diff --git a/src/google/events/cloud/audit/v1/Data.java b/src/google/events/cloud/audit/v1/Data.java index 59830578..6efa710a 100644 --- a/src/google/events/cloud/audit/v1/Data.java +++ b/src/google/events/cloud/audit/v1/Data.java @@ -96,6 +96,78 @@ public interface AuditLogDataOrBuilder extends com.google.protobuf.ByteString getResourceNameBytes(); + /** + *
+ * The resource location information. + *+ * + *
.google.events.cloud.audit.v1.ResourceLocation resource_location = 20;
+ * @return Whether the resourceLocation field is set.
+ */
+ boolean hasResourceLocation();
+ /**
+ * + * The resource location information. + *+ * + *
.google.events.cloud.audit.v1.ResourceLocation resource_location = 20;
+ * @return The resourceLocation.
+ */
+ google.events.cloud.audit.v1.Data.ResourceLocation getResourceLocation();
+ /**
+ * + * The resource location information. + *+ * + *
.google.events.cloud.audit.v1.ResourceLocation resource_location = 20;
+ */
+ google.events.cloud.audit.v1.Data.ResourceLocationOrBuilder getResourceLocationOrBuilder();
+
+ /**
+ * + * The resource's original state before mutation. Present only for + * operations which have successfully modified the targeted resource(s). + * In general, this field should contain all changed fields, except those + * that are already been included in `request`, `response`, `metadata` or + * `service_data` fields. + * When the JSON object represented here has a proto equivalent, + * the proto name will be indicated in the `@type` property. + *+ * + *
.google.protobuf.Struct resource_original_state = 19;
+ * @return Whether the resourceOriginalState field is set.
+ */
+ boolean hasResourceOriginalState();
+ /**
+ * + * The resource's original state before mutation. Present only for + * operations which have successfully modified the targeted resource(s). + * In general, this field should contain all changed fields, except those + * that are already been included in `request`, `response`, `metadata` or + * `service_data` fields. + * When the JSON object represented here has a proto equivalent, + * the proto name will be indicated in the `@type` property. + *+ * + *
.google.protobuf.Struct resource_original_state = 19;
+ * @return The resourceOriginalState.
+ */
+ com.google.protobuf.Struct getResourceOriginalState();
+ /**
+ * + * The resource's original state before mutation. Present only for + * operations which have successfully modified the targeted resource(s). + * In general, this field should contain all changed fields, except those + * that are already been included in `request`, `response`, `metadata` or + * `service_data` fields. + * When the JSON object represented here has a proto equivalent, + * the proto name will be indicated in the `@type` property. + *+ * + *
.google.protobuf.Struct resource_original_state = 19;
+ */
+ com.google.protobuf.StructOrBuilder getResourceOriginalStateOrBuilder();
+
/**
* * The number of items returned from a List or Query API method, @@ -329,6 +401,37 @@ google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder getAuthorizationInf /** ** Other service-specific data about the request, response, and other + * information associated with the current audited event. + *+ * + *.google.protobuf.Struct metadata = 18;
+ * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *+ * Other service-specific data about the request, response, and other + * information associated with the current audited event. + *+ * + *.google.protobuf.Struct metadata = 18;
+ * @return The metadata. + */ + com.google.protobuf.Struct getMetadata(); + /** + *+ * Other service-specific data about the request, response, and other + * information associated with the current audited event. + *+ * + *.google.protobuf.Struct metadata = 18;
+ */ + com.google.protobuf.StructOrBuilder getMetadataOrBuilder(); + + /** + *+ * Deprecated, use `metadata` field instead. + * Other service-specific data about the request, response, and other * activities. * When the JSON object represented here has a proto equivalent, the proto * name will be indicated in the `@type` property. @@ -340,6 +443,7 @@ google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder getAuthorizationInf boolean hasServiceData(); /** *+ * Deprecated, use `metadata` field instead. * Other service-specific data about the request, response, and other * activities. * When the JSON object represented here has a proto equivalent, the proto @@ -352,6 +456,7 @@ google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder getAuthorizationInf com.google.protobuf.Struct getServiceData(); /** *+ * Deprecated, use `metadata` field instead. * Other service-specific data about the request, response, and other * activities. * When the JSON object represented here has a proto equivalent, the proto @@ -529,6 +634,45 @@ private AuditLogData( break; } + case 146: { + com.google.protobuf.Struct.Builder subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = subBuilder.buildPartial(); + } + + break; + } + case 154: { + com.google.protobuf.Struct.Builder subBuilder = null; + if (resourceOriginalState_ != null) { + subBuilder = resourceOriginalState_.toBuilder(); + } + resourceOriginalState_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resourceOriginalState_); + resourceOriginalState_ = subBuilder.buildPartial(); + } + + break; + } + case 162: { + google.events.cloud.audit.v1.Data.ResourceLocation.Builder subBuilder = null; + if (resourceLocation_ != null) { + subBuilder = resourceLocation_.toBuilder(); + } + resourceLocation_ = input.readMessage(google.events.cloud.audit.v1.Data.ResourceLocation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resourceLocation_); + resourceLocation_ = subBuilder.buildPartial(); + } + + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -720,6 +864,100 @@ public java.lang.String getResourceName() { } } + public static final int RESOURCE_LOCATION_FIELD_NUMBER = 20; + private google.events.cloud.audit.v1.Data.ResourceLocation resourceLocation_; + /** + *+ * The resource location information. + *+ * + *.google.events.cloud.audit.v1.ResourceLocation resource_location = 20;
+ * @return Whether the resourceLocation field is set. + */ + @java.lang.Override + public boolean hasResourceLocation() { + return resourceLocation_ != null; + } + /** + *+ * The resource location information. + *+ * + *.google.events.cloud.audit.v1.ResourceLocation resource_location = 20;
+ * @return The resourceLocation. + */ + @java.lang.Override + public google.events.cloud.audit.v1.Data.ResourceLocation getResourceLocation() { + return resourceLocation_ == null ? google.events.cloud.audit.v1.Data.ResourceLocation.getDefaultInstance() : resourceLocation_; + } + /** + *+ * The resource location information. + *+ * + *.google.events.cloud.audit.v1.ResourceLocation resource_location = 20;
+ */ + @java.lang.Override + public google.events.cloud.audit.v1.Data.ResourceLocationOrBuilder getResourceLocationOrBuilder() { + return getResourceLocation(); + } + + public static final int RESOURCE_ORIGINAL_STATE_FIELD_NUMBER = 19; + private com.google.protobuf.Struct resourceOriginalState_; + /** + *+ * The resource's original state before mutation. Present only for + * operations which have successfully modified the targeted resource(s). + * In general, this field should contain all changed fields, except those + * that are already been included in `request`, `response`, `metadata` or + * `service_data` fields. + * When the JSON object represented here has a proto equivalent, + * the proto name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct resource_original_state = 19;
+ * @return Whether the resourceOriginalState field is set. + */ + @java.lang.Override + public boolean hasResourceOriginalState() { + return resourceOriginalState_ != null; + } + /** + *+ * The resource's original state before mutation. Present only for + * operations which have successfully modified the targeted resource(s). + * In general, this field should contain all changed fields, except those + * that are already been included in `request`, `response`, `metadata` or + * `service_data` fields. + * When the JSON object represented here has a proto equivalent, + * the proto name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct resource_original_state = 19;
+ * @return The resourceOriginalState. + */ + @java.lang.Override + public com.google.protobuf.Struct getResourceOriginalState() { + return resourceOriginalState_ == null ? com.google.protobuf.Struct.getDefaultInstance() : resourceOriginalState_; + } + /** + *+ * The resource's original state before mutation. Present only for + * operations which have successfully modified the targeted resource(s). + * In general, this field should contain all changed fields, except those + * that are already been included in `request`, `response`, `metadata` or + * `service_data` fields. + * When the JSON object represented here has a proto equivalent, + * the proto name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct resource_original_state = 19;
+ */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getResourceOriginalStateOrBuilder() { + return getResourceOriginalState(); + } + public static final int NUM_RESPONSE_ITEMS_FIELD_NUMBER = 12; private long numResponseItems_; /** @@ -1026,10 +1264,52 @@ public com.google.protobuf.StructOrBuilder getResponseOrBuilder() { return getResponse(); } + public static final int METADATA_FIELD_NUMBER = 18; + private com.google.protobuf.Struct metadata_; + /** + *+ * Other service-specific data about the request, response, and other + * information associated with the current audited event. + *+ * + *.google.protobuf.Struct metadata = 18;
+ * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + *+ * Other service-specific data about the request, response, and other + * information associated with the current audited event. + *+ * + *.google.protobuf.Struct metadata = 18;
+ * @return The metadata. + */ + @java.lang.Override + public com.google.protobuf.Struct getMetadata() { + return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } + /** + *+ * Other service-specific data about the request, response, and other + * information associated with the current audited event. + *+ * + *.google.protobuf.Struct metadata = 18;
+ */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { + return getMetadata(); + } + public static final int SERVICE_DATA_FIELD_NUMBER = 15; private com.google.protobuf.Struct serviceData_; /** *+ * Deprecated, use `metadata` field instead. * Other service-specific data about the request, response, and other * activities. * When the JSON object represented here has a proto equivalent, the proto @@ -1045,6 +1325,7 @@ public boolean hasServiceData() { } /** *+ * Deprecated, use `metadata` field instead. * Other service-specific data about the request, response, and other * activities. * When the JSON object represented here has a proto equivalent, the proto @@ -1060,6 +1341,7 @@ public com.google.protobuf.Struct getServiceData() { } /** *+ * Deprecated, use `metadata` field instead. * Other service-specific data about the request, response, and other * activities. * When the JSON object represented here has a proto equivalent, the proto @@ -1120,6 +1402,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (response_ != null) { output.writeMessage(17, getResponse()); } + if (metadata_ != null) { + output.writeMessage(18, getMetadata()); + } + if (resourceOriginalState_ != null) { + output.writeMessage(19, getResourceOriginalState()); + } + if (resourceLocation_ != null) { + output.writeMessage(20, getResourceLocation()); + } unknownFields.writeTo(output); } @@ -1170,6 +1461,18 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(17, getResponse()); } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, getMetadata()); + } + if (resourceOriginalState_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(19, getResourceOriginalState()); + } + if (resourceLocation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, getResourceLocation()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1191,6 +1494,16 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getMethodName())) return false; if (!getResourceName() .equals(other.getResourceName())) return false; + if (hasResourceLocation() != other.hasResourceLocation()) return false; + if (hasResourceLocation()) { + if (!getResourceLocation() + .equals(other.getResourceLocation())) return false; + } + if (hasResourceOriginalState() != other.hasResourceOriginalState()) return false; + if (hasResourceOriginalState()) { + if (!getResourceOriginalState() + .equals(other.getResourceOriginalState())) return false; + } if (getNumResponseItems() != other.getNumResponseItems()) return false; if (hasStatus() != other.hasStatus()) return false; @@ -1220,6 +1533,11 @@ public boolean equals(final java.lang.Object obj) { if (!getResponse() .equals(other.getResponse())) return false; } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } if (hasServiceData() != other.hasServiceData()) return false; if (hasServiceData()) { if (!getServiceData() @@ -1242,6 +1560,14 @@ public int hashCode() { hash = (53 * hash) + getMethodName().hashCode(); hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER; hash = (53 * hash) + getResourceName().hashCode(); + if (hasResourceLocation()) { + hash = (37 * hash) + RESOURCE_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getResourceLocation().hashCode(); + } + if (hasResourceOriginalState()) { + hash = (37 * hash) + RESOURCE_ORIGINAL_STATE_FIELD_NUMBER; + hash = (53 * hash) + getResourceOriginalState().hashCode(); + } hash = (37 * hash) + NUM_RESPONSE_ITEMS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getNumResponseItems()); @@ -1269,6 +1595,10 @@ public int hashCode() { hash = (37 * hash) + RESPONSE_FIELD_NUMBER; hash = (53 * hash) + getResponse().hashCode(); } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } if (hasServiceData()) { hash = (37 * hash) + SERVICE_DATA_FIELD_NUMBER; hash = (53 * hash) + getServiceData().hashCode(); @@ -1420,6 +1750,18 @@ public Builder clear() { resourceName_ = ""; + if (resourceLocationBuilder_ == null) { + resourceLocation_ = null; + } else { + resourceLocation_ = null; + resourceLocationBuilder_ = null; + } + if (resourceOriginalStateBuilder_ == null) { + resourceOriginalState_ = null; + } else { + resourceOriginalState_ = null; + resourceOriginalStateBuilder_ = null; + } numResponseItems_ = 0L; if (statusBuilder_ == null) { @@ -1458,6 +1800,12 @@ public Builder clear() { response_ = null; responseBuilder_ = null; } + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } if (serviceDataBuilder_ == null) { serviceData_ = null; } else { @@ -1494,6 +1842,16 @@ public google.events.cloud.audit.v1.Data.AuditLogData buildPartial() { result.serviceName_ = serviceName_; result.methodName_ = methodName_; result.resourceName_ = resourceName_; + if (resourceLocationBuilder_ == null) { + result.resourceLocation_ = resourceLocation_; + } else { + result.resourceLocation_ = resourceLocationBuilder_.build(); + } + if (resourceOriginalStateBuilder_ == null) { + result.resourceOriginalState_ = resourceOriginalState_; + } else { + result.resourceOriginalState_ = resourceOriginalStateBuilder_.build(); + } result.numResponseItems_ = numResponseItems_; if (statusBuilder_ == null) { result.status_ = status_; @@ -1529,6 +1887,11 @@ public google.events.cloud.audit.v1.Data.AuditLogData buildPartial() { } else { result.response_ = responseBuilder_.build(); } + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } if (serviceDataBuilder_ == null) { result.serviceData_ = serviceData_; } else { @@ -1594,6 +1957,12 @@ public Builder mergeFrom(google.events.cloud.audit.v1.Data.AuditLogData other) { resourceName_ = other.resourceName_; onChanged(); } + if (other.hasResourceLocation()) { + mergeResourceLocation(other.getResourceLocation()); + } + if (other.hasResourceOriginalState()) { + mergeResourceOriginalState(other.getResourceOriginalState()); + } if (other.getNumResponseItems() != 0L) { setNumResponseItems(other.getNumResponseItems()); } @@ -1638,6 +2007,9 @@ public Builder mergeFrom(google.events.cloud.audit.v1.Data.AuditLogData other) { if (other.hasResponse()) { mergeResponse(other.getResponse()); } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } if (other.hasServiceData()) { mergeServiceData(other.getServiceData()); } @@ -2004,1445 +2376,7200 @@ public Builder setResourceNameBytes( return this; } - private long numResponseItems_ ; - /** - *- * The number of items returned from a List or Query API method, - * if applicable. - *- * - *int64 num_response_items = 12;
- * @return The numResponseItems. - */ - @java.lang.Override - public long getNumResponseItems() { - return numResponseItems_; - } - /** - *- * The number of items returned from a List or Query API method, - * if applicable. - *- * - *int64 num_response_items = 12;
- * @param value The numResponseItems to set. - * @return This builder for chaining. - */ - public Builder setNumResponseItems(long value) { - - numResponseItems_ = value; - onChanged(); - return this; - } - /** - *- * The number of items returned from a List or Query API method, - * if applicable. - *- * - *int64 num_response_items = 12;
- * @return This builder for chaining. - */ - public Builder clearNumResponseItems() { - - numResponseItems_ = 0L; - onChanged(); - return this; - } - - private com.google.rpc.Status status_; + private google.events.cloud.audit.v1.Data.ResourceLocation resourceLocation_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusBuilder_; + google.events.cloud.audit.v1.Data.ResourceLocation, google.events.cloud.audit.v1.Data.ResourceLocation.Builder, google.events.cloud.audit.v1.Data.ResourceLocationOrBuilder> resourceLocationBuilder_; /** *- * The status of the overall operation. + * The resource location information. ** - *.google.rpc.Status status = 2;
- * @return Whether the status field is set. + *.google.events.cloud.audit.v1.ResourceLocation resource_location = 20;
+ * @return Whether the resourceLocation field is set. */ - public boolean hasStatus() { - return statusBuilder_ != null || status_ != null; + public boolean hasResourceLocation() { + return resourceLocationBuilder_ != null || resourceLocation_ != null; } /** *- * The status of the overall operation. + * The resource location information. ** - *.google.rpc.Status status = 2;
- * @return The status. + *.google.events.cloud.audit.v1.ResourceLocation resource_location = 20;
+ * @return The resourceLocation. */ - public com.google.rpc.Status getStatus() { - if (statusBuilder_ == null) { - return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + public google.events.cloud.audit.v1.Data.ResourceLocation getResourceLocation() { + if (resourceLocationBuilder_ == null) { + return resourceLocation_ == null ? google.events.cloud.audit.v1.Data.ResourceLocation.getDefaultInstance() : resourceLocation_; } else { - return statusBuilder_.getMessage(); + return resourceLocationBuilder_.getMessage(); } } /** *- * The status of the overall operation. + * The resource location information. ** - *.google.rpc.Status status = 2;
+ *.google.events.cloud.audit.v1.ResourceLocation resource_location = 20;
*/ - public Builder setStatus(com.google.rpc.Status value) { - if (statusBuilder_ == null) { + public Builder setResourceLocation(google.events.cloud.audit.v1.Data.ResourceLocation value) { + if (resourceLocationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - status_ = value; + resourceLocation_ = value; onChanged(); } else { - statusBuilder_.setMessage(value); + resourceLocationBuilder_.setMessage(value); } return this; } /** *- * The status of the overall operation. + * The resource location information. ** - *.google.rpc.Status status = 2;
+ *.google.events.cloud.audit.v1.ResourceLocation resource_location = 20;
*/ - public Builder setStatus( - com.google.rpc.Status.Builder builderForValue) { - if (statusBuilder_ == null) { - status_ = builderForValue.build(); + public Builder setResourceLocation( + google.events.cloud.audit.v1.Data.ResourceLocation.Builder builderForValue) { + if (resourceLocationBuilder_ == null) { + resourceLocation_ = builderForValue.build(); onChanged(); } else { - statusBuilder_.setMessage(builderForValue.build()); + resourceLocationBuilder_.setMessage(builderForValue.build()); } return this; } /** *- * The status of the overall operation. + * The resource location information. ** - *.google.rpc.Status status = 2;
+ *.google.events.cloud.audit.v1.ResourceLocation resource_location = 20;
*/ - public Builder mergeStatus(com.google.rpc.Status value) { - if (statusBuilder_ == null) { - if (status_ != null) { - status_ = - com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial(); + public Builder mergeResourceLocation(google.events.cloud.audit.v1.Data.ResourceLocation value) { + if (resourceLocationBuilder_ == null) { + if (resourceLocation_ != null) { + resourceLocation_ = + google.events.cloud.audit.v1.Data.ResourceLocation.newBuilder(resourceLocation_).mergeFrom(value).buildPartial(); } else { - status_ = value; + resourceLocation_ = value; } onChanged(); } else { - statusBuilder_.mergeFrom(value); + resourceLocationBuilder_.mergeFrom(value); } return this; } /** *- * The status of the overall operation. + * The resource location information. ** - *.google.rpc.Status status = 2;
+ *.google.events.cloud.audit.v1.ResourceLocation resource_location = 20;
*/ - public Builder clearStatus() { - if (statusBuilder_ == null) { - status_ = null; + public Builder clearResourceLocation() { + if (resourceLocationBuilder_ == null) { + resourceLocation_ = null; onChanged(); } else { - status_ = null; - statusBuilder_ = null; + resourceLocation_ = null; + resourceLocationBuilder_ = null; } return this; } /** *- * The status of the overall operation. + * The resource location information. ** - *.google.rpc.Status status = 2;
+ *.google.events.cloud.audit.v1.ResourceLocation resource_location = 20;
*/ - public com.google.rpc.Status.Builder getStatusBuilder() { + public google.events.cloud.audit.v1.Data.ResourceLocation.Builder getResourceLocationBuilder() { onChanged(); - return getStatusFieldBuilder().getBuilder(); + return getResourceLocationFieldBuilder().getBuilder(); } /** *- * The status of the overall operation. + * The resource location information. ** - *.google.rpc.Status status = 2;
+ *.google.events.cloud.audit.v1.ResourceLocation resource_location = 20;
*/ - public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { - if (statusBuilder_ != null) { - return statusBuilder_.getMessageOrBuilder(); + public google.events.cloud.audit.v1.Data.ResourceLocationOrBuilder getResourceLocationOrBuilder() { + if (resourceLocationBuilder_ != null) { + return resourceLocationBuilder_.getMessageOrBuilder(); } else { - return status_ == null ? - com.google.rpc.Status.getDefaultInstance() : status_; + return resourceLocation_ == null ? + google.events.cloud.audit.v1.Data.ResourceLocation.getDefaultInstance() : resourceLocation_; } } /** *- * The status of the overall operation. + * The resource location information. ** - *.google.rpc.Status status = 2;
+ *.google.events.cloud.audit.v1.ResourceLocation resource_location = 20;
*/ private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getStatusFieldBuilder() { - if (statusBuilder_ == null) { - statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - getStatus(), + google.events.cloud.audit.v1.Data.ResourceLocation, google.events.cloud.audit.v1.Data.ResourceLocation.Builder, google.events.cloud.audit.v1.Data.ResourceLocationOrBuilder> + getResourceLocationFieldBuilder() { + if (resourceLocationBuilder_ == null) { + resourceLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.audit.v1.Data.ResourceLocation, google.events.cloud.audit.v1.Data.ResourceLocation.Builder, google.events.cloud.audit.v1.Data.ResourceLocationOrBuilder>( + getResourceLocation(), getParentForChildren(), isClean()); - status_ = null; + resourceLocation_ = null; } - return statusBuilder_; + return resourceLocationBuilder_; } - private google.events.cloud.audit.v1.Data.AuthenticationInfo authenticationInfo_; + private com.google.protobuf.Struct resourceOriginalState_; private com.google.protobuf.SingleFieldBuilderV3< - google.events.cloud.audit.v1.Data.AuthenticationInfo, google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder, google.events.cloud.audit.v1.Data.AuthenticationInfoOrBuilder> authenticationInfoBuilder_; + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> resourceOriginalStateBuilder_; /** *- * Authentication information. + * The resource's original state before mutation. Present only for + * operations which have successfully modified the targeted resource(s). + * In general, this field should contain all changed fields, except those + * that are already been included in `request`, `response`, `metadata` or + * `service_data` fields. + * When the JSON object represented here has a proto equivalent, + * the proto name will be indicated in the `@type` property. ** - *.google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3;
- * @return Whether the authenticationInfo field is set. + *.google.protobuf.Struct resource_original_state = 19;
+ * @return Whether the resourceOriginalState field is set. */ - public boolean hasAuthenticationInfo() { - return authenticationInfoBuilder_ != null || authenticationInfo_ != null; + public boolean hasResourceOriginalState() { + return resourceOriginalStateBuilder_ != null || resourceOriginalState_ != null; } /** *- * Authentication information. + * The resource's original state before mutation. Present only for + * operations which have successfully modified the targeted resource(s). + * In general, this field should contain all changed fields, except those + * that are already been included in `request`, `response`, `metadata` or + * `service_data` fields. + * When the JSON object represented here has a proto equivalent, + * the proto name will be indicated in the `@type` property. ** - *.google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3;
- * @return The authenticationInfo. + *.google.protobuf.Struct resource_original_state = 19;
+ * @return The resourceOriginalState. */ - public google.events.cloud.audit.v1.Data.AuthenticationInfo getAuthenticationInfo() { - if (authenticationInfoBuilder_ == null) { - return authenticationInfo_ == null ? google.events.cloud.audit.v1.Data.AuthenticationInfo.getDefaultInstance() : authenticationInfo_; + public com.google.protobuf.Struct getResourceOriginalState() { + if (resourceOriginalStateBuilder_ == null) { + return resourceOriginalState_ == null ? com.google.protobuf.Struct.getDefaultInstance() : resourceOriginalState_; } else { - return authenticationInfoBuilder_.getMessage(); + return resourceOriginalStateBuilder_.getMessage(); } } /** *- * Authentication information. + * The resource's original state before mutation. Present only for + * operations which have successfully modified the targeted resource(s). + * In general, this field should contain all changed fields, except those + * that are already been included in `request`, `response`, `metadata` or + * `service_data` fields. + * When the JSON object represented here has a proto equivalent, + * the proto name will be indicated in the `@type` property. ** - *.google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3;
+ *.google.protobuf.Struct resource_original_state = 19;
*/ - public Builder setAuthenticationInfo(google.events.cloud.audit.v1.Data.AuthenticationInfo value) { - if (authenticationInfoBuilder_ == null) { + public Builder setResourceOriginalState(com.google.protobuf.Struct value) { + if (resourceOriginalStateBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - authenticationInfo_ = value; + resourceOriginalState_ = value; onChanged(); } else { - authenticationInfoBuilder_.setMessage(value); + resourceOriginalStateBuilder_.setMessage(value); } return this; } /** *- * Authentication information. + * The resource's original state before mutation. Present only for + * operations which have successfully modified the targeted resource(s). + * In general, this field should contain all changed fields, except those + * that are already been included in `request`, `response`, `metadata` or + * `service_data` fields. + * When the JSON object represented here has a proto equivalent, + * the proto name will be indicated in the `@type` property. ** - *.google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3;
+ *.google.protobuf.Struct resource_original_state = 19;
*/ - public Builder setAuthenticationInfo( - google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder builderForValue) { - if (authenticationInfoBuilder_ == null) { - authenticationInfo_ = builderForValue.build(); + public Builder setResourceOriginalState( + com.google.protobuf.Struct.Builder builderForValue) { + if (resourceOriginalStateBuilder_ == null) { + resourceOriginalState_ = builderForValue.build(); onChanged(); } else { - authenticationInfoBuilder_.setMessage(builderForValue.build()); + resourceOriginalStateBuilder_.setMessage(builderForValue.build()); } return this; } /** *- * Authentication information. + * The resource's original state before mutation. Present only for + * operations which have successfully modified the targeted resource(s). + * In general, this field should contain all changed fields, except those + * that are already been included in `request`, `response`, `metadata` or + * `service_data` fields. + * When the JSON object represented here has a proto equivalent, + * the proto name will be indicated in the `@type` property. ** - *.google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3;
+ *.google.protobuf.Struct resource_original_state = 19;
*/ - public Builder mergeAuthenticationInfo(google.events.cloud.audit.v1.Data.AuthenticationInfo value) { - if (authenticationInfoBuilder_ == null) { - if (authenticationInfo_ != null) { - authenticationInfo_ = - google.events.cloud.audit.v1.Data.AuthenticationInfo.newBuilder(authenticationInfo_).mergeFrom(value).buildPartial(); + public Builder mergeResourceOriginalState(com.google.protobuf.Struct value) { + if (resourceOriginalStateBuilder_ == null) { + if (resourceOriginalState_ != null) { + resourceOriginalState_ = + com.google.protobuf.Struct.newBuilder(resourceOriginalState_).mergeFrom(value).buildPartial(); } else { - authenticationInfo_ = value; + resourceOriginalState_ = value; } onChanged(); } else { - authenticationInfoBuilder_.mergeFrom(value); + resourceOriginalStateBuilder_.mergeFrom(value); } return this; } /** *- * Authentication information. + * The resource's original state before mutation. Present only for + * operations which have successfully modified the targeted resource(s). + * In general, this field should contain all changed fields, except those + * that are already been included in `request`, `response`, `metadata` or + * `service_data` fields. + * When the JSON object represented here has a proto equivalent, + * the proto name will be indicated in the `@type` property. ** - *.google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3;
+ *.google.protobuf.Struct resource_original_state = 19;
*/ - public Builder clearAuthenticationInfo() { - if (authenticationInfoBuilder_ == null) { - authenticationInfo_ = null; + public Builder clearResourceOriginalState() { + if (resourceOriginalStateBuilder_ == null) { + resourceOriginalState_ = null; onChanged(); } else { - authenticationInfo_ = null; - authenticationInfoBuilder_ = null; + resourceOriginalState_ = null; + resourceOriginalStateBuilder_ = null; } return this; } /** *- * Authentication information. + * The resource's original state before mutation. Present only for + * operations which have successfully modified the targeted resource(s). + * In general, this field should contain all changed fields, except those + * that are already been included in `request`, `response`, `metadata` or + * `service_data` fields. + * When the JSON object represented here has a proto equivalent, + * the proto name will be indicated in the `@type` property. ** - *.google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3;
+ *.google.protobuf.Struct resource_original_state = 19;
*/ - public google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder getAuthenticationInfoBuilder() { + public com.google.protobuf.Struct.Builder getResourceOriginalStateBuilder() { onChanged(); - return getAuthenticationInfoFieldBuilder().getBuilder(); + return getResourceOriginalStateFieldBuilder().getBuilder(); } /** *- * Authentication information. + * The resource's original state before mutation. Present only for + * operations which have successfully modified the targeted resource(s). + * In general, this field should contain all changed fields, except those + * that are already been included in `request`, `response`, `metadata` or + * `service_data` fields. + * When the JSON object represented here has a proto equivalent, + * the proto name will be indicated in the `@type` property. ** - *.google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3;
+ *.google.protobuf.Struct resource_original_state = 19;
*/ - public google.events.cloud.audit.v1.Data.AuthenticationInfoOrBuilder getAuthenticationInfoOrBuilder() { - if (authenticationInfoBuilder_ != null) { - return authenticationInfoBuilder_.getMessageOrBuilder(); + public com.google.protobuf.StructOrBuilder getResourceOriginalStateOrBuilder() { + if (resourceOriginalStateBuilder_ != null) { + return resourceOriginalStateBuilder_.getMessageOrBuilder(); } else { - return authenticationInfo_ == null ? - google.events.cloud.audit.v1.Data.AuthenticationInfo.getDefaultInstance() : authenticationInfo_; + return resourceOriginalState_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : resourceOriginalState_; } } /** *- * Authentication information. + * The resource's original state before mutation. Present only for + * operations which have successfully modified the targeted resource(s). + * In general, this field should contain all changed fields, except those + * that are already been included in `request`, `response`, `metadata` or + * `service_data` fields. + * When the JSON object represented here has a proto equivalent, + * the proto name will be indicated in the `@type` property. ** - *.google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3;
+ *.google.protobuf.Struct resource_original_state = 19;
*/ private com.google.protobuf.SingleFieldBuilderV3< - google.events.cloud.audit.v1.Data.AuthenticationInfo, google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder, google.events.cloud.audit.v1.Data.AuthenticationInfoOrBuilder> - getAuthenticationInfoFieldBuilder() { - if (authenticationInfoBuilder_ == null) { - authenticationInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - google.events.cloud.audit.v1.Data.AuthenticationInfo, google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder, google.events.cloud.audit.v1.Data.AuthenticationInfoOrBuilder>( - getAuthenticationInfo(), + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getResourceOriginalStateFieldBuilder() { + if (resourceOriginalStateBuilder_ == null) { + resourceOriginalStateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getResourceOriginalState(), getParentForChildren(), isClean()); - authenticationInfo_ = null; + resourceOriginalState_ = null; } - return authenticationInfoBuilder_; - } - - private java.util.ListauthorizationInfo_ = - java.util.Collections.emptyList(); - private void ensureAuthorizationInfoIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - authorizationInfo_ = new java.util.ArrayList (authorizationInfo_); - bitField0_ |= 0x00000001; - } + return resourceOriginalStateBuilder_; } - private com.google.protobuf.RepeatedFieldBuilderV3< - google.events.cloud.audit.v1.Data.AuthorizationInfo, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder, google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder> authorizationInfoBuilder_; - + private long numResponseItems_ ; /** * - * Authorization information. If there are multiple - * resources or permissions involved, then there is - * one AuthorizationInfo element for each {resource, permission} tuple. + * The number of items returned from a List or Query API method, + * if applicable. ** - *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ *int64 num_response_items = 12;
+ * @return The numResponseItems. */ - public java.util.ListgetAuthorizationInfoList() { - if (authorizationInfoBuilder_ == null) { - return java.util.Collections.unmodifiableList(authorizationInfo_); - } else { - return authorizationInfoBuilder_.getMessageList(); - } + @java.lang.Override + public long getNumResponseItems() { + return numResponseItems_; } /** * - * Authorization information. If there are multiple - * resources or permissions involved, then there is - * one AuthorizationInfo element for each {resource, permission} tuple. + * The number of items returned from a List or Query API method, + * if applicable. ** - *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ *int64 num_response_items = 12;
+ * @param value The numResponseItems to set. + * @return This builder for chaining. */ - public int getAuthorizationInfoCount() { - if (authorizationInfoBuilder_ == null) { - return authorizationInfo_.size(); - } else { - return authorizationInfoBuilder_.getCount(); - } + public Builder setNumResponseItems(long value) { + + numResponseItems_ = value; + onChanged(); + return this; } /** *- * Authorization information. If there are multiple - * resources or permissions involved, then there is - * one AuthorizationInfo element for each {resource, permission} tuple. + * The number of items returned from a List or Query API method, + * if applicable. ** - *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ *int64 num_response_items = 12;
+ * @return This builder for chaining. */ - public google.events.cloud.audit.v1.Data.AuthorizationInfo getAuthorizationInfo(int index) { - if (authorizationInfoBuilder_ == null) { - return authorizationInfo_.get(index); - } else { - return authorizationInfoBuilder_.getMessage(index); - } + public Builder clearNumResponseItems() { + + numResponseItems_ = 0L; + onChanged(); + return this; } + + private com.google.rpc.Status status_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusBuilder_; /** *- * Authorization information. If there are multiple - * resources or permissions involved, then there is - * one AuthorizationInfo element for each {resource, permission} tuple. + * The status of the overall operation. ** - *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ *.google.rpc.Status status = 2;
+ * @return Whether the status field is set. */ - public Builder setAuthorizationInfo( - int index, google.events.cloud.audit.v1.Data.AuthorizationInfo value) { - if (authorizationInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAuthorizationInfoIsMutable(); - authorizationInfo_.set(index, value); - onChanged(); - } else { - authorizationInfoBuilder_.setMessage(index, value); - } - return this; + public boolean hasStatus() { + return statusBuilder_ != null || status_ != null; } /** *- * Authorization information. If there are multiple - * resources or permissions involved, then there is - * one AuthorizationInfo element for each {resource, permission} tuple. + * The status of the overall operation. ** - *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ *.google.rpc.Status status = 2;
+ * @return The status. */ - public Builder setAuthorizationInfo( - int index, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder builderForValue) { - if (authorizationInfoBuilder_ == null) { - ensureAuthorizationInfoIsMutable(); - authorizationInfo_.set(index, builderForValue.build()); - onChanged(); + public com.google.rpc.Status getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; } else { - authorizationInfoBuilder_.setMessage(index, builderForValue.build()); + return statusBuilder_.getMessage(); } - return this; } /** *- * Authorization information. If there are multiple - * resources or permissions involved, then there is - * one AuthorizationInfo element for each {resource, permission} tuple. + * The status of the overall operation. ** - *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ *.google.rpc.Status status = 2;
*/ - public Builder addAuthorizationInfo(google.events.cloud.audit.v1.Data.AuthorizationInfo value) { - if (authorizationInfoBuilder_ == null) { + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureAuthorizationInfoIsMutable(); - authorizationInfo_.add(value); + status_ = value; onChanged(); } else { - authorizationInfoBuilder_.addMessage(value); + statusBuilder_.setMessage(value); } + return this; } /** *- * Authorization information. If there are multiple - * resources or permissions involved, then there is - * one AuthorizationInfo element for each {resource, permission} tuple. + * The status of the overall operation. ** - *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ *.google.rpc.Status status = 2;
*/ - public Builder addAuthorizationInfo( - int index, google.events.cloud.audit.v1.Data.AuthorizationInfo value) { - if (authorizationInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAuthorizationInfoIsMutable(); - authorizationInfo_.add(index, value); + public Builder setStatus( + com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); onChanged(); } else { - authorizationInfoBuilder_.addMessage(index, value); + statusBuilder_.setMessage(builderForValue.build()); } + return this; } /** *- * Authorization information. If there are multiple - * resources or permissions involved, then there is - * one AuthorizationInfo element for each {resource, permission} tuple. + * The status of the overall operation. ** - *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ *.google.rpc.Status status = 2;
*/ - public Builder addAuthorizationInfo( - google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder builderForValue) { - if (authorizationInfoBuilder_ == null) { - ensureAuthorizationInfoIsMutable(); - authorizationInfo_.add(builderForValue.build()); - onChanged(); - } else { - authorizationInfoBuilder_.addMessage(builderForValue.build()); + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (status_ != null) { + status_ = + com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial(); + } else { + status_ = value; + } + onChanged(); + } else { + statusBuilder_.mergeFrom(value); } + return this; } /** *- * Authorization information. If there are multiple - * resources or permissions involved, then there is - * one AuthorizationInfo element for each {resource, permission} tuple. + * The status of the overall operation. ** - *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ *.google.rpc.Status status = 2;
*/ - public Builder addAuthorizationInfo( - int index, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder builderForValue) { - if (authorizationInfoBuilder_ == null) { - ensureAuthorizationInfoIsMutable(); - authorizationInfo_.add(index, builderForValue.build()); + public Builder clearStatus() { + if (statusBuilder_ == null) { + status_ = null; onChanged(); } else { - authorizationInfoBuilder_.addMessage(index, builderForValue.build()); + status_ = null; + statusBuilder_ = null; } + return this; } /** *- * Authorization information. If there are multiple - * resources or permissions involved, then there is - * one AuthorizationInfo element for each {resource, permission} tuple. + * The status of the overall operation. ** - *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ *.google.rpc.Status status = 2;
*/ - public Builder addAllAuthorizationInfo( - java.lang.Iterable extends google.events.cloud.audit.v1.Data.AuthorizationInfo> values) { - if (authorizationInfoBuilder_ == null) { - ensureAuthorizationInfoIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, authorizationInfo_); - onChanged(); - } else { - authorizationInfoBuilder_.addAllMessages(values); - } - return this; + public com.google.rpc.Status.Builder getStatusBuilder() { + + onChanged(); + return getStatusFieldBuilder().getBuilder(); } /** *- * Authorization information. If there are multiple - * resources or permissions involved, then there is - * one AuthorizationInfo element for each {resource, permission} tuple. + * The status of the overall operation. ** - *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ *.google.rpc.Status status = 2;
*/ - public Builder clearAuthorizationInfo() { - if (authorizationInfoBuilder_ == null) { - authorizationInfo_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); } else { - authorizationInfoBuilder_.clear(); + return status_ == null ? + com.google.rpc.Status.getDefaultInstance() : status_; } - return this; } /** *- * Authorization information. If there are multiple - * resources or permissions involved, then there is - * one AuthorizationInfo element for each {resource, permission} tuple. + * The status of the overall operation. ** - *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ *.google.rpc.Status status = 2;
*/ - public Builder removeAuthorizationInfo(int index) { - if (authorizationInfoBuilder_ == null) { - ensureAuthorizationInfoIsMutable(); - authorizationInfo_.remove(index); - onChanged(); - } else { - authorizationInfoBuilder_.remove(index); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getStatus(), + getParentForChildren(), + isClean()); + status_ = null; } - return this; + return statusBuilder_; } + + private google.events.cloud.audit.v1.Data.AuthenticationInfo authenticationInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.audit.v1.Data.AuthenticationInfo, google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder, google.events.cloud.audit.v1.Data.AuthenticationInfoOrBuilder> authenticationInfoBuilder_; /** *- * Authorization information. If there are multiple - * resources or permissions involved, then there is - * one AuthorizationInfo element for each {resource, permission} tuple. + * Authentication information. ** - *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ *.google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3;
+ * @return Whether the authenticationInfo field is set. */ - public google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder getAuthorizationInfoBuilder( - int index) { - return getAuthorizationInfoFieldBuilder().getBuilder(index); + public boolean hasAuthenticationInfo() { + return authenticationInfoBuilder_ != null || authenticationInfo_ != null; } /** *- * Authorization information. If there are multiple - * resources or permissions involved, then there is - * one AuthorizationInfo element for each {resource, permission} tuple. + * Authentication information. ** - *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ *.google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3;
+ * @return The authenticationInfo. */ - public google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder getAuthorizationInfoOrBuilder( - int index) { - if (authorizationInfoBuilder_ == null) { - return authorizationInfo_.get(index); } else { - return authorizationInfoBuilder_.getMessageOrBuilder(index); + public google.events.cloud.audit.v1.Data.AuthenticationInfo getAuthenticationInfo() { + if (authenticationInfoBuilder_ == null) { + return authenticationInfo_ == null ? google.events.cloud.audit.v1.Data.AuthenticationInfo.getDefaultInstance() : authenticationInfo_; + } else { + return authenticationInfoBuilder_.getMessage(); } } /** *- * Authorization information. If there are multiple - * resources or permissions involved, then there is - * one AuthorizationInfo element for each {resource, permission} tuple. + * Authentication information. ** - *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ *.google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3;
*/ - public java.util.List extends google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder> - getAuthorizationInfoOrBuilderList() { - if (authorizationInfoBuilder_ != null) { - return authorizationInfoBuilder_.getMessageOrBuilderList(); + public Builder setAuthenticationInfo(google.events.cloud.audit.v1.Data.AuthenticationInfo value) { + if (authenticationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authenticationInfo_ = value; + onChanged(); } else { - return java.util.Collections.unmodifiableList(authorizationInfo_); + authenticationInfoBuilder_.setMessage(value); } + + return this; } /** *- * Authorization information. If there are multiple - * resources or permissions involved, then there is - * one AuthorizationInfo element for each {resource, permission} tuple. + * Authentication information. ** - *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ *.google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3;
*/ - public google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder addAuthorizationInfoBuilder() { - return getAuthorizationInfoFieldBuilder().addBuilder( - google.events.cloud.audit.v1.Data.AuthorizationInfo.getDefaultInstance()); + public Builder setAuthenticationInfo( + google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder builderForValue) { + if (authenticationInfoBuilder_ == null) { + authenticationInfo_ = builderForValue.build(); + onChanged(); + } else { + authenticationInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; } /** *- * Authorization information. If there are multiple - * resources or permissions involved, then there is - * one AuthorizationInfo element for each {resource, permission} tuple. + * Authentication information. ** - *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ *.google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3;
*/ - public google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder addAuthorizationInfoBuilder( - int index) { - return getAuthorizationInfoFieldBuilder().addBuilder( - index, google.events.cloud.audit.v1.Data.AuthorizationInfo.getDefaultInstance()); + public Builder mergeAuthenticationInfo(google.events.cloud.audit.v1.Data.AuthenticationInfo value) { + if (authenticationInfoBuilder_ == null) { + if (authenticationInfo_ != null) { + authenticationInfo_ = + google.events.cloud.audit.v1.Data.AuthenticationInfo.newBuilder(authenticationInfo_).mergeFrom(value).buildPartial(); + } else { + authenticationInfo_ = value; + } + onChanged(); + } else { + authenticationInfoBuilder_.mergeFrom(value); + } + + return this; } /** *- * Authorization information. If there are multiple - * resources or permissions involved, then there is - * one AuthorizationInfo element for each {resource, permission} tuple. + * Authentication information. ** - *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ *.google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3;
*/ - public java.util.List- getAuthorizationInfoBuilderList() { - return getAuthorizationInfoFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - google.events.cloud.audit.v1.Data.AuthorizationInfo, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder, google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder> - getAuthorizationInfoFieldBuilder() { - if (authorizationInfoBuilder_ == null) { - authorizationInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - google.events.cloud.audit.v1.Data.AuthorizationInfo, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder, google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder>( - authorizationInfo_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - authorizationInfo_ = null; + public Builder clearAuthenticationInfo() { + if (authenticationInfoBuilder_ == null) { + authenticationInfo_ = null; + onChanged(); + } else { + authenticationInfo_ = null; + authenticationInfoBuilder_ = null; } - return authorizationInfoBuilder_; - } - private google.events.cloud.audit.v1.Data.RequestMetadata requestMetadata_; - private com.google.protobuf.SingleFieldBuilderV3< - google.events.cloud.audit.v1.Data.RequestMetadata, google.events.cloud.audit.v1.Data.RequestMetadata.Builder, google.events.cloud.audit.v1.Data.RequestMetadataOrBuilder> requestMetadataBuilder_; + return this; + } /** * - * Metadata about the operation. + * Authentication information. ** - *.google.events.cloud.audit.v1.RequestMetadata request_metadata = 4;
- * @return Whether the requestMetadata field is set. + *.google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3;
*/ - public boolean hasRequestMetadata() { - return requestMetadataBuilder_ != null || requestMetadata_ != null; + public google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder getAuthenticationInfoBuilder() { + + onChanged(); + return getAuthenticationInfoFieldBuilder().getBuilder(); } /** *- * Metadata about the operation. + * Authentication information. ** - *.google.events.cloud.audit.v1.RequestMetadata request_metadata = 4;
- * @return The requestMetadata. + *.google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3;
*/ - public google.events.cloud.audit.v1.Data.RequestMetadata getRequestMetadata() { - if (requestMetadataBuilder_ == null) { - return requestMetadata_ == null ? google.events.cloud.audit.v1.Data.RequestMetadata.getDefaultInstance() : requestMetadata_; + public google.events.cloud.audit.v1.Data.AuthenticationInfoOrBuilder getAuthenticationInfoOrBuilder() { + if (authenticationInfoBuilder_ != null) { + return authenticationInfoBuilder_.getMessageOrBuilder(); } else { - return requestMetadataBuilder_.getMessage(); + return authenticationInfo_ == null ? + google.events.cloud.audit.v1.Data.AuthenticationInfo.getDefaultInstance() : authenticationInfo_; } } /** *- * Metadata about the operation. + * Authentication information. ** - *.google.events.cloud.audit.v1.RequestMetadata request_metadata = 4;
+ *.google.events.cloud.audit.v1.AuthenticationInfo authentication_info = 3;
*/ - public Builder setRequestMetadata(google.events.cloud.audit.v1.Data.RequestMetadata value) { - if (requestMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - requestMetadata_ = value; - onChanged(); - } else { - requestMetadataBuilder_.setMessage(value); + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.audit.v1.Data.AuthenticationInfo, google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder, google.events.cloud.audit.v1.Data.AuthenticationInfoOrBuilder> + getAuthenticationInfoFieldBuilder() { + if (authenticationInfoBuilder_ == null) { + authenticationInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.audit.v1.Data.AuthenticationInfo, google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder, google.events.cloud.audit.v1.Data.AuthenticationInfoOrBuilder>( + getAuthenticationInfo(), + getParentForChildren(), + isClean()); + authenticationInfo_ = null; } + return authenticationInfoBuilder_; + } - return this; + private java.util.ListauthorizationInfo_ = + java.util.Collections.emptyList(); + private void ensureAuthorizationInfoIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + authorizationInfo_ = new java.util.ArrayList (authorizationInfo_); + bitField0_ |= 0x00000001; + } } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.events.cloud.audit.v1.Data.AuthorizationInfo, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder, google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder> authorizationInfoBuilder_; + /** * - * Metadata about the operation. + * Authorization information. If there are multiple + * resources or permissions involved, then there is + * one AuthorizationInfo element for each {resource, permission} tuple. ** - *.google.events.cloud.audit.v1.RequestMetadata request_metadata = 4;
+ *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
*/ - public Builder setRequestMetadata( - google.events.cloud.audit.v1.Data.RequestMetadata.Builder builderForValue) { - if (requestMetadataBuilder_ == null) { - requestMetadata_ = builderForValue.build(); - onChanged(); + public java.util.ListgetAuthorizationInfoList() { + if (authorizationInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(authorizationInfo_); } else { - requestMetadataBuilder_.setMessage(builderForValue.build()); + return authorizationInfoBuilder_.getMessageList(); } - - return this; } /** * - * Metadata about the operation. + * Authorization information. If there are multiple + * resources or permissions involved, then there is + * one AuthorizationInfo element for each {resource, permission} tuple. ** - *.google.events.cloud.audit.v1.RequestMetadata request_metadata = 4;
+ *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
*/ - public Builder mergeRequestMetadata(google.events.cloud.audit.v1.Data.RequestMetadata value) { - if (requestMetadataBuilder_ == null) { - if (requestMetadata_ != null) { - requestMetadata_ = - google.events.cloud.audit.v1.Data.RequestMetadata.newBuilder(requestMetadata_).mergeFrom(value).buildPartial(); - } else { - requestMetadata_ = value; - } - onChanged(); + public int getAuthorizationInfoCount() { + if (authorizationInfoBuilder_ == null) { + return authorizationInfo_.size(); } else { - requestMetadataBuilder_.mergeFrom(value); + return authorizationInfoBuilder_.getCount(); } - - return this; } /** *- * Metadata about the operation. + * Authorization information. If there are multiple + * resources or permissions involved, then there is + * one AuthorizationInfo element for each {resource, permission} tuple. ** - *.google.events.cloud.audit.v1.RequestMetadata request_metadata = 4;
+ *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
*/ - public Builder clearRequestMetadata() { - if (requestMetadataBuilder_ == null) { - requestMetadata_ = null; - onChanged(); + public google.events.cloud.audit.v1.Data.AuthorizationInfo getAuthorizationInfo(int index) { + if (authorizationInfoBuilder_ == null) { + return authorizationInfo_.get(index); } else { - requestMetadata_ = null; - requestMetadataBuilder_ = null; + return authorizationInfoBuilder_.getMessage(index); } - - return this; - } - /** - *- * Metadata about the operation. - *- * - *.google.events.cloud.audit.v1.RequestMetadata request_metadata = 4;
- */ - public google.events.cloud.audit.v1.Data.RequestMetadata.Builder getRequestMetadataBuilder() { - - onChanged(); - return getRequestMetadataFieldBuilder().getBuilder(); } /** *- * Metadata about the operation. + * Authorization information. If there are multiple + * resources or permissions involved, then there is + * one AuthorizationInfo element for each {resource, permission} tuple. ** - *.google.events.cloud.audit.v1.RequestMetadata request_metadata = 4;
+ *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
*/ - public google.events.cloud.audit.v1.Data.RequestMetadataOrBuilder getRequestMetadataOrBuilder() { - if (requestMetadataBuilder_ != null) { - return requestMetadataBuilder_.getMessageOrBuilder(); + public Builder setAuthorizationInfo( + int index, google.events.cloud.audit.v1.Data.AuthorizationInfo value) { + if (authorizationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuthorizationInfoIsMutable(); + authorizationInfo_.set(index, value); + onChanged(); } else { - return requestMetadata_ == null ? - google.events.cloud.audit.v1.Data.RequestMetadata.getDefaultInstance() : requestMetadata_; + authorizationInfoBuilder_.setMessage(index, value); } + return this; } /** *- * Metadata about the operation. + * Authorization information. If there are multiple + * resources or permissions involved, then there is + * one AuthorizationInfo element for each {resource, permission} tuple. ** - *.google.events.cloud.audit.v1.RequestMetadata request_metadata = 4;
+ *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
*/ - private com.google.protobuf.SingleFieldBuilderV3< - google.events.cloud.audit.v1.Data.RequestMetadata, google.events.cloud.audit.v1.Data.RequestMetadata.Builder, google.events.cloud.audit.v1.Data.RequestMetadataOrBuilder> - getRequestMetadataFieldBuilder() { - if (requestMetadataBuilder_ == null) { - requestMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - google.events.cloud.audit.v1.Data.RequestMetadata, google.events.cloud.audit.v1.Data.RequestMetadata.Builder, google.events.cloud.audit.v1.Data.RequestMetadataOrBuilder>( - getRequestMetadata(), - getParentForChildren(), - isClean()); - requestMetadata_ = null; + public Builder setAuthorizationInfo( + int index, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder builderForValue) { + if (authorizationInfoBuilder_ == null) { + ensureAuthorizationInfoIsMutable(); + authorizationInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + authorizationInfoBuilder_.setMessage(index, builderForValue.build()); } - return requestMetadataBuilder_; - } - - private com.google.protobuf.Struct request_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> requestBuilder_; - /** - *- * The operation request. This may not include all request parameters, - * such as those that are too large, privacy-sensitive, or duplicated - * elsewhere in the log record. - * It should never include user-generated data, such as file contents. - * When the JSON object represented here has a proto equivalent, the proto - * name will be indicated in the `@type` property. - *- * - *.google.protobuf.Struct request = 16;
- * @return Whether the request field is set. - */ - public boolean hasRequest() { - return requestBuilder_ != null || request_ != null; + return this; } /** *- * The operation request. This may not include all request parameters, - * such as those that are too large, privacy-sensitive, or duplicated - * elsewhere in the log record. - * It should never include user-generated data, such as file contents. - * When the JSON object represented here has a proto equivalent, the proto - * name will be indicated in the `@type` property. + * Authorization information. If there are multiple + * resources or permissions involved, then there is + * one AuthorizationInfo element for each {resource, permission} tuple. ** - *.google.protobuf.Struct request = 16;
- * @return The request. + *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
*/ - public com.google.protobuf.Struct getRequest() { - if (requestBuilder_ == null) { - return request_ == null ? com.google.protobuf.Struct.getDefaultInstance() : request_; + public Builder addAuthorizationInfo(google.events.cloud.audit.v1.Data.AuthorizationInfo value) { + if (authorizationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuthorizationInfoIsMutable(); + authorizationInfo_.add(value); + onChanged(); } else { - return requestBuilder_.getMessage(); + authorizationInfoBuilder_.addMessage(value); } + return this; } /** *- * The operation request. This may not include all request parameters, - * such as those that are too large, privacy-sensitive, or duplicated - * elsewhere in the log record. - * It should never include user-generated data, such as file contents. - * When the JSON object represented here has a proto equivalent, the proto - * name will be indicated in the `@type` property. + * Authorization information. If there are multiple + * resources or permissions involved, then there is + * one AuthorizationInfo element for each {resource, permission} tuple. ** - *.google.protobuf.Struct request = 16;
+ *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
*/ - public Builder setRequest(com.google.protobuf.Struct value) { - if (requestBuilder_ == null) { + public Builder addAuthorizationInfo( + int index, google.events.cloud.audit.v1.Data.AuthorizationInfo value) { + if (authorizationInfoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - request_ = value; + ensureAuthorizationInfoIsMutable(); + authorizationInfo_.add(index, value); onChanged(); } else { - requestBuilder_.setMessage(value); + authorizationInfoBuilder_.addMessage(index, value); } - return this; } /** *- * The operation request. This may not include all request parameters, - * such as those that are too large, privacy-sensitive, or duplicated - * elsewhere in the log record. - * It should never include user-generated data, such as file contents. - * When the JSON object represented here has a proto equivalent, the proto - * name will be indicated in the `@type` property. + * Authorization information. If there are multiple + * resources or permissions involved, then there is + * one AuthorizationInfo element for each {resource, permission} tuple. ** - *.google.protobuf.Struct request = 16;
+ *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
*/ - public Builder setRequest( - com.google.protobuf.Struct.Builder builderForValue) { - if (requestBuilder_ == null) { - request_ = builderForValue.build(); + public Builder addAuthorizationInfo( + google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder builderForValue) { + if (authorizationInfoBuilder_ == null) { + ensureAuthorizationInfoIsMutable(); + authorizationInfo_.add(builderForValue.build()); onChanged(); } else { - requestBuilder_.setMessage(builderForValue.build()); + authorizationInfoBuilder_.addMessage(builderForValue.build()); } - return this; } /** *- * The operation request. This may not include all request parameters, - * such as those that are too large, privacy-sensitive, or duplicated - * elsewhere in the log record. - * It should never include user-generated data, such as file contents. - * When the JSON object represented here has a proto equivalent, the proto - * name will be indicated in the `@type` property. + * Authorization information. If there are multiple + * resources or permissions involved, then there is + * one AuthorizationInfo element for each {resource, permission} tuple. ** - *.google.protobuf.Struct request = 16;
+ *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
*/ - public Builder mergeRequest(com.google.protobuf.Struct value) { - if (requestBuilder_ == null) { - if (request_ != null) { - request_ = - com.google.protobuf.Struct.newBuilder(request_).mergeFrom(value).buildPartial(); - } else { - request_ = value; - } + public Builder addAuthorizationInfo( + int index, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder builderForValue) { + if (authorizationInfoBuilder_ == null) { + ensureAuthorizationInfoIsMutable(); + authorizationInfo_.add(index, builderForValue.build()); onChanged(); } else { - requestBuilder_.mergeFrom(value); + authorizationInfoBuilder_.addMessage(index, builderForValue.build()); } - return this; } /** *- * The operation request. This may not include all request parameters, - * such as those that are too large, privacy-sensitive, or duplicated - * elsewhere in the log record. - * It should never include user-generated data, such as file contents. - * When the JSON object represented here has a proto equivalent, the proto - * name will be indicated in the `@type` property. + * Authorization information. If there are multiple + * resources or permissions involved, then there is + * one AuthorizationInfo element for each {resource, permission} tuple. ** - *.google.protobuf.Struct request = 16;
+ *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
*/ - public Builder clearRequest() { - if (requestBuilder_ == null) { - request_ = null; + public Builder addAllAuthorizationInfo( + java.lang.Iterable extends google.events.cloud.audit.v1.Data.AuthorizationInfo> values) { + if (authorizationInfoBuilder_ == null) { + ensureAuthorizationInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, authorizationInfo_); onChanged(); } else { - request_ = null; - requestBuilder_ = null; + authorizationInfoBuilder_.addAllMessages(values); } - return this; } /** *- * The operation request. This may not include all request parameters, - * such as those that are too large, privacy-sensitive, or duplicated - * elsewhere in the log record. - * It should never include user-generated data, such as file contents. - * When the JSON object represented here has a proto equivalent, the proto - * name will be indicated in the `@type` property. + * Authorization information. If there are multiple + * resources or permissions involved, then there is + * one AuthorizationInfo element for each {resource, permission} tuple. ** - *.google.protobuf.Struct request = 16;
+ *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
*/ - public com.google.protobuf.Struct.Builder getRequestBuilder() { - - onChanged(); - return getRequestFieldBuilder().getBuilder(); + public Builder clearAuthorizationInfo() { + if (authorizationInfoBuilder_ == null) { + authorizationInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + authorizationInfoBuilder_.clear(); + } + return this; } /** *- * The operation request. This may not include all request parameters, - * such as those that are too large, privacy-sensitive, or duplicated - * elsewhere in the log record. - * It should never include user-generated data, such as file contents. - * When the JSON object represented here has a proto equivalent, the proto - * name will be indicated in the `@type` property. + * Authorization information. If there are multiple + * resources or permissions involved, then there is + * one AuthorizationInfo element for each {resource, permission} tuple. ** - *.google.protobuf.Struct request = 16;
+ *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
*/ - public com.google.protobuf.StructOrBuilder getRequestOrBuilder() { - if (requestBuilder_ != null) { - return requestBuilder_.getMessageOrBuilder(); + public Builder removeAuthorizationInfo(int index) { + if (authorizationInfoBuilder_ == null) { + ensureAuthorizationInfoIsMutable(); + authorizationInfo_.remove(index); + onChanged(); } else { - return request_ == null ? - com.google.protobuf.Struct.getDefaultInstance() : request_; + authorizationInfoBuilder_.remove(index); } + return this; } /** *- * The operation request. This may not include all request parameters, - * such as those that are too large, privacy-sensitive, or duplicated - * elsewhere in the log record. - * It should never include user-generated data, such as file contents. - * When the JSON object represented here has a proto equivalent, the proto - * name will be indicated in the `@type` property. + * Authorization information. If there are multiple + * resources or permissions involved, then there is + * one AuthorizationInfo element for each {resource, permission} tuple. ** - *.google.protobuf.Struct request = 16;
+ *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
*/ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getRequestFieldBuilder() { - if (requestBuilder_ == null) { - requestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - getRequest(), + public google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder getAuthorizationInfoBuilder( + int index) { + return getAuthorizationInfoFieldBuilder().getBuilder(index); + } + /** + *+ * Authorization information. If there are multiple + * resources or permissions involved, then there is + * one AuthorizationInfo element for each {resource, permission} tuple. + *+ * + *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ */ + public google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder getAuthorizationInfoOrBuilder( + int index) { + if (authorizationInfoBuilder_ == null) { + return authorizationInfo_.get(index); } else { + return authorizationInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + *+ * Authorization information. If there are multiple + * resources or permissions involved, then there is + * one AuthorizationInfo element for each {resource, permission} tuple. + *+ * + *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ */ + public java.util.List extends google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder> + getAuthorizationInfoOrBuilderList() { + if (authorizationInfoBuilder_ != null) { + return authorizationInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(authorizationInfo_); + } + } + /** + *+ * Authorization information. If there are multiple + * resources or permissions involved, then there is + * one AuthorizationInfo element for each {resource, permission} tuple. + *+ * + *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ */ + public google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder addAuthorizationInfoBuilder() { + return getAuthorizationInfoFieldBuilder().addBuilder( + google.events.cloud.audit.v1.Data.AuthorizationInfo.getDefaultInstance()); + } + /** + *+ * Authorization information. If there are multiple + * resources or permissions involved, then there is + * one AuthorizationInfo element for each {resource, permission} tuple. + *+ * + *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ */ + public google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder addAuthorizationInfoBuilder( + int index) { + return getAuthorizationInfoFieldBuilder().addBuilder( + index, google.events.cloud.audit.v1.Data.AuthorizationInfo.getDefaultInstance()); + } + /** + *+ * Authorization information. If there are multiple + * resources or permissions involved, then there is + * one AuthorizationInfo element for each {resource, permission} tuple. + *+ * + *repeated .google.events.cloud.audit.v1.AuthorizationInfo authorization_info = 9;
+ */ + public java.util.List+ getAuthorizationInfoBuilderList() { + return getAuthorizationInfoFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + google.events.cloud.audit.v1.Data.AuthorizationInfo, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder, google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder> + getAuthorizationInfoFieldBuilder() { + if (authorizationInfoBuilder_ == null) { + authorizationInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + google.events.cloud.audit.v1.Data.AuthorizationInfo, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder, google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder>( + authorizationInfo_, + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - request_ = null; + authorizationInfo_ = null; } - return requestBuilder_; + return authorizationInfoBuilder_; } - private com.google.protobuf.Struct response_; + private google.events.cloud.audit.v1.Data.RequestMetadata requestMetadata_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> responseBuilder_; + google.events.cloud.audit.v1.Data.RequestMetadata, google.events.cloud.audit.v1.Data.RequestMetadata.Builder, google.events.cloud.audit.v1.Data.RequestMetadataOrBuilder> requestMetadataBuilder_; /** * - * The operation response. This may not include all response elements, - * such as those that are too large, privacy-sensitive, or duplicated - * elsewhere in the log record. - * It should never include user-generated data, such as file contents. - * When the JSON object represented here has a proto equivalent, the proto - * name will be indicated in the `@type` property. + * Metadata about the operation. ** - *.google.protobuf.Struct response = 17;
- * @return Whether the response field is set. + *.google.events.cloud.audit.v1.RequestMetadata request_metadata = 4;
+ * @return Whether the requestMetadata field is set. */ - public boolean hasResponse() { - return responseBuilder_ != null || response_ != null; + public boolean hasRequestMetadata() { + return requestMetadataBuilder_ != null || requestMetadata_ != null; } /** *- * The operation response. This may not include all response elements, - * such as those that are too large, privacy-sensitive, or duplicated - * elsewhere in the log record. - * It should never include user-generated data, such as file contents. - * When the JSON object represented here has a proto equivalent, the proto - * name will be indicated in the `@type` property. + * Metadata about the operation. ** - *.google.protobuf.Struct response = 17;
- * @return The response. + *.google.events.cloud.audit.v1.RequestMetadata request_metadata = 4;
+ * @return The requestMetadata. */ - public com.google.protobuf.Struct getResponse() { - if (responseBuilder_ == null) { - return response_ == null ? com.google.protobuf.Struct.getDefaultInstance() : response_; + public google.events.cloud.audit.v1.Data.RequestMetadata getRequestMetadata() { + if (requestMetadataBuilder_ == null) { + return requestMetadata_ == null ? google.events.cloud.audit.v1.Data.RequestMetadata.getDefaultInstance() : requestMetadata_; } else { - return responseBuilder_.getMessage(); + return requestMetadataBuilder_.getMessage(); } } /** *- * The operation response. This may not include all response elements, - * such as those that are too large, privacy-sensitive, or duplicated - * elsewhere in the log record. - * It should never include user-generated data, such as file contents. - * When the JSON object represented here has a proto equivalent, the proto - * name will be indicated in the `@type` property. + * Metadata about the operation. ** - *.google.protobuf.Struct response = 17;
+ *.google.events.cloud.audit.v1.RequestMetadata request_metadata = 4;
*/ - public Builder setResponse(com.google.protobuf.Struct value) { - if (responseBuilder_ == null) { + public Builder setRequestMetadata(google.events.cloud.audit.v1.Data.RequestMetadata value) { + if (requestMetadataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - response_ = value; + requestMetadata_ = value; onChanged(); } else { - responseBuilder_.setMessage(value); + requestMetadataBuilder_.setMessage(value); } return this; } /** *- * The operation response. This may not include all response elements, - * such as those that are too large, privacy-sensitive, or duplicated - * elsewhere in the log record. - * It should never include user-generated data, such as file contents. - * When the JSON object represented here has a proto equivalent, the proto - * name will be indicated in the `@type` property. + * Metadata about the operation. ** - *.google.protobuf.Struct response = 17;
+ *.google.events.cloud.audit.v1.RequestMetadata request_metadata = 4;
*/ - public Builder setResponse( - com.google.protobuf.Struct.Builder builderForValue) { - if (responseBuilder_ == null) { - response_ = builderForValue.build(); + public Builder setRequestMetadata( + google.events.cloud.audit.v1.Data.RequestMetadata.Builder builderForValue) { + if (requestMetadataBuilder_ == null) { + requestMetadata_ = builderForValue.build(); onChanged(); } else { - responseBuilder_.setMessage(builderForValue.build()); + requestMetadataBuilder_.setMessage(builderForValue.build()); } return this; } /** *- * The operation response. This may not include all response elements, - * such as those that are too large, privacy-sensitive, or duplicated - * elsewhere in the log record. - * It should never include user-generated data, such as file contents. - * When the JSON object represented here has a proto equivalent, the proto - * name will be indicated in the `@type` property. + * Metadata about the operation. ** - *.google.protobuf.Struct response = 17;
+ *.google.events.cloud.audit.v1.RequestMetadata request_metadata = 4;
*/ - public Builder mergeResponse(com.google.protobuf.Struct value) { - if (responseBuilder_ == null) { - if (response_ != null) { - response_ = - com.google.protobuf.Struct.newBuilder(response_).mergeFrom(value).buildPartial(); + public Builder mergeRequestMetadata(google.events.cloud.audit.v1.Data.RequestMetadata value) { + if (requestMetadataBuilder_ == null) { + if (requestMetadata_ != null) { + requestMetadata_ = + google.events.cloud.audit.v1.Data.RequestMetadata.newBuilder(requestMetadata_).mergeFrom(value).buildPartial(); } else { - response_ = value; + requestMetadata_ = value; } onChanged(); } else { - responseBuilder_.mergeFrom(value); + requestMetadataBuilder_.mergeFrom(value); } return this; } /** *- * The operation response. This may not include all response elements, - * such as those that are too large, privacy-sensitive, or duplicated - * elsewhere in the log record. - * It should never include user-generated data, such as file contents. - * When the JSON object represented here has a proto equivalent, the proto - * name will be indicated in the `@type` property. + * Metadata about the operation. ** - *.google.protobuf.Struct response = 17;
+ *.google.events.cloud.audit.v1.RequestMetadata request_metadata = 4;
*/ - public Builder clearResponse() { - if (responseBuilder_ == null) { - response_ = null; + public Builder clearRequestMetadata() { + if (requestMetadataBuilder_ == null) { + requestMetadata_ = null; onChanged(); } else { - response_ = null; - responseBuilder_ = null; + requestMetadata_ = null; + requestMetadataBuilder_ = null; } return this; } /** *- * The operation response. This may not include all response elements, - * such as those that are too large, privacy-sensitive, or duplicated - * elsewhere in the log record. - * It should never include user-generated data, such as file contents. - * When the JSON object represented here has a proto equivalent, the proto - * name will be indicated in the `@type` property. + * Metadata about the operation. ** - *.google.protobuf.Struct response = 17;
+ *.google.events.cloud.audit.v1.RequestMetadata request_metadata = 4;
*/ - public com.google.protobuf.Struct.Builder getResponseBuilder() { + public google.events.cloud.audit.v1.Data.RequestMetadata.Builder getRequestMetadataBuilder() { onChanged(); - return getResponseFieldBuilder().getBuilder(); + return getRequestMetadataFieldBuilder().getBuilder(); } /** *- * The operation response. This may not include all response elements, - * such as those that are too large, privacy-sensitive, or duplicated - * elsewhere in the log record. - * It should never include user-generated data, such as file contents. - * When the JSON object represented here has a proto equivalent, the proto - * name will be indicated in the `@type` property. + * Metadata about the operation. ** - *.google.protobuf.Struct response = 17;
+ *.google.events.cloud.audit.v1.RequestMetadata request_metadata = 4;
*/ - public com.google.protobuf.StructOrBuilder getResponseOrBuilder() { - if (responseBuilder_ != null) { - return responseBuilder_.getMessageOrBuilder(); + public google.events.cloud.audit.v1.Data.RequestMetadataOrBuilder getRequestMetadataOrBuilder() { + if (requestMetadataBuilder_ != null) { + return requestMetadataBuilder_.getMessageOrBuilder(); } else { - return response_ == null ? - com.google.protobuf.Struct.getDefaultInstance() : response_; + return requestMetadata_ == null ? + google.events.cloud.audit.v1.Data.RequestMetadata.getDefaultInstance() : requestMetadata_; } } /** *- * The operation response. This may not include all response elements, - * such as those that are too large, privacy-sensitive, or duplicated - * elsewhere in the log record. - * It should never include user-generated data, such as file contents. - * When the JSON object represented here has a proto equivalent, the proto - * name will be indicated in the `@type` property. + * Metadata about the operation. ** - *.google.protobuf.Struct response = 17;
+ *.google.events.cloud.audit.v1.RequestMetadata request_metadata = 4;
*/ private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getResponseFieldBuilder() { - if (responseBuilder_ == null) { - responseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - getResponse(), + google.events.cloud.audit.v1.Data.RequestMetadata, google.events.cloud.audit.v1.Data.RequestMetadata.Builder, google.events.cloud.audit.v1.Data.RequestMetadataOrBuilder> + getRequestMetadataFieldBuilder() { + if (requestMetadataBuilder_ == null) { + requestMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.audit.v1.Data.RequestMetadata, google.events.cloud.audit.v1.Data.RequestMetadata.Builder, google.events.cloud.audit.v1.Data.RequestMetadataOrBuilder>( + getRequestMetadata(), getParentForChildren(), isClean()); - response_ = null; + requestMetadata_ = null; } - return responseBuilder_; + return requestMetadataBuilder_; } - private com.google.protobuf.Struct serviceData_; + private com.google.protobuf.Struct request_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> serviceDataBuilder_; + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> requestBuilder_; /** *- * Other service-specific data about the request, response, and other - * activities. + * The operation request. This may not include all request parameters, + * such as those that are too large, privacy-sensitive, or duplicated + * elsewhere in the log record. + * It should never include user-generated data, such as file contents. * When the JSON object represented here has a proto equivalent, the proto * name will be indicated in the `@type` property. ** - *.google.protobuf.Struct service_data = 15;
- * @return Whether the serviceData field is set. + *.google.protobuf.Struct request = 16;
+ * @return Whether the request field is set. */ - public boolean hasServiceData() { - return serviceDataBuilder_ != null || serviceData_ != null; + public boolean hasRequest() { + return requestBuilder_ != null || request_ != null; } /** *- * Other service-specific data about the request, response, and other - * activities. + * The operation request. This may not include all request parameters, + * such as those that are too large, privacy-sensitive, or duplicated + * elsewhere in the log record. + * It should never include user-generated data, such as file contents. * When the JSON object represented here has a proto equivalent, the proto * name will be indicated in the `@type` property. ** - *.google.protobuf.Struct service_data = 15;
- * @return The serviceData. + *.google.protobuf.Struct request = 16;
+ * @return The request. */ - public com.google.protobuf.Struct getServiceData() { - if (serviceDataBuilder_ == null) { - return serviceData_ == null ? com.google.protobuf.Struct.getDefaultInstance() : serviceData_; + public com.google.protobuf.Struct getRequest() { + if (requestBuilder_ == null) { + return request_ == null ? com.google.protobuf.Struct.getDefaultInstance() : request_; } else { - return serviceDataBuilder_.getMessage(); + return requestBuilder_.getMessage(); } } /** *- * Other service-specific data about the request, response, and other - * activities. + * The operation request. This may not include all request parameters, + * such as those that are too large, privacy-sensitive, or duplicated + * elsewhere in the log record. + * It should never include user-generated data, such as file contents. * When the JSON object represented here has a proto equivalent, the proto * name will be indicated in the `@type` property. ** - *.google.protobuf.Struct service_data = 15;
+ *.google.protobuf.Struct request = 16;
*/ - public Builder setServiceData(com.google.protobuf.Struct value) { - if (serviceDataBuilder_ == null) { + public Builder setRequest(com.google.protobuf.Struct value) { + if (requestBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - serviceData_ = value; + request_ = value; onChanged(); } else { - serviceDataBuilder_.setMessage(value); + requestBuilder_.setMessage(value); } return this; } /** *- * Other service-specific data about the request, response, and other - * activities. + * The operation request. This may not include all request parameters, + * such as those that are too large, privacy-sensitive, or duplicated + * elsewhere in the log record. + * It should never include user-generated data, such as file contents. * When the JSON object represented here has a proto equivalent, the proto * name will be indicated in the `@type` property. ** - *.google.protobuf.Struct service_data = 15;
+ *.google.protobuf.Struct request = 16;
*/ - public Builder setServiceData( + public Builder setRequest( com.google.protobuf.Struct.Builder builderForValue) { - if (serviceDataBuilder_ == null) { - serviceData_ = builderForValue.build(); + if (requestBuilder_ == null) { + request_ = builderForValue.build(); onChanged(); } else { - serviceDataBuilder_.setMessage(builderForValue.build()); + requestBuilder_.setMessage(builderForValue.build()); } return this; } /** *- * Other service-specific data about the request, response, and other - * activities. + * The operation request. This may not include all request parameters, + * such as those that are too large, privacy-sensitive, or duplicated + * elsewhere in the log record. + * It should never include user-generated data, such as file contents. * When the JSON object represented here has a proto equivalent, the proto * name will be indicated in the `@type` property. ** - *.google.protobuf.Struct service_data = 15;
+ *.google.protobuf.Struct request = 16;
*/ - public Builder mergeServiceData(com.google.protobuf.Struct value) { - if (serviceDataBuilder_ == null) { - if (serviceData_ != null) { - serviceData_ = - com.google.protobuf.Struct.newBuilder(serviceData_).mergeFrom(value).buildPartial(); + public Builder mergeRequest(com.google.protobuf.Struct value) { + if (requestBuilder_ == null) { + if (request_ != null) { + request_ = + com.google.protobuf.Struct.newBuilder(request_).mergeFrom(value).buildPartial(); } else { - serviceData_ = value; + request_ = value; } onChanged(); } else { - serviceDataBuilder_.mergeFrom(value); + requestBuilder_.mergeFrom(value); } return this; } /** *- * Other service-specific data about the request, response, and other - * activities. + * The operation request. This may not include all request parameters, + * such as those that are too large, privacy-sensitive, or duplicated + * elsewhere in the log record. + * It should never include user-generated data, such as file contents. * When the JSON object represented here has a proto equivalent, the proto * name will be indicated in the `@type` property. ** - *.google.protobuf.Struct service_data = 15;
+ *.google.protobuf.Struct request = 16;
*/ - public Builder clearServiceData() { - if (serviceDataBuilder_ == null) { - serviceData_ = null; + public Builder clearRequest() { + if (requestBuilder_ == null) { + request_ = null; onChanged(); } else { - serviceData_ = null; - serviceDataBuilder_ = null; + request_ = null; + requestBuilder_ = null; } return this; } /** *- * Other service-specific data about the request, response, and other - * activities. + * The operation request. This may not include all request parameters, + * such as those that are too large, privacy-sensitive, or duplicated + * elsewhere in the log record. + * It should never include user-generated data, such as file contents. * When the JSON object represented here has a proto equivalent, the proto * name will be indicated in the `@type` property. ** - *.google.protobuf.Struct service_data = 15;
+ *.google.protobuf.Struct request = 16;
*/ - public com.google.protobuf.Struct.Builder getServiceDataBuilder() { + public com.google.protobuf.Struct.Builder getRequestBuilder() { onChanged(); - return getServiceDataFieldBuilder().getBuilder(); + return getRequestFieldBuilder().getBuilder(); } /** *- * Other service-specific data about the request, response, and other - * activities. + * The operation request. This may not include all request parameters, + * such as those that are too large, privacy-sensitive, or duplicated + * elsewhere in the log record. + * It should never include user-generated data, such as file contents. * When the JSON object represented here has a proto equivalent, the proto * name will be indicated in the `@type` property. ** - *.google.protobuf.Struct service_data = 15;
+ *.google.protobuf.Struct request = 16;
*/ - public com.google.protobuf.StructOrBuilder getServiceDataOrBuilder() { - if (serviceDataBuilder_ != null) { - return serviceDataBuilder_.getMessageOrBuilder(); + public com.google.protobuf.StructOrBuilder getRequestOrBuilder() { + if (requestBuilder_ != null) { + return requestBuilder_.getMessageOrBuilder(); } else { - return serviceData_ == null ? - com.google.protobuf.Struct.getDefaultInstance() : serviceData_; + return request_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : request_; } } /** *- * Other service-specific data about the request, response, and other - * activities. + * The operation request. This may not include all request parameters, + * such as those that are too large, privacy-sensitive, or duplicated + * elsewhere in the log record. + * It should never include user-generated data, such as file contents. * When the JSON object represented here has a proto equivalent, the proto * name will be indicated in the `@type` property. ** - *.google.protobuf.Struct service_data = 15;
+ *.google.protobuf.Struct request = 16;
*/ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getServiceDataFieldBuilder() { - if (serviceDataBuilder_ == null) { - serviceDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + getRequestFieldBuilder() { + if (requestBuilder_ == null) { + requestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - getServiceData(), + getRequest(), + getParentForChildren(), + isClean()); + request_ = null; + } + return requestBuilder_; + } + + private com.google.protobuf.Struct response_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> responseBuilder_; + /** + *+ * The operation response. This may not include all response elements, + * such as those that are too large, privacy-sensitive, or duplicated + * elsewhere in the log record. + * It should never include user-generated data, such as file contents. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct response = 17;
+ * @return Whether the response field is set. + */ + public boolean hasResponse() { + return responseBuilder_ != null || response_ != null; + } + /** + *+ * The operation response. This may not include all response elements, + * such as those that are too large, privacy-sensitive, or duplicated + * elsewhere in the log record. + * It should never include user-generated data, such as file contents. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct response = 17;
+ * @return The response. + */ + public com.google.protobuf.Struct getResponse() { + if (responseBuilder_ == null) { + return response_ == null ? com.google.protobuf.Struct.getDefaultInstance() : response_; + } else { + return responseBuilder_.getMessage(); + } + } + /** + *+ * The operation response. This may not include all response elements, + * such as those that are too large, privacy-sensitive, or duplicated + * elsewhere in the log record. + * It should never include user-generated data, such as file contents. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct response = 17;
+ */ + public Builder setResponse(com.google.protobuf.Struct value) { + if (responseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + responseBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * The operation response. This may not include all response elements, + * such as those that are too large, privacy-sensitive, or duplicated + * elsewhere in the log record. + * It should never include user-generated data, such as file contents. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct response = 17;
+ */ + public Builder setResponse( + com.google.protobuf.Struct.Builder builderForValue) { + if (responseBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + responseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * The operation response. This may not include all response elements, + * such as those that are too large, privacy-sensitive, or duplicated + * elsewhere in the log record. + * It should never include user-generated data, such as file contents. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct response = 17;
+ */ + public Builder mergeResponse(com.google.protobuf.Struct value) { + if (responseBuilder_ == null) { + if (response_ != null) { + response_ = + com.google.protobuf.Struct.newBuilder(response_).mergeFrom(value).buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + responseBuilder_.mergeFrom(value); + } + + return this; + } + /** + *+ * The operation response. This may not include all response elements, + * such as those that are too large, privacy-sensitive, or duplicated + * elsewhere in the log record. + * It should never include user-generated data, such as file contents. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct response = 17;
+ */ + public Builder clearResponse() { + if (responseBuilder_ == null) { + response_ = null; + onChanged(); + } else { + response_ = null; + responseBuilder_ = null; + } + + return this; + } + /** + *+ * The operation response. This may not include all response elements, + * such as those that are too large, privacy-sensitive, or duplicated + * elsewhere in the log record. + * It should never include user-generated data, such as file contents. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct response = 17;
+ */ + public com.google.protobuf.Struct.Builder getResponseBuilder() { + + onChanged(); + return getResponseFieldBuilder().getBuilder(); + } + /** + *+ * The operation response. This may not include all response elements, + * such as those that are too large, privacy-sensitive, or duplicated + * elsewhere in the log record. + * It should never include user-generated data, such as file contents. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct response = 17;
+ */ + public com.google.protobuf.StructOrBuilder getResponseOrBuilder() { + if (responseBuilder_ != null) { + return responseBuilder_.getMessageOrBuilder(); + } else { + return response_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : response_; + } + } + /** + *+ * The operation response. This may not include all response elements, + * such as those that are too large, privacy-sensitive, or duplicated + * elsewhere in the log record. + * It should never include user-generated data, such as file contents. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct response = 17;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getResponseFieldBuilder() { + if (responseBuilder_ == null) { + responseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getResponse(), + getParentForChildren(), + isClean()); + response_ = null; + } + return responseBuilder_; + } + + private com.google.protobuf.Struct metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> metadataBuilder_; + /** + *+ * Other service-specific data about the request, response, and other + * information associated with the current audited event. + *+ * + *.google.protobuf.Struct metadata = 18;
+ * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + *+ * Other service-specific data about the request, response, and other + * information associated with the current audited event. + *+ * + *.google.protobuf.Struct metadata = 18;
+ * @return The metadata. + */ + public com.google.protobuf.Struct getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + *+ * Other service-specific data about the request, response, and other + * information associated with the current audited event. + *+ * + *.google.protobuf.Struct metadata = 18;
+ */ + public Builder setMetadata(com.google.protobuf.Struct value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * Other service-specific data about the request, response, and other + * information associated with the current audited event. + *+ * + *.google.protobuf.Struct metadata = 18;
+ */ + public Builder setMetadata( + com.google.protobuf.Struct.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * Other service-specific data about the request, response, and other + * information associated with the current audited event. + *+ * + *.google.protobuf.Struct metadata = 18;
+ */ + public Builder mergeMetadata(com.google.protobuf.Struct value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.protobuf.Struct.newBuilder(metadata_).mergeFrom(value).buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + *+ * Other service-specific data about the request, response, and other + * information associated with the current audited event. + *+ * + *.google.protobuf.Struct metadata = 18;
+ */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + *+ * Other service-specific data about the request, response, and other + * information associated with the current audited event. + *+ * + *.google.protobuf.Struct metadata = 18;
+ */ + public com.google.protobuf.Struct.Builder getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *+ * Other service-specific data about the request, response, and other + * information associated with the current audited event. + *+ * + *.google.protobuf.Struct metadata = 18;
+ */ + public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } + } + /** + *+ * Other service-specific data about the request, response, and other + * information associated with the current audited event. + *+ * + *.google.protobuf.Struct metadata = 18;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private com.google.protobuf.Struct serviceData_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> serviceDataBuilder_; + /** + *+ * Deprecated, use `metadata` field instead. + * Other service-specific data about the request, response, and other + * activities. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct service_data = 15;
+ * @return Whether the serviceData field is set. + */ + public boolean hasServiceData() { + return serviceDataBuilder_ != null || serviceData_ != null; + } + /** + *+ * Deprecated, use `metadata` field instead. + * Other service-specific data about the request, response, and other + * activities. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct service_data = 15;
+ * @return The serviceData. + */ + public com.google.protobuf.Struct getServiceData() { + if (serviceDataBuilder_ == null) { + return serviceData_ == null ? com.google.protobuf.Struct.getDefaultInstance() : serviceData_; + } else { + return serviceDataBuilder_.getMessage(); + } + } + /** + *+ * Deprecated, use `metadata` field instead. + * Other service-specific data about the request, response, and other + * activities. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct service_data = 15;
+ */ + public Builder setServiceData(com.google.protobuf.Struct value) { + if (serviceDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceData_ = value; + onChanged(); + } else { + serviceDataBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * Deprecated, use `metadata` field instead. + * Other service-specific data about the request, response, and other + * activities. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct service_data = 15;
+ */ + public Builder setServiceData( + com.google.protobuf.Struct.Builder builderForValue) { + if (serviceDataBuilder_ == null) { + serviceData_ = builderForValue.build(); + onChanged(); + } else { + serviceDataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * Deprecated, use `metadata` field instead. + * Other service-specific data about the request, response, and other + * activities. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct service_data = 15;
+ */ + public Builder mergeServiceData(com.google.protobuf.Struct value) { + if (serviceDataBuilder_ == null) { + if (serviceData_ != null) { + serviceData_ = + com.google.protobuf.Struct.newBuilder(serviceData_).mergeFrom(value).buildPartial(); + } else { + serviceData_ = value; + } + onChanged(); + } else { + serviceDataBuilder_.mergeFrom(value); + } + + return this; + } + /** + *+ * Deprecated, use `metadata` field instead. + * Other service-specific data about the request, response, and other + * activities. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct service_data = 15;
+ */ + public Builder clearServiceData() { + if (serviceDataBuilder_ == null) { + serviceData_ = null; + onChanged(); + } else { + serviceData_ = null; + serviceDataBuilder_ = null; + } + + return this; + } + /** + *+ * Deprecated, use `metadata` field instead. + * Other service-specific data about the request, response, and other + * activities. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct service_data = 15;
+ */ + public com.google.protobuf.Struct.Builder getServiceDataBuilder() { + + onChanged(); + return getServiceDataFieldBuilder().getBuilder(); + } + /** + *+ * Deprecated, use `metadata` field instead. + * Other service-specific data about the request, response, and other + * activities. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct service_data = 15;
+ */ + public com.google.protobuf.StructOrBuilder getServiceDataOrBuilder() { + if (serviceDataBuilder_ != null) { + return serviceDataBuilder_.getMessageOrBuilder(); + } else { + return serviceData_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : serviceData_; + } + } + /** + *+ * Deprecated, use `metadata` field instead. + * Other service-specific data about the request, response, and other + * activities. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct service_data = 15;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getServiceDataFieldBuilder() { + if (serviceDataBuilder_ == null) { + serviceDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getServiceData(), + getParentForChildren(), + isClean()); + serviceData_ = null; + } + return serviceDataBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.events.cloud.audit.v1.AuditLogData) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.audit.v1.AuditLogData) + private static final google.events.cloud.audit.v1.Data.AuditLogData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.audit.v1.Data.AuditLogData(); + } + + public static google.events.cloud.audit.v1.Data.AuditLogData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser+ PARSER = new com.google.protobuf.AbstractParser () { + @java.lang.Override + public AuditLogData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AuditLogData(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuditLogData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AuthenticationInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.audit.v1.AuthenticationInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * The email address of the authenticated user (or service account on behalf + * of third party principal) making the request. For privacy reasons, the + * principal email address is redacted for all read-only operations that fail + * with a "permission denied" error. + *+ * + *string principal_email = 1;
+ * @return The principalEmail. + */ + java.lang.String getPrincipalEmail(); + /** + *+ * The email address of the authenticated user (or service account on behalf + * of third party principal) making the request. For privacy reasons, the + * principal email address is redacted for all read-only operations that fail + * with a "permission denied" error. + *+ * + *string principal_email = 1;
+ * @return The bytes for principalEmail. + */ + com.google.protobuf.ByteString + getPrincipalEmailBytes(); + + /** + *+ * The authority selector specified by the requestor, if any. + * It is not guaranteed that the principal was allowed to use this authority. + *+ * + *string authority_selector = 2;
+ * @return The authoritySelector. + */ + java.lang.String getAuthoritySelector(); + /** + *+ * The authority selector specified by the requestor, if any. + * It is not guaranteed that the principal was allowed to use this authority. + *+ * + *string authority_selector = 2;
+ * @return The bytes for authoritySelector. + */ + com.google.protobuf.ByteString + getAuthoritySelectorBytes(); + + /** + *+ * The third party identification (if any) of the authenticated user making + * the request. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct third_party_principal = 4;
+ * @return Whether the thirdPartyPrincipal field is set. + */ + boolean hasThirdPartyPrincipal(); + /** + *+ * The third party identification (if any) of the authenticated user making + * the request. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct third_party_principal = 4;
+ * @return The thirdPartyPrincipal. + */ + com.google.protobuf.Struct getThirdPartyPrincipal(); + /** + *+ * The third party identification (if any) of the authenticated user making + * the request. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct third_party_principal = 4;
+ */ + com.google.protobuf.StructOrBuilder getThirdPartyPrincipalOrBuilder(); + + /** + *+ * The name of the service account key used to create or exchange + * credentials for authenticating the service account making the request. + * This is a scheme-less URI full resource name. For example: + * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" + *+ * + *string service_account_key_name = 5;
+ * @return The serviceAccountKeyName. + */ + java.lang.String getServiceAccountKeyName(); + /** + *+ * The name of the service account key used to create or exchange + * credentials for authenticating the service account making the request. + * This is a scheme-less URI full resource name. For example: + * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" + *+ * + *string service_account_key_name = 5;
+ * @return The bytes for serviceAccountKeyName. + */ + com.google.protobuf.ByteString + getServiceAccountKeyNameBytes(); + + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + java.util.List+ getServiceAccountDelegationInfoList(); + /** + * + * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo getServiceAccountDelegationInfo(int index); + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + int getServiceAccountDelegationInfoCount(); + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + java.util.List extends google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfoOrBuilder> + getServiceAccountDelegationInfoOrBuilderList(); + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfoOrBuilder getServiceAccountDelegationInfoOrBuilder( + int index); + + /** + *+ * String representation of identity of requesting party. + * Populated for both first and third party identities. + *+ * + *string principal_subject = 8;
+ * @return The principalSubject. + */ + java.lang.String getPrincipalSubject(); + /** + *+ * String representation of identity of requesting party. + * Populated for both first and third party identities. + *+ * + *string principal_subject = 8;
+ * @return The bytes for principalSubject. + */ + com.google.protobuf.ByteString + getPrincipalSubjectBytes(); + } + /** + *+ * Authentication information for the operation. + *+ * + * Protobuf type {@code google.events.cloud.audit.v1.AuthenticationInfo} + */ + public static final class AuthenticationInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.audit.v1.AuthenticationInfo) + AuthenticationInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuthenticationInfo.newBuilder() to construct. + private AuthenticationInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private AuthenticationInfo() { + principalEmail_ = ""; + authoritySelector_ = ""; + serviceAccountKeyName_ = ""; + serviceAccountDelegationInfo_ = java.util.Collections.emptyList(); + principalSubject_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AuthenticationInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AuthenticationInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + principalEmail_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + authoritySelector_ = s; + break; + } + case 34: { + com.google.protobuf.Struct.Builder subBuilder = null; + if (thirdPartyPrincipal_ != null) { + subBuilder = thirdPartyPrincipal_.toBuilder(); + } + thirdPartyPrincipal_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(thirdPartyPrincipal_); + thirdPartyPrincipal_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + serviceAccountKeyName_ = s; + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + serviceAccountDelegationInfo_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + serviceAccountDelegationInfo_.add( + input.readMessage(google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.parser(), extensionRegistry)); + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + principalSubject_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + serviceAccountDelegationInfo_ = java.util.Collections.unmodifiableList(serviceAccountDelegationInfo_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthenticationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthenticationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.audit.v1.Data.AuthenticationInfo.class, google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder.class); + } + + public static final int PRINCIPAL_EMAIL_FIELD_NUMBER = 1; + private volatile java.lang.Object principalEmail_; + /** + * + * The email address of the authenticated user (or service account on behalf + * of third party principal) making the request. For privacy reasons, the + * principal email address is redacted for all read-only operations that fail + * with a "permission denied" error. + *+ * + *string principal_email = 1;
+ * @return The principalEmail. + */ + @java.lang.Override + public java.lang.String getPrincipalEmail() { + java.lang.Object ref = principalEmail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principalEmail_ = s; + return s; + } + } + /** + *+ * The email address of the authenticated user (or service account on behalf + * of third party principal) making the request. For privacy reasons, the + * principal email address is redacted for all read-only operations that fail + * with a "permission denied" error. + *+ * + *string principal_email = 1;
+ * @return The bytes for principalEmail. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPrincipalEmailBytes() { + java.lang.Object ref = principalEmail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principalEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTHORITY_SELECTOR_FIELD_NUMBER = 2; + private volatile java.lang.Object authoritySelector_; + /** + *+ * The authority selector specified by the requestor, if any. + * It is not guaranteed that the principal was allowed to use this authority. + *+ * + *string authority_selector = 2;
+ * @return The authoritySelector. + */ + @java.lang.Override + public java.lang.String getAuthoritySelector() { + java.lang.Object ref = authoritySelector_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authoritySelector_ = s; + return s; + } + } + /** + *+ * The authority selector specified by the requestor, if any. + * It is not guaranteed that the principal was allowed to use this authority. + *+ * + *string authority_selector = 2;
+ * @return The bytes for authoritySelector. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAuthoritySelectorBytes() { + java.lang.Object ref = authoritySelector_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + authoritySelector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int THIRD_PARTY_PRINCIPAL_FIELD_NUMBER = 4; + private com.google.protobuf.Struct thirdPartyPrincipal_; + /** + *+ * The third party identification (if any) of the authenticated user making + * the request. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct third_party_principal = 4;
+ * @return Whether the thirdPartyPrincipal field is set. + */ + @java.lang.Override + public boolean hasThirdPartyPrincipal() { + return thirdPartyPrincipal_ != null; + } + /** + *+ * The third party identification (if any) of the authenticated user making + * the request. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct third_party_principal = 4;
+ * @return The thirdPartyPrincipal. + */ + @java.lang.Override + public com.google.protobuf.Struct getThirdPartyPrincipal() { + return thirdPartyPrincipal_ == null ? com.google.protobuf.Struct.getDefaultInstance() : thirdPartyPrincipal_; + } + /** + *+ * The third party identification (if any) of the authenticated user making + * the request. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct third_party_principal = 4;
+ */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getThirdPartyPrincipalOrBuilder() { + return getThirdPartyPrincipal(); + } + + public static final int SERVICE_ACCOUNT_KEY_NAME_FIELD_NUMBER = 5; + private volatile java.lang.Object serviceAccountKeyName_; + /** + *+ * The name of the service account key used to create or exchange + * credentials for authenticating the service account making the request. + * This is a scheme-less URI full resource name. For example: + * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" + *+ * + *string service_account_key_name = 5;
+ * @return The serviceAccountKeyName. + */ + @java.lang.Override + public java.lang.String getServiceAccountKeyName() { + java.lang.Object ref = serviceAccountKeyName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccountKeyName_ = s; + return s; + } + } + /** + *+ * The name of the service account key used to create or exchange + * credentials for authenticating the service account making the request. + * This is a scheme-less URI full resource name. For example: + * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" + *+ * + *string service_account_key_name = 5;
+ * @return The bytes for serviceAccountKeyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getServiceAccountKeyNameBytes() { + java.lang.Object ref = serviceAccountKeyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + serviceAccountKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ACCOUNT_DELEGATION_INFO_FIELD_NUMBER = 6; + private java.util.ListserviceAccountDelegationInfo_; + /** + * + * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + @java.lang.Override + public java.util.ListgetServiceAccountDelegationInfoList() { + return serviceAccountDelegationInfo_; + } + /** + * + * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + @java.lang.Override + public java.util.List extends google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfoOrBuilder> + getServiceAccountDelegationInfoOrBuilderList() { + return serviceAccountDelegationInfo_; + } + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + @java.lang.Override + public int getServiceAccountDelegationInfoCount() { + return serviceAccountDelegationInfo_.size(); + } + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + @java.lang.Override + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo getServiceAccountDelegationInfo(int index) { + return serviceAccountDelegationInfo_.get(index); + } + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + @java.lang.Override + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfoOrBuilder getServiceAccountDelegationInfoOrBuilder( + int index) { + return serviceAccountDelegationInfo_.get(index); + } + + public static final int PRINCIPAL_SUBJECT_FIELD_NUMBER = 8; + private volatile java.lang.Object principalSubject_; + /** + *+ * String representation of identity of requesting party. + * Populated for both first and third party identities. + *+ * + *string principal_subject = 8;
+ * @return The principalSubject. + */ + @java.lang.Override + public java.lang.String getPrincipalSubject() { + java.lang.Object ref = principalSubject_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principalSubject_ = s; + return s; + } + } + /** + *+ * String representation of identity of requesting party. + * Populated for both first and third party identities. + *+ * + *string principal_subject = 8;
+ * @return The bytes for principalSubject. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPrincipalSubjectBytes() { + java.lang.Object ref = principalSubject_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principalSubject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getPrincipalEmailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, principalEmail_); + } + if (!getAuthoritySelectorBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, authoritySelector_); + } + if (thirdPartyPrincipal_ != null) { + output.writeMessage(4, getThirdPartyPrincipal()); + } + if (!getServiceAccountKeyNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, serviceAccountKeyName_); + } + for (int i = 0; i < serviceAccountDelegationInfo_.size(); i++) { + output.writeMessage(6, serviceAccountDelegationInfo_.get(i)); + } + if (!getPrincipalSubjectBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, principalSubject_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPrincipalEmailBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, principalEmail_); + } + if (!getAuthoritySelectorBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, authoritySelector_); + } + if (thirdPartyPrincipal_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getThirdPartyPrincipal()); + } + if (!getServiceAccountKeyNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, serviceAccountKeyName_); + } + for (int i = 0; i < serviceAccountDelegationInfo_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, serviceAccountDelegationInfo_.get(i)); + } + if (!getPrincipalSubjectBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, principalSubject_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof google.events.cloud.audit.v1.Data.AuthenticationInfo)) { + return super.equals(obj); + } + google.events.cloud.audit.v1.Data.AuthenticationInfo other = (google.events.cloud.audit.v1.Data.AuthenticationInfo) obj; + + if (!getPrincipalEmail() + .equals(other.getPrincipalEmail())) return false; + if (!getAuthoritySelector() + .equals(other.getAuthoritySelector())) return false; + if (hasThirdPartyPrincipal() != other.hasThirdPartyPrincipal()) return false; + if (hasThirdPartyPrincipal()) { + if (!getThirdPartyPrincipal() + .equals(other.getThirdPartyPrincipal())) return false; + } + if (!getServiceAccountKeyName() + .equals(other.getServiceAccountKeyName())) return false; + if (!getServiceAccountDelegationInfoList() + .equals(other.getServiceAccountDelegationInfoList())) return false; + if (!getPrincipalSubject() + .equals(other.getPrincipalSubject())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PRINCIPAL_EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalEmail().hashCode(); + hash = (37 * hash) + AUTHORITY_SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + getAuthoritySelector().hashCode(); + if (hasThirdPartyPrincipal()) { + hash = (37 * hash) + THIRD_PARTY_PRINCIPAL_FIELD_NUMBER; + hash = (53 * hash) + getThirdPartyPrincipal().hashCode(); + } + hash = (37 * hash) + SERVICE_ACCOUNT_KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccountKeyName().hashCode(); + if (getServiceAccountDelegationInfoCount() > 0) { + hash = (37 * hash) + SERVICE_ACCOUNT_DELEGATION_INFO_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccountDelegationInfoList().hashCode(); + } + hash = (37 * hash) + PRINCIPAL_SUBJECT_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalSubject().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(google.events.cloud.audit.v1.Data.AuthenticationInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *+ * Authentication information for the operation. + *+ * + * Protobuf type {@code google.events.cloud.audit.v1.AuthenticationInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builderimplements + // @@protoc_insertion_point(builder_implements:google.events.cloud.audit.v1.AuthenticationInfo) + google.events.cloud.audit.v1.Data.AuthenticationInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthenticationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthenticationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.audit.v1.Data.AuthenticationInfo.class, google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder.class); + } + + // Construct using google.events.cloud.audit.v1.Data.AuthenticationInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getServiceAccountDelegationInfoFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + principalEmail_ = ""; + + authoritySelector_ = ""; + + if (thirdPartyPrincipalBuilder_ == null) { + thirdPartyPrincipal_ = null; + } else { + thirdPartyPrincipal_ = null; + thirdPartyPrincipalBuilder_ = null; + } + serviceAccountKeyName_ = ""; + + if (serviceAccountDelegationInfoBuilder_ == null) { + serviceAccountDelegationInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + serviceAccountDelegationInfoBuilder_.clear(); + } + principalSubject_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthenticationInfo_descriptor; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuthenticationInfo getDefaultInstanceForType() { + return google.events.cloud.audit.v1.Data.AuthenticationInfo.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuthenticationInfo build() { + google.events.cloud.audit.v1.Data.AuthenticationInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuthenticationInfo buildPartial() { + google.events.cloud.audit.v1.Data.AuthenticationInfo result = new google.events.cloud.audit.v1.Data.AuthenticationInfo(this); + int from_bitField0_ = bitField0_; + result.principalEmail_ = principalEmail_; + result.authoritySelector_ = authoritySelector_; + if (thirdPartyPrincipalBuilder_ == null) { + result.thirdPartyPrincipal_ = thirdPartyPrincipal_; + } else { + result.thirdPartyPrincipal_ = thirdPartyPrincipalBuilder_.build(); + } + result.serviceAccountKeyName_ = serviceAccountKeyName_; + if (serviceAccountDelegationInfoBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + serviceAccountDelegationInfo_ = java.util.Collections.unmodifiableList(serviceAccountDelegationInfo_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.serviceAccountDelegationInfo_ = serviceAccountDelegationInfo_; + } else { + result.serviceAccountDelegationInfo_ = serviceAccountDelegationInfoBuilder_.build(); + } + result.principalSubject_ = principalSubject_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof google.events.cloud.audit.v1.Data.AuthenticationInfo) { + return mergeFrom((google.events.cloud.audit.v1.Data.AuthenticationInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.audit.v1.Data.AuthenticationInfo other) { + if (other == google.events.cloud.audit.v1.Data.AuthenticationInfo.getDefaultInstance()) return this; + if (!other.getPrincipalEmail().isEmpty()) { + principalEmail_ = other.principalEmail_; + onChanged(); + } + if (!other.getAuthoritySelector().isEmpty()) { + authoritySelector_ = other.authoritySelector_; + onChanged(); + } + if (other.hasThirdPartyPrincipal()) { + mergeThirdPartyPrincipal(other.getThirdPartyPrincipal()); + } + if (!other.getServiceAccountKeyName().isEmpty()) { + serviceAccountKeyName_ = other.serviceAccountKeyName_; + onChanged(); + } + if (serviceAccountDelegationInfoBuilder_ == null) { + if (!other.serviceAccountDelegationInfo_.isEmpty()) { + if (serviceAccountDelegationInfo_.isEmpty()) { + serviceAccountDelegationInfo_ = other.serviceAccountDelegationInfo_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServiceAccountDelegationInfoIsMutable(); + serviceAccountDelegationInfo_.addAll(other.serviceAccountDelegationInfo_); + } + onChanged(); + } + } else { + if (!other.serviceAccountDelegationInfo_.isEmpty()) { + if (serviceAccountDelegationInfoBuilder_.isEmpty()) { + serviceAccountDelegationInfoBuilder_.dispose(); + serviceAccountDelegationInfoBuilder_ = null; + serviceAccountDelegationInfo_ = other.serviceAccountDelegationInfo_; + bitField0_ = (bitField0_ & ~0x00000001); + serviceAccountDelegationInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getServiceAccountDelegationInfoFieldBuilder() : null; + } else { + serviceAccountDelegationInfoBuilder_.addAllMessages(other.serviceAccountDelegationInfo_); + } + } + } + if (!other.getPrincipalSubject().isEmpty()) { + principalSubject_ = other.principalSubject_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + google.events.cloud.audit.v1.Data.AuthenticationInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.audit.v1.Data.AuthenticationInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object principalEmail_ = ""; + /** + * + * The email address of the authenticated user (or service account on behalf + * of third party principal) making the request. For privacy reasons, the + * principal email address is redacted for all read-only operations that fail + * with a "permission denied" error. + *+ * + *string principal_email = 1;
+ * @return The principalEmail. + */ + public java.lang.String getPrincipalEmail() { + java.lang.Object ref = principalEmail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principalEmail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *+ * The email address of the authenticated user (or service account on behalf + * of third party principal) making the request. For privacy reasons, the + * principal email address is redacted for all read-only operations that fail + * with a "permission denied" error. + *+ * + *string principal_email = 1;
+ * @return The bytes for principalEmail. + */ + public com.google.protobuf.ByteString + getPrincipalEmailBytes() { + java.lang.Object ref = principalEmail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principalEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *+ * The email address of the authenticated user (or service account on behalf + * of third party principal) making the request. For privacy reasons, the + * principal email address is redacted for all read-only operations that fail + * with a "permission denied" error. + *+ * + *string principal_email = 1;
+ * @param value The principalEmail to set. + * @return This builder for chaining. + */ + public Builder setPrincipalEmail( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + principalEmail_ = value; + onChanged(); + return this; + } + /** + *+ * The email address of the authenticated user (or service account on behalf + * of third party principal) making the request. For privacy reasons, the + * principal email address is redacted for all read-only operations that fail + * with a "permission denied" error. + *+ * + *string principal_email = 1;
+ * @return This builder for chaining. + */ + public Builder clearPrincipalEmail() { + + principalEmail_ = getDefaultInstance().getPrincipalEmail(); + onChanged(); + return this; + } + /** + *+ * The email address of the authenticated user (or service account on behalf + * of third party principal) making the request. For privacy reasons, the + * principal email address is redacted for all read-only operations that fail + * with a "permission denied" error. + *+ * + *string principal_email = 1;
+ * @param value The bytes for principalEmail to set. + * @return This builder for chaining. + */ + public Builder setPrincipalEmailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + principalEmail_ = value; + onChanged(); + return this; + } + + private java.lang.Object authoritySelector_ = ""; + /** + *+ * The authority selector specified by the requestor, if any. + * It is not guaranteed that the principal was allowed to use this authority. + *+ * + *string authority_selector = 2;
+ * @return The authoritySelector. + */ + public java.lang.String getAuthoritySelector() { + java.lang.Object ref = authoritySelector_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authoritySelector_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *+ * The authority selector specified by the requestor, if any. + * It is not guaranteed that the principal was allowed to use this authority. + *+ * + *string authority_selector = 2;
+ * @return The bytes for authoritySelector. + */ + public com.google.protobuf.ByteString + getAuthoritySelectorBytes() { + java.lang.Object ref = authoritySelector_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + authoritySelector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *+ * The authority selector specified by the requestor, if any. + * It is not guaranteed that the principal was allowed to use this authority. + *+ * + *string authority_selector = 2;
+ * @param value The authoritySelector to set. + * @return This builder for chaining. + */ + public Builder setAuthoritySelector( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + authoritySelector_ = value; + onChanged(); + return this; + } + /** + *+ * The authority selector specified by the requestor, if any. + * It is not guaranteed that the principal was allowed to use this authority. + *+ * + *string authority_selector = 2;
+ * @return This builder for chaining. + */ + public Builder clearAuthoritySelector() { + + authoritySelector_ = getDefaultInstance().getAuthoritySelector(); + onChanged(); + return this; + } + /** + *+ * The authority selector specified by the requestor, if any. + * It is not guaranteed that the principal was allowed to use this authority. + *+ * + *string authority_selector = 2;
+ * @param value The bytes for authoritySelector to set. + * @return This builder for chaining. + */ + public Builder setAuthoritySelectorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + authoritySelector_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Struct thirdPartyPrincipal_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> thirdPartyPrincipalBuilder_; + /** + *+ * The third party identification (if any) of the authenticated user making + * the request. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct third_party_principal = 4;
+ * @return Whether the thirdPartyPrincipal field is set. + */ + public boolean hasThirdPartyPrincipal() { + return thirdPartyPrincipalBuilder_ != null || thirdPartyPrincipal_ != null; + } + /** + *+ * The third party identification (if any) of the authenticated user making + * the request. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct third_party_principal = 4;
+ * @return The thirdPartyPrincipal. + */ + public com.google.protobuf.Struct getThirdPartyPrincipal() { + if (thirdPartyPrincipalBuilder_ == null) { + return thirdPartyPrincipal_ == null ? com.google.protobuf.Struct.getDefaultInstance() : thirdPartyPrincipal_; + } else { + return thirdPartyPrincipalBuilder_.getMessage(); + } + } + /** + *+ * The third party identification (if any) of the authenticated user making + * the request. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct third_party_principal = 4;
+ */ + public Builder setThirdPartyPrincipal(com.google.protobuf.Struct value) { + if (thirdPartyPrincipalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + thirdPartyPrincipal_ = value; + onChanged(); + } else { + thirdPartyPrincipalBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * The third party identification (if any) of the authenticated user making + * the request. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct third_party_principal = 4;
+ */ + public Builder setThirdPartyPrincipal( + com.google.protobuf.Struct.Builder builderForValue) { + if (thirdPartyPrincipalBuilder_ == null) { + thirdPartyPrincipal_ = builderForValue.build(); + onChanged(); + } else { + thirdPartyPrincipalBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * The third party identification (if any) of the authenticated user making + * the request. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct third_party_principal = 4;
+ */ + public Builder mergeThirdPartyPrincipal(com.google.protobuf.Struct value) { + if (thirdPartyPrincipalBuilder_ == null) { + if (thirdPartyPrincipal_ != null) { + thirdPartyPrincipal_ = + com.google.protobuf.Struct.newBuilder(thirdPartyPrincipal_).mergeFrom(value).buildPartial(); + } else { + thirdPartyPrincipal_ = value; + } + onChanged(); + } else { + thirdPartyPrincipalBuilder_.mergeFrom(value); + } + + return this; + } + /** + *+ * The third party identification (if any) of the authenticated user making + * the request. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct third_party_principal = 4;
+ */ + public Builder clearThirdPartyPrincipal() { + if (thirdPartyPrincipalBuilder_ == null) { + thirdPartyPrincipal_ = null; + onChanged(); + } else { + thirdPartyPrincipal_ = null; + thirdPartyPrincipalBuilder_ = null; + } + + return this; + } + /** + *+ * The third party identification (if any) of the authenticated user making + * the request. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct third_party_principal = 4;
+ */ + public com.google.protobuf.Struct.Builder getThirdPartyPrincipalBuilder() { + + onChanged(); + return getThirdPartyPrincipalFieldBuilder().getBuilder(); + } + /** + *+ * The third party identification (if any) of the authenticated user making + * the request. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct third_party_principal = 4;
+ */ + public com.google.protobuf.StructOrBuilder getThirdPartyPrincipalOrBuilder() { + if (thirdPartyPrincipalBuilder_ != null) { + return thirdPartyPrincipalBuilder_.getMessageOrBuilder(); + } else { + return thirdPartyPrincipal_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : thirdPartyPrincipal_; + } + } + /** + *+ * The third party identification (if any) of the authenticated user making + * the request. + * When the JSON object represented here has a proto equivalent, the proto + * name will be indicated in the `@type` property. + *+ * + *.google.protobuf.Struct third_party_principal = 4;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getThirdPartyPrincipalFieldBuilder() { + if (thirdPartyPrincipalBuilder_ == null) { + thirdPartyPrincipalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getThirdPartyPrincipal(), + getParentForChildren(), + isClean()); + thirdPartyPrincipal_ = null; + } + return thirdPartyPrincipalBuilder_; + } + + private java.lang.Object serviceAccountKeyName_ = ""; + /** + *+ * The name of the service account key used to create or exchange + * credentials for authenticating the service account making the request. + * This is a scheme-less URI full resource name. For example: + * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" + *+ * + *string service_account_key_name = 5;
+ * @return The serviceAccountKeyName. + */ + public java.lang.String getServiceAccountKeyName() { + java.lang.Object ref = serviceAccountKeyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccountKeyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *+ * The name of the service account key used to create or exchange + * credentials for authenticating the service account making the request. + * This is a scheme-less URI full resource name. For example: + * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" + *+ * + *string service_account_key_name = 5;
+ * @return The bytes for serviceAccountKeyName. + */ + public com.google.protobuf.ByteString + getServiceAccountKeyNameBytes() { + java.lang.Object ref = serviceAccountKeyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + serviceAccountKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *+ * The name of the service account key used to create or exchange + * credentials for authenticating the service account making the request. + * This is a scheme-less URI full resource name. For example: + * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" + *+ * + *string service_account_key_name = 5;
+ * @param value The serviceAccountKeyName to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountKeyName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceAccountKeyName_ = value; + onChanged(); + return this; + } + /** + *+ * The name of the service account key used to create or exchange + * credentials for authenticating the service account making the request. + * This is a scheme-less URI full resource name. For example: + * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" + *+ * + *string service_account_key_name = 5;
+ * @return This builder for chaining. + */ + public Builder clearServiceAccountKeyName() { + + serviceAccountKeyName_ = getDefaultInstance().getServiceAccountKeyName(); + onChanged(); + return this; + } + /** + *+ * The name of the service account key used to create or exchange + * credentials for authenticating the service account making the request. + * This is a scheme-less URI full resource name. For example: + * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" + *+ * + *string service_account_key_name = 5;
+ * @param value The bytes for serviceAccountKeyName to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountKeyNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceAccountKeyName_ = value; + onChanged(); + return this; + } + + private java.util.ListserviceAccountDelegationInfo_ = + java.util.Collections.emptyList(); + private void ensureServiceAccountDelegationInfoIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + serviceAccountDelegationInfo_ = new java.util.ArrayList (serviceAccountDelegationInfo_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.Builder, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfoOrBuilder> serviceAccountDelegationInfoBuilder_; + + /** + * + * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + public java.util.ListgetServiceAccountDelegationInfoList() { + if (serviceAccountDelegationInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(serviceAccountDelegationInfo_); + } else { + return serviceAccountDelegationInfoBuilder_.getMessageList(); + } + } + /** + * + * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + public int getServiceAccountDelegationInfoCount() { + if (serviceAccountDelegationInfoBuilder_ == null) { + return serviceAccountDelegationInfo_.size(); + } else { + return serviceAccountDelegationInfoBuilder_.getCount(); + } + } + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo getServiceAccountDelegationInfo(int index) { + if (serviceAccountDelegationInfoBuilder_ == null) { + return serviceAccountDelegationInfo_.get(index); + } else { + return serviceAccountDelegationInfoBuilder_.getMessage(index); + } + } + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + public Builder setServiceAccountDelegationInfo( + int index, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo value) { + if (serviceAccountDelegationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountDelegationInfoIsMutable(); + serviceAccountDelegationInfo_.set(index, value); + onChanged(); + } else { + serviceAccountDelegationInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + public Builder setServiceAccountDelegationInfo( + int index, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.Builder builderForValue) { + if (serviceAccountDelegationInfoBuilder_ == null) { + ensureServiceAccountDelegationInfoIsMutable(); + serviceAccountDelegationInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + serviceAccountDelegationInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + public Builder addServiceAccountDelegationInfo(google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo value) { + if (serviceAccountDelegationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountDelegationInfoIsMutable(); + serviceAccountDelegationInfo_.add(value); + onChanged(); + } else { + serviceAccountDelegationInfoBuilder_.addMessage(value); + } + return this; + } + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + public Builder addServiceAccountDelegationInfo( + int index, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo value) { + if (serviceAccountDelegationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountDelegationInfoIsMutable(); + serviceAccountDelegationInfo_.add(index, value); + onChanged(); + } else { + serviceAccountDelegationInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + public Builder addServiceAccountDelegationInfo( + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.Builder builderForValue) { + if (serviceAccountDelegationInfoBuilder_ == null) { + ensureServiceAccountDelegationInfoIsMutable(); + serviceAccountDelegationInfo_.add(builderForValue.build()); + onChanged(); + } else { + serviceAccountDelegationInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + public Builder addServiceAccountDelegationInfo( + int index, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.Builder builderForValue) { + if (serviceAccountDelegationInfoBuilder_ == null) { + ensureServiceAccountDelegationInfoIsMutable(); + serviceAccountDelegationInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + serviceAccountDelegationInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + public Builder addAllServiceAccountDelegationInfo( + java.lang.Iterable extends google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo> values) { + if (serviceAccountDelegationInfoBuilder_ == null) { + ensureServiceAccountDelegationInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, serviceAccountDelegationInfo_); + onChanged(); + } else { + serviceAccountDelegationInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + public Builder clearServiceAccountDelegationInfo() { + if (serviceAccountDelegationInfoBuilder_ == null) { + serviceAccountDelegationInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + serviceAccountDelegationInfoBuilder_.clear(); + } + return this; + } + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + public Builder removeServiceAccountDelegationInfo(int index) { + if (serviceAccountDelegationInfoBuilder_ == null) { + ensureServiceAccountDelegationInfoIsMutable(); + serviceAccountDelegationInfo_.remove(index); + onChanged(); + } else { + serviceAccountDelegationInfoBuilder_.remove(index); + } + return this; + } + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.Builder getServiceAccountDelegationInfoBuilder( + int index) { + return getServiceAccountDelegationInfoFieldBuilder().getBuilder(index); + } + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfoOrBuilder getServiceAccountDelegationInfoOrBuilder( + int index) { + if (serviceAccountDelegationInfoBuilder_ == null) { + return serviceAccountDelegationInfo_.get(index); } else { + return serviceAccountDelegationInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + public java.util.List extends google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfoOrBuilder> + getServiceAccountDelegationInfoOrBuilderList() { + if (serviceAccountDelegationInfoBuilder_ != null) { + return serviceAccountDelegationInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(serviceAccountDelegationInfo_); + } + } + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.Builder addServiceAccountDelegationInfoBuilder() { + return getServiceAccountDelegationInfoFieldBuilder().addBuilder( + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.getDefaultInstance()); + } + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.Builder addServiceAccountDelegationInfoBuilder( + int index) { + return getServiceAccountDelegationInfoFieldBuilder().addBuilder( + index, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.getDefaultInstance()); + } + /** + *+ * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities present, they are guaranteed to be sorted based on the original + * ordering of the identity delegation events. + *+ * + *repeated .google.events.cloud.audit.v1.ServiceAccountDelegationInfo service_account_delegation_info = 6;
+ */ + public java.util.List+ getServiceAccountDelegationInfoBuilderList() { + return getServiceAccountDelegationInfoFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.Builder, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfoOrBuilder> + getServiceAccountDelegationInfoFieldBuilder() { + if (serviceAccountDelegationInfoBuilder_ == null) { + serviceAccountDelegationInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.Builder, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfoOrBuilder>( + serviceAccountDelegationInfo_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + serviceAccountDelegationInfo_ = null; + } + return serviceAccountDelegationInfoBuilder_; + } + + private java.lang.Object principalSubject_ = ""; + /** + * + * String representation of identity of requesting party. + * Populated for both first and third party identities. + *+ * + *string principal_subject = 8;
+ * @return The principalSubject. + */ + public java.lang.String getPrincipalSubject() { + java.lang.Object ref = principalSubject_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principalSubject_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *+ * String representation of identity of requesting party. + * Populated for both first and third party identities. + *+ * + *string principal_subject = 8;
+ * @return The bytes for principalSubject. + */ + public com.google.protobuf.ByteString + getPrincipalSubjectBytes() { + java.lang.Object ref = principalSubject_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principalSubject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *+ * String representation of identity of requesting party. + * Populated for both first and third party identities. + *+ * + *string principal_subject = 8;
+ * @param value The principalSubject to set. + * @return This builder for chaining. + */ + public Builder setPrincipalSubject( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + principalSubject_ = value; + onChanged(); + return this; + } + /** + *+ * String representation of identity of requesting party. + * Populated for both first and third party identities. + *+ * + *string principal_subject = 8;
+ * @return This builder for chaining. + */ + public Builder clearPrincipalSubject() { + + principalSubject_ = getDefaultInstance().getPrincipalSubject(); + onChanged(); + return this; + } + /** + *+ * String representation of identity of requesting party. + * Populated for both first and third party identities. + *+ * + *string principal_subject = 8;
+ * @param value The bytes for principalSubject to set. + * @return This builder for chaining. + */ + public Builder setPrincipalSubjectBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + principalSubject_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.events.cloud.audit.v1.AuthenticationInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.audit.v1.AuthenticationInfo) + private static final google.events.cloud.audit.v1.Data.AuthenticationInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.audit.v1.Data.AuthenticationInfo(); + } + + public static google.events.cloud.audit.v1.Data.AuthenticationInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser+ PARSER = new com.google.protobuf.AbstractParser () { + @java.lang.Override + public AuthenticationInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AuthenticationInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuthenticationInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AuthorizationInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.audit.v1.AuthorizationInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * The resource being accessed, as a REST-style string. For example: + * bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID + *+ * + *string resource = 1;
+ * @return The resource. + */ + java.lang.String getResource(); + /** + *+ * The resource being accessed, as a REST-style string. For example: + * bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID + *+ * + *string resource = 1;
+ * @return The bytes for resource. + */ + com.google.protobuf.ByteString + getResourceBytes(); + + /** + *+ * The required IAM permission. + *+ * + *string permission = 2;
+ * @return The permission. + */ + java.lang.String getPermission(); + /** + *+ * The required IAM permission. + *+ * + *string permission = 2;
+ * @return The bytes for permission. + */ + com.google.protobuf.ByteString + getPermissionBytes(); + + /** + *+ * Whether or not authorization for `resource` and `permission` + * was granted. + *+ * + *bool granted = 3;
+ * @return The granted. + */ + boolean getGranted(); + + /** + *+ * Resource attributes used in IAM condition evaluation. This field contains + * resource attributes like resource type and resource name. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLogData.request_metadata.request_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Resource resource_attributes = 5;
+ * @return Whether the resourceAttributes field is set. + */ + boolean hasResourceAttributes(); + /** + *+ * Resource attributes used in IAM condition evaluation. This field contains + * resource attributes like resource type and resource name. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLogData.request_metadata.request_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Resource resource_attributes = 5;
+ * @return The resourceAttributes. + */ + com.google.rpc.context.AttributeContext.Resource getResourceAttributes(); + /** + *+ * Resource attributes used in IAM condition evaluation. This field contains + * resource attributes like resource type and resource name. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLogData.request_metadata.request_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Resource resource_attributes = 5;
+ */ + com.google.rpc.context.AttributeContext.ResourceOrBuilder getResourceAttributesOrBuilder(); + } + /** + *+ * Authorization information for the operation. + *+ * + * Protobuf type {@code google.events.cloud.audit.v1.AuthorizationInfo} + */ + public static final class AuthorizationInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.audit.v1.AuthorizationInfo) + AuthorizationInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuthorizationInfo.newBuilder() to construct. + private AuthorizationInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private AuthorizationInfo() { + resource_ = ""; + permission_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AuthorizationInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AuthorizationInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + resource_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + permission_ = s; + break; + } + case 24: { + + granted_ = input.readBool(); + break; + } + case 42: { + com.google.rpc.context.AttributeContext.Resource.Builder subBuilder = null; + if (resourceAttributes_ != null) { + subBuilder = resourceAttributes_.toBuilder(); + } + resourceAttributes_ = input.readMessage(com.google.rpc.context.AttributeContext.Resource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resourceAttributes_); + resourceAttributes_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthorizationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthorizationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.audit.v1.Data.AuthorizationInfo.class, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder.class); + } + + public static final int RESOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object resource_; + /** + *+ * The resource being accessed, as a REST-style string. For example: + * bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID + *+ * + *string resource = 1;
+ * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } + } + /** + *+ * The resource being accessed, as a REST-style string. For example: + * bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID + *+ * + *string resource = 1;
+ * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERMISSION_FIELD_NUMBER = 2; + private volatile java.lang.Object permission_; + /** + *+ * The required IAM permission. + *+ * + *string permission = 2;
+ * @return The permission. + */ + @java.lang.Override + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + permission_ = s; + return s; + } + } + /** + *+ * The required IAM permission. + *+ * + *string permission = 2;
+ * @return The bytes for permission. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GRANTED_FIELD_NUMBER = 3; + private boolean granted_; + /** + *+ * Whether or not authorization for `resource` and `permission` + * was granted. + *+ * + *bool granted = 3;
+ * @return The granted. + */ + @java.lang.Override + public boolean getGranted() { + return granted_; + } + + public static final int RESOURCE_ATTRIBUTES_FIELD_NUMBER = 5; + private com.google.rpc.context.AttributeContext.Resource resourceAttributes_; + /** + *+ * Resource attributes used in IAM condition evaluation. This field contains + * resource attributes like resource type and resource name. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLogData.request_metadata.request_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Resource resource_attributes = 5;
+ * @return Whether the resourceAttributes field is set. + */ + @java.lang.Override + public boolean hasResourceAttributes() { + return resourceAttributes_ != null; + } + /** + *+ * Resource attributes used in IAM condition evaluation. This field contains + * resource attributes like resource type and resource name. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLogData.request_metadata.request_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Resource resource_attributes = 5;
+ * @return The resourceAttributes. + */ + @java.lang.Override + public com.google.rpc.context.AttributeContext.Resource getResourceAttributes() { + return resourceAttributes_ == null ? com.google.rpc.context.AttributeContext.Resource.getDefaultInstance() : resourceAttributes_; + } + /** + *+ * Resource attributes used in IAM condition evaluation. This field contains + * resource attributes like resource type and resource name. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLogData.request_metadata.request_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Resource resource_attributes = 5;
+ */ + @java.lang.Override + public com.google.rpc.context.AttributeContext.ResourceOrBuilder getResourceAttributesOrBuilder() { + return getResourceAttributes(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getResourceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_); + } + if (!getPermissionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, permission_); + } + if (granted_ != false) { + output.writeBool(3, granted_); + } + if (resourceAttributes_ != null) { + output.writeMessage(5, getResourceAttributes()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getResourceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_); + } + if (!getPermissionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, permission_); + } + if (granted_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, granted_); + } + if (resourceAttributes_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getResourceAttributes()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof google.events.cloud.audit.v1.Data.AuthorizationInfo)) { + return super.equals(obj); + } + google.events.cloud.audit.v1.Data.AuthorizationInfo other = (google.events.cloud.audit.v1.Data.AuthorizationInfo) obj; + + if (!getResource() + .equals(other.getResource())) return false; + if (!getPermission() + .equals(other.getPermission())) return false; + if (getGranted() + != other.getGranted()) return false; + if (hasResourceAttributes() != other.hasResourceAttributes()) return false; + if (hasResourceAttributes()) { + if (!getResourceAttributes() + .equals(other.getResourceAttributes())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + hash = (37 * hash) + PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + getPermission().hashCode(); + hash = (37 * hash) + GRANTED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getGranted()); + if (hasResourceAttributes()) { + hash = (37 * hash) + RESOURCE_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getResourceAttributes().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(google.events.cloud.audit.v1.Data.AuthorizationInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *+ * Authorization information for the operation. + *+ * + * Protobuf type {@code google.events.cloud.audit.v1.AuthorizationInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builderimplements + // @@protoc_insertion_point(builder_implements:google.events.cloud.audit.v1.AuthorizationInfo) + google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthorizationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthorizationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.audit.v1.Data.AuthorizationInfo.class, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder.class); + } + + // Construct using google.events.cloud.audit.v1.Data.AuthorizationInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + resource_ = ""; + + permission_ = ""; + + granted_ = false; + + if (resourceAttributesBuilder_ == null) { + resourceAttributes_ = null; + } else { + resourceAttributes_ = null; + resourceAttributesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthorizationInfo_descriptor; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuthorizationInfo getDefaultInstanceForType() { + return google.events.cloud.audit.v1.Data.AuthorizationInfo.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuthorizationInfo build() { + google.events.cloud.audit.v1.Data.AuthorizationInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuthorizationInfo buildPartial() { + google.events.cloud.audit.v1.Data.AuthorizationInfo result = new google.events.cloud.audit.v1.Data.AuthorizationInfo(this); + result.resource_ = resource_; + result.permission_ = permission_; + result.granted_ = granted_; + if (resourceAttributesBuilder_ == null) { + result.resourceAttributes_ = resourceAttributes_; + } else { + result.resourceAttributes_ = resourceAttributesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof google.events.cloud.audit.v1.Data.AuthorizationInfo) { + return mergeFrom((google.events.cloud.audit.v1.Data.AuthorizationInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.audit.v1.Data.AuthorizationInfo other) { + if (other == google.events.cloud.audit.v1.Data.AuthorizationInfo.getDefaultInstance()) return this; + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + onChanged(); + } + if (!other.getPermission().isEmpty()) { + permission_ = other.permission_; + onChanged(); + } + if (other.getGranted() != false) { + setGranted(other.getGranted()); + } + if (other.hasResourceAttributes()) { + mergeResourceAttributes(other.getResourceAttributes()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + google.events.cloud.audit.v1.Data.AuthorizationInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.audit.v1.Data.AuthorizationInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object resource_ = ""; + /** + * + * The resource being accessed, as a REST-style string. For example: + * bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID + *+ * + *string resource = 1;
+ * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *+ * The resource being accessed, as a REST-style string. For example: + * bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID + *+ * + *string resource = 1;
+ * @return The bytes for resource. + */ + public com.google.protobuf.ByteString + getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *+ * The resource being accessed, as a REST-style string. For example: + * bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID + *+ * + *string resource = 1;
+ * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resource_ = value; + onChanged(); + return this; + } + /** + *+ * The resource being accessed, as a REST-style string. For example: + * bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID + *+ * + *string resource = 1;
+ * @return This builder for chaining. + */ + public Builder clearResource() { + + resource_ = getDefaultInstance().getResource(); + onChanged(); + return this; + } + /** + *+ * The resource being accessed, as a REST-style string. For example: + * bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID + *+ * + *string resource = 1;
+ * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resource_ = value; + onChanged(); + return this; + } + + private java.lang.Object permission_ = ""; + /** + *+ * The required IAM permission. + *+ * + *string permission = 2;
+ * @return The permission. + */ + public java.lang.String getPermission() { + java.lang.Object ref = permission_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + permission_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *+ * The required IAM permission. + *+ * + *string permission = 2;
+ * @return The bytes for permission. + */ + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = permission_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + permission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *+ * The required IAM permission. + *+ * + *string permission = 2;
+ * @param value The permission to set. + * @return This builder for chaining. + */ + public Builder setPermission( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + permission_ = value; + onChanged(); + return this; + } + /** + *+ * The required IAM permission. + *+ * + *string permission = 2;
+ * @return This builder for chaining. + */ + public Builder clearPermission() { + + permission_ = getDefaultInstance().getPermission(); + onChanged(); + return this; + } + /** + *+ * The required IAM permission. + *+ * + *string permission = 2;
+ * @param value The bytes for permission to set. + * @return This builder for chaining. + */ + public Builder setPermissionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + permission_ = value; + onChanged(); + return this; + } + + private boolean granted_ ; + /** + *+ * Whether or not authorization for `resource` and `permission` + * was granted. + *+ * + *bool granted = 3;
+ * @return The granted. + */ + @java.lang.Override + public boolean getGranted() { + return granted_; + } + /** + *+ * Whether or not authorization for `resource` and `permission` + * was granted. + *+ * + *bool granted = 3;
+ * @param value The granted to set. + * @return This builder for chaining. + */ + public Builder setGranted(boolean value) { + + granted_ = value; + onChanged(); + return this; + } + /** + *+ * Whether or not authorization for `resource` and `permission` + * was granted. + *+ * + *bool granted = 3;
+ * @return This builder for chaining. + */ + public Builder clearGranted() { + + granted_ = false; + onChanged(); + return this; + } + + private com.google.rpc.context.AttributeContext.Resource resourceAttributes_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.context.AttributeContext.Resource, com.google.rpc.context.AttributeContext.Resource.Builder, com.google.rpc.context.AttributeContext.ResourceOrBuilder> resourceAttributesBuilder_; + /** + *+ * Resource attributes used in IAM condition evaluation. This field contains + * resource attributes like resource type and resource name. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLogData.request_metadata.request_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Resource resource_attributes = 5;
+ * @return Whether the resourceAttributes field is set. + */ + public boolean hasResourceAttributes() { + return resourceAttributesBuilder_ != null || resourceAttributes_ != null; + } + /** + *+ * Resource attributes used in IAM condition evaluation. This field contains + * resource attributes like resource type and resource name. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLogData.request_metadata.request_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Resource resource_attributes = 5;
+ * @return The resourceAttributes. + */ + public com.google.rpc.context.AttributeContext.Resource getResourceAttributes() { + if (resourceAttributesBuilder_ == null) { + return resourceAttributes_ == null ? com.google.rpc.context.AttributeContext.Resource.getDefaultInstance() : resourceAttributes_; + } else { + return resourceAttributesBuilder_.getMessage(); + } + } + /** + *+ * Resource attributes used in IAM condition evaluation. This field contains + * resource attributes like resource type and resource name. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLogData.request_metadata.request_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Resource resource_attributes = 5;
+ */ + public Builder setResourceAttributes(com.google.rpc.context.AttributeContext.Resource value) { + if (resourceAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceAttributes_ = value; + onChanged(); + } else { + resourceAttributesBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * Resource attributes used in IAM condition evaluation. This field contains + * resource attributes like resource type and resource name. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLogData.request_metadata.request_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Resource resource_attributes = 5;
+ */ + public Builder setResourceAttributes( + com.google.rpc.context.AttributeContext.Resource.Builder builderForValue) { + if (resourceAttributesBuilder_ == null) { + resourceAttributes_ = builderForValue.build(); + onChanged(); + } else { + resourceAttributesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * Resource attributes used in IAM condition evaluation. This field contains + * resource attributes like resource type and resource name. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLogData.request_metadata.request_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Resource resource_attributes = 5;
+ */ + public Builder mergeResourceAttributes(com.google.rpc.context.AttributeContext.Resource value) { + if (resourceAttributesBuilder_ == null) { + if (resourceAttributes_ != null) { + resourceAttributes_ = + com.google.rpc.context.AttributeContext.Resource.newBuilder(resourceAttributes_).mergeFrom(value).buildPartial(); + } else { + resourceAttributes_ = value; + } + onChanged(); + } else { + resourceAttributesBuilder_.mergeFrom(value); + } + + return this; + } + /** + *+ * Resource attributes used in IAM condition evaluation. This field contains + * resource attributes like resource type and resource name. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLogData.request_metadata.request_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Resource resource_attributes = 5;
+ */ + public Builder clearResourceAttributes() { + if (resourceAttributesBuilder_ == null) { + resourceAttributes_ = null; + onChanged(); + } else { + resourceAttributes_ = null; + resourceAttributesBuilder_ = null; + } + + return this; + } + /** + *+ * Resource attributes used in IAM condition evaluation. This field contains + * resource attributes like resource type and resource name. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLogData.request_metadata.request_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Resource resource_attributes = 5;
+ */ + public com.google.rpc.context.AttributeContext.Resource.Builder getResourceAttributesBuilder() { + + onChanged(); + return getResourceAttributesFieldBuilder().getBuilder(); + } + /** + *+ * Resource attributes used in IAM condition evaluation. This field contains + * resource attributes like resource type and resource name. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLogData.request_metadata.request_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Resource resource_attributes = 5;
+ */ + public com.google.rpc.context.AttributeContext.ResourceOrBuilder getResourceAttributesOrBuilder() { + if (resourceAttributesBuilder_ != null) { + return resourceAttributesBuilder_.getMessageOrBuilder(); + } else { + return resourceAttributes_ == null ? + com.google.rpc.context.AttributeContext.Resource.getDefaultInstance() : resourceAttributes_; + } + } + /** + *+ * Resource attributes used in IAM condition evaluation. This field contains + * resource attributes like resource type and resource name. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLogData.request_metadata.request_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Resource resource_attributes = 5;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.context.AttributeContext.Resource, com.google.rpc.context.AttributeContext.Resource.Builder, com.google.rpc.context.AttributeContext.ResourceOrBuilder> + getResourceAttributesFieldBuilder() { + if (resourceAttributesBuilder_ == null) { + resourceAttributesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.context.AttributeContext.Resource, com.google.rpc.context.AttributeContext.Resource.Builder, com.google.rpc.context.AttributeContext.ResourceOrBuilder>( + getResourceAttributes(), + getParentForChildren(), + isClean()); + resourceAttributes_ = null; + } + return resourceAttributesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.events.cloud.audit.v1.AuthorizationInfo) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.audit.v1.AuthorizationInfo) + private static final google.events.cloud.audit.v1.Data.AuthorizationInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.audit.v1.Data.AuthorizationInfo(); + } + + public static google.events.cloud.audit.v1.Data.AuthorizationInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser+ PARSER = new com.google.protobuf.AbstractParser () { + @java.lang.Override + public AuthorizationInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AuthorizationInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.AuthorizationInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RequestMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.audit.v1.RequestMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * The IP address of the caller. + * For caller from internet, this will be public IPv4 or IPv6 address. + * For caller from a Compute Engine VM with external IP address, this + * will be the VM's external IP address. For caller from a Compute + * Engine VM without external IP address, if the VM is in the same + * organization (or project) as the accessed resource, `caller_ip` will + * be the VM's internal IPv4 address, otherwise the `caller_ip` will be + * redacted to "gce-internal-ip". + * See https://cloud.google.com/compute/docs/vpc/ for more information. + *+ * + *string caller_ip = 1;
+ * @return The callerIp. + */ + java.lang.String getCallerIp(); + /** + *+ * The IP address of the caller. + * For caller from internet, this will be public IPv4 or IPv6 address. + * For caller from a Compute Engine VM with external IP address, this + * will be the VM's external IP address. For caller from a Compute + * Engine VM without external IP address, if the VM is in the same + * organization (or project) as the accessed resource, `caller_ip` will + * be the VM's internal IPv4 address, otherwise the `caller_ip` will be + * redacted to "gce-internal-ip". + * See https://cloud.google.com/compute/docs/vpc/ for more information. + *+ * + *string caller_ip = 1;
+ * @return The bytes for callerIp. + */ + com.google.protobuf.ByteString + getCallerIpBytes(); + + /** + *+ * The user agent of the caller. + * This information is not authenticated and should be treated accordingly. + * For example: + * + `google-api-python-client/1.4.0`: + * The request was made by the Google API client for Python. + * + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: + * The request was made by the Google Cloud SDK CLI (gcloud). + * + `AppEngine-Google; (+http://code.google.com/appengine; appid: + * s~my-project`: + * The request was made from the `my-project` App Engine app. + *+ * + *string caller_supplied_user_agent = 2;
+ * @return The callerSuppliedUserAgent. + */ + java.lang.String getCallerSuppliedUserAgent(); + /** + *+ * The user agent of the caller. + * This information is not authenticated and should be treated accordingly. + * For example: + * + `google-api-python-client/1.4.0`: + * The request was made by the Google API client for Python. + * + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: + * The request was made by the Google Cloud SDK CLI (gcloud). + * + `AppEngine-Google; (+http://code.google.com/appengine; appid: + * s~my-project`: + * The request was made from the `my-project` App Engine app. + *+ * + *string caller_supplied_user_agent = 2;
+ * @return The bytes for callerSuppliedUserAgent. + */ + com.google.protobuf.ByteString + getCallerSuppliedUserAgentBytes(); + + /** + *+ * The network of the caller. + * Set only if the network host project is part of the same GCP organization + * (or project) as the accessed resource. + * See https://cloud.google.com/compute/docs/vpc/ for more information. + * This is a scheme-less URI full resource name. For example: + * "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID" + *+ * + *string caller_network = 3;
+ * @return The callerNetwork. + */ + java.lang.String getCallerNetwork(); + /** + *+ * The network of the caller. + * Set only if the network host project is part of the same GCP organization + * (or project) as the accessed resource. + * See https://cloud.google.com/compute/docs/vpc/ for more information. + * This is a scheme-less URI full resource name. For example: + * "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID" + *+ * + *string caller_network = 3;
+ * @return The bytes for callerNetwork. + */ + com.google.protobuf.ByteString + getCallerNetworkBytes(); + + /** + *+ * Request attributes used in IAM condition evaluation. This field contains + * request attributes like request time and access levels associated with + * the request. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLog.authentication_info.resource_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Request request_attributes = 7;
+ * @return Whether the requestAttributes field is set. + */ + boolean hasRequestAttributes(); + /** + *+ * Request attributes used in IAM condition evaluation. This field contains + * request attributes like request time and access levels associated with + * the request. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLog.authentication_info.resource_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Request request_attributes = 7;
+ * @return The requestAttributes. + */ + com.google.rpc.context.AttributeContext.Request getRequestAttributes(); + /** + *+ * Request attributes used in IAM condition evaluation. This field contains + * request attributes like request time and access levels associated with + * the request. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLog.authentication_info.resource_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Request request_attributes = 7;
+ */ + com.google.rpc.context.AttributeContext.RequestOrBuilder getRequestAttributesOrBuilder(); + + /** + *+ * The destination of a network activity, such as accepting a TCP connection. + * In a multi hop network activity, the destination represents the receiver of + * the last hop. Only two fields are used in this message, Peer.port and + * Peer.ip. These fields are optionally populated by those services utilizing + * the IAM condition feature. + *+ * + *.google.rpc.context.AttributeContext.Peer destination_attributes = 8;
+ * @return Whether the destinationAttributes field is set. + */ + boolean hasDestinationAttributes(); + /** + *+ * The destination of a network activity, such as accepting a TCP connection. + * In a multi hop network activity, the destination represents the receiver of + * the last hop. Only two fields are used in this message, Peer.port and + * Peer.ip. These fields are optionally populated by those services utilizing + * the IAM condition feature. + *+ * + *.google.rpc.context.AttributeContext.Peer destination_attributes = 8;
+ * @return The destinationAttributes. + */ + com.google.rpc.context.AttributeContext.Peer getDestinationAttributes(); + /** + *+ * The destination of a network activity, such as accepting a TCP connection. + * In a multi hop network activity, the destination represents the receiver of + * the last hop. Only two fields are used in this message, Peer.port and + * Peer.ip. These fields are optionally populated by those services utilizing + * the IAM condition feature. + *+ * + *.google.rpc.context.AttributeContext.Peer destination_attributes = 8;
+ */ + com.google.rpc.context.AttributeContext.PeerOrBuilder getDestinationAttributesOrBuilder(); + } + /** + *+ * Metadata about the request. + *+ * + * Protobuf type {@code google.events.cloud.audit.v1.RequestMetadata} + */ + public static final class RequestMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.audit.v1.RequestMetadata) + RequestMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use RequestMetadata.newBuilder() to construct. + private RequestMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private RequestMetadata() { + callerIp_ = ""; + callerSuppliedUserAgent_ = ""; + callerNetwork_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RequestMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RequestMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + callerIp_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + callerSuppliedUserAgent_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + callerNetwork_ = s; + break; + } + case 58: { + com.google.rpc.context.AttributeContext.Request.Builder subBuilder = null; + if (requestAttributes_ != null) { + subBuilder = requestAttributes_.toBuilder(); + } + requestAttributes_ = input.readMessage(com.google.rpc.context.AttributeContext.Request.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(requestAttributes_); + requestAttributes_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + com.google.rpc.context.AttributeContext.Peer.Builder subBuilder = null; + if (destinationAttributes_ != null) { + subBuilder = destinationAttributes_.toBuilder(); + } + destinationAttributes_ = input.readMessage(com.google.rpc.context.AttributeContext.Peer.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(destinationAttributes_); + destinationAttributes_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_RequestMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_RequestMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.audit.v1.Data.RequestMetadata.class, google.events.cloud.audit.v1.Data.RequestMetadata.Builder.class); + } + + public static final int CALLER_IP_FIELD_NUMBER = 1; + private volatile java.lang.Object callerIp_; + /** + *+ * The IP address of the caller. + * For caller from internet, this will be public IPv4 or IPv6 address. + * For caller from a Compute Engine VM with external IP address, this + * will be the VM's external IP address. For caller from a Compute + * Engine VM without external IP address, if the VM is in the same + * organization (or project) as the accessed resource, `caller_ip` will + * be the VM's internal IPv4 address, otherwise the `caller_ip` will be + * redacted to "gce-internal-ip". + * See https://cloud.google.com/compute/docs/vpc/ for more information. + *+ * + *string caller_ip = 1;
+ * @return The callerIp. + */ + @java.lang.Override + public java.lang.String getCallerIp() { + java.lang.Object ref = callerIp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + callerIp_ = s; + return s; + } + } + /** + *+ * The IP address of the caller. + * For caller from internet, this will be public IPv4 or IPv6 address. + * For caller from a Compute Engine VM with external IP address, this + * will be the VM's external IP address. For caller from a Compute + * Engine VM without external IP address, if the VM is in the same + * organization (or project) as the accessed resource, `caller_ip` will + * be the VM's internal IPv4 address, otherwise the `caller_ip` will be + * redacted to "gce-internal-ip". + * See https://cloud.google.com/compute/docs/vpc/ for more information. + *+ * + *string caller_ip = 1;
+ * @return The bytes for callerIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCallerIpBytes() { + java.lang.Object ref = callerIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + callerIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CALLER_SUPPLIED_USER_AGENT_FIELD_NUMBER = 2; + private volatile java.lang.Object callerSuppliedUserAgent_; + /** + *+ * The user agent of the caller. + * This information is not authenticated and should be treated accordingly. + * For example: + * + `google-api-python-client/1.4.0`: + * The request was made by the Google API client for Python. + * + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: + * The request was made by the Google Cloud SDK CLI (gcloud). + * + `AppEngine-Google; (+http://code.google.com/appengine; appid: + * s~my-project`: + * The request was made from the `my-project` App Engine app. + *+ * + *string caller_supplied_user_agent = 2;
+ * @return The callerSuppliedUserAgent. + */ + @java.lang.Override + public java.lang.String getCallerSuppliedUserAgent() { + java.lang.Object ref = callerSuppliedUserAgent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + callerSuppliedUserAgent_ = s; + return s; + } + } + /** + *+ * The user agent of the caller. + * This information is not authenticated and should be treated accordingly. + * For example: + * + `google-api-python-client/1.4.0`: + * The request was made by the Google API client for Python. + * + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: + * The request was made by the Google Cloud SDK CLI (gcloud). + * + `AppEngine-Google; (+http://code.google.com/appengine; appid: + * s~my-project`: + * The request was made from the `my-project` App Engine app. + *+ * + *string caller_supplied_user_agent = 2;
+ * @return The bytes for callerSuppliedUserAgent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCallerSuppliedUserAgentBytes() { + java.lang.Object ref = callerSuppliedUserAgent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + callerSuppliedUserAgent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CALLER_NETWORK_FIELD_NUMBER = 3; + private volatile java.lang.Object callerNetwork_; + /** + *+ * The network of the caller. + * Set only if the network host project is part of the same GCP organization + * (or project) as the accessed resource. + * See https://cloud.google.com/compute/docs/vpc/ for more information. + * This is a scheme-less URI full resource name. For example: + * "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID" + *+ * + *string caller_network = 3;
+ * @return The callerNetwork. + */ + @java.lang.Override + public java.lang.String getCallerNetwork() { + java.lang.Object ref = callerNetwork_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + callerNetwork_ = s; + return s; + } + } + /** + *+ * The network of the caller. + * Set only if the network host project is part of the same GCP organization + * (or project) as the accessed resource. + * See https://cloud.google.com/compute/docs/vpc/ for more information. + * This is a scheme-less URI full resource name. For example: + * "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID" + *+ * + *string caller_network = 3;
+ * @return The bytes for callerNetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCallerNetworkBytes() { + java.lang.Object ref = callerNetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + callerNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ATTRIBUTES_FIELD_NUMBER = 7; + private com.google.rpc.context.AttributeContext.Request requestAttributes_; + /** + *+ * Request attributes used in IAM condition evaluation. This field contains + * request attributes like request time and access levels associated with + * the request. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLog.authentication_info.resource_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Request request_attributes = 7;
+ * @return Whether the requestAttributes field is set. + */ + @java.lang.Override + public boolean hasRequestAttributes() { + return requestAttributes_ != null; + } + /** + *+ * Request attributes used in IAM condition evaluation. This field contains + * request attributes like request time and access levels associated with + * the request. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLog.authentication_info.resource_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Request request_attributes = 7;
+ * @return The requestAttributes. + */ + @java.lang.Override + public com.google.rpc.context.AttributeContext.Request getRequestAttributes() { + return requestAttributes_ == null ? com.google.rpc.context.AttributeContext.Request.getDefaultInstance() : requestAttributes_; + } + /** + *+ * Request attributes used in IAM condition evaluation. This field contains + * request attributes like request time and access levels associated with + * the request. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLog.authentication_info.resource_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Request request_attributes = 7;
+ */ + @java.lang.Override + public com.google.rpc.context.AttributeContext.RequestOrBuilder getRequestAttributesOrBuilder() { + return getRequestAttributes(); + } + + public static final int DESTINATION_ATTRIBUTES_FIELD_NUMBER = 8; + private com.google.rpc.context.AttributeContext.Peer destinationAttributes_; + /** + *+ * The destination of a network activity, such as accepting a TCP connection. + * In a multi hop network activity, the destination represents the receiver of + * the last hop. Only two fields are used in this message, Peer.port and + * Peer.ip. These fields are optionally populated by those services utilizing + * the IAM condition feature. + *+ * + *.google.rpc.context.AttributeContext.Peer destination_attributes = 8;
+ * @return Whether the destinationAttributes field is set. + */ + @java.lang.Override + public boolean hasDestinationAttributes() { + return destinationAttributes_ != null; + } + /** + *+ * The destination of a network activity, such as accepting a TCP connection. + * In a multi hop network activity, the destination represents the receiver of + * the last hop. Only two fields are used in this message, Peer.port and + * Peer.ip. These fields are optionally populated by those services utilizing + * the IAM condition feature. + *+ * + *.google.rpc.context.AttributeContext.Peer destination_attributes = 8;
+ * @return The destinationAttributes. + */ + @java.lang.Override + public com.google.rpc.context.AttributeContext.Peer getDestinationAttributes() { + return destinationAttributes_ == null ? com.google.rpc.context.AttributeContext.Peer.getDefaultInstance() : destinationAttributes_; + } + /** + *+ * The destination of a network activity, such as accepting a TCP connection. + * In a multi hop network activity, the destination represents the receiver of + * the last hop. Only two fields are used in this message, Peer.port and + * Peer.ip. These fields are optionally populated by those services utilizing + * the IAM condition feature. + *+ * + *.google.rpc.context.AttributeContext.Peer destination_attributes = 8;
+ */ + @java.lang.Override + public com.google.rpc.context.AttributeContext.PeerOrBuilder getDestinationAttributesOrBuilder() { + return getDestinationAttributes(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getCallerIpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, callerIp_); + } + if (!getCallerSuppliedUserAgentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, callerSuppliedUserAgent_); + } + if (!getCallerNetworkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, callerNetwork_); + } + if (requestAttributes_ != null) { + output.writeMessage(7, getRequestAttributes()); + } + if (destinationAttributes_ != null) { + output.writeMessage(8, getDestinationAttributes()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCallerIpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, callerIp_); + } + if (!getCallerSuppliedUserAgentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, callerSuppliedUserAgent_); + } + if (!getCallerNetworkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, callerNetwork_); + } + if (requestAttributes_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getRequestAttributes()); + } + if (destinationAttributes_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getDestinationAttributes()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof google.events.cloud.audit.v1.Data.RequestMetadata)) { + return super.equals(obj); + } + google.events.cloud.audit.v1.Data.RequestMetadata other = (google.events.cloud.audit.v1.Data.RequestMetadata) obj; + + if (!getCallerIp() + .equals(other.getCallerIp())) return false; + if (!getCallerSuppliedUserAgent() + .equals(other.getCallerSuppliedUserAgent())) return false; + if (!getCallerNetwork() + .equals(other.getCallerNetwork())) return false; + if (hasRequestAttributes() != other.hasRequestAttributes()) return false; + if (hasRequestAttributes()) { + if (!getRequestAttributes() + .equals(other.getRequestAttributes())) return false; + } + if (hasDestinationAttributes() != other.hasDestinationAttributes()) return false; + if (hasDestinationAttributes()) { + if (!getDestinationAttributes() + .equals(other.getDestinationAttributes())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CALLER_IP_FIELD_NUMBER; + hash = (53 * hash) + getCallerIp().hashCode(); + hash = (37 * hash) + CALLER_SUPPLIED_USER_AGENT_FIELD_NUMBER; + hash = (53 * hash) + getCallerSuppliedUserAgent().hashCode(); + hash = (37 * hash) + CALLER_NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getCallerNetwork().hashCode(); + if (hasRequestAttributes()) { + hash = (37 * hash) + REQUEST_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getRequestAttributes().hashCode(); + } + if (hasDestinationAttributes()) { + hash = (37 * hash) + DESTINATION_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getDestinationAttributes().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(google.events.cloud.audit.v1.Data.RequestMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *+ * Metadata about the request. + *+ * + * Protobuf type {@code google.events.cloud.audit.v1.RequestMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builderimplements + // @@protoc_insertion_point(builder_implements:google.events.cloud.audit.v1.RequestMetadata) + google.events.cloud.audit.v1.Data.RequestMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_RequestMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_RequestMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.audit.v1.Data.RequestMetadata.class, google.events.cloud.audit.v1.Data.RequestMetadata.Builder.class); + } + + // Construct using google.events.cloud.audit.v1.Data.RequestMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + callerIp_ = ""; + + callerSuppliedUserAgent_ = ""; + + callerNetwork_ = ""; + + if (requestAttributesBuilder_ == null) { + requestAttributes_ = null; + } else { + requestAttributes_ = null; + requestAttributesBuilder_ = null; + } + if (destinationAttributesBuilder_ == null) { + destinationAttributes_ = null; + } else { + destinationAttributes_ = null; + destinationAttributesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_RequestMetadata_descriptor; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.RequestMetadata getDefaultInstanceForType() { + return google.events.cloud.audit.v1.Data.RequestMetadata.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.RequestMetadata build() { + google.events.cloud.audit.v1.Data.RequestMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.RequestMetadata buildPartial() { + google.events.cloud.audit.v1.Data.RequestMetadata result = new google.events.cloud.audit.v1.Data.RequestMetadata(this); + result.callerIp_ = callerIp_; + result.callerSuppliedUserAgent_ = callerSuppliedUserAgent_; + result.callerNetwork_ = callerNetwork_; + if (requestAttributesBuilder_ == null) { + result.requestAttributes_ = requestAttributes_; + } else { + result.requestAttributes_ = requestAttributesBuilder_.build(); + } + if (destinationAttributesBuilder_ == null) { + result.destinationAttributes_ = destinationAttributes_; + } else { + result.destinationAttributes_ = destinationAttributesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof google.events.cloud.audit.v1.Data.RequestMetadata) { + return mergeFrom((google.events.cloud.audit.v1.Data.RequestMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.audit.v1.Data.RequestMetadata other) { + if (other == google.events.cloud.audit.v1.Data.RequestMetadata.getDefaultInstance()) return this; + if (!other.getCallerIp().isEmpty()) { + callerIp_ = other.callerIp_; + onChanged(); + } + if (!other.getCallerSuppliedUserAgent().isEmpty()) { + callerSuppliedUserAgent_ = other.callerSuppliedUserAgent_; + onChanged(); + } + if (!other.getCallerNetwork().isEmpty()) { + callerNetwork_ = other.callerNetwork_; + onChanged(); + } + if (other.hasRequestAttributes()) { + mergeRequestAttributes(other.getRequestAttributes()); + } + if (other.hasDestinationAttributes()) { + mergeDestinationAttributes(other.getDestinationAttributes()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + google.events.cloud.audit.v1.Data.RequestMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.audit.v1.Data.RequestMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object callerIp_ = ""; + /** + * + * The IP address of the caller. + * For caller from internet, this will be public IPv4 or IPv6 address. + * For caller from a Compute Engine VM with external IP address, this + * will be the VM's external IP address. For caller from a Compute + * Engine VM without external IP address, if the VM is in the same + * organization (or project) as the accessed resource, `caller_ip` will + * be the VM's internal IPv4 address, otherwise the `caller_ip` will be + * redacted to "gce-internal-ip". + * See https://cloud.google.com/compute/docs/vpc/ for more information. + *+ * + *string caller_ip = 1;
+ * @return The callerIp. + */ + public java.lang.String getCallerIp() { + java.lang.Object ref = callerIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + callerIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *+ * The IP address of the caller. + * For caller from internet, this will be public IPv4 or IPv6 address. + * For caller from a Compute Engine VM with external IP address, this + * will be the VM's external IP address. For caller from a Compute + * Engine VM without external IP address, if the VM is in the same + * organization (or project) as the accessed resource, `caller_ip` will + * be the VM's internal IPv4 address, otherwise the `caller_ip` will be + * redacted to "gce-internal-ip". + * See https://cloud.google.com/compute/docs/vpc/ for more information. + *+ * + *string caller_ip = 1;
+ * @return The bytes for callerIp. + */ + public com.google.protobuf.ByteString + getCallerIpBytes() { + java.lang.Object ref = callerIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + callerIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *+ * The IP address of the caller. + * For caller from internet, this will be public IPv4 or IPv6 address. + * For caller from a Compute Engine VM with external IP address, this + * will be the VM's external IP address. For caller from a Compute + * Engine VM without external IP address, if the VM is in the same + * organization (or project) as the accessed resource, `caller_ip` will + * be the VM's internal IPv4 address, otherwise the `caller_ip` will be + * redacted to "gce-internal-ip". + * See https://cloud.google.com/compute/docs/vpc/ for more information. + *+ * + *string caller_ip = 1;
+ * @param value The callerIp to set. + * @return This builder for chaining. + */ + public Builder setCallerIp( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + callerIp_ = value; + onChanged(); + return this; + } + /** + *+ * The IP address of the caller. + * For caller from internet, this will be public IPv4 or IPv6 address. + * For caller from a Compute Engine VM with external IP address, this + * will be the VM's external IP address. For caller from a Compute + * Engine VM without external IP address, if the VM is in the same + * organization (or project) as the accessed resource, `caller_ip` will + * be the VM's internal IPv4 address, otherwise the `caller_ip` will be + * redacted to "gce-internal-ip". + * See https://cloud.google.com/compute/docs/vpc/ for more information. + *+ * + *string caller_ip = 1;
+ * @return This builder for chaining. + */ + public Builder clearCallerIp() { + + callerIp_ = getDefaultInstance().getCallerIp(); + onChanged(); + return this; + } + /** + *+ * The IP address of the caller. + * For caller from internet, this will be public IPv4 or IPv6 address. + * For caller from a Compute Engine VM with external IP address, this + * will be the VM's external IP address. For caller from a Compute + * Engine VM without external IP address, if the VM is in the same + * organization (or project) as the accessed resource, `caller_ip` will + * be the VM's internal IPv4 address, otherwise the `caller_ip` will be + * redacted to "gce-internal-ip". + * See https://cloud.google.com/compute/docs/vpc/ for more information. + *+ * + *string caller_ip = 1;
+ * @param value The bytes for callerIp to set. + * @return This builder for chaining. + */ + public Builder setCallerIpBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + callerIp_ = value; + onChanged(); + return this; + } + + private java.lang.Object callerSuppliedUserAgent_ = ""; + /** + *+ * The user agent of the caller. + * This information is not authenticated and should be treated accordingly. + * For example: + * + `google-api-python-client/1.4.0`: + * The request was made by the Google API client for Python. + * + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: + * The request was made by the Google Cloud SDK CLI (gcloud). + * + `AppEngine-Google; (+http://code.google.com/appengine; appid: + * s~my-project`: + * The request was made from the `my-project` App Engine app. + *+ * + *string caller_supplied_user_agent = 2;
+ * @return The callerSuppliedUserAgent. + */ + public java.lang.String getCallerSuppliedUserAgent() { + java.lang.Object ref = callerSuppliedUserAgent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + callerSuppliedUserAgent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *+ * The user agent of the caller. + * This information is not authenticated and should be treated accordingly. + * For example: + * + `google-api-python-client/1.4.0`: + * The request was made by the Google API client for Python. + * + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: + * The request was made by the Google Cloud SDK CLI (gcloud). + * + `AppEngine-Google; (+http://code.google.com/appengine; appid: + * s~my-project`: + * The request was made from the `my-project` App Engine app. + *+ * + *string caller_supplied_user_agent = 2;
+ * @return The bytes for callerSuppliedUserAgent. + */ + public com.google.protobuf.ByteString + getCallerSuppliedUserAgentBytes() { + java.lang.Object ref = callerSuppliedUserAgent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + callerSuppliedUserAgent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *+ * The user agent of the caller. + * This information is not authenticated and should be treated accordingly. + * For example: + * + `google-api-python-client/1.4.0`: + * The request was made by the Google API client for Python. + * + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: + * The request was made by the Google Cloud SDK CLI (gcloud). + * + `AppEngine-Google; (+http://code.google.com/appengine; appid: + * s~my-project`: + * The request was made from the `my-project` App Engine app. + *+ * + *string caller_supplied_user_agent = 2;
+ * @param value The callerSuppliedUserAgent to set. + * @return This builder for chaining. + */ + public Builder setCallerSuppliedUserAgent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + callerSuppliedUserAgent_ = value; + onChanged(); + return this; + } + /** + *+ * The user agent of the caller. + * This information is not authenticated and should be treated accordingly. + * For example: + * + `google-api-python-client/1.4.0`: + * The request was made by the Google API client for Python. + * + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: + * The request was made by the Google Cloud SDK CLI (gcloud). + * + `AppEngine-Google; (+http://code.google.com/appengine; appid: + * s~my-project`: + * The request was made from the `my-project` App Engine app. + *+ * + *string caller_supplied_user_agent = 2;
+ * @return This builder for chaining. + */ + public Builder clearCallerSuppliedUserAgent() { + + callerSuppliedUserAgent_ = getDefaultInstance().getCallerSuppliedUserAgent(); + onChanged(); + return this; + } + /** + *+ * The user agent of the caller. + * This information is not authenticated and should be treated accordingly. + * For example: + * + `google-api-python-client/1.4.0`: + * The request was made by the Google API client for Python. + * + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: + * The request was made by the Google Cloud SDK CLI (gcloud). + * + `AppEngine-Google; (+http://code.google.com/appengine; appid: + * s~my-project`: + * The request was made from the `my-project` App Engine app. + *+ * + *string caller_supplied_user_agent = 2;
+ * @param value The bytes for callerSuppliedUserAgent to set. + * @return This builder for chaining. + */ + public Builder setCallerSuppliedUserAgentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + callerSuppliedUserAgent_ = value; + onChanged(); + return this; + } + + private java.lang.Object callerNetwork_ = ""; + /** + *+ * The network of the caller. + * Set only if the network host project is part of the same GCP organization + * (or project) as the accessed resource. + * See https://cloud.google.com/compute/docs/vpc/ for more information. + * This is a scheme-less URI full resource name. For example: + * "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID" + *+ * + *string caller_network = 3;
+ * @return The callerNetwork. + */ + public java.lang.String getCallerNetwork() { + java.lang.Object ref = callerNetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + callerNetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *+ * The network of the caller. + * Set only if the network host project is part of the same GCP organization + * (or project) as the accessed resource. + * See https://cloud.google.com/compute/docs/vpc/ for more information. + * This is a scheme-less URI full resource name. For example: + * "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID" + *+ * + *string caller_network = 3;
+ * @return The bytes for callerNetwork. + */ + public com.google.protobuf.ByteString + getCallerNetworkBytes() { + java.lang.Object ref = callerNetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + callerNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *+ * The network of the caller. + * Set only if the network host project is part of the same GCP organization + * (or project) as the accessed resource. + * See https://cloud.google.com/compute/docs/vpc/ for more information. + * This is a scheme-less URI full resource name. For example: + * "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID" + *+ * + *string caller_network = 3;
+ * @param value The callerNetwork to set. + * @return This builder for chaining. + */ + public Builder setCallerNetwork( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + callerNetwork_ = value; + onChanged(); + return this; + } + /** + *+ * The network of the caller. + * Set only if the network host project is part of the same GCP organization + * (or project) as the accessed resource. + * See https://cloud.google.com/compute/docs/vpc/ for more information. + * This is a scheme-less URI full resource name. For example: + * "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID" + *+ * + *string caller_network = 3;
+ * @return This builder for chaining. + */ + public Builder clearCallerNetwork() { + + callerNetwork_ = getDefaultInstance().getCallerNetwork(); + onChanged(); + return this; + } + /** + *+ * The network of the caller. + * Set only if the network host project is part of the same GCP organization + * (or project) as the accessed resource. + * See https://cloud.google.com/compute/docs/vpc/ for more information. + * This is a scheme-less URI full resource name. For example: + * "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID" + *+ * + *string caller_network = 3;
+ * @param value The bytes for callerNetwork to set. + * @return This builder for chaining. + */ + public Builder setCallerNetworkBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + callerNetwork_ = value; + onChanged(); + return this; + } + + private com.google.rpc.context.AttributeContext.Request requestAttributes_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.context.AttributeContext.Request, com.google.rpc.context.AttributeContext.Request.Builder, com.google.rpc.context.AttributeContext.RequestOrBuilder> requestAttributesBuilder_; + /** + *+ * Request attributes used in IAM condition evaluation. This field contains + * request attributes like request time and access levels associated with + * the request. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLog.authentication_info.resource_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Request request_attributes = 7;
+ * @return Whether the requestAttributes field is set. + */ + public boolean hasRequestAttributes() { + return requestAttributesBuilder_ != null || requestAttributes_ != null; + } + /** + *+ * Request attributes used in IAM condition evaluation. This field contains + * request attributes like request time and access levels associated with + * the request. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLog.authentication_info.resource_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Request request_attributes = 7;
+ * @return The requestAttributes. + */ + public com.google.rpc.context.AttributeContext.Request getRequestAttributes() { + if (requestAttributesBuilder_ == null) { + return requestAttributes_ == null ? com.google.rpc.context.AttributeContext.Request.getDefaultInstance() : requestAttributes_; + } else { + return requestAttributesBuilder_.getMessage(); + } + } + /** + *+ * Request attributes used in IAM condition evaluation. This field contains + * request attributes like request time and access levels associated with + * the request. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLog.authentication_info.resource_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Request request_attributes = 7;
+ */ + public Builder setRequestAttributes(com.google.rpc.context.AttributeContext.Request value) { + if (requestAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestAttributes_ = value; + onChanged(); + } else { + requestAttributesBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * Request attributes used in IAM condition evaluation. This field contains + * request attributes like request time and access levels associated with + * the request. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLog.authentication_info.resource_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Request request_attributes = 7;
+ */ + public Builder setRequestAttributes( + com.google.rpc.context.AttributeContext.Request.Builder builderForValue) { + if (requestAttributesBuilder_ == null) { + requestAttributes_ = builderForValue.build(); + onChanged(); + } else { + requestAttributesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * Request attributes used in IAM condition evaluation. This field contains + * request attributes like request time and access levels associated with + * the request. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLog.authentication_info.resource_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Request request_attributes = 7;
+ */ + public Builder mergeRequestAttributes(com.google.rpc.context.AttributeContext.Request value) { + if (requestAttributesBuilder_ == null) { + if (requestAttributes_ != null) { + requestAttributes_ = + com.google.rpc.context.AttributeContext.Request.newBuilder(requestAttributes_).mergeFrom(value).buildPartial(); + } else { + requestAttributes_ = value; + } + onChanged(); + } else { + requestAttributesBuilder_.mergeFrom(value); + } + + return this; + } + /** + *+ * Request attributes used in IAM condition evaluation. This field contains + * request attributes like request time and access levels associated with + * the request. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLog.authentication_info.resource_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Request request_attributes = 7;
+ */ + public Builder clearRequestAttributes() { + if (requestAttributesBuilder_ == null) { + requestAttributes_ = null; + onChanged(); + } else { + requestAttributes_ = null; + requestAttributesBuilder_ = null; + } + + return this; + } + /** + *+ * Request attributes used in IAM condition evaluation. This field contains + * request attributes like request time and access levels associated with + * the request. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLog.authentication_info.resource_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Request request_attributes = 7;
+ */ + public com.google.rpc.context.AttributeContext.Request.Builder getRequestAttributesBuilder() { + + onChanged(); + return getRequestAttributesFieldBuilder().getBuilder(); + } + /** + *+ * Request attributes used in IAM condition evaluation. This field contains + * request attributes like request time and access levels associated with + * the request. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLog.authentication_info.resource_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Request request_attributes = 7;
+ */ + public com.google.rpc.context.AttributeContext.RequestOrBuilder getRequestAttributesOrBuilder() { + if (requestAttributesBuilder_ != null) { + return requestAttributesBuilder_.getMessageOrBuilder(); + } else { + return requestAttributes_ == null ? + com.google.rpc.context.AttributeContext.Request.getDefaultInstance() : requestAttributes_; + } + } + /** + *+ * Request attributes used in IAM condition evaluation. This field contains + * request attributes like request time and access levels associated with + * the request. + * To get the whole view of the attributes used in IAM + * condition evaluation, the user must also look into + * `AuditLog.authentication_info.resource_attributes`. + *+ * + *.google.rpc.context.AttributeContext.Request request_attributes = 7;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.context.AttributeContext.Request, com.google.rpc.context.AttributeContext.Request.Builder, com.google.rpc.context.AttributeContext.RequestOrBuilder> + getRequestAttributesFieldBuilder() { + if (requestAttributesBuilder_ == null) { + requestAttributesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.context.AttributeContext.Request, com.google.rpc.context.AttributeContext.Request.Builder, com.google.rpc.context.AttributeContext.RequestOrBuilder>( + getRequestAttributes(), getParentForChildren(), isClean()); - serviceData_ = null; + requestAttributes_ = null; } - return serviceDataBuilder_; + return requestAttributesBuilder_; + } + + private com.google.rpc.context.AttributeContext.Peer destinationAttributes_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.context.AttributeContext.Peer, com.google.rpc.context.AttributeContext.Peer.Builder, com.google.rpc.context.AttributeContext.PeerOrBuilder> destinationAttributesBuilder_; + /** + *+ * The destination of a network activity, such as accepting a TCP connection. + * In a multi hop network activity, the destination represents the receiver of + * the last hop. Only two fields are used in this message, Peer.port and + * Peer.ip. These fields are optionally populated by those services utilizing + * the IAM condition feature. + *+ * + *.google.rpc.context.AttributeContext.Peer destination_attributes = 8;
+ * @return Whether the destinationAttributes field is set. + */ + public boolean hasDestinationAttributes() { + return destinationAttributesBuilder_ != null || destinationAttributes_ != null; + } + /** + *+ * The destination of a network activity, such as accepting a TCP connection. + * In a multi hop network activity, the destination represents the receiver of + * the last hop. Only two fields are used in this message, Peer.port and + * Peer.ip. These fields are optionally populated by those services utilizing + * the IAM condition feature. + *+ * + *.google.rpc.context.AttributeContext.Peer destination_attributes = 8;
+ * @return The destinationAttributes. + */ + public com.google.rpc.context.AttributeContext.Peer getDestinationAttributes() { + if (destinationAttributesBuilder_ == null) { + return destinationAttributes_ == null ? com.google.rpc.context.AttributeContext.Peer.getDefaultInstance() : destinationAttributes_; + } else { + return destinationAttributesBuilder_.getMessage(); + } + } + /** + *+ * The destination of a network activity, such as accepting a TCP connection. + * In a multi hop network activity, the destination represents the receiver of + * the last hop. Only two fields are used in this message, Peer.port and + * Peer.ip. These fields are optionally populated by those services utilizing + * the IAM condition feature. + *+ * + *.google.rpc.context.AttributeContext.Peer destination_attributes = 8;
+ */ + public Builder setDestinationAttributes(com.google.rpc.context.AttributeContext.Peer value) { + if (destinationAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destinationAttributes_ = value; + onChanged(); + } else { + destinationAttributesBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * The destination of a network activity, such as accepting a TCP connection. + * In a multi hop network activity, the destination represents the receiver of + * the last hop. Only two fields are used in this message, Peer.port and + * Peer.ip. These fields are optionally populated by those services utilizing + * the IAM condition feature. + *+ * + *.google.rpc.context.AttributeContext.Peer destination_attributes = 8;
+ */ + public Builder setDestinationAttributes( + com.google.rpc.context.AttributeContext.Peer.Builder builderForValue) { + if (destinationAttributesBuilder_ == null) { + destinationAttributes_ = builderForValue.build(); + onChanged(); + } else { + destinationAttributesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * The destination of a network activity, such as accepting a TCP connection. + * In a multi hop network activity, the destination represents the receiver of + * the last hop. Only two fields are used in this message, Peer.port and + * Peer.ip. These fields are optionally populated by those services utilizing + * the IAM condition feature. + *+ * + *.google.rpc.context.AttributeContext.Peer destination_attributes = 8;
+ */ + public Builder mergeDestinationAttributes(com.google.rpc.context.AttributeContext.Peer value) { + if (destinationAttributesBuilder_ == null) { + if (destinationAttributes_ != null) { + destinationAttributes_ = + com.google.rpc.context.AttributeContext.Peer.newBuilder(destinationAttributes_).mergeFrom(value).buildPartial(); + } else { + destinationAttributes_ = value; + } + onChanged(); + } else { + destinationAttributesBuilder_.mergeFrom(value); + } + + return this; + } + /** + *+ * The destination of a network activity, such as accepting a TCP connection. + * In a multi hop network activity, the destination represents the receiver of + * the last hop. Only two fields are used in this message, Peer.port and + * Peer.ip. These fields are optionally populated by those services utilizing + * the IAM condition feature. + *+ * + *.google.rpc.context.AttributeContext.Peer destination_attributes = 8;
+ */ + public Builder clearDestinationAttributes() { + if (destinationAttributesBuilder_ == null) { + destinationAttributes_ = null; + onChanged(); + } else { + destinationAttributes_ = null; + destinationAttributesBuilder_ = null; + } + + return this; + } + /** + *+ * The destination of a network activity, such as accepting a TCP connection. + * In a multi hop network activity, the destination represents the receiver of + * the last hop. Only two fields are used in this message, Peer.port and + * Peer.ip. These fields are optionally populated by those services utilizing + * the IAM condition feature. + *+ * + *.google.rpc.context.AttributeContext.Peer destination_attributes = 8;
+ */ + public com.google.rpc.context.AttributeContext.Peer.Builder getDestinationAttributesBuilder() { + + onChanged(); + return getDestinationAttributesFieldBuilder().getBuilder(); + } + /** + *+ * The destination of a network activity, such as accepting a TCP connection. + * In a multi hop network activity, the destination represents the receiver of + * the last hop. Only two fields are used in this message, Peer.port and + * Peer.ip. These fields are optionally populated by those services utilizing + * the IAM condition feature. + *+ * + *.google.rpc.context.AttributeContext.Peer destination_attributes = 8;
+ */ + public com.google.rpc.context.AttributeContext.PeerOrBuilder getDestinationAttributesOrBuilder() { + if (destinationAttributesBuilder_ != null) { + return destinationAttributesBuilder_.getMessageOrBuilder(); + } else { + return destinationAttributes_ == null ? + com.google.rpc.context.AttributeContext.Peer.getDefaultInstance() : destinationAttributes_; + } + } + /** + *+ * The destination of a network activity, such as accepting a TCP connection. + * In a multi hop network activity, the destination represents the receiver of + * the last hop. Only two fields are used in this message, Peer.port and + * Peer.ip. These fields are optionally populated by those services utilizing + * the IAM condition feature. + *+ * + *.google.rpc.context.AttributeContext.Peer destination_attributes = 8;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.context.AttributeContext.Peer, com.google.rpc.context.AttributeContext.Peer.Builder, com.google.rpc.context.AttributeContext.PeerOrBuilder> + getDestinationAttributesFieldBuilder() { + if (destinationAttributesBuilder_ == null) { + destinationAttributesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.context.AttributeContext.Peer, com.google.rpc.context.AttributeContext.Peer.Builder, com.google.rpc.context.AttributeContext.PeerOrBuilder>( + getDestinationAttributes(), + getParentForChildren(), + isClean()); + destinationAttributes_ = null; + } + return destinationAttributesBuilder_; } @java.lang.Override public final Builder setUnknownFields( @@ -3457,95 +9584,206 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:google.events.cloud.audit.v1.AuditLogData) + // @@protoc_insertion_point(builder_scope:google.events.cloud.audit.v1.RequestMetadata) } - // @@protoc_insertion_point(class_scope:google.events.cloud.audit.v1.AuditLogData) - private static final google.events.cloud.audit.v1.Data.AuditLogData DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.events.cloud.audit.v1.RequestMetadata) + private static final google.events.cloud.audit.v1.Data.RequestMetadata DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new google.events.cloud.audit.v1.Data.AuditLogData(); + DEFAULT_INSTANCE = new google.events.cloud.audit.v1.Data.RequestMetadata(); } - public static google.events.cloud.audit.v1.Data.AuditLogData getDefaultInstance() { + public static google.events.cloud.audit.v1.Data.RequestMetadata getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser- PARSER = new com.google.protobuf.AbstractParser () { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser () { @java.lang.Override - public AuditLogData parsePartialFrom( + public RequestMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AuditLogData(input, extensionRegistry); + return new RequestMetadata(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public google.events.cloud.audit.v1.Data.AuditLogData getDefaultInstanceForType() { + public google.events.cloud.audit.v1.Data.RequestMetadata getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface AuthenticationInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.events.cloud.audit.v1.AuthenticationInfo) + public interface ResourceLocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.audit.v1.ResourceLocation) com.google.protobuf.MessageOrBuilder { /** * - * The email address of the authenticated user making the request. + * The locations of a resource after the execution of the operation. + * Requests to create or delete a location based resource must populate + * the 'current_locations' field and not the 'original_locations' field. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string current_locations = 1;
+ * @return A list containing the currentLocations. + */ + java.util.List+ getCurrentLocationsList(); + /** + * + * The locations of a resource after the execution of the operation. + * Requests to create or delete a location based resource must populate + * the 'current_locations' field and not the 'original_locations' field. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string current_locations = 1;
+ * @return The count of currentLocations. + */ + int getCurrentLocationsCount(); + /** + *+ * The locations of a resource after the execution of the operation. + * Requests to create or delete a location based resource must populate + * the 'current_locations' field and not the 'original_locations' field. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string current_locations = 1;
+ * @param index The index of the element to return. + * @return The currentLocations at the given index. + */ + java.lang.String getCurrentLocations(int index); + /** + *+ * The locations of a resource after the execution of the operation. + * Requests to create or delete a location based resource must populate + * the 'current_locations' field and not the 'original_locations' field. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string current_locations = 1;
+ * @param index The index of the value to return. + * @return The bytes of the currentLocations at the given index. + */ + com.google.protobuf.ByteString + getCurrentLocationsBytes(int index); + + /** + *+ * The locations of a resource prior to the execution of the operation. + * Requests that mutate the resource's location must populate both the + * 'original_locations' as well as the 'current_locations' fields. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" ** - *string principal_email = 1;
- * @return The principalEmail. + *repeated string original_locations = 2;
+ * @return A list containing the originalLocations. */ - java.lang.String getPrincipalEmail(); + java.util.List+ getOriginalLocationsList(); /** * - * The email address of the authenticated user making the request. + * The locations of a resource prior to the execution of the operation. + * Requests that mutate the resource's location must populate both the + * 'original_locations' as well as the 'current_locations' fields. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" ** - *string principal_email = 1;
- * @return The bytes for principalEmail. + *repeated string original_locations = 2;
+ * @return The count of originalLocations. + */ + int getOriginalLocationsCount(); + /** + *+ * The locations of a resource prior to the execution of the operation. + * Requests that mutate the resource's location must populate both the + * 'original_locations' as well as the 'current_locations' fields. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string original_locations = 2;
+ * @param index The index of the element to return. + * @return The originalLocations at the given index. + */ + java.lang.String getOriginalLocations(int index); + /** + *+ * The locations of a resource prior to the execution of the operation. + * Requests that mutate the resource's location must populate both the + * 'original_locations' as well as the 'current_locations' fields. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string original_locations = 2;
+ * @param index The index of the value to return. + * @return The bytes of the originalLocations at the given index. */ com.google.protobuf.ByteString - getPrincipalEmailBytes(); + getOriginalLocationsBytes(int index); } /** *- * Authentication information for the operation. + * Location information about a resource. ** - * Protobuf type {@code google.events.cloud.audit.v1.AuthenticationInfo} + * Protobuf type {@code google.events.cloud.audit.v1.ResourceLocation} */ - public static final class AuthenticationInfo extends + public static final class ResourceLocation extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.events.cloud.audit.v1.AuthenticationInfo) - AuthenticationInfoOrBuilder { + // @@protoc_insertion_point(message_implements:google.events.cloud.audit.v1.ResourceLocation) + ResourceLocationOrBuilder { private static final long serialVersionUID = 0L; - // Use AuthenticationInfo.newBuilder() to construct. - private AuthenticationInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + // Use ResourceLocation.newBuilder() to construct. + private ResourceLocation(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } - private AuthenticationInfo() { - principalEmail_ = ""; + private ResourceLocation() { + currentLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + originalLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new AuthenticationInfo(); + return new ResourceLocation(); } @java.lang.Override @@ -3553,7 +9791,7 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private AuthenticationInfo( + private ResourceLocation( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -3561,6 +9799,7 @@ private AuthenticationInfo( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } + int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -3573,8 +9812,20 @@ private AuthenticationInfo( break; case 10: { java.lang.String s = input.readStringRequireUtf8(); - - principalEmail_ = s; + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + currentLocations_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + currentLocations_.add(s); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + originalLocations_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + originalLocations_.add(s); break; } default: { @@ -3592,67 +9843,177 @@ private AuthenticationInfo( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + currentLocations_ = currentLocations_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + originalLocations_ = originalLocations_.getUnmodifiableView(); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthenticationInfo_descriptor; + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ResourceLocation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthenticationInfo_fieldAccessorTable + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ResourceLocation_fieldAccessorTable .ensureFieldAccessorsInitialized( - google.events.cloud.audit.v1.Data.AuthenticationInfo.class, google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder.class); + google.events.cloud.audit.v1.Data.ResourceLocation.class, google.events.cloud.audit.v1.Data.ResourceLocation.Builder.class); } - public static final int PRINCIPAL_EMAIL_FIELD_NUMBER = 1; - private volatile java.lang.Object principalEmail_; + public static final int CURRENT_LOCATIONS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList currentLocations_; /** *- * The email address of the authenticated user making the request. + * The locations of a resource after the execution of the operation. + * Requests to create or delete a location based resource must populate + * the 'current_locations' field and not the 'original_locations' field. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" ** - *string principal_email = 1;
- * @return The principalEmail. + *repeated string current_locations = 1;
+ * @return A list containing the currentLocations. */ - @java.lang.Override - public java.lang.String getPrincipalEmail() { - java.lang.Object ref = principalEmail_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - principalEmail_ = s; - return s; - } + public com.google.protobuf.ProtocolStringList + getCurrentLocationsList() { + return currentLocations_; } /** *- * The email address of the authenticated user making the request. + * The locations of a resource after the execution of the operation. + * Requests to create or delete a location based resource must populate + * the 'current_locations' field and not the 'original_locations' field. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" ** - *string principal_email = 1;
- * @return The bytes for principalEmail. + *repeated string current_locations = 1;
+ * @return The count of currentLocations. + */ + public int getCurrentLocationsCount() { + return currentLocations_.size(); + } + /** + *+ * The locations of a resource after the execution of the operation. + * Requests to create or delete a location based resource must populate + * the 'current_locations' field and not the 'original_locations' field. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string current_locations = 1;
+ * @param index The index of the element to return. + * @return The currentLocations at the given index. + */ + public java.lang.String getCurrentLocations(int index) { + return currentLocations_.get(index); + } + /** + *+ * The locations of a resource after the execution of the operation. + * Requests to create or delete a location based resource must populate + * the 'current_locations' field and not the 'original_locations' field. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string current_locations = 1;
+ * @param index The index of the value to return. + * @return The bytes of the currentLocations at the given index. */ - @java.lang.Override public com.google.protobuf.ByteString - getPrincipalEmailBytes() { - java.lang.Object ref = principalEmail_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - principalEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + getCurrentLocationsBytes(int index) { + return currentLocations_.getByteString(index); + } + + public static final int ORIGINAL_LOCATIONS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList originalLocations_; + /** + *+ * The locations of a resource prior to the execution of the operation. + * Requests that mutate the resource's location must populate both the + * 'original_locations' as well as the 'current_locations' fields. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string original_locations = 2;
+ * @return A list containing the originalLocations. + */ + public com.google.protobuf.ProtocolStringList + getOriginalLocationsList() { + return originalLocations_; + } + /** + *+ * The locations of a resource prior to the execution of the operation. + * Requests that mutate the resource's location must populate both the + * 'original_locations' as well as the 'current_locations' fields. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string original_locations = 2;
+ * @return The count of originalLocations. + */ + public int getOriginalLocationsCount() { + return originalLocations_.size(); + } + /** + *+ * The locations of a resource prior to the execution of the operation. + * Requests that mutate the resource's location must populate both the + * 'original_locations' as well as the 'current_locations' fields. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string original_locations = 2;
+ * @param index The index of the element to return. + * @return The originalLocations at the given index. + */ + public java.lang.String getOriginalLocations(int index) { + return originalLocations_.get(index); + } + /** + *+ * The locations of a resource prior to the execution of the operation. + * Requests that mutate the resource's location must populate both the + * 'original_locations' as well as the 'current_locations' fields. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string original_locations = 2;
+ * @param index The index of the value to return. + * @return The bytes of the originalLocations at the given index. + */ + public com.google.protobuf.ByteString + getOriginalLocationsBytes(int index) { + return originalLocations_.getByteString(index); } private byte memoizedIsInitialized = -1; @@ -3669,8 +10030,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getPrincipalEmailBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, principalEmail_); + for (int i = 0; i < currentLocations_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, currentLocations_.getRaw(i)); + } + for (int i = 0; i < originalLocations_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, originalLocations_.getRaw(i)); } unknownFields.writeTo(output); } @@ -3681,8 +10045,21 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getPrincipalEmailBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, principalEmail_); + { + int dataSize = 0; + for (int i = 0; i < currentLocations_.size(); i++) { + dataSize += computeStringSizeNoTag(currentLocations_.getRaw(i)); + } + size += dataSize; + size += 1 * getCurrentLocationsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < originalLocations_.size(); i++) { + dataSize += computeStringSizeNoTag(originalLocations_.getRaw(i)); + } + size += dataSize; + size += 1 * getOriginalLocationsList().size(); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -3694,13 +10071,15 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof google.events.cloud.audit.v1.Data.AuthenticationInfo)) { + if (!(obj instanceof google.events.cloud.audit.v1.Data.ResourceLocation)) { return super.equals(obj); } - google.events.cloud.audit.v1.Data.AuthenticationInfo other = (google.events.cloud.audit.v1.Data.AuthenticationInfo) obj; + google.events.cloud.audit.v1.Data.ResourceLocation other = (google.events.cloud.audit.v1.Data.ResourceLocation) obj; - if (!getPrincipalEmail() - .equals(other.getPrincipalEmail())) return false; + if (!getCurrentLocationsList() + .equals(other.getCurrentLocationsList())) return false; + if (!getOriginalLocationsList() + .equals(other.getOriginalLocationsList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -3712,76 +10091,82 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PRINCIPAL_EMAIL_FIELD_NUMBER; - hash = (53 * hash) + getPrincipalEmail().hashCode(); + if (getCurrentLocationsCount() > 0) { + hash = (37 * hash) + CURRENT_LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getCurrentLocationsList().hashCode(); + } + if (getOriginalLocationsCount() > 0) { + hash = (37 * hash) + ORIGINAL_LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getOriginalLocationsList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + public static google.events.cloud.audit.v1.Data.ResourceLocation parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + public static google.events.cloud.audit.v1.Data.ResourceLocation parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + public static google.events.cloud.audit.v1.Data.ResourceLocation parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + public static google.events.cloud.audit.v1.Data.ResourceLocation parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom(byte[] data) + public static google.events.cloud.audit.v1.Data.ResourceLocation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + public static google.events.cloud.audit.v1.Data.ResourceLocation parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom(java.io.InputStream input) + public static google.events.cloud.audit.v1.Data.ResourceLocation parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + public static google.events.cloud.audit.v1.Data.ResourceLocation parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseDelimitedFrom(java.io.InputStream input) + public static google.events.cloud.audit.v1.Data.ResourceLocation parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseDelimitedFrom( + public static google.events.cloud.audit.v1.Data.ResourceLocation parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + public static google.events.cloud.audit.v1.Data.ResourceLocation parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( + public static google.events.cloud.audit.v1.Data.ResourceLocation parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -3794,7 +10179,7 @@ public static google.events.cloud.audit.v1.Data.AuthenticationInfo parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(google.events.cloud.audit.v1.Data.AuthenticationInfo prototype) { + public static Builder newBuilder(google.events.cloud.audit.v1.Data.ResourceLocation prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -3811,29 +10196,29 @@ protected Builder newBuilderForType( } /** *- * Authentication information for the operation. + * Location information about a resource. ** - * Protobuf type {@code google.events.cloud.audit.v1.AuthenticationInfo} + * Protobuf type {@code google.events.cloud.audit.v1.ResourceLocation} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builderimplements - // @@protoc_insertion_point(builder_implements:google.events.cloud.audit.v1.AuthenticationInfo) - google.events.cloud.audit.v1.Data.AuthenticationInfoOrBuilder { + // @@protoc_insertion_point(builder_implements:google.events.cloud.audit.v1.ResourceLocation) + google.events.cloud.audit.v1.Data.ResourceLocationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthenticationInfo_descriptor; + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ResourceLocation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthenticationInfo_fieldAccessorTable + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ResourceLocation_fieldAccessorTable .ensureFieldAccessorsInitialized( - google.events.cloud.audit.v1.Data.AuthenticationInfo.class, google.events.cloud.audit.v1.Data.AuthenticationInfo.Builder.class); + google.events.cloud.audit.v1.Data.ResourceLocation.class, google.events.cloud.audit.v1.Data.ResourceLocation.Builder.class); } - // Construct using google.events.cloud.audit.v1.Data.AuthenticationInfo.newBuilder() + // Construct using google.events.cloud.audit.v1.Data.ResourceLocation.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -3851,25 +10236,27 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - principalEmail_ = ""; - + currentLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + originalLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthenticationInfo_descriptor; + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ResourceLocation_descriptor; } @java.lang.Override - public google.events.cloud.audit.v1.Data.AuthenticationInfo getDefaultInstanceForType() { - return google.events.cloud.audit.v1.Data.AuthenticationInfo.getDefaultInstance(); + public google.events.cloud.audit.v1.Data.ResourceLocation getDefaultInstanceForType() { + return google.events.cloud.audit.v1.Data.ResourceLocation.getDefaultInstance(); } @java.lang.Override - public google.events.cloud.audit.v1.Data.AuthenticationInfo build() { - google.events.cloud.audit.v1.Data.AuthenticationInfo result = buildPartial(); + public google.events.cloud.audit.v1.Data.ResourceLocation build() { + google.events.cloud.audit.v1.Data.ResourceLocation result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -3877,9 +10264,19 @@ public google.events.cloud.audit.v1.Data.AuthenticationInfo build() { } @java.lang.Override - public google.events.cloud.audit.v1.Data.AuthenticationInfo buildPartial() { - google.events.cloud.audit.v1.Data.AuthenticationInfo result = new google.events.cloud.audit.v1.Data.AuthenticationInfo(this); - result.principalEmail_ = principalEmail_; + public google.events.cloud.audit.v1.Data.ResourceLocation buildPartial() { + google.events.cloud.audit.v1.Data.ResourceLocation result = new google.events.cloud.audit.v1.Data.ResourceLocation(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + currentLocations_ = currentLocations_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.currentLocations_ = currentLocations_; + if (((bitField0_ & 0x00000002) != 0)) { + originalLocations_ = originalLocations_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.originalLocations_ = originalLocations_; onBuilt(); return result; } @@ -3918,18 +10315,34 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof google.events.cloud.audit.v1.Data.AuthenticationInfo) { - return mergeFrom((google.events.cloud.audit.v1.Data.AuthenticationInfo)other); + if (other instanceof google.events.cloud.audit.v1.Data.ResourceLocation) { + return mergeFrom((google.events.cloud.audit.v1.Data.ResourceLocation)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(google.events.cloud.audit.v1.Data.AuthenticationInfo other) { - if (other == google.events.cloud.audit.v1.Data.AuthenticationInfo.getDefaultInstance()) return this; - if (!other.getPrincipalEmail().isEmpty()) { - principalEmail_ = other.principalEmail_; + public Builder mergeFrom(google.events.cloud.audit.v1.Data.ResourceLocation other) { + if (other == google.events.cloud.audit.v1.Data.ResourceLocation.getDefaultInstance()) return this; + if (!other.currentLocations_.isEmpty()) { + if (currentLocations_.isEmpty()) { + currentLocations_ = other.currentLocations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCurrentLocationsIsMutable(); + currentLocations_.addAll(other.currentLocations_); + } + onChanged(); + } + if (!other.originalLocations_.isEmpty()) { + if (originalLocations_.isEmpty()) { + originalLocations_ = other.originalLocations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureOriginalLocationsIsMutable(); + originalLocations_.addAll(other.originalLocations_); + } onChanged(); } this.mergeUnknownFields(other.unknownFields); @@ -3947,11 +10360,11 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - google.events.cloud.audit.v1.Data.AuthenticationInfo parsedMessage = null; + google.events.cloud.audit.v1.Data.ResourceLocation parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (google.events.cloud.audit.v1.Data.AuthenticationInfo) e.getUnfinishedMessage(); + parsedMessage = (google.events.cloud.audit.v1.Data.ResourceLocation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -3960,99 +10373,404 @@ public Builder mergeFrom( } return this; } - - private java.lang.Object principalEmail_ = ""; + private int bitField0_; + + private com.google.protobuf.LazyStringList currentLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureCurrentLocationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + currentLocations_ = new com.google.protobuf.LazyStringArrayList(currentLocations_); + bitField0_ |= 0x00000001; + } + } + /** + * + * The locations of a resource after the execution of the operation. + * Requests to create or delete a location based resource must populate + * the 'current_locations' field and not the 'original_locations' field. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string current_locations = 1;
+ * @return A list containing the currentLocations. + */ + public com.google.protobuf.ProtocolStringList + getCurrentLocationsList() { + return currentLocations_.getUnmodifiableView(); + } + /** + *+ * The locations of a resource after the execution of the operation. + * Requests to create or delete a location based resource must populate + * the 'current_locations' field and not the 'original_locations' field. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string current_locations = 1;
+ * @return The count of currentLocations. + */ + public int getCurrentLocationsCount() { + return currentLocations_.size(); + } + /** + *+ * The locations of a resource after the execution of the operation. + * Requests to create or delete a location based resource must populate + * the 'current_locations' field and not the 'original_locations' field. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string current_locations = 1;
+ * @param index The index of the element to return. + * @return The currentLocations at the given index. + */ + public java.lang.String getCurrentLocations(int index) { + return currentLocations_.get(index); + } + /** + *+ * The locations of a resource after the execution of the operation. + * Requests to create or delete a location based resource must populate + * the 'current_locations' field and not the 'original_locations' field. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string current_locations = 1;
+ * @param index The index of the value to return. + * @return The bytes of the currentLocations at the given index. + */ + public com.google.protobuf.ByteString + getCurrentLocationsBytes(int index) { + return currentLocations_.getByteString(index); + } + /** + *+ * The locations of a resource after the execution of the operation. + * Requests to create or delete a location based resource must populate + * the 'current_locations' field and not the 'original_locations' field. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string current_locations = 1;
+ * @param index The index to set the value at. + * @param value The currentLocations to set. + * @return This builder for chaining. + */ + public Builder setCurrentLocations( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCurrentLocationsIsMutable(); + currentLocations_.set(index, value); + onChanged(); + return this; + } + /** + *+ * The locations of a resource after the execution of the operation. + * Requests to create or delete a location based resource must populate + * the 'current_locations' field and not the 'original_locations' field. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string current_locations = 1;
+ * @param value The currentLocations to add. + * @return This builder for chaining. + */ + public Builder addCurrentLocations( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCurrentLocationsIsMutable(); + currentLocations_.add(value); + onChanged(); + return this; + } + /** + *+ * The locations of a resource after the execution of the operation. + * Requests to create or delete a location based resource must populate + * the 'current_locations' field and not the 'original_locations' field. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string current_locations = 1;
+ * @param values The currentLocations to add. + * @return This builder for chaining. + */ + public Builder addAllCurrentLocations( + java.lang.Iterablevalues) { + ensureCurrentLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, currentLocations_); + onChanged(); + return this; + } + /** + * + * The locations of a resource after the execution of the operation. + * Requests to create or delete a location based resource must populate + * the 'current_locations' field and not the 'original_locations' field. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string current_locations = 1;
+ * @return This builder for chaining. + */ + public Builder clearCurrentLocations() { + currentLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *+ * The locations of a resource after the execution of the operation. + * Requests to create or delete a location based resource must populate + * the 'current_locations' field and not the 'original_locations' field. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string current_locations = 1;
+ * @param value The bytes of the currentLocations to add. + * @return This builder for chaining. + */ + public Builder addCurrentLocationsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCurrentLocationsIsMutable(); + currentLocations_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList originalLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureOriginalLocationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + originalLocations_ = new com.google.protobuf.LazyStringArrayList(originalLocations_); + bitField0_ |= 0x00000002; + } + } + /** + *+ * The locations of a resource prior to the execution of the operation. + * Requests that mutate the resource's location must populate both the + * 'original_locations' as well as the 'current_locations' fields. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string original_locations = 2;
+ * @return A list containing the originalLocations. + */ + public com.google.protobuf.ProtocolStringList + getOriginalLocationsList() { + return originalLocations_.getUnmodifiableView(); + } /** *- * The email address of the authenticated user making the request. + * The locations of a resource prior to the execution of the operation. + * Requests that mutate the resource's location must populate both the + * 'original_locations' as well as the 'current_locations' fields. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" ** - *string principal_email = 1;
- * @return The principalEmail. + *repeated string original_locations = 2;
+ * @return The count of originalLocations. */ - public java.lang.String getPrincipalEmail() { - java.lang.Object ref = principalEmail_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - principalEmail_ = s; - return s; - } else { - return (java.lang.String) ref; - } + public int getOriginalLocationsCount() { + return originalLocations_.size(); } /** *- * The email address of the authenticated user making the request. + * The locations of a resource prior to the execution of the operation. + * Requests that mutate the resource's location must populate both the + * 'original_locations' as well as the 'current_locations' fields. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" ** - *string principal_email = 1;
- * @return The bytes for principalEmail. + *repeated string original_locations = 2;
+ * @param index The index of the element to return. + * @return The originalLocations at the given index. + */ + public java.lang.String getOriginalLocations(int index) { + return originalLocations_.get(index); + } + /** + *+ * The locations of a resource prior to the execution of the operation. + * Requests that mutate the resource's location must populate both the + * 'original_locations' as well as the 'current_locations' fields. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string original_locations = 2;
+ * @param index The index of the value to return. + * @return The bytes of the originalLocations at the given index. */ public com.google.protobuf.ByteString - getPrincipalEmailBytes() { - java.lang.Object ref = principalEmail_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - principalEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + getOriginalLocationsBytes(int index) { + return originalLocations_.getByteString(index); } /** *- * The email address of the authenticated user making the request. + * The locations of a resource prior to the execution of the operation. + * Requests that mutate the resource's location must populate both the + * 'original_locations' as well as the 'current_locations' fields. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" ** - *string principal_email = 1;
- * @param value The principalEmail to set. + *repeated string original_locations = 2;
+ * @param index The index to set the value at. + * @param value The originalLocations to set. * @return This builder for chaining. */ - public Builder setPrincipalEmail( + public Builder setOriginalLocations( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOriginalLocationsIsMutable(); + originalLocations_.set(index, value); + onChanged(); + return this; + } + /** + *+ * The locations of a resource prior to the execution of the operation. + * Requests that mutate the resource's location must populate both the + * 'original_locations' as well as the 'current_locations' fields. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string original_locations = 2;
+ * @param value The originalLocations to add. + * @return This builder for chaining. + */ + public Builder addOriginalLocations( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - - principalEmail_ = value; + ensureOriginalLocationsIsMutable(); + originalLocations_.add(value); onChanged(); return this; } /** *- * The email address of the authenticated user making the request. + * The locations of a resource prior to the execution of the operation. + * Requests that mutate the resource's location must populate both the + * 'original_locations' as well as the 'current_locations' fields. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" ** - *string principal_email = 1;
+ *repeated string original_locations = 2;
+ * @param values The originalLocations to add. * @return This builder for chaining. */ - public Builder clearPrincipalEmail() { - - principalEmail_ = getDefaultInstance().getPrincipalEmail(); + public Builder addAllOriginalLocations( + java.lang.Iterablevalues) { + ensureOriginalLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, originalLocations_); + onChanged(); + return this; + } + /** + * + * The locations of a resource prior to the execution of the operation. + * Requests that mutate the resource's location must populate both the + * 'original_locations' as well as the 'current_locations' fields. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" + *+ * + *repeated string original_locations = 2;
+ * @return This builder for chaining. + */ + public Builder clearOriginalLocations() { + originalLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *- * The email address of the authenticated user making the request. + * The locations of a resource prior to the execution of the operation. + * Requests that mutate the resource's location must populate both the + * 'original_locations' as well as the 'current_locations' fields. + * For example: + * "europe-west1-a" + * "us-east1" + * "nam3" ** - *string principal_email = 1;
- * @param value The bytes for principalEmail to set. + *repeated string original_locations = 2;
+ * @param value The bytes of the originalLocations to add. * @return This builder for chaining. */ - public Builder setPrincipalEmailBytes( + public Builder addOriginalLocationsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - - principalEmail_ = value; + ensureOriginalLocationsIsMutable(); + originalLocations_.add(value); onChanged(); return this; } @@ -4069,1214 +10787,1904 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:google.events.cloud.audit.v1.AuthenticationInfo) + // @@protoc_insertion_point(builder_scope:google.events.cloud.audit.v1.ResourceLocation) } - // @@protoc_insertion_point(class_scope:google.events.cloud.audit.v1.AuthenticationInfo) - private static final google.events.cloud.audit.v1.Data.AuthenticationInfo DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.events.cloud.audit.v1.ResourceLocation) + private static final google.events.cloud.audit.v1.Data.ResourceLocation DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new google.events.cloud.audit.v1.Data.AuthenticationInfo(); - } - - public static google.events.cloud.audit.v1.Data.AuthenticationInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser- PARSER = new com.google.protobuf.AbstractParser () { - @java.lang.Override - public AuthenticationInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AuthenticationInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public google.events.cloud.audit.v1.Data.AuthenticationInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface AuthorizationInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.events.cloud.audit.v1.AuthorizationInfo) - com.google.protobuf.MessageOrBuilder { - - /** - * - * The resource being accessed, as a REST-style string. For example: - * bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID - *- * - *string resource = 1;
- * @return The resource. - */ - java.lang.String getResource(); - /** - *- * The resource being accessed, as a REST-style string. For example: - * bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID - *- * - *string resource = 1;
- * @return The bytes for resource. - */ - com.google.protobuf.ByteString - getResourceBytes(); - - /** - *- * The required IAM permission. - *- * - *string permission = 2;
- * @return The permission. - */ - java.lang.String getPermission(); - /** - *- * The required IAM permission. - *- * - *string permission = 2;
- * @return The bytes for permission. - */ - com.google.protobuf.ByteString - getPermissionBytes(); - - /** - *- * Whether or not authorization for `resource` and `permission` - * was granted. - *- * - *bool granted = 3;
- * @return The granted. - */ - boolean getGranted(); - } - /** - *- * Authorization information for the operation. - *- * - * Protobuf type {@code google.events.cloud.audit.v1.AuthorizationInfo} - */ - public static final class AuthorizationInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.events.cloud.audit.v1.AuthorizationInfo) - AuthorizationInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use AuthorizationInfo.newBuilder() to construct. - private AuthorizationInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) { - super(builder); - } - private AuthorizationInfo() { - resource_ = ""; - permission_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AuthorizationInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AuthorizationInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - permission_ = s; - break; - } - case 24: { - - granted_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); + DEFAULT_INSTANCE = new google.events.cloud.audit.v1.Data.ResourceLocation(); + } + + public static google.events.cloud.audit.v1.Data.ResourceLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser+ PARSER = new com.google.protobuf.AbstractParser () { + @java.lang.Override + public ResourceLocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResourceLocation(input, extensionRegistry); } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthorizationInfo_descriptor; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthorizationInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - google.events.cloud.audit.v1.Data.AuthorizationInfo.class, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder.class); + public google.events.cloud.audit.v1.Data.ResourceLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - public static final int RESOURCE_FIELD_NUMBER = 1; - private volatile java.lang.Object resource_; + } + + public interface ServiceAccountDelegationInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.audit.v1.ServiceAccountDelegationInfo) + com.google.protobuf.MessageOrBuilder { + /** * - * The resource being accessed, as a REST-style string. For example: - * bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID + * First party (Google) identity as the real authority. ** - *string resource = 1;
- * @return The resource. + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal first_party_principal = 1;
+ * @return Whether the firstPartyPrincipal field is set. */ - @java.lang.Override - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } - } + boolean hasFirstPartyPrincipal(); /** *- * The resource being accessed, as a REST-style string. For example: - * bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID + * First party (Google) identity as the real authority. ** - *string resource = 1;
- * @return The bytes for resource. + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal first_party_principal = 1;
+ * @return The firstPartyPrincipal. */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal getFirstPartyPrincipal(); + /** + *+ * First party (Google) identity as the real authority. + *+ * + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal first_party_principal = 1;
+ */ + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipalOrBuilder getFirstPartyPrincipalOrBuilder(); - public static final int PERMISSION_FIELD_NUMBER = 2; - private volatile java.lang.Object permission_; /** *- * The required IAM permission. + * Third party identity as the real authority. ** - *string permission = 2;
- * @return The permission. + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal third_party_principal = 2;
+ * @return Whether the thirdPartyPrincipal field is set. */ - @java.lang.Override - public java.lang.String getPermission() { - java.lang.Object ref = permission_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - permission_ = s; - return s; - } - } + boolean hasThirdPartyPrincipal(); /** *- * The required IAM permission. + * Third party identity as the real authority. ** - *string permission = 2;
- * @return The bytes for permission. + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal third_party_principal = 2;
+ * @return The thirdPartyPrincipal. */ - @java.lang.Override - public com.google.protobuf.ByteString - getPermissionBytes() { - java.lang.Object ref = permission_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - permission_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int GRANTED_FIELD_NUMBER = 3; - private boolean granted_; + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal getThirdPartyPrincipal(); /** *- * Whether or not authorization for `resource` and `permission` - * was granted. + * Third party identity as the real authority. ** - *bool granted = 3;
- * @return The granted. + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal third_party_principal = 2;
*/ - @java.lang.Override - public boolean getGranted() { - return granted_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getResourceBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_); - } - if (!getPermissionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, permission_); - } - if (granted_ != false) { - output.writeBool(3, granted_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getResourceBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_); - } - if (!getPermissionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, permission_); - } - if (granted_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, granted_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof google.events.cloud.audit.v1.Data.AuthorizationInfo)) { - return super.equals(obj); - } - google.events.cloud.audit.v1.Data.AuthorizationInfo other = (google.events.cloud.audit.v1.Data.AuthorizationInfo) obj; - - if (!getResource() - .equals(other.getResource())) return false; - if (!getPermission() - .equals(other.getPermission())) return false; - if (getGranted() - != other.getGranted()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RESOURCE_FIELD_NUMBER; - hash = (53 * hash) + getResource().hashCode(); - hash = (37 * hash) + PERMISSION_FIELD_NUMBER; - hash = (53 * hash) + getPermission().hashCode(); - hash = (37 * hash) + GRANTED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getGranted()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipalOrBuilder getThirdPartyPrincipalOrBuilder(); - public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.AuthorityCase getAuthorityCase(); + } + /** + *+ * Identity delegation history of an authenticated service account. + *+ * + * Protobuf type {@code google.events.cloud.audit.v1.ServiceAccountDelegationInfo} + */ + public static final class ServiceAccountDelegationInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.audit.v1.ServiceAccountDelegationInfo) + ServiceAccountDelegationInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ServiceAccountDelegationInfo.newBuilder() to construct. + private ServiceAccountDelegationInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); } - public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + private ServiceAccountDelegationInfo() { } - public static google.events.cloud.audit.v1.Data.AuthorizationInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ServiceAccountDelegationInfo(); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; } - public static Builder newBuilder(google.events.cloud.audit.v1.Data.AuthorizationInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + private ServiceAccountDelegationInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.Builder subBuilder = null; + if (authorityCase_ == 1) { + subBuilder = ((google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal) authority_).toBuilder(); + } + authority_ = + input.readMessage(google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal) authority_); + authority_ = subBuilder.buildPartial(); + } + authorityCase_ = 1; + break; + } + case 18: { + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.Builder subBuilder = null; + if (authorityCase_ == 2) { + subBuilder = ((google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal) authority_).toBuilder(); + } + authority_ = + input.readMessage(google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal) authority_); + authority_ = subBuilder.buildPartial(); + } + authorityCase_ = 2; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_descriptor; } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.class, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.Builder.class); + } + + public interface FirstPartyPrincipalOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal) + com.google.protobuf.MessageOrBuilder { + + /** + *+ * The email address of a Google account. + *+ * + *string principal_email = 1;
+ * @return The principalEmail. + */ + java.lang.String getPrincipalEmail(); + /** + *+ * The email address of a Google account. + *+ * + *string principal_email = 1;
+ * @return The bytes for principalEmail. + */ + com.google.protobuf.ByteString + getPrincipalEmailBytes(); + + /** + *+ * Metadata about the service that uses the service account. + *+ * + *.google.protobuf.Struct service_metadata = 2;
+ * @return Whether the serviceMetadata field is set. + */ + boolean hasServiceMetadata(); + /** + *+ * Metadata about the service that uses the service account. + *+ * + *.google.protobuf.Struct service_metadata = 2;
+ * @return The serviceMetadata. + */ + com.google.protobuf.Struct getServiceMetadata(); + /** + *+ * Metadata about the service that uses the service account. + *+ * + *.google.protobuf.Struct service_metadata = 2;
+ */ + com.google.protobuf.StructOrBuilder getServiceMetadataOrBuilder(); } /** *- * Authorization information for the operation. + * First party identity principal. ** - * Protobuf type {@code google.events.cloud.audit.v1.AuthorizationInfo} + * Protobuf type {@code google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builderimplements - // @@protoc_insertion_point(builder_implements:google.events.cloud.audit.v1.AuthorizationInfo) - google.events.cloud.audit.v1.Data.AuthorizationInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthorizationInfo_descriptor; + public static final class FirstPartyPrincipal extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal) + FirstPartyPrincipalOrBuilder { + private static final long serialVersionUID = 0L; + // Use FirstPartyPrincipal.newBuilder() to construct. + private FirstPartyPrincipal(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private FirstPartyPrincipal() { + principalEmail_ = ""; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthorizationInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - google.events.cloud.audit.v1.Data.AuthorizationInfo.class, google.events.cloud.audit.v1.Data.AuthorizationInfo.Builder.class); - } - - // Construct using google.events.cloud.audit.v1.Data.AuthorizationInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FirstPartyPrincipal(); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { + private FirstPartyPrincipal( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); } - } - @java.lang.Override - public Builder clear() { - super.clear(); - resource_ = ""; - - permission_ = ""; - - granted_ = false; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); - return this; + principalEmail_ = s; + break; + } + case 18: { + com.google.protobuf.Struct.Builder subBuilder = null; + if (serviceMetadata_ != null) { + subBuilder = serviceMetadata_.toBuilder(); + } + serviceMetadata_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(serviceMetadata_); + serviceMetadata_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_AuthorizationInfo_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_FirstPartyPrincipal_descriptor; } @java.lang.Override - public google.events.cloud.audit.v1.Data.AuthorizationInfo getDefaultInstanceForType() { - return google.events.cloud.audit.v1.Data.AuthorizationInfo.getDefaultInstance(); + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_FirstPartyPrincipal_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.class, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.Builder.class); } + public static final int PRINCIPAL_EMAIL_FIELD_NUMBER = 1; + private volatile java.lang.Object principalEmail_; + /** + * + * The email address of a Google account. + *+ * + *string principal_email = 1;
+ * @return The principalEmail. + */ @java.lang.Override - public google.events.cloud.audit.v1.Data.AuthorizationInfo build() { - google.events.cloud.audit.v1.Data.AuthorizationInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + public java.lang.String getPrincipalEmail() { + java.lang.Object ref = principalEmail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principalEmail_ = s; + return s; } - return result; } - + /** + *+ * The email address of a Google account. + *+ * + *string principal_email = 1;
+ * @return The bytes for principalEmail. + */ @java.lang.Override - public google.events.cloud.audit.v1.Data.AuthorizationInfo buildPartial() { - google.events.cloud.audit.v1.Data.AuthorizationInfo result = new google.events.cloud.audit.v1.Data.AuthorizationInfo(this); - result.resource_ = resource_; - result.permission_ = permission_; - result.granted_ = granted_; - onBuilt(); - return result; + public com.google.protobuf.ByteString + getPrincipalEmailBytes() { + java.lang.Object ref = principalEmail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principalEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } + public static final int SERVICE_METADATA_FIELD_NUMBER = 2; + private com.google.protobuf.Struct serviceMetadata_; + /** + *+ * Metadata about the service that uses the service account. + *+ * + *.google.protobuf.Struct service_metadata = 2;
+ * @return Whether the serviceMetadata field is set. + */ @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + public boolean hasServiceMetadata() { + return serviceMetadata_ != null; } + /** + *+ * Metadata about the service that uses the service account. + *+ * + *.google.protobuf.Struct service_metadata = 2;
+ * @return The serviceMetadata. + */ @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + public com.google.protobuf.Struct getServiceMetadata() { + return serviceMetadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : serviceMetadata_; } + /** + *+ * Metadata about the service that uses the service account. + *+ * + *.google.protobuf.Struct service_metadata = 2;
+ */ @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + public com.google.protobuf.StructOrBuilder getServiceMetadataOrBuilder() { + return getServiceMetadata(); } + + private byte memoizedIsInitialized = -1; @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; } + @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof google.events.cloud.audit.v1.Data.AuthorizationInfo) { - return mergeFrom((google.events.cloud.audit.v1.Data.AuthorizationInfo)other); - } else { - super.mergeFrom(other); - return this; + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getPrincipalEmailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, principalEmail_); } + if (serviceMetadata_ != null) { + output.writeMessage(2, getServiceMetadata()); + } + unknownFields.writeTo(output); } - public Builder mergeFrom(google.events.cloud.audit.v1.Data.AuthorizationInfo other) { - if (other == google.events.cloud.audit.v1.Data.AuthorizationInfo.getDefaultInstance()) return this; - if (!other.getResource().isEmpty()) { - resource_ = other.resource_; - onChanged(); - } - if (!other.getPermission().isEmpty()) { - permission_ = other.permission_; - onChanged(); + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPrincipalEmailBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, principalEmail_); } - if (other.getGranted() != false) { - setGranted(other.getGranted()); + if (serviceMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getServiceMetadata()); } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; } @java.lang.Override - public final boolean isInitialized() { + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal)) { + return super.equals(obj); + } + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal other = (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal) obj; + + if (!getPrincipalEmail() + .equals(other.getPrincipalEmail())) return false; + if (hasServiceMetadata() != other.hasServiceMetadata()) return false; + if (hasServiceMetadata()) { + if (!getServiceMetadata() + .equals(other.getServiceMetadata())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override - public Builder mergeFrom( + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PRINCIPAL_EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalEmail().hashCode(); + if (hasServiceMetadata()) { + hash = (37 * hash) + SERVICE_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getServiceMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - google.events.cloud.audit.v1.Data.AuthorizationInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (google.events.cloud.audit.v1.Data.AuthorizationInfo) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - private java.lang.Object resource_ = ""; + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** *- * The resource being accessed, as a REST-style string. For example: - * bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID + * First party identity principal. ** - *string resource = 1;
- * @return The resource. + * Protobuf type {@code google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal} */ - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } else { - return (java.lang.String) ref; + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builderimplements + // @@protoc_insertion_point(builder_implements:google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal) + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipalOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_FirstPartyPrincipal_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_FirstPartyPrincipal_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.class, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.Builder.class); + } + + // Construct using google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + principalEmail_ = ""; + + if (serviceMetadataBuilder_ == null) { + serviceMetadata_ = null; + } else { + serviceMetadata_ = null; + serviceMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_FirstPartyPrincipal_descriptor; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal getDefaultInstanceForType() { + return google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal build() { + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal buildPartial() { + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal result = new google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal(this); + result.principalEmail_ = principalEmail_; + if (serviceMetadataBuilder_ == null) { + result.serviceMetadata_ = serviceMetadata_; + } else { + result.serviceMetadata_ = serviceMetadataBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal) { + return mergeFrom((google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal other) { + if (other == google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.getDefaultInstance()) return this; + if (!other.getPrincipalEmail().isEmpty()) { + principalEmail_ = other.principalEmail_; + onChanged(); + } + if (other.hasServiceMetadata()) { + mergeServiceMetadata(other.getServiceMetadata()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object principalEmail_ = ""; + /** + * + * The email address of a Google account. + *+ * + *string principal_email = 1;
+ * @return The principalEmail. + */ + public java.lang.String getPrincipalEmail() { + java.lang.Object ref = principalEmail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principalEmail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *+ * The email address of a Google account. + *+ * + *string principal_email = 1;
+ * @return The bytes for principalEmail. + */ + public com.google.protobuf.ByteString + getPrincipalEmailBytes() { + java.lang.Object ref = principalEmail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principalEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *+ * The email address of a Google account. + *+ * + *string principal_email = 1;
+ * @param value The principalEmail to set. + * @return This builder for chaining. + */ + public Builder setPrincipalEmail( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + principalEmail_ = value; + onChanged(); + return this; + } + /** + *+ * The email address of a Google account. + *+ * + *string principal_email = 1;
+ * @return This builder for chaining. + */ + public Builder clearPrincipalEmail() { + + principalEmail_ = getDefaultInstance().getPrincipalEmail(); + onChanged(); + return this; + } + /** + *+ * The email address of a Google account. + *+ * + *string principal_email = 1;
+ * @param value The bytes for principalEmail to set. + * @return This builder for chaining. + */ + public Builder setPrincipalEmailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + principalEmail_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Struct serviceMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> serviceMetadataBuilder_; + /** + *+ * Metadata about the service that uses the service account. + *+ * + *.google.protobuf.Struct service_metadata = 2;
+ * @return Whether the serviceMetadata field is set. + */ + public boolean hasServiceMetadata() { + return serviceMetadataBuilder_ != null || serviceMetadata_ != null; + } + /** + *+ * Metadata about the service that uses the service account. + *+ * + *.google.protobuf.Struct service_metadata = 2;
+ * @return The serviceMetadata. + */ + public com.google.protobuf.Struct getServiceMetadata() { + if (serviceMetadataBuilder_ == null) { + return serviceMetadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : serviceMetadata_; + } else { + return serviceMetadataBuilder_.getMessage(); + } + } + /** + *+ * Metadata about the service that uses the service account. + *+ * + *.google.protobuf.Struct service_metadata = 2;
+ */ + public Builder setServiceMetadata(com.google.protobuf.Struct value) { + if (serviceMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceMetadata_ = value; + onChanged(); + } else { + serviceMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * Metadata about the service that uses the service account. + *+ * + *.google.protobuf.Struct service_metadata = 2;
+ */ + public Builder setServiceMetadata( + com.google.protobuf.Struct.Builder builderForValue) { + if (serviceMetadataBuilder_ == null) { + serviceMetadata_ = builderForValue.build(); + onChanged(); + } else { + serviceMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * Metadata about the service that uses the service account. + *+ * + *.google.protobuf.Struct service_metadata = 2;
+ */ + public Builder mergeServiceMetadata(com.google.protobuf.Struct value) { + if (serviceMetadataBuilder_ == null) { + if (serviceMetadata_ != null) { + serviceMetadata_ = + com.google.protobuf.Struct.newBuilder(serviceMetadata_).mergeFrom(value).buildPartial(); + } else { + serviceMetadata_ = value; + } + onChanged(); + } else { + serviceMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + *+ * Metadata about the service that uses the service account. + *+ * + *.google.protobuf.Struct service_metadata = 2;
+ */ + public Builder clearServiceMetadata() { + if (serviceMetadataBuilder_ == null) { + serviceMetadata_ = null; + onChanged(); + } else { + serviceMetadata_ = null; + serviceMetadataBuilder_ = null; + } + + return this; + } + /** + *+ * Metadata about the service that uses the service account. + *+ * + *.google.protobuf.Struct service_metadata = 2;
+ */ + public com.google.protobuf.Struct.Builder getServiceMetadataBuilder() { + + onChanged(); + return getServiceMetadataFieldBuilder().getBuilder(); + } + /** + *+ * Metadata about the service that uses the service account. + *+ * + *.google.protobuf.Struct service_metadata = 2;
+ */ + public com.google.protobuf.StructOrBuilder getServiceMetadataOrBuilder() { + if (serviceMetadataBuilder_ != null) { + return serviceMetadataBuilder_.getMessageOrBuilder(); + } else { + return serviceMetadata_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : serviceMetadata_; + } + } + /** + *+ * Metadata about the service that uses the service account. + *+ * + *.google.protobuf.Struct service_metadata = 2;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getServiceMetadataFieldBuilder() { + if (serviceMetadataBuilder_ == null) { + serviceMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getServiceMetadata(), + getParentForChildren(), + isClean()); + serviceMetadata_ = null; + } + return serviceMetadataBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal) } - /** - *- * The resource being accessed, as a REST-style string. For example: - * bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID - *- * - *string resource = 1;
- * @return The bytes for resource. - */ - public com.google.protobuf.ByteString - getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + + // @@protoc_insertion_point(class_scope:google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal) + private static final google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal(); + } + + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser+ PARSER = new com.google.protobuf.AbstractParser () { + @java.lang.Override + public FirstPartyPrincipal parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FirstPartyPrincipal(input, extensionRegistry); } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ThirdPartyPrincipalOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal) + com.google.protobuf.MessageOrBuilder { + /** * - * The resource being accessed, as a REST-style string. For example: - * bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID + * Metadata about third party identity. ** - *string resource = 1;
- * @param value The resource to set. - * @return This builder for chaining. + *.google.protobuf.Struct third_party_claims = 1;
+ * @return Whether the thirdPartyClaims field is set. */ - public Builder setResource( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resource_ = value; - onChanged(); - return this; - } + boolean hasThirdPartyClaims(); /** *- * The resource being accessed, as a REST-style string. For example: - * bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID + * Metadata about third party identity. ** - *string resource = 1;
- * @return This builder for chaining. + *.google.protobuf.Struct third_party_claims = 1;
+ * @return The thirdPartyClaims. */ - public Builder clearResource() { - - resource_ = getDefaultInstance().getResource(); - onChanged(); - return this; - } + com.google.protobuf.Struct getThirdPartyClaims(); /** *- * The resource being accessed, as a REST-style string. For example: - * bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID + * Metadata about third party identity. ** - *string resource = 1;
- * @param value The bytes for resource to set. - * @return This builder for chaining. + *.google.protobuf.Struct third_party_claims = 1;
*/ - public Builder setResourceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resource_ = value; - onChanged(); - return this; + com.google.protobuf.StructOrBuilder getThirdPartyClaimsOrBuilder(); + } + /** + *+ * Third party identity principal. + *+ * + * Protobuf type {@code google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal} + */ + public static final class ThirdPartyPrincipal extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal) + ThirdPartyPrincipalOrBuilder { + private static final long serialVersionUID = 0L; + // Use ThirdPartyPrincipal.newBuilder() to construct. + private ThirdPartyPrincipal(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private ThirdPartyPrincipal() { } - private java.lang.Object permission_ = ""; - /** - *- * The required IAM permission. - *- * - *string permission = 2;
- * @return The permission. - */ - public java.lang.String getPermission() { - java.lang.Object ref = permission_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - permission_ = s; - return s; - } else { - return (java.lang.String) ref; - } + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ThirdPartyPrincipal(); } - /** - *- * The required IAM permission. - *- * - *string permission = 2;
- * @return The bytes for permission. - */ - public com.google.protobuf.ByteString - getPermissionBytes() { - java.lang.Object ref = permission_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - permission_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; } - /** - *- * The required IAM permission. - *- * - *string permission = 2;
- * @param value The permission to set. - * @return This builder for chaining. - */ - public Builder setPermission( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - permission_ = value; - onChanged(); - return this; + private ThirdPartyPrincipal( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.Struct.Builder subBuilder = null; + if (thirdPartyClaims_ != null) { + subBuilder = thirdPartyClaims_.toBuilder(); + } + thirdPartyClaims_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(thirdPartyClaims_); + thirdPartyClaims_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } } - /** - *- * The required IAM permission. - *- * - *string permission = 2;
- * @return This builder for chaining. - */ - public Builder clearPermission() { - - permission_ = getDefaultInstance().getPermission(); - onChanged(); - return this; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_ThirdPartyPrincipal_descriptor; } - /** - *- * The required IAM permission. - *- * - *string permission = 2;
- * @param value The bytes for permission to set. - * @return This builder for chaining. - */ - public Builder setPermissionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - permission_ = value; - onChanged(); - return this; + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_ThirdPartyPrincipal_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.class, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.Builder.class); } - private boolean granted_ ; + public static final int THIRD_PARTY_CLAIMS_FIELD_NUMBER = 1; + private com.google.protobuf.Struct thirdPartyClaims_; /** *- * Whether or not authorization for `resource` and `permission` - * was granted. + * Metadata about third party identity. ** - *bool granted = 3;
- * @return The granted. + *.google.protobuf.Struct third_party_claims = 1;
+ * @return Whether the thirdPartyClaims field is set. */ @java.lang.Override - public boolean getGranted() { - return granted_; + public boolean hasThirdPartyClaims() { + return thirdPartyClaims_ != null; } /** *- * Whether or not authorization for `resource` and `permission` - * was granted. + * Metadata about third party identity. ** - *bool granted = 3;
- * @param value The granted to set. - * @return This builder for chaining. + *.google.protobuf.Struct third_party_claims = 1;
+ * @return The thirdPartyClaims. */ - public Builder setGranted(boolean value) { - - granted_ = value; - onChanged(); - return this; + @java.lang.Override + public com.google.protobuf.Struct getThirdPartyClaims() { + return thirdPartyClaims_ == null ? com.google.protobuf.Struct.getDefaultInstance() : thirdPartyClaims_; } /** *- * Whether or not authorization for `resource` and `permission` - * was granted. + * Metadata about third party identity. ** - *bool granted = 3;
- * @return This builder for chaining. + *.google.protobuf.Struct third_party_claims = 1;
*/ - public Builder clearGranted() { - - granted_ = false; - onChanged(); - return this; + @java.lang.Override + public com.google.protobuf.StructOrBuilder getThirdPartyClaimsOrBuilder() { + return getThirdPartyClaims(); } + + private byte memoizedIsInitialized = -1; @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; } @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (thirdPartyClaims_ != null) { + output.writeMessage(1, getThirdPartyClaims()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (thirdPartyClaims_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getThirdPartyClaims()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal)) { + return super.equals(obj); + } + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal other = (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal) obj; - // @@protoc_insertion_point(builder_scope:google.events.cloud.audit.v1.AuthorizationInfo) - } + if (hasThirdPartyClaims() != other.hasThirdPartyClaims()) return false; + if (hasThirdPartyClaims()) { + if (!getThirdPartyClaims() + .equals(other.getThirdPartyClaims())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } - // @@protoc_insertion_point(class_scope:google.events.cloud.audit.v1.AuthorizationInfo) - private static final google.events.cloud.audit.v1.Data.AuthorizationInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new google.events.cloud.audit.v1.Data.AuthorizationInfo(); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasThirdPartyClaims()) { + hash = (37 * hash) + THIRD_PARTY_CLAIMS_FIELD_NUMBER; + hash = (53 * hash) + getThirdPartyClaims().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } - public static google.events.cloud.audit.v1.Data.AuthorizationInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } - private static final com.google.protobuf.Parser- PARSER = new com.google.protobuf.AbstractParser () { @java.lang.Override - public AuthorizationInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AuthorizationInfo(input, extensionRegistry); + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - }; + /** + * + * Third party identity principal. + *+ * + * Protobuf type {@code google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builderimplements + // @@protoc_insertion_point(builder_implements:google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal) + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipalOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_ThirdPartyPrincipal_descriptor; + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_ThirdPartyPrincipal_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.class, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.Builder.class); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + // Construct using google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - public google.events.cloud.audit.v1.Data.AuthorizationInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (thirdPartyClaimsBuilder_ == null) { + thirdPartyClaims_ = null; + } else { + thirdPartyClaims_ = null; + thirdPartyClaimsBuilder_ = null; + } + return this; + } - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_ThirdPartyPrincipal_descriptor; + } - public interface RequestMetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.events.cloud.audit.v1.RequestMetadata) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal getDefaultInstanceForType() { + return google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.getDefaultInstance(); + } - /** - * - * The IP address of the caller. - *- * - *string caller_ip = 1;
- * @return The callerIp. - */ - java.lang.String getCallerIp(); - /** - *- * The IP address of the caller. - *- * - *string caller_ip = 1;
- * @return The bytes for callerIp. - */ - com.google.protobuf.ByteString - getCallerIpBytes(); + @java.lang.Override + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal build() { + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - /** - *- * The user agent of the caller. - * This information is not authenticated and should be treated accordingly. - * For example: - * + `google-api-python-client/1.4.0`: - * The request was made by the Google API client for Python. - * + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: - * The request was made by the Google Cloud SDK CLI (gcloud). - * + `AppEngine-Google; (+http://code.google.com/appengine; appid: - * s~my-project`: - * The request was made from the `my-project` App Engine app. - *- * - *string caller_supplied_user_agent = 2;
- * @return The callerSuppliedUserAgent. - */ - java.lang.String getCallerSuppliedUserAgent(); - /** - *- * The user agent of the caller. - * This information is not authenticated and should be treated accordingly. - * For example: - * + `google-api-python-client/1.4.0`: - * The request was made by the Google API client for Python. - * + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: - * The request was made by the Google Cloud SDK CLI (gcloud). - * + `AppEngine-Google; (+http://code.google.com/appengine; appid: - * s~my-project`: - * The request was made from the `my-project` App Engine app. - *- * - *string caller_supplied_user_agent = 2;
- * @return The bytes for callerSuppliedUserAgent. - */ - com.google.protobuf.ByteString - getCallerSuppliedUserAgentBytes(); - } - /** - *- * Metadata about the request. - *- * - * Protobuf type {@code google.events.cloud.audit.v1.RequestMetadata} - */ - public static final class RequestMetadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.events.cloud.audit.v1.RequestMetadata) - RequestMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use RequestMetadata.newBuilder() to construct. - private RequestMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) { - super(builder); - } - private RequestMetadata() { - callerIp_ = ""; - callerSuppliedUserAgent_ = ""; - } + @java.lang.Override + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal buildPartial() { + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal result = new google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal(this); + if (thirdPartyClaimsBuilder_ == null) { + result.thirdPartyClaims_ = thirdPartyClaims_; + } else { + result.thirdPartyClaims_ = thirdPartyClaimsBuilder_.build(); + } + onBuilt(); + return result; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RequestMetadata(); - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal) { + return mergeFrom((google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal)other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RequestMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); + public Builder mergeFrom(google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal other) { + if (other == google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.getDefaultInstance()) return this; + if (other.hasThirdPartyClaims()) { + mergeThirdPartyClaims(other.getThirdPartyClaims()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - callerIp_ = s; - break; + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); + } + return this; + } - callerSuppliedUserAgent_ = s; - break; + private com.google.protobuf.Struct thirdPartyClaims_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> thirdPartyClaimsBuilder_; + /** + *+ * Metadata about third party identity. + *+ * + *.google.protobuf.Struct third_party_claims = 1;
+ * @return Whether the thirdPartyClaims field is set. + */ + public boolean hasThirdPartyClaims() { + return thirdPartyClaimsBuilder_ != null || thirdPartyClaims_ != null; + } + /** + *+ * Metadata about third party identity. + *+ * + *.google.protobuf.Struct third_party_claims = 1;
+ * @return The thirdPartyClaims. + */ + public com.google.protobuf.Struct getThirdPartyClaims() { + if (thirdPartyClaimsBuilder_ == null) { + return thirdPartyClaims_ == null ? com.google.protobuf.Struct.getDefaultInstance() : thirdPartyClaims_; + } else { + return thirdPartyClaimsBuilder_.getMessage(); + } + } + /** + *+ * Metadata about third party identity. + *+ * + *.google.protobuf.Struct third_party_claims = 1;
+ */ + public Builder setThirdPartyClaims(com.google.protobuf.Struct value) { + if (thirdPartyClaimsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; + thirdPartyClaims_ = value; + onChanged(); + } else { + thirdPartyClaimsBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * Metadata about third party identity. + *+ * + *.google.protobuf.Struct third_party_claims = 1;
+ */ + public Builder setThirdPartyClaims( + com.google.protobuf.Struct.Builder builderForValue) { + if (thirdPartyClaimsBuilder_ == null) { + thirdPartyClaims_ = builderForValue.build(); + onChanged(); + } else { + thirdPartyClaimsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * Metadata about third party identity. + *+ * + *.google.protobuf.Struct third_party_claims = 1;
+ */ + public Builder mergeThirdPartyClaims(com.google.protobuf.Struct value) { + if (thirdPartyClaimsBuilder_ == null) { + if (thirdPartyClaims_ != null) { + thirdPartyClaims_ = + com.google.protobuf.Struct.newBuilder(thirdPartyClaims_).mergeFrom(value).buildPartial(); + } else { + thirdPartyClaims_ = value; } + onChanged(); + } else { + thirdPartyClaimsBuilder_.mergeFrom(value); } + + return this; } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); + /** + *+ * Metadata about third party identity. + *+ * + *.google.protobuf.Struct third_party_claims = 1;
+ */ + public Builder clearThirdPartyClaims() { + if (thirdPartyClaimsBuilder_ == null) { + thirdPartyClaims_ = null; + onChanged(); + } else { + thirdPartyClaims_ = null; + thirdPartyClaimsBuilder_ = null; + } + + return this; + } + /** + *+ * Metadata about third party identity. + *+ * + *.google.protobuf.Struct third_party_claims = 1;
+ */ + public com.google.protobuf.Struct.Builder getThirdPartyClaimsBuilder() { + + onChanged(); + return getThirdPartyClaimsFieldBuilder().getBuilder(); + } + /** + *+ * Metadata about third party identity. + *+ * + *.google.protobuf.Struct third_party_claims = 1;
+ */ + public com.google.protobuf.StructOrBuilder getThirdPartyClaimsOrBuilder() { + if (thirdPartyClaimsBuilder_ != null) { + return thirdPartyClaimsBuilder_.getMessageOrBuilder(); + } else { + return thirdPartyClaims_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : thirdPartyClaims_; + } + } + /** + *+ * Metadata about third party identity. + *+ * + *.google.protobuf.Struct third_party_claims = 1;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getThirdPartyClaimsFieldBuilder() { + if (thirdPartyClaimsBuilder_ == null) { + thirdPartyClaimsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getThirdPartyClaims(), + getParentForChildren(), + isClean()); + thirdPartyClaims_ = null; + } + return thirdPartyClaimsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal) + private static final google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal(); + } + + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser+ PARSER = new com.google.protobuf.AbstractParser () { + @java.lang.Override + public ThirdPartyPrincipal parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ThirdPartyPrincipal(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_RequestMetadata_descriptor; + + private int authorityCase_ = 0; + private java.lang.Object authority_; + public enum AuthorityCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FIRST_PARTY_PRINCIPAL(1), + THIRD_PARTY_PRINCIPAL(2), + AUTHORITY_NOT_SET(0); + private final int value; + private AuthorityCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AuthorityCase valueOf(int value) { + return forNumber(value); + } + + public static AuthorityCase forNumber(int value) { + switch (value) { + case 1: return FIRST_PARTY_PRINCIPAL; + case 2: return THIRD_PARTY_PRINCIPAL; + case 0: return AUTHORITY_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public AuthorityCase + getAuthorityCase() { + return AuthorityCase.forNumber( + authorityCase_); } + public static final int FIRST_PARTY_PRINCIPAL_FIELD_NUMBER = 1; + /** + * + * First party (Google) identity as the real authority. + *+ * + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal first_party_principal = 1;
+ * @return Whether the firstPartyPrincipal field is set. + */ @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_RequestMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - google.events.cloud.audit.v1.Data.RequestMetadata.class, google.events.cloud.audit.v1.Data.RequestMetadata.Builder.class); + public boolean hasFirstPartyPrincipal() { + return authorityCase_ == 1; } - - public static final int CALLER_IP_FIELD_NUMBER = 1; - private volatile java.lang.Object callerIp_; /** *- * The IP address of the caller. + * First party (Google) identity as the real authority. ** - *string caller_ip = 1;
- * @return The callerIp. + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal first_party_principal = 1;
+ * @return The firstPartyPrincipal. */ @java.lang.Override - public java.lang.String getCallerIp() { - java.lang.Object ref = callerIp_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - callerIp_ = s; - return s; + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal getFirstPartyPrincipal() { + if (authorityCase_ == 1) { + return (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal) authority_; } + return google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.getDefaultInstance(); } /** *- * The IP address of the caller. + * First party (Google) identity as the real authority. ** - *string caller_ip = 1;
- * @return The bytes for callerIp. + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal first_party_principal = 1;
*/ @java.lang.Override - public com.google.protobuf.ByteString - getCallerIpBytes() { - java.lang.Object ref = callerIp_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - callerIp_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipalOrBuilder getFirstPartyPrincipalOrBuilder() { + if (authorityCase_ == 1) { + return (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal) authority_; } + return google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.getDefaultInstance(); } - public static final int CALLER_SUPPLIED_USER_AGENT_FIELD_NUMBER = 2; - private volatile java.lang.Object callerSuppliedUserAgent_; + public static final int THIRD_PARTY_PRINCIPAL_FIELD_NUMBER = 2; /** *- * The user agent of the caller. - * This information is not authenticated and should be treated accordingly. - * For example: - * + `google-api-python-client/1.4.0`: - * The request was made by the Google API client for Python. - * + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: - * The request was made by the Google Cloud SDK CLI (gcloud). - * + `AppEngine-Google; (+http://code.google.com/appengine; appid: - * s~my-project`: - * The request was made from the `my-project` App Engine app. + * Third party identity as the real authority. ** - *string caller_supplied_user_agent = 2;
- * @return The callerSuppliedUserAgent. + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal third_party_principal = 2;
+ * @return Whether the thirdPartyPrincipal field is set. */ @java.lang.Override - public java.lang.String getCallerSuppliedUserAgent() { - java.lang.Object ref = callerSuppliedUserAgent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - callerSuppliedUserAgent_ = s; - return s; + public boolean hasThirdPartyPrincipal() { + return authorityCase_ == 2; + } + /** + *+ * Third party identity as the real authority. + *+ * + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal third_party_principal = 2;
+ * @return The thirdPartyPrincipal. + */ + @java.lang.Override + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal getThirdPartyPrincipal() { + if (authorityCase_ == 2) { + return (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal) authority_; } + return google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.getDefaultInstance(); } /** *- * The user agent of the caller. - * This information is not authenticated and should be treated accordingly. - * For example: - * + `google-api-python-client/1.4.0`: - * The request was made by the Google API client for Python. - * + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: - * The request was made by the Google Cloud SDK CLI (gcloud). - * + `AppEngine-Google; (+http://code.google.com/appengine; appid: - * s~my-project`: - * The request was made from the `my-project` App Engine app. + * Third party identity as the real authority. ** - *string caller_supplied_user_agent = 2;
- * @return The bytes for callerSuppliedUserAgent. + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal third_party_principal = 2;
*/ @java.lang.Override - public com.google.protobuf.ByteString - getCallerSuppliedUserAgentBytes() { - java.lang.Object ref = callerSuppliedUserAgent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - callerSuppliedUserAgent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipalOrBuilder getThirdPartyPrincipalOrBuilder() { + if (authorityCase_ == 2) { + return (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal) authority_; } + return google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @@ -5293,11 +12701,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getCallerIpBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, callerIp_); + if (authorityCase_ == 1) { + output.writeMessage(1, (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal) authority_); } - if (!getCallerSuppliedUserAgentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, callerSuppliedUserAgent_); + if (authorityCase_ == 2) { + output.writeMessage(2, (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal) authority_); } unknownFields.writeTo(output); } @@ -5308,11 +12716,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getCallerIpBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, callerIp_); + if (authorityCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal) authority_); } - if (!getCallerSuppliedUserAgentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, callerSuppliedUserAgent_); + if (authorityCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal) authority_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -5324,15 +12734,24 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof google.events.cloud.audit.v1.Data.RequestMetadata)) { + if (!(obj instanceof google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo)) { return super.equals(obj); } - google.events.cloud.audit.v1.Data.RequestMetadata other = (google.events.cloud.audit.v1.Data.RequestMetadata) obj; - - if (!getCallerIp() - .equals(other.getCallerIp())) return false; - if (!getCallerSuppliedUserAgent() - .equals(other.getCallerSuppliedUserAgent())) return false; + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo other = (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo) obj; + + if (!getAuthorityCase().equals(other.getAuthorityCase())) return false; + switch (authorityCase_) { + case 1: + if (!getFirstPartyPrincipal() + .equals(other.getFirstPartyPrincipal())) return false; + break; + case 2: + if (!getThirdPartyPrincipal() + .equals(other.getThirdPartyPrincipal())) return false; + break; + case 0: + default: + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -5344,78 +12763,86 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CALLER_IP_FIELD_NUMBER; - hash = (53 * hash) + getCallerIp().hashCode(); - hash = (37 * hash) + CALLER_SUPPLIED_USER_AGENT_FIELD_NUMBER; - hash = (53 * hash) + getCallerSuppliedUserAgent().hashCode(); + switch (authorityCase_) { + case 1: + hash = (37 * hash) + FIRST_PARTY_PRINCIPAL_FIELD_NUMBER; + hash = (53 * hash) + getFirstPartyPrincipal().hashCode(); + break; + case 2: + hash = (37 * hash) + THIRD_PARTY_PRINCIPAL_FIELD_NUMBER; + hash = (53 * hash) + getThirdPartyPrincipal().hashCode(); + break; + case 0: + default: + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom(byte[] data) + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom(java.io.InputStream input) + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static google.events.cloud.audit.v1.Data.RequestMetadata parseDelimitedFrom(java.io.InputStream input) + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static google.events.cloud.audit.v1.Data.RequestMetadata parseDelimitedFrom( + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -5428,7 +12855,7 @@ public static google.events.cloud.audit.v1.Data.RequestMetadata parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(google.events.cloud.audit.v1.Data.RequestMetadata prototype) { + public static Builder newBuilder(google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -5445,29 +12872,29 @@ protected Builder newBuilderForType( } /** *- * Metadata about the request. + * Identity delegation history of an authenticated service account. ** - * Protobuf type {@code google.events.cloud.audit.v1.RequestMetadata} + * Protobuf type {@code google.events.cloud.audit.v1.ServiceAccountDelegationInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builderimplements - // @@protoc_insertion_point(builder_implements:google.events.cloud.audit.v1.RequestMetadata) - google.events.cloud.audit.v1.Data.RequestMetadataOrBuilder { + // @@protoc_insertion_point(builder_implements:google.events.cloud.audit.v1.ServiceAccountDelegationInfo) + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_RequestMetadata_descriptor; + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_RequestMetadata_fieldAccessorTable + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( - google.events.cloud.audit.v1.Data.RequestMetadata.class, google.events.cloud.audit.v1.Data.RequestMetadata.Builder.class); + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.class, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.Builder.class); } - // Construct using google.events.cloud.audit.v1.Data.RequestMetadata.newBuilder() + // Construct using google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -5485,27 +12912,25 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - callerIp_ = ""; - - callerSuppliedUserAgent_ = ""; - + authorityCase_ = 0; + authority_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_RequestMetadata_descriptor; + return google.events.cloud.audit.v1.Data.internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_descriptor; } @java.lang.Override - public google.events.cloud.audit.v1.Data.RequestMetadata getDefaultInstanceForType() { - return google.events.cloud.audit.v1.Data.RequestMetadata.getDefaultInstance(); + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo getDefaultInstanceForType() { + return google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.getDefaultInstance(); } @java.lang.Override - public google.events.cloud.audit.v1.Data.RequestMetadata build() { - google.events.cloud.audit.v1.Data.RequestMetadata result = buildPartial(); + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo build() { + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -5513,10 +12938,23 @@ public google.events.cloud.audit.v1.Data.RequestMetadata build() { } @java.lang.Override - public google.events.cloud.audit.v1.Data.RequestMetadata buildPartial() { - google.events.cloud.audit.v1.Data.RequestMetadata result = new google.events.cloud.audit.v1.Data.RequestMetadata(this); - result.callerIp_ = callerIp_; - result.callerSuppliedUserAgent_ = callerSuppliedUserAgent_; + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo buildPartial() { + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo result = new google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo(this); + if (authorityCase_ == 1) { + if (firstPartyPrincipalBuilder_ == null) { + result.authority_ = authority_; + } else { + result.authority_ = firstPartyPrincipalBuilder_.build(); + } + } + if (authorityCase_ == 2) { + if (thirdPartyPrincipalBuilder_ == null) { + result.authority_ = authority_; + } else { + result.authority_ = thirdPartyPrincipalBuilder_.build(); + } + } + result.authorityCase_ = authorityCase_; onBuilt(); return result; } @@ -5555,23 +12993,28 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof google.events.cloud.audit.v1.Data.RequestMetadata) { - return mergeFrom((google.events.cloud.audit.v1.Data.RequestMetadata)other); + if (other instanceof google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo) { + return mergeFrom((google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(google.events.cloud.audit.v1.Data.RequestMetadata other) { - if (other == google.events.cloud.audit.v1.Data.RequestMetadata.getDefaultInstance()) return this; - if (!other.getCallerIp().isEmpty()) { - callerIp_ = other.callerIp_; - onChanged(); - } - if (!other.getCallerSuppliedUserAgent().isEmpty()) { - callerSuppliedUserAgent_ = other.callerSuppliedUserAgent_; - onChanged(); + public Builder mergeFrom(google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo other) { + if (other == google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.getDefaultInstance()) return this; + switch (other.getAuthorityCase()) { + case FIRST_PARTY_PRINCIPAL: { + mergeFirstPartyPrincipal(other.getFirstPartyPrincipal()); + break; + } + case THIRD_PARTY_PRINCIPAL: { + mergeThirdPartyPrincipal(other.getThirdPartyPrincipal()); + break; + } + case AUTHORITY_NOT_SET: { + break; + } } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -5588,11 +13031,11 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - google.events.cloud.audit.v1.Data.RequestMetadata parsedMessage = null; + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (google.events.cloud.audit.v1.Data.RequestMetadata) e.getUnfinishedMessage(); + parsedMessage = (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -5601,242 +13044,374 @@ public Builder mergeFrom( } return this; } - - private java.lang.Object callerIp_ = ""; + private int authorityCase_ = 0; + private java.lang.Object authority_; + public AuthorityCase + getAuthorityCase() { + return AuthorityCase.forNumber( + authorityCase_); + } + + public Builder clearAuthority() { + authorityCase_ = 0; + authority_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.Builder, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipalOrBuilder> firstPartyPrincipalBuilder_; + /** + * + * First party (Google) identity as the real authority. + *+ * + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal first_party_principal = 1;
+ * @return Whether the firstPartyPrincipal field is set. + */ + @java.lang.Override + public boolean hasFirstPartyPrincipal() { + return authorityCase_ == 1; + } + /** + *+ * First party (Google) identity as the real authority. + *+ * + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal first_party_principal = 1;
+ * @return The firstPartyPrincipal. + */ + @java.lang.Override + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal getFirstPartyPrincipal() { + if (firstPartyPrincipalBuilder_ == null) { + if (authorityCase_ == 1) { + return (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal) authority_; + } + return google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.getDefaultInstance(); + } else { + if (authorityCase_ == 1) { + return firstPartyPrincipalBuilder_.getMessage(); + } + return google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.getDefaultInstance(); + } + } + /** + *+ * First party (Google) identity as the real authority. + *+ * + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal first_party_principal = 1;
+ */ + public Builder setFirstPartyPrincipal(google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal value) { + if (firstPartyPrincipalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authority_ = value; + onChanged(); + } else { + firstPartyPrincipalBuilder_.setMessage(value); + } + authorityCase_ = 1; + return this; + } + /** + *+ * First party (Google) identity as the real authority. + *+ * + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal first_party_principal = 1;
+ */ + public Builder setFirstPartyPrincipal( + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.Builder builderForValue) { + if (firstPartyPrincipalBuilder_ == null) { + authority_ = builderForValue.build(); + onChanged(); + } else { + firstPartyPrincipalBuilder_.setMessage(builderForValue.build()); + } + authorityCase_ = 1; + return this; + } + /** + *+ * First party (Google) identity as the real authority. + *+ * + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal first_party_principal = 1;
+ */ + public Builder mergeFirstPartyPrincipal(google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal value) { + if (firstPartyPrincipalBuilder_ == null) { + if (authorityCase_ == 1 && + authority_ != google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.getDefaultInstance()) { + authority_ = google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.newBuilder((google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal) authority_) + .mergeFrom(value).buildPartial(); + } else { + authority_ = value; + } + onChanged(); + } else { + if (authorityCase_ == 1) { + firstPartyPrincipalBuilder_.mergeFrom(value); + } + firstPartyPrincipalBuilder_.setMessage(value); + } + authorityCase_ = 1; + return this; + } + /** + *+ * First party (Google) identity as the real authority. + *+ * + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal first_party_principal = 1;
+ */ + public Builder clearFirstPartyPrincipal() { + if (firstPartyPrincipalBuilder_ == null) { + if (authorityCase_ == 1) { + authorityCase_ = 0; + authority_ = null; + onChanged(); + } + } else { + if (authorityCase_ == 1) { + authorityCase_ = 0; + authority_ = null; + } + firstPartyPrincipalBuilder_.clear(); + } + return this; + } /** *- * The IP address of the caller. + * First party (Google) identity as the real authority. ** - *string caller_ip = 1;
- * @return The callerIp. + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal first_party_principal = 1;
*/ - public java.lang.String getCallerIp() { - java.lang.Object ref = callerIp_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - callerIp_ = s; - return s; + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.Builder getFirstPartyPrincipalBuilder() { + return getFirstPartyPrincipalFieldBuilder().getBuilder(); + } + /** + *+ * First party (Google) identity as the real authority. + *+ * + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal first_party_principal = 1;
+ */ + @java.lang.Override + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipalOrBuilder getFirstPartyPrincipalOrBuilder() { + if ((authorityCase_ == 1) && (firstPartyPrincipalBuilder_ != null)) { + return firstPartyPrincipalBuilder_.getMessageOrBuilder(); } else { - return (java.lang.String) ref; + if (authorityCase_ == 1) { + return (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal) authority_; + } + return google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.getDefaultInstance(); } } /** *- * The IP address of the caller. + * First party (Google) identity as the real authority. ** - *string caller_ip = 1;
- * @return The bytes for callerIp. + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.FirstPartyPrincipal first_party_principal = 1;
*/ - public com.google.protobuf.ByteString - getCallerIpBytes() { - java.lang.Object ref = callerIp_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - callerIp_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.Builder, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipalOrBuilder> + getFirstPartyPrincipalFieldBuilder() { + if (firstPartyPrincipalBuilder_ == null) { + if (!(authorityCase_ == 1)) { + authority_ = google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.getDefaultInstance(); + } + firstPartyPrincipalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal.Builder, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipalOrBuilder>( + (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.FirstPartyPrincipal) authority_, + getParentForChildren(), + isClean()); + authority_ = null; } + authorityCase_ = 1; + onChanged();; + return firstPartyPrincipalBuilder_; } + + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.Builder, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipalOrBuilder> thirdPartyPrincipalBuilder_; /** *- * The IP address of the caller. + * Third party identity as the real authority. ** - *string caller_ip = 1;
- * @param value The callerIp to set. - * @return This builder for chaining. + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal third_party_principal = 2;
+ * @return Whether the thirdPartyPrincipal field is set. */ - public Builder setCallerIp( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - callerIp_ = value; - onChanged(); - return this; + @java.lang.Override + public boolean hasThirdPartyPrincipal() { + return authorityCase_ == 2; } /** *- * The IP address of the caller. + * Third party identity as the real authority. ** - *string caller_ip = 1;
- * @return This builder for chaining. + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal third_party_principal = 2;
+ * @return The thirdPartyPrincipal. */ - public Builder clearCallerIp() { - - callerIp_ = getDefaultInstance().getCallerIp(); - onChanged(); - return this; + @java.lang.Override + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal getThirdPartyPrincipal() { + if (thirdPartyPrincipalBuilder_ == null) { + if (authorityCase_ == 2) { + return (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal) authority_; + } + return google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.getDefaultInstance(); + } else { + if (authorityCase_ == 2) { + return thirdPartyPrincipalBuilder_.getMessage(); + } + return google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.getDefaultInstance(); + } } /** *- * The IP address of the caller. + * Third party identity as the real authority. ** - *string caller_ip = 1;
- * @param value The bytes for callerIp to set. - * @return This builder for chaining. + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal third_party_principal = 2;
*/ - public Builder setCallerIpBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - callerIp_ = value; - onChanged(); + public Builder setThirdPartyPrincipal(google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal value) { + if (thirdPartyPrincipalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authority_ = value; + onChanged(); + } else { + thirdPartyPrincipalBuilder_.setMessage(value); + } + authorityCase_ = 2; return this; } - - private java.lang.Object callerSuppliedUserAgent_ = ""; /** *- * The user agent of the caller. - * This information is not authenticated and should be treated accordingly. - * For example: - * + `google-api-python-client/1.4.0`: - * The request was made by the Google API client for Python. - * + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: - * The request was made by the Google Cloud SDK CLI (gcloud). - * + `AppEngine-Google; (+http://code.google.com/appengine; appid: - * s~my-project`: - * The request was made from the `my-project` App Engine app. + * Third party identity as the real authority. ** - *string caller_supplied_user_agent = 2;
- * @return The callerSuppliedUserAgent. + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal third_party_principal = 2;
*/ - public java.lang.String getCallerSuppliedUserAgent() { - java.lang.Object ref = callerSuppliedUserAgent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - callerSuppliedUserAgent_ = s; - return s; + public Builder setThirdPartyPrincipal( + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.Builder builderForValue) { + if (thirdPartyPrincipalBuilder_ == null) { + authority_ = builderForValue.build(); + onChanged(); } else { - return (java.lang.String) ref; + thirdPartyPrincipalBuilder_.setMessage(builderForValue.build()); } + authorityCase_ = 2; + return this; } /** *- * The user agent of the caller. - * This information is not authenticated and should be treated accordingly. - * For example: - * + `google-api-python-client/1.4.0`: - * The request was made by the Google API client for Python. - * + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: - * The request was made by the Google Cloud SDK CLI (gcloud). - * + `AppEngine-Google; (+http://code.google.com/appengine; appid: - * s~my-project`: - * The request was made from the `my-project` App Engine app. + * Third party identity as the real authority. ** - *string caller_supplied_user_agent = 2;
- * @return The bytes for callerSuppliedUserAgent. + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal third_party_principal = 2;
*/ - public com.google.protobuf.ByteString - getCallerSuppliedUserAgentBytes() { - java.lang.Object ref = callerSuppliedUserAgent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - callerSuppliedUserAgent_ = b; - return b; + public Builder mergeThirdPartyPrincipal(google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal value) { + if (thirdPartyPrincipalBuilder_ == null) { + if (authorityCase_ == 2 && + authority_ != google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.getDefaultInstance()) { + authority_ = google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.newBuilder((google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal) authority_) + .mergeFrom(value).buildPartial(); + } else { + authority_ = value; + } + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; + if (authorityCase_ == 2) { + thirdPartyPrincipalBuilder_.mergeFrom(value); + } + thirdPartyPrincipalBuilder_.setMessage(value); } + authorityCase_ = 2; + return this; } /** *- * The user agent of the caller. - * This information is not authenticated and should be treated accordingly. - * For example: - * + `google-api-python-client/1.4.0`: - * The request was made by the Google API client for Python. - * + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: - * The request was made by the Google Cloud SDK CLI (gcloud). - * + `AppEngine-Google; (+http://code.google.com/appengine; appid: - * s~my-project`: - * The request was made from the `my-project` App Engine app. + * Third party identity as the real authority. ** - *string caller_supplied_user_agent = 2;
- * @param value The callerSuppliedUserAgent to set. - * @return This builder for chaining. + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal third_party_principal = 2;
*/ - public Builder setCallerSuppliedUserAgent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - callerSuppliedUserAgent_ = value; - onChanged(); + public Builder clearThirdPartyPrincipal() { + if (thirdPartyPrincipalBuilder_ == null) { + if (authorityCase_ == 2) { + authorityCase_ = 0; + authority_ = null; + onChanged(); + } + } else { + if (authorityCase_ == 2) { + authorityCase_ = 0; + authority_ = null; + } + thirdPartyPrincipalBuilder_.clear(); + } return this; } /** *- * The user agent of the caller. - * This information is not authenticated and should be treated accordingly. - * For example: - * + `google-api-python-client/1.4.0`: - * The request was made by the Google API client for Python. - * + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: - * The request was made by the Google Cloud SDK CLI (gcloud). - * + `AppEngine-Google; (+http://code.google.com/appengine; appid: - * s~my-project`: - * The request was made from the `my-project` App Engine app. + * Third party identity as the real authority. ** - *string caller_supplied_user_agent = 2;
- * @return This builder for chaining. + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal third_party_principal = 2;
*/ - public Builder clearCallerSuppliedUserAgent() { - - callerSuppliedUserAgent_ = getDefaultInstance().getCallerSuppliedUserAgent(); - onChanged(); - return this; + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.Builder getThirdPartyPrincipalBuilder() { + return getThirdPartyPrincipalFieldBuilder().getBuilder(); } /** *- * The user agent of the caller. - * This information is not authenticated and should be treated accordingly. - * For example: - * + `google-api-python-client/1.4.0`: - * The request was made by the Google API client for Python. - * + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: - * The request was made by the Google Cloud SDK CLI (gcloud). - * + `AppEngine-Google; (+http://code.google.com/appengine; appid: - * s~my-project`: - * The request was made from the `my-project` App Engine app. + * Third party identity as the real authority. ** - *string caller_supplied_user_agent = 2;
- * @param value The bytes for callerSuppliedUserAgent to set. - * @return This builder for chaining. + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal third_party_principal = 2;
*/ - public Builder setCallerSuppliedUserAgentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - callerSuppliedUserAgent_ = value; - onChanged(); - return this; + @java.lang.Override + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipalOrBuilder getThirdPartyPrincipalOrBuilder() { + if ((authorityCase_ == 2) && (thirdPartyPrincipalBuilder_ != null)) { + return thirdPartyPrincipalBuilder_.getMessageOrBuilder(); + } else { + if (authorityCase_ == 2) { + return (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal) authority_; + } + return google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.getDefaultInstance(); + } + } + /** + *+ * Third party identity as the real authority. + *+ * + *.google.events.cloud.audit.v1.ServiceAccountDelegationInfo.ThirdPartyPrincipal third_party_principal = 2;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.Builder, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipalOrBuilder> + getThirdPartyPrincipalFieldBuilder() { + if (thirdPartyPrincipalBuilder_ == null) { + if (!(authorityCase_ == 2)) { + authority_ = google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.getDefaultInstance(); + } + thirdPartyPrincipalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal.Builder, google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipalOrBuilder>( + (google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo.ThirdPartyPrincipal) authority_, + getParentForChildren(), + isClean()); + authority_ = null; + } + authorityCase_ = 2; + onChanged();; + return thirdPartyPrincipalBuilder_; } @java.lang.Override public final Builder setUnknownFields( @@ -5851,41 +13426,41 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:google.events.cloud.audit.v1.RequestMetadata) + // @@protoc_insertion_point(builder_scope:google.events.cloud.audit.v1.ServiceAccountDelegationInfo) } - // @@protoc_insertion_point(class_scope:google.events.cloud.audit.v1.RequestMetadata) - private static final google.events.cloud.audit.v1.Data.RequestMetadata DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.events.cloud.audit.v1.ServiceAccountDelegationInfo) + private static final google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new google.events.cloud.audit.v1.Data.RequestMetadata(); + DEFAULT_INSTANCE = new google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo(); } - public static google.events.cloud.audit.v1.Data.RequestMetadata getDefaultInstance() { + public static google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser- PARSER = new com.google.protobuf.AbstractParser () { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser () { @java.lang.Override - public RequestMetadata parsePartialFrom( + public ServiceAccountDelegationInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RequestMetadata(input, extensionRegistry); + return new ServiceAccountDelegationInfo(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public google.events.cloud.audit.v1.Data.RequestMetadata getDefaultInstanceForType() { + public google.events.cloud.audit.v1.Data.ServiceAccountDelegationInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -5911,6 +13486,26 @@ public google.events.cloud.audit.v1.Data.RequestMetadata getDefaultInstanceForTy private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_events_cloud_audit_v1_RequestMetadata_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_audit_v1_ResourceLocation_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_audit_v1_ResourceLocation_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_FirstPartyPrincipal_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_FirstPartyPrincipal_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_ThirdPartyPrincipal_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_ThirdPartyPrincipal_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -5922,25 +13517,56 @@ public google.events.cloud.audit.v1.Data.RequestMetadata getDefaultInstanceForTy java.lang.String[] descriptorData = { "\n\'google/events/cloud/audit/v1/data.prot" + "o\022\034google.events.cloud.audit.v1\032\034google/" + - "protobuf/struct.proto\032\027google/rpc/status" + - ".proto\"\371\003\n\014AuditLogData\022\024\n\014service_name\030" + - "\007 \001(\t\022\023\n\013method_name\030\010 \001(\t\022\025\n\rresource_n" + - "ame\030\013 \001(\t\022\032\n\022num_response_items\030\014 \001(\003\022\"\n" + - "\006status\030\002 \001(\0132\022.google.rpc.Status\022M\n\023aut" + - "hentication_info\030\003 \001(\01320.google.events.c" + - "loud.audit.v1.AuthenticationInfo\022K\n\022auth" + - "orization_info\030\t \003(\0132/.google.events.clo" + - "ud.audit.v1.AuthorizationInfo\022G\n\020request" + - "_metadata\030\004 \001(\0132-.google.events.cloud.au" + - "dit.v1.RequestMetadata\022(\n\007request\030\020 \001(\0132" + - "\027.google.protobuf.Struct\022)\n\010response\030\021 \001" + - "(\0132\027.google.protobuf.Struct\022-\n\014service_d" + - "ata\030\017 \001(\0132\027.google.protobuf.Struct\"-\n\022Au" + - "thenticationInfo\022\027\n\017principal_email\030\001 \001(" + - "\t\"J\n\021AuthorizationInfo\022\020\n\010resource\030\001 \001(\t" + - "\022\022\n\npermission\030\002 \001(\t\022\017\n\007granted\030\003 \001(\010\"H\n" + - "\017RequestMetadata\022\021\n\tcaller_ip\030\001 \001(\t\022\"\n\032c" + - "aller_supplied_user_agent\030\002 \001(\tB(\252\002%Goog" + + "protobuf/struct.proto\032*google/rpc/contex" + + "t/attribute_context.proto\032\027google/rpc/st" + + "atus.proto\"\251\005\n\014AuditLogData\022\024\n\014service_n" + + "ame\030\007 \001(\t\022\023\n\013method_name\030\010 \001(\t\022\025\n\rresour" + + "ce_name\030\013 \001(\t\022I\n\021resource_location\030\024 \001(\013" + + "2..google.events.cloud.audit.v1.Resource" + + "Location\0228\n\027resource_original_state\030\023 \001(" + + "\0132\027.google.protobuf.Struct\022\032\n\022num_respon" + + "se_items\030\014 \001(\003\022\"\n\006status\030\002 \001(\0132\022.google." + + "rpc.Status\022M\n\023authentication_info\030\003 \001(\0132" + + "0.google.events.cloud.audit.v1.Authentic" + + "ationInfo\022K\n\022authorization_info\030\t \003(\0132/." + + "google.events.cloud.audit.v1.Authorizati" + + "onInfo\022G\n\020request_metadata\030\004 \001(\0132-.googl" + + "e.events.cloud.audit.v1.RequestMetadata\022" + + "(\n\007request\030\020 \001(\0132\027.google.protobuf.Struc" + + "t\022)\n\010response\030\021 \001(\0132\027.google.protobuf.St" + + "ruct\022)\n\010metadata\030\022 \001(\0132\027.google.protobuf" + + ".Struct\022-\n\014service_data\030\017 \001(\0132\027.google.p" + + "rotobuf.Struct\"\243\002\n\022AuthenticationInfo\022\027\n" + + "\017principal_email\030\001 \001(\t\022\032\n\022authority_sele" + + "ctor\030\002 \001(\t\0226\n\025third_party_principal\030\004 \001(" + + "\0132\027.google.protobuf.Struct\022 \n\030service_ac" + + "count_key_name\030\005 \001(\t\022c\n\037service_account_" + + "delegation_info\030\006 \003(\0132:.google.events.cl" + + "oud.audit.v1.ServiceAccountDelegationInf" + + "o\022\031\n\021principal_subject\030\010 \001(\t\"\226\001\n\021Authori" + + "zationInfo\022\020\n\010resource\030\001 \001(\t\022\022\n\npermissi" + + "on\030\002 \001(\t\022\017\n\007granted\030\003 \001(\010\022J\n\023resource_at" + + "tributes\030\005 \001(\0132-.google.rpc.context.Attr" + + "ibuteContext.Resource\"\365\001\n\017RequestMetadat" + + "a\022\021\n\tcaller_ip\030\001 \001(\t\022\"\n\032caller_supplied_" + + "user_agent\030\002 \001(\t\022\026\n\016caller_network\030\003 \001(\t" + + "\022H\n\022request_attributes\030\007 \001(\0132,.google.rp" + + "c.context.AttributeContext.Request\022I\n\026de" + + "stination_attributes\030\010 \001(\0132).google.rpc." + + "context.AttributeContext.Peer\"I\n\020Resourc" + + "eLocation\022\031\n\021current_locations\030\001 \003(\t\022\032\n\022" + + "original_locations\030\002 \003(\t\"\274\003\n\034ServiceAcco" + + "untDelegationInfo\022o\n\025first_party_princip" + + "al\030\001 \001(\0132N.google.events.cloud.audit.v1." + + "ServiceAccountDelegationInfo.FirstPartyP" + + "rincipalH\000\022o\n\025third_party_principal\030\002 \001(" + + "\0132N.google.events.cloud.audit.v1.Service" + + "AccountDelegationInfo.ThirdPartyPrincipa" + + "lH\000\032a\n\023FirstPartyPrincipal\022\027\n\017principal_" + + "email\030\001 \001(\t\0221\n\020service_metadata\030\002 \001(\0132\027." + + "google.protobuf.Struct\032J\n\023ThirdPartyPrin" + + "cipal\0223\n\022third_party_claims\030\001 \001(\0132\027.goog" + + "le.protobuf.StructB\013\n\tAuthorityB(\252\002%Goog" + "le.Events.Protobuf.Cloud.Audit.V1b\006proto" + "3" }; @@ -5948,6 +13574,7 @@ public google.events.cloud.audit.v1.Data.RequestMetadata getDefaultInstanceForTy .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.protobuf.StructProto.getDescriptor(), + com.google.rpc.context.AttributeContextProto.getDescriptor(), com.google.rpc.StatusProto.getDescriptor(), }); internal_static_google_events_cloud_audit_v1_AuditLogData_descriptor = @@ -5955,26 +13582,51 @@ public google.events.cloud.audit.v1.Data.RequestMetadata getDefaultInstanceForTy internal_static_google_events_cloud_audit_v1_AuditLogData_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_audit_v1_AuditLogData_descriptor, - new java.lang.String[] { "ServiceName", "MethodName", "ResourceName", "NumResponseItems", "Status", "AuthenticationInfo", "AuthorizationInfo", "RequestMetadata", "Request", "Response", "ServiceData", }); + new java.lang.String[] { "ServiceName", "MethodName", "ResourceName", "ResourceLocation", "ResourceOriginalState", "NumResponseItems", "Status", "AuthenticationInfo", "AuthorizationInfo", "RequestMetadata", "Request", "Response", "Metadata", "ServiceData", }); internal_static_google_events_cloud_audit_v1_AuthenticationInfo_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_events_cloud_audit_v1_AuthenticationInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_audit_v1_AuthenticationInfo_descriptor, - new java.lang.String[] { "PrincipalEmail", }); + new java.lang.String[] { "PrincipalEmail", "AuthoritySelector", "ThirdPartyPrincipal", "ServiceAccountKeyName", "ServiceAccountDelegationInfo", "PrincipalSubject", }); internal_static_google_events_cloud_audit_v1_AuthorizationInfo_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_google_events_cloud_audit_v1_AuthorizationInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_audit_v1_AuthorizationInfo_descriptor, - new java.lang.String[] { "Resource", "Permission", "Granted", }); + new java.lang.String[] { "Resource", "Permission", "Granted", "ResourceAttributes", }); internal_static_google_events_cloud_audit_v1_RequestMetadata_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_google_events_cloud_audit_v1_RequestMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_events_cloud_audit_v1_RequestMetadata_descriptor, - new java.lang.String[] { "CallerIp", "CallerSuppliedUserAgent", }); + new java.lang.String[] { "CallerIp", "CallerSuppliedUserAgent", "CallerNetwork", "RequestAttributes", "DestinationAttributes", }); + internal_static_google_events_cloud_audit_v1_ResourceLocation_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_events_cloud_audit_v1_ResourceLocation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_audit_v1_ResourceLocation_descriptor, + new java.lang.String[] { "CurrentLocations", "OriginalLocations", }); + internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_descriptor, + new java.lang.String[] { "FirstPartyPrincipal", "ThirdPartyPrincipal", "Authority", }); + internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_FirstPartyPrincipal_descriptor = + internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_descriptor.getNestedTypes().get(0); + internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_FirstPartyPrincipal_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_FirstPartyPrincipal_descriptor, + new java.lang.String[] { "PrincipalEmail", "ServiceMetadata", }); + internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_ThirdPartyPrincipal_descriptor = + internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_descriptor.getNestedTypes().get(1); + internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_ThirdPartyPrincipal_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_events_cloud_audit_v1_ServiceAccountDelegationInfo_ThirdPartyPrincipal_descriptor, + new java.lang.String[] { "ThirdPartyClaims", }); com.google.protobuf.StructProto.getDescriptor(); + com.google.rpc.context.AttributeContextProto.getDescriptor(); com.google.rpc.StatusProto.getDescriptor(); } diff --git a/src/google/events/cloud/build/v1/Data.java b/src/google/events/cloud/build/v1/Data.java new file mode 100644 index 00000000..4b9e28ab --- /dev/null +++ b/src/google/events/cloud/build/v1/Data.java @@ -0,0 +1,31591 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/events/cloud/build/v1/data.proto + +package google.events.cloud.build.v1; + +public final class Data { + private Data() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface BuildEventDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.build.v1.BuildEventData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * Unique identifier of the build. + *+ * + *string id = 1;
+ * @return The id. + */ + java.lang.String getId(); + /** + *+ * Unique identifier of the build. + *+ * + *string id = 1;
+ * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *+ * ID of the project. + *+ * + *string project_id = 16;
+ * @return The projectId. + */ + java.lang.String getProjectId(); + /** + *+ * ID of the project. + *+ * + *string project_id = 16;
+ * @return The bytes for projectId. + */ + com.google.protobuf.ByteString + getProjectIdBytes(); + + /** + *+ * Status of the build. + *+ * + *.google.events.cloud.build.v1.BuildEventData.Status status = 2;
+ * @return The enum numeric value on the wire for status. + */ + int getStatusValue(); + /** + *+ * Status of the build. + *+ * + *.google.events.cloud.build.v1.BuildEventData.Status status = 2;
+ * @return The status. + */ + google.events.cloud.build.v1.Data.BuildEventData.Status getStatus(); + + /** + *+ * Customer-readable message about the current status. + *+ * + *string status_detail = 24;
+ * @return The statusDetail. + */ + java.lang.String getStatusDetail(); + /** + *+ * Customer-readable message about the current status. + *+ * + *string status_detail = 24;
+ * @return The bytes for statusDetail. + */ + com.google.protobuf.ByteString + getStatusDetailBytes(); + + /** + *+ * The location of the source files to build. + *+ * + *.google.events.cloud.build.v1.Source source = 3;
+ * @return Whether the source field is set. + */ + boolean hasSource(); + /** + *+ * The location of the source files to build. + *+ * + *.google.events.cloud.build.v1.Source source = 3;
+ * @return The source. + */ + google.events.cloud.build.v1.Data.Source getSource(); + /** + *+ * The location of the source files to build. + *+ * + *.google.events.cloud.build.v1.Source source = 3;
+ */ + google.events.cloud.build.v1.Data.SourceOrBuilder getSourceOrBuilder(); + + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + java.util.List+ getStepsList(); + /** + * + * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + google.events.cloud.build.v1.Data.BuildStep getSteps(int index); + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + int getStepsCount(); + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + java.util.List extends google.events.cloud.build.v1.Data.BuildStepOrBuilder> + getStepsOrBuilderList(); + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + google.events.cloud.build.v1.Data.BuildStepOrBuilder getStepsOrBuilder( + int index); + + /** + *+ * Results of the build. + *+ * + *.google.events.cloud.build.v1.Results results = 10;
+ * @return Whether the results field is set. + */ + boolean hasResults(); + /** + *+ * Results of the build. + *+ * + *.google.events.cloud.build.v1.Results results = 10;
+ * @return The results. + */ + google.events.cloud.build.v1.Data.Results getResults(); + /** + *+ * Results of the build. + *+ * + *.google.events.cloud.build.v1.Results results = 10;
+ */ + google.events.cloud.build.v1.Data.ResultsOrBuilder getResultsOrBuilder(); + + /** + *+ * Time at which the request to create the build was received. + *+ * + *.google.protobuf.Timestamp create_time = 6;
+ * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *+ * Time at which the request to create the build was received. + *+ * + *.google.protobuf.Timestamp create_time = 6;
+ * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *+ * Time at which the request to create the build was received. + *+ * + *.google.protobuf.Timestamp create_time = 6;
+ */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *+ * Time at which execution of the build was started. + *+ * + *.google.protobuf.Timestamp start_time = 7;
+ * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + *+ * Time at which execution of the build was started. + *+ * + *.google.protobuf.Timestamp start_time = 7;
+ * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + *+ * Time at which execution of the build was started. + *+ * + *.google.protobuf.Timestamp start_time = 7;
+ */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + *+ * Time at which execution of the build was finished. + * The difference between finish_time and start_time is the duration of the + * build's execution. + *+ * + *.google.protobuf.Timestamp finish_time = 8;
+ * @return Whether the finishTime field is set. + */ + boolean hasFinishTime(); + /** + *+ * Time at which execution of the build was finished. + * The difference between finish_time and start_time is the duration of the + * build's execution. + *+ * + *.google.protobuf.Timestamp finish_time = 8;
+ * @return The finishTime. + */ + com.google.protobuf.Timestamp getFinishTime(); + /** + *+ * Time at which execution of the build was finished. + * The difference between finish_time and start_time is the duration of the + * build's execution. + *+ * + *.google.protobuf.Timestamp finish_time = 8;
+ */ + com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder(); + + /** + *+ * Amount of time that this build should be allowed to run, to second + * granularity. If this amount of time elapses, work on the build will cease + * and the build status will be `TIMEOUT`. + *+ * + *.google.protobuf.Duration timeout = 12;
+ * @return Whether the timeout field is set. + */ + boolean hasTimeout(); + /** + *+ * Amount of time that this build should be allowed to run, to second + * granularity. If this amount of time elapses, work on the build will cease + * and the build status will be `TIMEOUT`. + *+ * + *.google.protobuf.Duration timeout = 12;
+ * @return The timeout. + */ + com.google.protobuf.Duration getTimeout(); + /** + *+ * Amount of time that this build should be allowed to run, to second + * granularity. If this amount of time elapses, work on the build will cease + * and the build status will be `TIMEOUT`. + *+ * + *.google.protobuf.Duration timeout = 12;
+ */ + com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder(); + + /** + *+ * A list of images to be pushed upon the successful completion of all build + * steps. + * The images are pushed using the builder service account's credentials. + * The digests of the pushed images will be stored in the `Build` resource's + * results field. + * If any of the images fail to be pushed, the build status is marked + * `FAILURE`. + *+ * + *repeated string images = 13;
+ * @return A list containing the images. + */ + java.util.List+ getImagesList(); + /** + * + * A list of images to be pushed upon the successful completion of all build + * steps. + * The images are pushed using the builder service account's credentials. + * The digests of the pushed images will be stored in the `Build` resource's + * results field. + * If any of the images fail to be pushed, the build status is marked + * `FAILURE`. + *+ * + *repeated string images = 13;
+ * @return The count of images. + */ + int getImagesCount(); + /** + *+ * A list of images to be pushed upon the successful completion of all build + * steps. + * The images are pushed using the builder service account's credentials. + * The digests of the pushed images will be stored in the `Build` resource's + * results field. + * If any of the images fail to be pushed, the build status is marked + * `FAILURE`. + *+ * + *repeated string images = 13;
+ * @param index The index of the element to return. + * @return The images at the given index. + */ + java.lang.String getImages(int index); + /** + *+ * A list of images to be pushed upon the successful completion of all build + * steps. + * The images are pushed using the builder service account's credentials. + * The digests of the pushed images will be stored in the `Build` resource's + * results field. + * If any of the images fail to be pushed, the build status is marked + * `FAILURE`. + *+ * + *repeated string images = 13;
+ * @param index The index of the value to return. + * @return The bytes of the images at the given index. + */ + com.google.protobuf.ByteString + getImagesBytes(int index); + + /** + *+ * TTL in queue for this build. If provided and the build is enqueued longer + * than this value, the build will expire and the build status will be + * `EXPIRED`. + * The TTL starts ticking from create_time. + *+ * + *.google.protobuf.Duration queue_ttl = 40;
+ * @return Whether the queueTtl field is set. + */ + boolean hasQueueTtl(); + /** + *+ * TTL in queue for this build. If provided and the build is enqueued longer + * than this value, the build will expire and the build status will be + * `EXPIRED`. + * The TTL starts ticking from create_time. + *+ * + *.google.protobuf.Duration queue_ttl = 40;
+ * @return The queueTtl. + */ + com.google.protobuf.Duration getQueueTtl(); + /** + *+ * TTL in queue for this build. If provided and the build is enqueued longer + * than this value, the build will expire and the build status will be + * `EXPIRED`. + * The TTL starts ticking from create_time. + *+ * + *.google.protobuf.Duration queue_ttl = 40;
+ */ + com.google.protobuf.DurationOrBuilder getQueueTtlOrBuilder(); + + /** + *+ * Artifacts produced by the build that should be uploaded upon + * successful completion of all build steps. + *+ * + *.google.events.cloud.build.v1.Artifacts artifacts = 37;
+ * @return Whether the artifacts field is set. + */ + boolean hasArtifacts(); + /** + *+ * Artifacts produced by the build that should be uploaded upon + * successful completion of all build steps. + *+ * + *.google.events.cloud.build.v1.Artifacts artifacts = 37;
+ * @return The artifacts. + */ + google.events.cloud.build.v1.Data.Artifacts getArtifacts(); + /** + *+ * Artifacts produced by the build that should be uploaded upon + * successful completion of all build steps. + *+ * + *.google.events.cloud.build.v1.Artifacts artifacts = 37;
+ */ + google.events.cloud.build.v1.Data.ArtifactsOrBuilder getArtifactsOrBuilder(); + + /** + *+ * Google Cloud Storage bucket where logs should be written (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. + *+ * + *string logs_bucket = 19;
+ * @return The logsBucket. + */ + java.lang.String getLogsBucket(); + /** + *+ * Google Cloud Storage bucket where logs should be written (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. + *+ * + *string logs_bucket = 19;
+ * @return The bytes for logsBucket. + */ + com.google.protobuf.ByteString + getLogsBucketBytes(); + + /** + *+ * A permanent fixed identifier for source. + *+ * + *.google.events.cloud.build.v1.SourceProvenance source_provenance = 21;
+ * @return Whether the sourceProvenance field is set. + */ + boolean hasSourceProvenance(); + /** + *+ * A permanent fixed identifier for source. + *+ * + *.google.events.cloud.build.v1.SourceProvenance source_provenance = 21;
+ * @return The sourceProvenance. + */ + google.events.cloud.build.v1.Data.SourceProvenance getSourceProvenance(); + /** + *+ * A permanent fixed identifier for source. + *+ * + *.google.events.cloud.build.v1.SourceProvenance source_provenance = 21;
+ */ + google.events.cloud.build.v1.Data.SourceProvenanceOrBuilder getSourceProvenanceOrBuilder(); + + /** + *+ * The ID of the `BuildTrigger` that triggered this build, if it + * was triggered automatically. + *+ * + *string build_trigger_id = 22;
+ * @return The buildTriggerId. + */ + java.lang.String getBuildTriggerId(); + /** + *+ * The ID of the `BuildTrigger` that triggered this build, if it + * was triggered automatically. + *+ * + *string build_trigger_id = 22;
+ * @return The bytes for buildTriggerId. + */ + com.google.protobuf.ByteString + getBuildTriggerIdBytes(); + + /** + *+ * Special options for this build. + *+ * + *.google.events.cloud.build.v1.BuildOptions options = 23;
+ * @return Whether the options field is set. + */ + boolean hasOptions(); + /** + *+ * Special options for this build. + *+ * + *.google.events.cloud.build.v1.BuildOptions options = 23;
+ * @return The options. + */ + google.events.cloud.build.v1.Data.BuildOptions getOptions(); + /** + *+ * Special options for this build. + *+ * + *.google.events.cloud.build.v1.BuildOptions options = 23;
+ */ + google.events.cloud.build.v1.Data.BuildOptionsOrBuilder getOptionsOrBuilder(); + + /** + *+ * URL to logs for this build in Google Cloud Console. + *+ * + *string log_url = 25;
+ * @return The logUrl. + */ + java.lang.String getLogUrl(); + /** + *+ * URL to logs for this build in Google Cloud Console. + *+ * + *string log_url = 25;
+ * @return The bytes for logUrl. + */ + com.google.protobuf.ByteString + getLogUrlBytes(); + + /** + *+ * Substitutions data for `Build` resource. + *+ * + *map<string, string> substitutions = 29;
+ */ + int getSubstitutionsCount(); + /** + *+ * Substitutions data for `Build` resource. + *+ * + *map<string, string> substitutions = 29;
+ */ + boolean containsSubstitutions( + java.lang.String key); + /** + * Use {@link #getSubstitutionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map+ getSubstitutions(); + /** + * + * Substitutions data for `Build` resource. + *+ * + *map<string, string> substitutions = 29;
+ */ + java.util.Map+ getSubstitutionsMap(); + /** + * + * Substitutions data for `Build` resource. + *+ * + *map<string, string> substitutions = 29;
+ */ + + java.lang.String getSubstitutionsOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *+ * Substitutions data for `Build` resource. + *+ * + *map<string, string> substitutions = 29;
+ */ + + java.lang.String getSubstitutionsOrThrow( + java.lang.String key); + + /** + *+ * Tags for annotation of a `Build`. These are not docker tags. + *+ * + *repeated string tags = 31;
+ * @return A list containing the tags. + */ + java.util.List+ getTagsList(); + /** + * + * Tags for annotation of a `Build`. These are not docker tags. + *+ * + *repeated string tags = 31;
+ * @return The count of tags. + */ + int getTagsCount(); + /** + *+ * Tags for annotation of a `Build`. These are not docker tags. + *+ * + *repeated string tags = 31;
+ * @param index The index of the element to return. + * @return The tags at the given index. + */ + java.lang.String getTags(int index); + /** + *+ * Tags for annotation of a `Build`. These are not docker tags. + *+ * + *repeated string tags = 31;
+ * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + com.google.protobuf.ByteString + getTagsBytes(int index); + + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + java.util.List+ getSecretsList(); + /** + * + * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + google.events.cloud.build.v1.Data.Secret getSecrets(int index); + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + int getSecretsCount(); + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + java.util.List extends google.events.cloud.build.v1.Data.SecretOrBuilder> + getSecretsOrBuilderList(); + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + google.events.cloud.build.v1.Data.SecretOrBuilder getSecretsOrBuilder( + int index); + + /** + *+ * Stores timing information for phases of the build. Valid keys + * are: + * * BUILD: time to execute all build steps + * * PUSH: time to push all specified images. + * * FETCHSOURCE: time to fetch source. + * If the build does not specify source or images, + * these keys will not be included. + *+ * + *map<string, .google.events.cloud.build.v1.TimeSpan> timing = 33;
+ */ + int getTimingCount(); + /** + *+ * Stores timing information for phases of the build. Valid keys + * are: + * * BUILD: time to execute all build steps + * * PUSH: time to push all specified images. + * * FETCHSOURCE: time to fetch source. + * If the build does not specify source or images, + * these keys will not be included. + *+ * + *map<string, .google.events.cloud.build.v1.TimeSpan> timing = 33;
+ */ + boolean containsTiming( + java.lang.String key); + /** + * Use {@link #getTimingMap()} instead. + */ + @java.lang.Deprecated + java.util.Map+ getTiming(); + /** + * + * Stores timing information for phases of the build. Valid keys + * are: + * * BUILD: time to execute all build steps + * * PUSH: time to push all specified images. + * * FETCHSOURCE: time to fetch source. + * If the build does not specify source or images, + * these keys will not be included. + *+ * + *map<string, .google.events.cloud.build.v1.TimeSpan> timing = 33;
+ */ + java.util.Map+ getTimingMap(); + /** + * + * Stores timing information for phases of the build. Valid keys + * are: + * * BUILD: time to execute all build steps + * * PUSH: time to push all specified images. + * * FETCHSOURCE: time to fetch source. + * If the build does not specify source or images, + * these keys will not be included. + *+ * + *map<string, .google.events.cloud.build.v1.TimeSpan> timing = 33;
+ */ + + google.events.cloud.build.v1.Data.TimeSpan getTimingOrDefault( + java.lang.String key, + google.events.cloud.build.v1.Data.TimeSpan defaultValue); + /** + *+ * Stores timing information for phases of the build. Valid keys + * are: + * * BUILD: time to execute all build steps + * * PUSH: time to push all specified images. + * * FETCHSOURCE: time to fetch source. + * If the build does not specify source or images, + * these keys will not be included. + *+ * + *map<string, .google.events.cloud.build.v1.TimeSpan> timing = 33;
+ */ + + google.events.cloud.build.v1.Data.TimeSpan getTimingOrThrow( + java.lang.String key); + } + /** + *+ * Build event data + * Common build format for Google Cloud Platform API operations. + * Copied from + * https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto. + *+ * + * Protobuf type {@code google.events.cloud.build.v1.BuildEventData} + */ + public static final class BuildEventData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.build.v1.BuildEventData) + BuildEventDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use BuildEventData.newBuilder() to construct. + private BuildEventData(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private BuildEventData() { + id_ = ""; + projectId_ = ""; + status_ = 0; + statusDetail_ = ""; + steps_ = java.util.Collections.emptyList(); + images_ = com.google.protobuf.LazyStringArrayList.EMPTY; + logsBucket_ = ""; + buildTriggerId_ = ""; + logUrl_ = ""; + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + secrets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BuildEventData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BuildEventData( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + case 16: { + int rawValue = input.readEnum(); + + status_ = rawValue; + break; + } + case 26: { + google.events.cloud.build.v1.Data.Source.Builder subBuilder = null; + if (source_ != null) { + subBuilder = source_.toBuilder(); + } + source_ = input.readMessage(google.events.cloud.build.v1.Data.Source.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(source_); + source_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (finishTime_ != null) { + subBuilder = finishTime_.toBuilder(); + } + finishTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(finishTime_); + finishTime_ = subBuilder.buildPartial(); + } + + break; + } + case 82: { + google.events.cloud.build.v1.Data.Results.Builder subBuilder = null; + if (results_ != null) { + subBuilder = results_.toBuilder(); + } + results_ = input.readMessage(google.events.cloud.build.v1.Data.Results.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(results_); + results_ = subBuilder.buildPartial(); + } + + break; + } + case 90: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + steps_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + steps_.add( + input.readMessage(google.events.cloud.build.v1.Data.BuildStep.parser(), extensionRegistry)); + break; + } + case 98: { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeout_ != null) { + subBuilder = timeout_.toBuilder(); + } + timeout_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeout_); + timeout_ = subBuilder.buildPartial(); + } + + break; + } + case 106: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + images_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + images_.add(s); + break; + } + case 130: { + java.lang.String s = input.readStringRequireUtf8(); + + projectId_ = s; + break; + } + case 154: { + java.lang.String s = input.readStringRequireUtf8(); + + logsBucket_ = s; + break; + } + case 170: { + google.events.cloud.build.v1.Data.SourceProvenance.Builder subBuilder = null; + if (sourceProvenance_ != null) { + subBuilder = sourceProvenance_.toBuilder(); + } + sourceProvenance_ = input.readMessage(google.events.cloud.build.v1.Data.SourceProvenance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sourceProvenance_); + sourceProvenance_ = subBuilder.buildPartial(); + } + + break; + } + case 178: { + java.lang.String s = input.readStringRequireUtf8(); + + buildTriggerId_ = s; + break; + } + case 186: { + google.events.cloud.build.v1.Data.BuildOptions.Builder subBuilder = null; + if (options_ != null) { + subBuilder = options_.toBuilder(); + } + options_ = input.readMessage(google.events.cloud.build.v1.Data.BuildOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(options_); + options_ = subBuilder.buildPartial(); + } + + break; + } + case 194: { + java.lang.String s = input.readStringRequireUtf8(); + + statusDetail_ = s; + break; + } + case 202: { + java.lang.String s = input.readStringRequireUtf8(); + + logUrl_ = s; + break; + } + case 234: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + substitutions_ = com.google.protobuf.MapField.newMapField( + SubstitutionsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry + substitutions__ = input.readMessage( + SubstitutionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + substitutions_.getMutableMap().put( + substitutions__.getKey(), substitutions__.getValue()); + break; + } + case 250: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; + } + tags_.add(s); + break; + } + case 258: { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + secrets_ = new java.util.ArrayList (); + mutable_bitField0_ |= 0x00000010; + } + secrets_.add( + input.readMessage(google.events.cloud.build.v1.Data.Secret.parser(), extensionRegistry)); + break; + } + case 266: { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + timing_ = com.google.protobuf.MapField.newMapField( + TimingDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000020; + } + com.google.protobuf.MapEntry + timing__ = input.readMessage( + TimingDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + timing_.getMutableMap().put( + timing__.getKey(), timing__.getValue()); + break; + } + case 298: { + google.events.cloud.build.v1.Data.Artifacts.Builder subBuilder = null; + if (artifacts_ != null) { + subBuilder = artifacts_.toBuilder(); + } + artifacts_ = input.readMessage(google.events.cloud.build.v1.Data.Artifacts.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(artifacts_); + artifacts_ = subBuilder.buildPartial(); + } + + break; + } + case 322: { + com.google.protobuf.Duration.Builder subBuilder = null; + if (queueTtl_ != null) { + subBuilder = queueTtl_.toBuilder(); + } + queueTtl_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(queueTtl_); + queueTtl_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + steps_ = java.util.Collections.unmodifiableList(steps_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + images_ = images_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + tags_ = tags_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + secrets_ = java.util.Collections.unmodifiableList(secrets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.build.v1.Data.internal_static_google_events_cloud_build_v1_BuildEventData_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 29: + return internalGetSubstitutions(); + case 33: + return internalGetTiming(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.build.v1.Data.internal_static_google_events_cloud_build_v1_BuildEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.build.v1.Data.BuildEventData.class, google.events.cloud.build.v1.Data.BuildEventData.Builder.class); + } + + /** + * + * Possible status of a build or build step. + *+ * + * Protobuf enum {@code google.events.cloud.build.v1.BuildEventData.Status} + */ + public enum Status + implements com.google.protobuf.ProtocolMessageEnum { + /** + *+ * Status of the build is unknown. + *+ * + *STATUS_UNKNOWN = 0;
+ */ + STATUS_UNKNOWN(0), + /** + *+ * Build or step is queued; work has not yet begun. + *+ * + *QUEUED = 1;
+ */ + QUEUED(1), + /** + *+ * Build or step is being executed. + *+ * + *WORKING = 2;
+ */ + WORKING(2), + /** + *+ * Build or step finished successfully. + *+ * + *SUCCESS = 3;
+ */ + SUCCESS(3), + /** + *+ * Build or step failed to complete successfully. + *+ * + *FAILURE = 4;
+ */ + FAILURE(4), + /** + *+ * Build or step failed due to an internal cause. + *+ * + *INTERNAL_ERROR = 5;
+ */ + INTERNAL_ERROR(5), + /** + *+ * Build or step took longer than was allowed. + *+ * + *TIMEOUT = 6;
+ */ + TIMEOUT(6), + /** + *+ * Build or step was canceled by a user. + *+ * + *CANCELLED = 7;
+ */ + CANCELLED(7), + /** + *+ * Build was enqueued for longer than the value of `queue_ttl`. + *+ * + *EXPIRED = 9;
+ */ + EXPIRED(9), + UNRECOGNIZED(-1), + ; + + /** + *+ * Status of the build is unknown. + *+ * + *STATUS_UNKNOWN = 0;
+ */ + public static final int STATUS_UNKNOWN_VALUE = 0; + /** + *+ * Build or step is queued; work has not yet begun. + *+ * + *QUEUED = 1;
+ */ + public static final int QUEUED_VALUE = 1; + /** + *+ * Build or step is being executed. + *+ * + *WORKING = 2;
+ */ + public static final int WORKING_VALUE = 2; + /** + *+ * Build or step finished successfully. + *+ * + *SUCCESS = 3;
+ */ + public static final int SUCCESS_VALUE = 3; + /** + *+ * Build or step failed to complete successfully. + *+ * + *FAILURE = 4;
+ */ + public static final int FAILURE_VALUE = 4; + /** + *+ * Build or step failed due to an internal cause. + *+ * + *INTERNAL_ERROR = 5;
+ */ + public static final int INTERNAL_ERROR_VALUE = 5; + /** + *+ * Build or step took longer than was allowed. + *+ * + *TIMEOUT = 6;
+ */ + public static final int TIMEOUT_VALUE = 6; + /** + *+ * Build or step was canceled by a user. + *+ * + *CANCELLED = 7;
+ */ + public static final int CANCELLED_VALUE = 7; + /** + *+ * Build was enqueued for longer than the value of `queue_ttl`. + *+ * + *EXPIRED = 9;
+ */ + public static final int EXPIRED_VALUE = 9; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Status valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Status forNumber(int value) { + switch (value) { + case 0: return STATUS_UNKNOWN; + case 1: return QUEUED; + case 2: return WORKING; + case 3: return SUCCESS; + case 4: return FAILURE; + case 5: return INTERNAL_ERROR; + case 6: return TIMEOUT; + case 7: return CANCELLED; + case 9: return EXPIRED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap+ internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Status> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap () { + public Status findValueByNumber(int number) { + return Status.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return google.events.cloud.build.v1.Data.BuildEventData.getDescriptor().getEnumTypes().get(0); + } + + private static final Status[] VALUES = values(); + + public static Status valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Status(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.events.cloud.build.v1.BuildEventData.Status) + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * + * Unique identifier of the build. + *+ * + *string id = 1;
+ * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *+ * Unique identifier of the build. + *+ * + *string id = 1;
+ * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 16; + private volatile java.lang.Object projectId_; + /** + *+ * ID of the project. + *+ * + *string project_id = 16;
+ * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + *+ * ID of the project. + *+ * + *string project_id = 16;
+ * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_FIELD_NUMBER = 2; + private int status_; + /** + *+ * Status of the build. + *+ * + *.google.events.cloud.build.v1.BuildEventData.Status status = 2;
+ * @return The enum numeric value on the wire for status. + */ + @java.lang.Override public int getStatusValue() { + return status_; + } + /** + *+ * Status of the build. + *+ * + *.google.events.cloud.build.v1.BuildEventData.Status status = 2;
+ * @return The status. + */ + @java.lang.Override public google.events.cloud.build.v1.Data.BuildEventData.Status getStatus() { + @SuppressWarnings("deprecation") + google.events.cloud.build.v1.Data.BuildEventData.Status result = google.events.cloud.build.v1.Data.BuildEventData.Status.valueOf(status_); + return result == null ? google.events.cloud.build.v1.Data.BuildEventData.Status.UNRECOGNIZED : result; + } + + public static final int STATUS_DETAIL_FIELD_NUMBER = 24; + private volatile java.lang.Object statusDetail_; + /** + *+ * Customer-readable message about the current status. + *+ * + *string status_detail = 24;
+ * @return The statusDetail. + */ + @java.lang.Override + public java.lang.String getStatusDetail() { + java.lang.Object ref = statusDetail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusDetail_ = s; + return s; + } + } + /** + *+ * Customer-readable message about the current status. + *+ * + *string status_detail = 24;
+ * @return The bytes for statusDetail. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStatusDetailBytes() { + java.lang.Object ref = statusDetail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + statusDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_FIELD_NUMBER = 3; + private google.events.cloud.build.v1.Data.Source source_; + /** + *+ * The location of the source files to build. + *+ * + *.google.events.cloud.build.v1.Source source = 3;
+ * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return source_ != null; + } + /** + *+ * The location of the source files to build. + *+ * + *.google.events.cloud.build.v1.Source source = 3;
+ * @return The source. + */ + @java.lang.Override + public google.events.cloud.build.v1.Data.Source getSource() { + return source_ == null ? google.events.cloud.build.v1.Data.Source.getDefaultInstance() : source_; + } + /** + *+ * The location of the source files to build. + *+ * + *.google.events.cloud.build.v1.Source source = 3;
+ */ + @java.lang.Override + public google.events.cloud.build.v1.Data.SourceOrBuilder getSourceOrBuilder() { + return getSource(); + } + + public static final int STEPS_FIELD_NUMBER = 11; + private java.util.Liststeps_; + /** + * + * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + @java.lang.Override + public java.util.ListgetStepsList() { + return steps_; + } + /** + * + * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + @java.lang.Override + public java.util.List extends google.events.cloud.build.v1.Data.BuildStepOrBuilder> + getStepsOrBuilderList() { + return steps_; + } + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + @java.lang.Override + public int getStepsCount() { + return steps_.size(); + } + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + @java.lang.Override + public google.events.cloud.build.v1.Data.BuildStep getSteps(int index) { + return steps_.get(index); + } + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + @java.lang.Override + public google.events.cloud.build.v1.Data.BuildStepOrBuilder getStepsOrBuilder( + int index) { + return steps_.get(index); + } + + public static final int RESULTS_FIELD_NUMBER = 10; + private google.events.cloud.build.v1.Data.Results results_; + /** + *+ * Results of the build. + *+ * + *.google.events.cloud.build.v1.Results results = 10;
+ * @return Whether the results field is set. + */ + @java.lang.Override + public boolean hasResults() { + return results_ != null; + } + /** + *+ * Results of the build. + *+ * + *.google.events.cloud.build.v1.Results results = 10;
+ * @return The results. + */ + @java.lang.Override + public google.events.cloud.build.v1.Data.Results getResults() { + return results_ == null ? google.events.cloud.build.v1.Data.Results.getDefaultInstance() : results_; + } + /** + *+ * Results of the build. + *+ * + *.google.events.cloud.build.v1.Results results = 10;
+ */ + @java.lang.Override + public google.events.cloud.build.v1.Data.ResultsOrBuilder getResultsOrBuilder() { + return getResults(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + *+ * Time at which the request to create the build was received. + *+ * + *.google.protobuf.Timestamp create_time = 6;
+ * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *+ * Time at which the request to create the build was received. + *+ * + *.google.protobuf.Timestamp create_time = 6;
+ * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *+ * Time at which the request to create the build was received. + *+ * + *.google.protobuf.Timestamp create_time = 6;
+ */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int START_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp startTime_; + /** + *+ * Time at which execution of the build was started. + *+ * + *.google.protobuf.Timestamp start_time = 7;
+ * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + *+ * Time at which execution of the build was started. + *+ * + *.google.protobuf.Timestamp start_time = 7;
+ * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + *+ * Time at which execution of the build was started. + *+ * + *.google.protobuf.Timestamp start_time = 7;
+ */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int FINISH_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp finishTime_; + /** + *+ * Time at which execution of the build was finished. + * The difference between finish_time and start_time is the duration of the + * build's execution. + *+ * + *.google.protobuf.Timestamp finish_time = 8;
+ * @return Whether the finishTime field is set. + */ + @java.lang.Override + public boolean hasFinishTime() { + return finishTime_ != null; + } + /** + *+ * Time at which execution of the build was finished. + * The difference between finish_time and start_time is the duration of the + * build's execution. + *+ * + *.google.protobuf.Timestamp finish_time = 8;
+ * @return The finishTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getFinishTime() { + return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; + } + /** + *+ * Time at which execution of the build was finished. + * The difference between finish_time and start_time is the duration of the + * build's execution. + *+ * + *.google.protobuf.Timestamp finish_time = 8;
+ */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { + return getFinishTime(); + } + + public static final int TIMEOUT_FIELD_NUMBER = 12; + private com.google.protobuf.Duration timeout_; + /** + *+ * Amount of time that this build should be allowed to run, to second + * granularity. If this amount of time elapses, work on the build will cease + * and the build status will be `TIMEOUT`. + *+ * + *.google.protobuf.Duration timeout = 12;
+ * @return Whether the timeout field is set. + */ + @java.lang.Override + public boolean hasTimeout() { + return timeout_ != null; + } + /** + *+ * Amount of time that this build should be allowed to run, to second + * granularity. If this amount of time elapses, work on the build will cease + * and the build status will be `TIMEOUT`. + *+ * + *.google.protobuf.Duration timeout = 12;
+ * @return The timeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getTimeout() { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } + /** + *+ * Amount of time that this build should be allowed to run, to second + * granularity. If this amount of time elapses, work on the build will cease + * and the build status will be `TIMEOUT`. + *+ * + *.google.protobuf.Duration timeout = 12;
+ */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { + return getTimeout(); + } + + public static final int IMAGES_FIELD_NUMBER = 13; + private com.google.protobuf.LazyStringList images_; + /** + *+ * A list of images to be pushed upon the successful completion of all build + * steps. + * The images are pushed using the builder service account's credentials. + * The digests of the pushed images will be stored in the `Build` resource's + * results field. + * If any of the images fail to be pushed, the build status is marked + * `FAILURE`. + *+ * + *repeated string images = 13;
+ * @return A list containing the images. + */ + public com.google.protobuf.ProtocolStringList + getImagesList() { + return images_; + } + /** + *+ * A list of images to be pushed upon the successful completion of all build + * steps. + * The images are pushed using the builder service account's credentials. + * The digests of the pushed images will be stored in the `Build` resource's + * results field. + * If any of the images fail to be pushed, the build status is marked + * `FAILURE`. + *+ * + *repeated string images = 13;
+ * @return The count of images. + */ + public int getImagesCount() { + return images_.size(); + } + /** + *+ * A list of images to be pushed upon the successful completion of all build + * steps. + * The images are pushed using the builder service account's credentials. + * The digests of the pushed images will be stored in the `Build` resource's + * results field. + * If any of the images fail to be pushed, the build status is marked + * `FAILURE`. + *+ * + *repeated string images = 13;
+ * @param index The index of the element to return. + * @return The images at the given index. + */ + public java.lang.String getImages(int index) { + return images_.get(index); + } + /** + *+ * A list of images to be pushed upon the successful completion of all build + * steps. + * The images are pushed using the builder service account's credentials. + * The digests of the pushed images will be stored in the `Build` resource's + * results field. + * If any of the images fail to be pushed, the build status is marked + * `FAILURE`. + *+ * + *repeated string images = 13;
+ * @param index The index of the value to return. + * @return The bytes of the images at the given index. + */ + public com.google.protobuf.ByteString + getImagesBytes(int index) { + return images_.getByteString(index); + } + + public static final int QUEUE_TTL_FIELD_NUMBER = 40; + private com.google.protobuf.Duration queueTtl_; + /** + *+ * TTL in queue for this build. If provided and the build is enqueued longer + * than this value, the build will expire and the build status will be + * `EXPIRED`. + * The TTL starts ticking from create_time. + *+ * + *.google.protobuf.Duration queue_ttl = 40;
+ * @return Whether the queueTtl field is set. + */ + @java.lang.Override + public boolean hasQueueTtl() { + return queueTtl_ != null; + } + /** + *+ * TTL in queue for this build. If provided and the build is enqueued longer + * than this value, the build will expire and the build status will be + * `EXPIRED`. + * The TTL starts ticking from create_time. + *+ * + *.google.protobuf.Duration queue_ttl = 40;
+ * @return The queueTtl. + */ + @java.lang.Override + public com.google.protobuf.Duration getQueueTtl() { + return queueTtl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : queueTtl_; + } + /** + *+ * TTL in queue for this build. If provided and the build is enqueued longer + * than this value, the build will expire and the build status will be + * `EXPIRED`. + * The TTL starts ticking from create_time. + *+ * + *.google.protobuf.Duration queue_ttl = 40;
+ */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getQueueTtlOrBuilder() { + return getQueueTtl(); + } + + public static final int ARTIFACTS_FIELD_NUMBER = 37; + private google.events.cloud.build.v1.Data.Artifacts artifacts_; + /** + *+ * Artifacts produced by the build that should be uploaded upon + * successful completion of all build steps. + *+ * + *.google.events.cloud.build.v1.Artifacts artifacts = 37;
+ * @return Whether the artifacts field is set. + */ + @java.lang.Override + public boolean hasArtifacts() { + return artifacts_ != null; + } + /** + *+ * Artifacts produced by the build that should be uploaded upon + * successful completion of all build steps. + *+ * + *.google.events.cloud.build.v1.Artifacts artifacts = 37;
+ * @return The artifacts. + */ + @java.lang.Override + public google.events.cloud.build.v1.Data.Artifacts getArtifacts() { + return artifacts_ == null ? google.events.cloud.build.v1.Data.Artifacts.getDefaultInstance() : artifacts_; + } + /** + *+ * Artifacts produced by the build that should be uploaded upon + * successful completion of all build steps. + *+ * + *.google.events.cloud.build.v1.Artifacts artifacts = 37;
+ */ + @java.lang.Override + public google.events.cloud.build.v1.Data.ArtifactsOrBuilder getArtifactsOrBuilder() { + return getArtifacts(); + } + + public static final int LOGS_BUCKET_FIELD_NUMBER = 19; + private volatile java.lang.Object logsBucket_; + /** + *+ * Google Cloud Storage bucket where logs should be written (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. + *+ * + *string logs_bucket = 19;
+ * @return The logsBucket. + */ + @java.lang.Override + public java.lang.String getLogsBucket() { + java.lang.Object ref = logsBucket_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logsBucket_ = s; + return s; + } + } + /** + *+ * Google Cloud Storage bucket where logs should be written (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. + *+ * + *string logs_bucket = 19;
+ * @return The bytes for logsBucket. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLogsBucketBytes() { + java.lang.Object ref = logsBucket_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logsBucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_PROVENANCE_FIELD_NUMBER = 21; + private google.events.cloud.build.v1.Data.SourceProvenance sourceProvenance_; + /** + *+ * A permanent fixed identifier for source. + *+ * + *.google.events.cloud.build.v1.SourceProvenance source_provenance = 21;
+ * @return Whether the sourceProvenance field is set. + */ + @java.lang.Override + public boolean hasSourceProvenance() { + return sourceProvenance_ != null; + } + /** + *+ * A permanent fixed identifier for source. + *+ * + *.google.events.cloud.build.v1.SourceProvenance source_provenance = 21;
+ * @return The sourceProvenance. + */ + @java.lang.Override + public google.events.cloud.build.v1.Data.SourceProvenance getSourceProvenance() { + return sourceProvenance_ == null ? google.events.cloud.build.v1.Data.SourceProvenance.getDefaultInstance() : sourceProvenance_; + } + /** + *+ * A permanent fixed identifier for source. + *+ * + *.google.events.cloud.build.v1.SourceProvenance source_provenance = 21;
+ */ + @java.lang.Override + public google.events.cloud.build.v1.Data.SourceProvenanceOrBuilder getSourceProvenanceOrBuilder() { + return getSourceProvenance(); + } + + public static final int BUILD_TRIGGER_ID_FIELD_NUMBER = 22; + private volatile java.lang.Object buildTriggerId_; + /** + *+ * The ID of the `BuildTrigger` that triggered this build, if it + * was triggered automatically. + *+ * + *string build_trigger_id = 22;
+ * @return The buildTriggerId. + */ + @java.lang.Override + public java.lang.String getBuildTriggerId() { + java.lang.Object ref = buildTriggerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildTriggerId_ = s; + return s; + } + } + /** + *+ * The ID of the `BuildTrigger` that triggered this build, if it + * was triggered automatically. + *+ * + *string build_trigger_id = 22;
+ * @return The bytes for buildTriggerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBuildTriggerIdBytes() { + java.lang.Object ref = buildTriggerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildTriggerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTIONS_FIELD_NUMBER = 23; + private google.events.cloud.build.v1.Data.BuildOptions options_; + /** + *+ * Special options for this build. + *+ * + *.google.events.cloud.build.v1.BuildOptions options = 23;
+ * @return Whether the options field is set. + */ + @java.lang.Override + public boolean hasOptions() { + return options_ != null; + } + /** + *+ * Special options for this build. + *+ * + *.google.events.cloud.build.v1.BuildOptions options = 23;
+ * @return The options. + */ + @java.lang.Override + public google.events.cloud.build.v1.Data.BuildOptions getOptions() { + return options_ == null ? google.events.cloud.build.v1.Data.BuildOptions.getDefaultInstance() : options_; + } + /** + *+ * Special options for this build. + *+ * + *.google.events.cloud.build.v1.BuildOptions options = 23;
+ */ + @java.lang.Override + public google.events.cloud.build.v1.Data.BuildOptionsOrBuilder getOptionsOrBuilder() { + return getOptions(); + } + + public static final int LOG_URL_FIELD_NUMBER = 25; + private volatile java.lang.Object logUrl_; + /** + *+ * URL to logs for this build in Google Cloud Console. + *+ * + *string log_url = 25;
+ * @return The logUrl. + */ + @java.lang.Override + public java.lang.String getLogUrl() { + java.lang.Object ref = logUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logUrl_ = s; + return s; + } + } + /** + *+ * URL to logs for this build in Google Cloud Console. + *+ * + *string log_url = 25;
+ * @return The bytes for logUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLogUrlBytes() { + java.lang.Object ref = logUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBSTITUTIONS_FIELD_NUMBER = 29; + private static final class SubstitutionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + google.events.cloud.build.v1.Data.internal_static_google_events_cloud_build_v1_BuildEventData_SubstitutionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> substitutions_; + private com.google.protobuf.MapField + internalGetSubstitutions() { + if (substitutions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SubstitutionsDefaultEntryHolder.defaultEntry); + } + return substitutions_; + } + + public int getSubstitutionsCount() { + return internalGetSubstitutions().getMap().size(); + } + /** + * + * Substitutions data for `Build` resource. + *+ * + *map<string, string> substitutions = 29;
+ */ + + @java.lang.Override + public boolean containsSubstitutions( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetSubstitutions().getMap().containsKey(key); + } + /** + * Use {@link #getSubstitutionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.MapgetSubstitutions() { + return getSubstitutionsMap(); + } + /** + * + * Substitutions data for `Build` resource. + *+ * + *map<string, string> substitutions = 29;
+ */ + @java.lang.Override + + public java.util.MapgetSubstitutionsMap() { + return internalGetSubstitutions().getMap(); + } + /** + * + * Substitutions data for `Build` resource. + *+ * + *map<string, string> substitutions = 29;
+ */ + @java.lang.Override + + public java.lang.String getSubstitutionsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Mapmap = + internalGetSubstitutions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * Substitutions data for `Build` resource. + *+ * + *map<string, string> substitutions = 29;
+ */ + @java.lang.Override + + public java.lang.String getSubstitutionsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Mapmap = + internalGetSubstitutions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int TAGS_FIELD_NUMBER = 31; + private com.google.protobuf.LazyStringList tags_; + /** + * + * Tags for annotation of a `Build`. These are not docker tags. + *+ * + *repeated string tags = 31;
+ * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList + getTagsList() { + return tags_; + } + /** + *+ * Tags for annotation of a `Build`. These are not docker tags. + *+ * + *repeated string tags = 31;
+ * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + *+ * Tags for annotation of a `Build`. These are not docker tags. + *+ * + *repeated string tags = 31;
+ * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + *+ * Tags for annotation of a `Build`. These are not docker tags. + *+ * + *repeated string tags = 31;
+ * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString + getTagsBytes(int index) { + return tags_.getByteString(index); + } + + public static final int SECRETS_FIELD_NUMBER = 32; + private java.util.Listsecrets_; + /** + * + * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + @java.lang.Override + public java.util.ListgetSecretsList() { + return secrets_; + } + /** + * + * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + @java.lang.Override + public java.util.List extends google.events.cloud.build.v1.Data.SecretOrBuilder> + getSecretsOrBuilderList() { + return secrets_; + } + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + @java.lang.Override + public int getSecretsCount() { + return secrets_.size(); + } + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + @java.lang.Override + public google.events.cloud.build.v1.Data.Secret getSecrets(int index) { + return secrets_.get(index); + } + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + @java.lang.Override + public google.events.cloud.build.v1.Data.SecretOrBuilder getSecretsOrBuilder( + int index) { + return secrets_.get(index); + } + + public static final int TIMING_FIELD_NUMBER = 33; + private static final class TimingDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, google.events.cloud.build.v1.Data.TimeSpan> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + google.events.cloud.build.v1.Data.internal_static_google_events_cloud_build_v1_BuildEventData_TimingEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + google.events.cloud.build.v1.Data.TimeSpan.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, google.events.cloud.build.v1.Data.TimeSpan> timing_; + private com.google.protobuf.MapField + internalGetTiming() { + if (timing_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TimingDefaultEntryHolder.defaultEntry); + } + return timing_; + } + + public int getTimingCount() { + return internalGetTiming().getMap().size(); + } + /** + * + * Stores timing information for phases of the build. Valid keys + * are: + * * BUILD: time to execute all build steps + * * PUSH: time to push all specified images. + * * FETCHSOURCE: time to fetch source. + * If the build does not specify source or images, + * these keys will not be included. + *+ * + *map<string, .google.events.cloud.build.v1.TimeSpan> timing = 33;
+ */ + + @java.lang.Override + public boolean containsTiming( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetTiming().getMap().containsKey(key); + } + /** + * Use {@link #getTimingMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.MapgetTiming() { + return getTimingMap(); + } + /** + * + * Stores timing information for phases of the build. Valid keys + * are: + * * BUILD: time to execute all build steps + * * PUSH: time to push all specified images. + * * FETCHSOURCE: time to fetch source. + * If the build does not specify source or images, + * these keys will not be included. + *+ * + *map<string, .google.events.cloud.build.v1.TimeSpan> timing = 33;
+ */ + @java.lang.Override + + public java.util.MapgetTimingMap() { + return internalGetTiming().getMap(); + } + /** + * + * Stores timing information for phases of the build. Valid keys + * are: + * * BUILD: time to execute all build steps + * * PUSH: time to push all specified images. + * * FETCHSOURCE: time to fetch source. + * If the build does not specify source or images, + * these keys will not be included. + *+ * + *map<string, .google.events.cloud.build.v1.TimeSpan> timing = 33;
+ */ + @java.lang.Override + + public google.events.cloud.build.v1.Data.TimeSpan getTimingOrDefault( + java.lang.String key, + google.events.cloud.build.v1.Data.TimeSpan defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Mapmap = + internalGetTiming().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * Stores timing information for phases of the build. Valid keys + * are: + * * BUILD: time to execute all build steps + * * PUSH: time to push all specified images. + * * FETCHSOURCE: time to fetch source. + * If the build does not specify source or images, + * these keys will not be included. + *+ * + *map<string, .google.events.cloud.build.v1.TimeSpan> timing = 33;
+ */ + @java.lang.Override + + public google.events.cloud.build.v1.Data.TimeSpan getTimingOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Mapmap = + internalGetTiming().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (status_ != google.events.cloud.build.v1.Data.BuildEventData.Status.STATUS_UNKNOWN.getNumber()) { + output.writeEnum(2, status_); + } + if (source_ != null) { + output.writeMessage(3, getSource()); + } + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + if (startTime_ != null) { + output.writeMessage(7, getStartTime()); + } + if (finishTime_ != null) { + output.writeMessage(8, getFinishTime()); + } + if (results_ != null) { + output.writeMessage(10, getResults()); + } + for (int i = 0; i < steps_.size(); i++) { + output.writeMessage(11, steps_.get(i)); + } + if (timeout_ != null) { + output.writeMessage(12, getTimeout()); + } + for (int i = 0; i < images_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, images_.getRaw(i)); + } + if (!getProjectIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, projectId_); + } + if (!getLogsBucketBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, logsBucket_); + } + if (sourceProvenance_ != null) { + output.writeMessage(21, getSourceProvenance()); + } + if (!getBuildTriggerIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 22, buildTriggerId_); + } + if (options_ != null) { + output.writeMessage(23, getOptions()); + } + if (!getStatusDetailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 24, statusDetail_); + } + if (!getLogUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 25, logUrl_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetSubstitutions(), + SubstitutionsDefaultEntryHolder.defaultEntry, + 29); + for (int i = 0; i < tags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 31, tags_.getRaw(i)); + } + for (int i = 0; i < secrets_.size(); i++) { + output.writeMessage(32, secrets_.get(i)); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetTiming(), + TimingDefaultEntryHolder.defaultEntry, + 33); + if (artifacts_ != null) { + output.writeMessage(37, getArtifacts()); + } + if (queueTtl_ != null) { + output.writeMessage(40, getQueueTtl()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (status_ != google.events.cloud.build.v1.Data.BuildEventData.Status.STATUS_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, status_); + } + if (source_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getSource()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getCreateTime()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getStartTime()); + } + if (finishTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getFinishTime()); + } + if (results_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getResults()); + } + for (int i = 0; i < steps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, steps_.get(i)); + } + if (timeout_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getTimeout()); + } + { + int dataSize = 0; + for (int i = 0; i < images_.size(); i++) { + dataSize += computeStringSizeNoTag(images_.getRaw(i)); + } + size += dataSize; + size += 1 * getImagesList().size(); + } + if (!getProjectIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, projectId_); + } + if (!getLogsBucketBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, logsBucket_); + } + if (sourceProvenance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, getSourceProvenance()); + } + if (!getBuildTriggerIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(22, buildTriggerId_); + } + if (options_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(23, getOptions()); + } + if (!getStatusDetailBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(24, statusDetail_); + } + if (!getLogUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(25, logUrl_); + } + for (java.util.Map.Entry entry + : internalGetSubstitutions().getMap().entrySet()) { + com.google.protobuf.MapEntry + substitutions__ = SubstitutionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(29, substitutions__); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 2 * getTagsList().size(); + } + for (int i = 0; i < secrets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(32, secrets_.get(i)); + } + for (java.util.Map.Entry entry + : internalGetTiming().getMap().entrySet()) { + com.google.protobuf.MapEntry + timing__ = TimingDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(33, timing__); + } + if (artifacts_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(37, getArtifacts()); + } + if (queueTtl_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(40, getQueueTtl()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof google.events.cloud.build.v1.Data.BuildEventData)) { + return super.equals(obj); + } + google.events.cloud.build.v1.Data.BuildEventData other = (google.events.cloud.build.v1.Data.BuildEventData) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getProjectId() + .equals(other.getProjectId())) return false; + if (status_ != other.status_) return false; + if (!getStatusDetail() + .equals(other.getStatusDetail())) return false; + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource() + .equals(other.getSource())) return false; + } + if (!getStepsList() + .equals(other.getStepsList())) return false; + if (hasResults() != other.hasResults()) return false; + if (hasResults()) { + if (!getResults() + .equals(other.getResults())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime() + .equals(other.getStartTime())) return false; + } + if (hasFinishTime() != other.hasFinishTime()) return false; + if (hasFinishTime()) { + if (!getFinishTime() + .equals(other.getFinishTime())) return false; + } + if (hasTimeout() != other.hasTimeout()) return false; + if (hasTimeout()) { + if (!getTimeout() + .equals(other.getTimeout())) return false; + } + if (!getImagesList() + .equals(other.getImagesList())) return false; + if (hasQueueTtl() != other.hasQueueTtl()) return false; + if (hasQueueTtl()) { + if (!getQueueTtl() + .equals(other.getQueueTtl())) return false; + } + if (hasArtifacts() != other.hasArtifacts()) return false; + if (hasArtifacts()) { + if (!getArtifacts() + .equals(other.getArtifacts())) return false; + } + if (!getLogsBucket() + .equals(other.getLogsBucket())) return false; + if (hasSourceProvenance() != other.hasSourceProvenance()) return false; + if (hasSourceProvenance()) { + if (!getSourceProvenance() + .equals(other.getSourceProvenance())) return false; + } + if (!getBuildTriggerId() + .equals(other.getBuildTriggerId())) return false; + if (hasOptions() != other.hasOptions()) return false; + if (hasOptions()) { + if (!getOptions() + .equals(other.getOptions())) return false; + } + if (!getLogUrl() + .equals(other.getLogUrl())) return false; + if (!internalGetSubstitutions().equals( + other.internalGetSubstitutions())) return false; + if (!getTagsList() + .equals(other.getTagsList())) return false; + if (!getSecretsList() + .equals(other.getSecretsList())) return false; + if (!internalGetTiming().equals( + other.internalGetTiming())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + status_; + hash = (37 * hash) + STATUS_DETAIL_FIELD_NUMBER; + hash = (53 * hash) + getStatusDetail().hashCode(); + if (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + if (getStepsCount() > 0) { + hash = (37 * hash) + STEPS_FIELD_NUMBER; + hash = (53 * hash) + getStepsList().hashCode(); + } + if (hasResults()) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResults().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasFinishTime()) { + hash = (37 * hash) + FINISH_TIME_FIELD_NUMBER; + hash = (53 * hash) + getFinishTime().hashCode(); + } + if (hasTimeout()) { + hash = (37 * hash) + TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getTimeout().hashCode(); + } + if (getImagesCount() > 0) { + hash = (37 * hash) + IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getImagesList().hashCode(); + } + if (hasQueueTtl()) { + hash = (37 * hash) + QUEUE_TTL_FIELD_NUMBER; + hash = (53 * hash) + getQueueTtl().hashCode(); + } + if (hasArtifacts()) { + hash = (37 * hash) + ARTIFACTS_FIELD_NUMBER; + hash = (53 * hash) + getArtifacts().hashCode(); + } + hash = (37 * hash) + LOGS_BUCKET_FIELD_NUMBER; + hash = (53 * hash) + getLogsBucket().hashCode(); + if (hasSourceProvenance()) { + hash = (37 * hash) + SOURCE_PROVENANCE_FIELD_NUMBER; + hash = (53 * hash) + getSourceProvenance().hashCode(); + } + hash = (37 * hash) + BUILD_TRIGGER_ID_FIELD_NUMBER; + hash = (53 * hash) + getBuildTriggerId().hashCode(); + if (hasOptions()) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptions().hashCode(); + } + hash = (37 * hash) + LOG_URL_FIELD_NUMBER; + hash = (53 * hash) + getLogUrl().hashCode(); + if (!internalGetSubstitutions().getMap().isEmpty()) { + hash = (37 * hash) + SUBSTITUTIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetSubstitutions().hashCode(); + } + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + if (getSecretsCount() > 0) { + hash = (37 * hash) + SECRETS_FIELD_NUMBER; + hash = (53 * hash) + getSecretsList().hashCode(); + } + if (!internalGetTiming().getMap().isEmpty()) { + hash = (37 * hash) + TIMING_FIELD_NUMBER; + hash = (53 * hash) + internalGetTiming().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.build.v1.Data.BuildEventData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.build.v1.Data.BuildEventData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.build.v1.Data.BuildEventData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.build.v1.Data.BuildEventData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.build.v1.Data.BuildEventData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.build.v1.Data.BuildEventData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.build.v1.Data.BuildEventData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.build.v1.Data.BuildEventData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static google.events.cloud.build.v1.Data.BuildEventData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.build.v1.Data.BuildEventData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static google.events.cloud.build.v1.Data.BuildEventData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.build.v1.Data.BuildEventData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(google.events.cloud.build.v1.Data.BuildEventData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * Build event data + * Common build format for Google Cloud Platform API operations. + * Copied from + * https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto. + *+ * + * Protobuf type {@code google.events.cloud.build.v1.BuildEventData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builderimplements + // @@protoc_insertion_point(builder_implements:google.events.cloud.build.v1.BuildEventData) + google.events.cloud.build.v1.Data.BuildEventDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.build.v1.Data.internal_static_google_events_cloud_build_v1_BuildEventData_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 29: + return internalGetSubstitutions(); + case 33: + return internalGetTiming(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 29: + return internalGetMutableSubstitutions(); + case 33: + return internalGetMutableTiming(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.build.v1.Data.internal_static_google_events_cloud_build_v1_BuildEventData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.build.v1.Data.BuildEventData.class, google.events.cloud.build.v1.Data.BuildEventData.Builder.class); + } + + // Construct using google.events.cloud.build.v1.Data.BuildEventData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getStepsFieldBuilder(); + getSecretsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + id_ = ""; + + projectId_ = ""; + + status_ = 0; + + statusDetail_ = ""; + + if (sourceBuilder_ == null) { + source_ = null; + } else { + source_ = null; + sourceBuilder_ = null; + } + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + stepsBuilder_.clear(); + } + if (resultsBuilder_ == null) { + results_ = null; + } else { + results_ = null; + resultsBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (finishTimeBuilder_ == null) { + finishTime_ = null; + } else { + finishTime_ = null; + finishTimeBuilder_ = null; + } + if (timeoutBuilder_ == null) { + timeout_ = null; + } else { + timeout_ = null; + timeoutBuilder_ = null; + } + images_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (queueTtlBuilder_ == null) { + queueTtl_ = null; + } else { + queueTtl_ = null; + queueTtlBuilder_ = null; + } + if (artifactsBuilder_ == null) { + artifacts_ = null; + } else { + artifacts_ = null; + artifactsBuilder_ = null; + } + logsBucket_ = ""; + + if (sourceProvenanceBuilder_ == null) { + sourceProvenance_ = null; + } else { + sourceProvenance_ = null; + sourceProvenanceBuilder_ = null; + } + buildTriggerId_ = ""; + + if (optionsBuilder_ == null) { + options_ = null; + } else { + options_ = null; + optionsBuilder_ = null; + } + logUrl_ = ""; + + internalGetMutableSubstitutions().clear(); + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + if (secretsBuilder_ == null) { + secrets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + secretsBuilder_.clear(); + } + internalGetMutableTiming().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.build.v1.Data.internal_static_google_events_cloud_build_v1_BuildEventData_descriptor; + } + + @java.lang.Override + public google.events.cloud.build.v1.Data.BuildEventData getDefaultInstanceForType() { + return google.events.cloud.build.v1.Data.BuildEventData.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.build.v1.Data.BuildEventData build() { + google.events.cloud.build.v1.Data.BuildEventData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.build.v1.Data.BuildEventData buildPartial() { + google.events.cloud.build.v1.Data.BuildEventData result = new google.events.cloud.build.v1.Data.BuildEventData(this); + int from_bitField0_ = bitField0_; + result.id_ = id_; + result.projectId_ = projectId_; + result.status_ = status_; + result.statusDetail_ = statusDetail_; + if (sourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = sourceBuilder_.build(); + } + if (stepsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + steps_ = java.util.Collections.unmodifiableList(steps_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.steps_ = steps_; + } else { + result.steps_ = stepsBuilder_.build(); + } + if (resultsBuilder_ == null) { + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (finishTimeBuilder_ == null) { + result.finishTime_ = finishTime_; + } else { + result.finishTime_ = finishTimeBuilder_.build(); + } + if (timeoutBuilder_ == null) { + result.timeout_ = timeout_; + } else { + result.timeout_ = timeoutBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + images_ = images_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.images_ = images_; + if (queueTtlBuilder_ == null) { + result.queueTtl_ = queueTtl_; + } else { + result.queueTtl_ = queueTtlBuilder_.build(); + } + if (artifactsBuilder_ == null) { + result.artifacts_ = artifacts_; + } else { + result.artifacts_ = artifactsBuilder_.build(); + } + result.logsBucket_ = logsBucket_; + if (sourceProvenanceBuilder_ == null) { + result.sourceProvenance_ = sourceProvenance_; + } else { + result.sourceProvenance_ = sourceProvenanceBuilder_.build(); + } + result.buildTriggerId_ = buildTriggerId_; + if (optionsBuilder_ == null) { + result.options_ = options_; + } else { + result.options_ = optionsBuilder_.build(); + } + result.logUrl_ = logUrl_; + result.substitutions_ = internalGetSubstitutions(); + result.substitutions_.makeImmutable(); + if (((bitField0_ & 0x00000008) != 0)) { + tags_ = tags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.tags_ = tags_; + if (secretsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + secrets_ = java.util.Collections.unmodifiableList(secrets_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.secrets_ = secrets_; + } else { + result.secrets_ = secretsBuilder_.build(); + } + result.timing_ = internalGetTiming(); + result.timing_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof google.events.cloud.build.v1.Data.BuildEventData) { + return mergeFrom((google.events.cloud.build.v1.Data.BuildEventData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.build.v1.Data.BuildEventData other) { + if (other == google.events.cloud.build.v1.Data.BuildEventData.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + onChanged(); + } + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } + if (!other.getStatusDetail().isEmpty()) { + statusDetail_ = other.statusDetail_; + onChanged(); + } + if (other.hasSource()) { + mergeSource(other.getSource()); + } + if (stepsBuilder_ == null) { + if (!other.steps_.isEmpty()) { + if (steps_.isEmpty()) { + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureStepsIsMutable(); + steps_.addAll(other.steps_); + } + onChanged(); + } + } else { + if (!other.steps_.isEmpty()) { + if (stepsBuilder_.isEmpty()) { + stepsBuilder_.dispose(); + stepsBuilder_ = null; + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000001); + stepsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getStepsFieldBuilder() : null; + } else { + stepsBuilder_.addAllMessages(other.steps_); + } + } + } + if (other.hasResults()) { + mergeResults(other.getResults()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasFinishTime()) { + mergeFinishTime(other.getFinishTime()); + } + if (other.hasTimeout()) { + mergeTimeout(other.getTimeout()); + } + if (!other.images_.isEmpty()) { + if (images_.isEmpty()) { + images_ = other.images_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureImagesIsMutable(); + images_.addAll(other.images_); + } + onChanged(); + } + if (other.hasQueueTtl()) { + mergeQueueTtl(other.getQueueTtl()); + } + if (other.hasArtifacts()) { + mergeArtifacts(other.getArtifacts()); + } + if (!other.getLogsBucket().isEmpty()) { + logsBucket_ = other.logsBucket_; + onChanged(); + } + if (other.hasSourceProvenance()) { + mergeSourceProvenance(other.getSourceProvenance()); + } + if (!other.getBuildTriggerId().isEmpty()) { + buildTriggerId_ = other.buildTriggerId_; + onChanged(); + } + if (other.hasOptions()) { + mergeOptions(other.getOptions()); + } + if (!other.getLogUrl().isEmpty()) { + logUrl_ = other.logUrl_; + onChanged(); + } + internalGetMutableSubstitutions().mergeFrom( + other.internalGetSubstitutions()); + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + if (secretsBuilder_ == null) { + if (!other.secrets_.isEmpty()) { + if (secrets_.isEmpty()) { + secrets_ = other.secrets_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureSecretsIsMutable(); + secrets_.addAll(other.secrets_); + } + onChanged(); + } + } else { + if (!other.secrets_.isEmpty()) { + if (secretsBuilder_.isEmpty()) { + secretsBuilder_.dispose(); + secretsBuilder_ = null; + secrets_ = other.secrets_; + bitField0_ = (bitField0_ & ~0x00000010); + secretsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSecretsFieldBuilder() : null; + } else { + secretsBuilder_.addAllMessages(other.secrets_); + } + } + } + internalGetMutableTiming().mergeFrom( + other.internalGetTiming()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + google.events.cloud.build.v1.Data.BuildEventData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.build.v1.Data.BuildEventData) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * Unique identifier of the build. + *+ * + *string id = 1;
+ * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *+ * Unique identifier of the build. + *+ * + *string id = 1;
+ * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *+ * Unique identifier of the build. + *+ * + *string id = 1;
+ * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + *+ * Unique identifier of the build. + *+ * + *string id = 1;
+ * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + *+ * Unique identifier of the build. + *+ * + *string id = 1;
+ * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + *+ * ID of the project. + *+ * + *string project_id = 16;
+ * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *+ * ID of the project. + *+ * + *string project_id = 16;
+ * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString + getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *+ * ID of the project. + *+ * + *string project_id = 16;
+ * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + projectId_ = value; + onChanged(); + return this; + } + /** + *+ * ID of the project. + *+ * + *string project_id = 16;
+ * @return This builder for chaining. + */ + public Builder clearProjectId() { + + projectId_ = getDefaultInstance().getProjectId(); + onChanged(); + return this; + } + /** + *+ * ID of the project. + *+ * + *string project_id = 16;
+ * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + projectId_ = value; + onChanged(); + return this; + } + + private int status_ = 0; + /** + *+ * Status of the build. + *+ * + *.google.events.cloud.build.v1.BuildEventData.Status status = 2;
+ * @return The enum numeric value on the wire for status. + */ + @java.lang.Override public int getStatusValue() { + return status_; + } + /** + *+ * Status of the build. + *+ * + *.google.events.cloud.build.v1.BuildEventData.Status status = 2;
+ * @param value The enum numeric value on the wire for status to set. + * @return This builder for chaining. + */ + public Builder setStatusValue(int value) { + + status_ = value; + onChanged(); + return this; + } + /** + *+ * Status of the build. + *+ * + *.google.events.cloud.build.v1.BuildEventData.Status status = 2;
+ * @return The status. + */ + @java.lang.Override + public google.events.cloud.build.v1.Data.BuildEventData.Status getStatus() { + @SuppressWarnings("deprecation") + google.events.cloud.build.v1.Data.BuildEventData.Status result = google.events.cloud.build.v1.Data.BuildEventData.Status.valueOf(status_); + return result == null ? google.events.cloud.build.v1.Data.BuildEventData.Status.UNRECOGNIZED : result; + } + /** + *+ * Status of the build. + *+ * + *.google.events.cloud.build.v1.BuildEventData.Status status = 2;
+ * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(google.events.cloud.build.v1.Data.BuildEventData.Status value) { + if (value == null) { + throw new NullPointerException(); + } + + status_ = value.getNumber(); + onChanged(); + return this; + } + /** + *+ * Status of the build. + *+ * + *.google.events.cloud.build.v1.BuildEventData.Status status = 2;
+ * @return This builder for chaining. + */ + public Builder clearStatus() { + + status_ = 0; + onChanged(); + return this; + } + + private java.lang.Object statusDetail_ = ""; + /** + *+ * Customer-readable message about the current status. + *+ * + *string status_detail = 24;
+ * @return The statusDetail. + */ + public java.lang.String getStatusDetail() { + java.lang.Object ref = statusDetail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusDetail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *+ * Customer-readable message about the current status. + *+ * + *string status_detail = 24;
+ * @return The bytes for statusDetail. + */ + public com.google.protobuf.ByteString + getStatusDetailBytes() { + java.lang.Object ref = statusDetail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + statusDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *+ * Customer-readable message about the current status. + *+ * + *string status_detail = 24;
+ * @param value The statusDetail to set. + * @return This builder for chaining. + */ + public Builder setStatusDetail( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + statusDetail_ = value; + onChanged(); + return this; + } + /** + *+ * Customer-readable message about the current status. + *+ * + *string status_detail = 24;
+ * @return This builder for chaining. + */ + public Builder clearStatusDetail() { + + statusDetail_ = getDefaultInstance().getStatusDetail(); + onChanged(); + return this; + } + /** + *+ * Customer-readable message about the current status. + *+ * + *string status_detail = 24;
+ * @param value The bytes for statusDetail to set. + * @return This builder for chaining. + */ + public Builder setStatusDetailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + statusDetail_ = value; + onChanged(); + return this; + } + + private google.events.cloud.build.v1.Data.Source source_; + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.Source, google.events.cloud.build.v1.Data.Source.Builder, google.events.cloud.build.v1.Data.SourceOrBuilder> sourceBuilder_; + /** + *+ * The location of the source files to build. + *+ * + *.google.events.cloud.build.v1.Source source = 3;
+ * @return Whether the source field is set. + */ + public boolean hasSource() { + return sourceBuilder_ != null || source_ != null; + } + /** + *+ * The location of the source files to build. + *+ * + *.google.events.cloud.build.v1.Source source = 3;
+ * @return The source. + */ + public google.events.cloud.build.v1.Data.Source getSource() { + if (sourceBuilder_ == null) { + return source_ == null ? google.events.cloud.build.v1.Data.Source.getDefaultInstance() : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + /** + *+ * The location of the source files to build. + *+ * + *.google.events.cloud.build.v1.Source source = 3;
+ */ + public Builder setSource(google.events.cloud.build.v1.Data.Source value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + sourceBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * The location of the source files to build. + *+ * + *.google.events.cloud.build.v1.Source source = 3;
+ */ + public Builder setSource( + google.events.cloud.build.v1.Data.Source.Builder builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * The location of the source files to build. + *+ * + *.google.events.cloud.build.v1.Source source = 3;
+ */ + public Builder mergeSource(google.events.cloud.build.v1.Data.Source value) { + if (sourceBuilder_ == null) { + if (source_ != null) { + source_ = + google.events.cloud.build.v1.Data.Source.newBuilder(source_).mergeFrom(value).buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + sourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *+ * The location of the source files to build. + *+ * + *.google.events.cloud.build.v1.Source source = 3;
+ */ + public Builder clearSource() { + if (sourceBuilder_ == null) { + source_ = null; + onChanged(); + } else { + source_ = null; + sourceBuilder_ = null; + } + + return this; + } + /** + *+ * The location of the source files to build. + *+ * + *.google.events.cloud.build.v1.Source source = 3;
+ */ + public google.events.cloud.build.v1.Data.Source.Builder getSourceBuilder() { + + onChanged(); + return getSourceFieldBuilder().getBuilder(); + } + /** + *+ * The location of the source files to build. + *+ * + *.google.events.cloud.build.v1.Source source = 3;
+ */ + public google.events.cloud.build.v1.Data.SourceOrBuilder getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null ? + google.events.cloud.build.v1.Data.Source.getDefaultInstance() : source_; + } + } + /** + *+ * The location of the source files to build. + *+ * + *.google.events.cloud.build.v1.Source source = 3;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.Source, google.events.cloud.build.v1.Data.Source.Builder, google.events.cloud.build.v1.Data.SourceOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.Source, google.events.cloud.build.v1.Data.Source.Builder, google.events.cloud.build.v1.Data.SourceOrBuilder>( + getSource(), + getParentForChildren(), + isClean()); + source_ = null; + } + return sourceBuilder_; + } + + private java.util.Liststeps_ = + java.util.Collections.emptyList(); + private void ensureStepsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + steps_ = new java.util.ArrayList (steps_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.events.cloud.build.v1.Data.BuildStep, google.events.cloud.build.v1.Data.BuildStep.Builder, google.events.cloud.build.v1.Data.BuildStepOrBuilder> stepsBuilder_; + + /** + * + * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + public java.util.ListgetStepsList() { + if (stepsBuilder_ == null) { + return java.util.Collections.unmodifiableList(steps_); + } else { + return stepsBuilder_.getMessageList(); + } + } + /** + * + * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + public int getStepsCount() { + if (stepsBuilder_ == null) { + return steps_.size(); + } else { + return stepsBuilder_.getCount(); + } + } + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + public google.events.cloud.build.v1.Data.BuildStep getSteps(int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessage(index); + } + } + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + public Builder setSteps( + int index, google.events.cloud.build.v1.Data.BuildStep value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.set(index, value); + onChanged(); + } else { + stepsBuilder_.setMessage(index, value); + } + return this; + } + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + public Builder setSteps( + int index, google.events.cloud.build.v1.Data.BuildStep.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.set(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + public Builder addSteps(google.events.cloud.build.v1.Data.BuildStep value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(value); + onChanged(); + } else { + stepsBuilder_.addMessage(value); + } + return this; + } + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + public Builder addSteps( + int index, google.events.cloud.build.v1.Data.BuildStep value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(index, value); + onChanged(); + } else { + stepsBuilder_.addMessage(index, value); + } + return this; + } + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + public Builder addSteps( + google.events.cloud.build.v1.Data.BuildStep.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + public Builder addSteps( + int index, google.events.cloud.build.v1.Data.BuildStep.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + public Builder addAllSteps( + java.lang.Iterable extends google.events.cloud.build.v1.Data.BuildStep> values) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, steps_); + onChanged(); + } else { + stepsBuilder_.addAllMessages(values); + } + return this; + } + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + public Builder clearSteps() { + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + stepsBuilder_.clear(); + } + return this; + } + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + public Builder removeSteps(int index) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.remove(index); + onChanged(); + } else { + stepsBuilder_.remove(index); + } + return this; + } + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + public google.events.cloud.build.v1.Data.BuildStep.Builder getStepsBuilder( + int index) { + return getStepsFieldBuilder().getBuilder(index); + } + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + public google.events.cloud.build.v1.Data.BuildStepOrBuilder getStepsOrBuilder( + int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); } else { + return stepsBuilder_.getMessageOrBuilder(index); + } + } + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + public java.util.List extends google.events.cloud.build.v1.Data.BuildStepOrBuilder> + getStepsOrBuilderList() { + if (stepsBuilder_ != null) { + return stepsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(steps_); + } + } + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + public google.events.cloud.build.v1.Data.BuildStep.Builder addStepsBuilder() { + return getStepsFieldBuilder().addBuilder( + google.events.cloud.build.v1.Data.BuildStep.getDefaultInstance()); + } + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + public google.events.cloud.build.v1.Data.BuildStep.Builder addStepsBuilder( + int index) { + return getStepsFieldBuilder().addBuilder( + index, google.events.cloud.build.v1.Data.BuildStep.getDefaultInstance()); + } + /** + *+ * The operations to be performed on the workspace. + *+ * + *repeated .google.events.cloud.build.v1.BuildStep steps = 11;
+ */ + public java.util.List+ getStepsBuilderList() { + return getStepsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + google.events.cloud.build.v1.Data.BuildStep, google.events.cloud.build.v1.Data.BuildStep.Builder, google.events.cloud.build.v1.Data.BuildStepOrBuilder> + getStepsFieldBuilder() { + if (stepsBuilder_ == null) { + stepsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + google.events.cloud.build.v1.Data.BuildStep, google.events.cloud.build.v1.Data.BuildStep.Builder, google.events.cloud.build.v1.Data.BuildStepOrBuilder>( + steps_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + steps_ = null; + } + return stepsBuilder_; + } + + private google.events.cloud.build.v1.Data.Results results_; + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.Results, google.events.cloud.build.v1.Data.Results.Builder, google.events.cloud.build.v1.Data.ResultsOrBuilder> resultsBuilder_; + /** + * + * Results of the build. + *+ * + *.google.events.cloud.build.v1.Results results = 10;
+ * @return Whether the results field is set. + */ + public boolean hasResults() { + return resultsBuilder_ != null || results_ != null; + } + /** + *+ * Results of the build. + *+ * + *.google.events.cloud.build.v1.Results results = 10;
+ * @return The results. + */ + public google.events.cloud.build.v1.Data.Results getResults() { + if (resultsBuilder_ == null) { + return results_ == null ? google.events.cloud.build.v1.Data.Results.getDefaultInstance() : results_; + } else { + return resultsBuilder_.getMessage(); + } + } + /** + *+ * Results of the build. + *+ * + *.google.events.cloud.build.v1.Results results = 10;
+ */ + public Builder setResults(google.events.cloud.build.v1.Data.Results value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + results_ = value; + onChanged(); + } else { + resultsBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * Results of the build. + *+ * + *.google.events.cloud.build.v1.Results results = 10;
+ */ + public Builder setResults( + google.events.cloud.build.v1.Data.Results.Builder builderForValue) { + if (resultsBuilder_ == null) { + results_ = builderForValue.build(); + onChanged(); + } else { + resultsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * Results of the build. + *+ * + *.google.events.cloud.build.v1.Results results = 10;
+ */ + public Builder mergeResults(google.events.cloud.build.v1.Data.Results value) { + if (resultsBuilder_ == null) { + if (results_ != null) { + results_ = + google.events.cloud.build.v1.Data.Results.newBuilder(results_).mergeFrom(value).buildPartial(); + } else { + results_ = value; + } + onChanged(); + } else { + resultsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *+ * Results of the build. + *+ * + *.google.events.cloud.build.v1.Results results = 10;
+ */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = null; + onChanged(); + } else { + results_ = null; + resultsBuilder_ = null; + } + + return this; + } + /** + *+ * Results of the build. + *+ * + *.google.events.cloud.build.v1.Results results = 10;
+ */ + public google.events.cloud.build.v1.Data.Results.Builder getResultsBuilder() { + + onChanged(); + return getResultsFieldBuilder().getBuilder(); + } + /** + *+ * Results of the build. + *+ * + *.google.events.cloud.build.v1.Results results = 10;
+ */ + public google.events.cloud.build.v1.Data.ResultsOrBuilder getResultsOrBuilder() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilder(); + } else { + return results_ == null ? + google.events.cloud.build.v1.Data.Results.getDefaultInstance() : results_; + } + } + /** + *+ * Results of the build. + *+ * + *.google.events.cloud.build.v1.Results results = 10;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.Results, google.events.cloud.build.v1.Data.Results.Builder, google.events.cloud.build.v1.Data.ResultsOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.Results, google.events.cloud.build.v1.Data.Results.Builder, google.events.cloud.build.v1.Data.ResultsOrBuilder>( + getResults(), + getParentForChildren(), + isClean()); + results_ = null; + } + return resultsBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *+ * Time at which the request to create the build was received. + *+ * + *.google.protobuf.Timestamp create_time = 6;
+ * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *+ * Time at which the request to create the build was received. + *+ * + *.google.protobuf.Timestamp create_time = 6;
+ * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *+ * Time at which the request to create the build was received. + *+ * + *.google.protobuf.Timestamp create_time = 6;
+ */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * Time at which the request to create the build was received. + *+ * + *.google.protobuf.Timestamp create_time = 6;
+ */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * Time at which the request to create the build was received. + *+ * + *.google.protobuf.Timestamp create_time = 6;
+ */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *+ * Time at which the request to create the build was received. + *+ * + *.google.protobuf.Timestamp create_time = 6;
+ */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *+ * Time at which the request to create the build was received. + *+ * + *.google.protobuf.Timestamp create_time = 6;
+ */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *+ * Time at which the request to create the build was received. + *+ * + *.google.protobuf.Timestamp create_time = 6;
+ */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *+ * Time at which the request to create the build was received. + *+ * + *.google.protobuf.Timestamp create_time = 6;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** + *+ * Time at which execution of the build was started. + *+ * + *.google.protobuf.Timestamp start_time = 7;
+ * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + *+ * Time at which execution of the build was started. + *+ * + *.google.protobuf.Timestamp start_time = 7;
+ * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + *+ * Time at which execution of the build was started. + *+ * + *.google.protobuf.Timestamp start_time = 7;
+ */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * Time at which execution of the build was started. + *+ * + *.google.protobuf.Timestamp start_time = 7;
+ */ + public Builder setStartTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * Time at which execution of the build was started. + *+ * + *.google.protobuf.Timestamp start_time = 7;
+ */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *+ * Time at which execution of the build was started. + *+ * + *.google.protobuf.Timestamp start_time = 7;
+ */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + *+ * Time at which execution of the build was started. + *+ * + *.google.protobuf.Timestamp start_time = 7;
+ */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + *+ * Time at which execution of the build was started. + *+ * + *.google.protobuf.Timestamp start_time = 7;
+ */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + *+ * Time at which execution of the build was started. + *+ * + *.google.protobuf.Timestamp start_time = 7;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getStartTime(), + getParentForChildren(), + isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp finishTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> finishTimeBuilder_; + /** + *+ * Time at which execution of the build was finished. + * The difference between finish_time and start_time is the duration of the + * build's execution. + *+ * + *.google.protobuf.Timestamp finish_time = 8;
+ * @return Whether the finishTime field is set. + */ + public boolean hasFinishTime() { + return finishTimeBuilder_ != null || finishTime_ != null; + } + /** + *+ * Time at which execution of the build was finished. + * The difference between finish_time and start_time is the duration of the + * build's execution. + *+ * + *.google.protobuf.Timestamp finish_time = 8;
+ * @return The finishTime. + */ + public com.google.protobuf.Timestamp getFinishTime() { + if (finishTimeBuilder_ == null) { + return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; + } else { + return finishTimeBuilder_.getMessage(); + } + } + /** + *+ * Time at which execution of the build was finished. + * The difference between finish_time and start_time is the duration of the + * build's execution. + *+ * + *.google.protobuf.Timestamp finish_time = 8;
+ */ + public Builder setFinishTime(com.google.protobuf.Timestamp value) { + if (finishTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + finishTime_ = value; + onChanged(); + } else { + finishTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * Time at which execution of the build was finished. + * The difference between finish_time and start_time is the duration of the + * build's execution. + *+ * + *.google.protobuf.Timestamp finish_time = 8;
+ */ + public Builder setFinishTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (finishTimeBuilder_ == null) { + finishTime_ = builderForValue.build(); + onChanged(); + } else { + finishTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * Time at which execution of the build was finished. + * The difference between finish_time and start_time is the duration of the + * build's execution. + *+ * + *.google.protobuf.Timestamp finish_time = 8;
+ */ + public Builder mergeFinishTime(com.google.protobuf.Timestamp value) { + if (finishTimeBuilder_ == null) { + if (finishTime_ != null) { + finishTime_ = + com.google.protobuf.Timestamp.newBuilder(finishTime_).mergeFrom(value).buildPartial(); + } else { + finishTime_ = value; + } + onChanged(); + } else { + finishTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *+ * Time at which execution of the build was finished. + * The difference between finish_time and start_time is the duration of the + * build's execution. + *+ * + *.google.protobuf.Timestamp finish_time = 8;
+ */ + public Builder clearFinishTime() { + if (finishTimeBuilder_ == null) { + finishTime_ = null; + onChanged(); + } else { + finishTime_ = null; + finishTimeBuilder_ = null; + } + + return this; + } + /** + *+ * Time at which execution of the build was finished. + * The difference between finish_time and start_time is the duration of the + * build's execution. + *+ * + *.google.protobuf.Timestamp finish_time = 8;
+ */ + public com.google.protobuf.Timestamp.Builder getFinishTimeBuilder() { + + onChanged(); + return getFinishTimeFieldBuilder().getBuilder(); + } + /** + *+ * Time at which execution of the build was finished. + * The difference between finish_time and start_time is the duration of the + * build's execution. + *+ * + *.google.protobuf.Timestamp finish_time = 8;
+ */ + public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { + if (finishTimeBuilder_ != null) { + return finishTimeBuilder_.getMessageOrBuilder(); + } else { + return finishTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; + } + } + /** + *+ * Time at which execution of the build was finished. + * The difference between finish_time and start_time is the duration of the + * build's execution. + *+ * + *.google.protobuf.Timestamp finish_time = 8;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getFinishTimeFieldBuilder() { + if (finishTimeBuilder_ == null) { + finishTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getFinishTime(), + getParentForChildren(), + isClean()); + finishTime_ = null; + } + return finishTimeBuilder_; + } + + private com.google.protobuf.Duration timeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> timeoutBuilder_; + /** + *+ * Amount of time that this build should be allowed to run, to second + * granularity. If this amount of time elapses, work on the build will cease + * and the build status will be `TIMEOUT`. + *+ * + *.google.protobuf.Duration timeout = 12;
+ * @return Whether the timeout field is set. + */ + public boolean hasTimeout() { + return timeoutBuilder_ != null || timeout_ != null; + } + /** + *+ * Amount of time that this build should be allowed to run, to second + * granularity. If this amount of time elapses, work on the build will cease + * and the build status will be `TIMEOUT`. + *+ * + *.google.protobuf.Duration timeout = 12;
+ * @return The timeout. + */ + public com.google.protobuf.Duration getTimeout() { + if (timeoutBuilder_ == null) { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } else { + return timeoutBuilder_.getMessage(); + } + } + /** + *+ * Amount of time that this build should be allowed to run, to second + * granularity. If this amount of time elapses, work on the build will cease + * and the build status will be `TIMEOUT`. + *+ * + *.google.protobuf.Duration timeout = 12;
+ */ + public Builder setTimeout(com.google.protobuf.Duration value) { + if (timeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeout_ = value; + onChanged(); + } else { + timeoutBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * Amount of time that this build should be allowed to run, to second + * granularity. If this amount of time elapses, work on the build will cease + * and the build status will be `TIMEOUT`. + *+ * + *.google.protobuf.Duration timeout = 12;
+ */ + public Builder setTimeout( + com.google.protobuf.Duration.Builder builderForValue) { + if (timeoutBuilder_ == null) { + timeout_ = builderForValue.build(); + onChanged(); + } else { + timeoutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * Amount of time that this build should be allowed to run, to second + * granularity. If this amount of time elapses, work on the build will cease + * and the build status will be `TIMEOUT`. + *+ * + *.google.protobuf.Duration timeout = 12;
+ */ + public Builder mergeTimeout(com.google.protobuf.Duration value) { + if (timeoutBuilder_ == null) { + if (timeout_ != null) { + timeout_ = + com.google.protobuf.Duration.newBuilder(timeout_).mergeFrom(value).buildPartial(); + } else { + timeout_ = value; + } + onChanged(); + } else { + timeoutBuilder_.mergeFrom(value); + } + + return this; + } + /** + *+ * Amount of time that this build should be allowed to run, to second + * granularity. If this amount of time elapses, work on the build will cease + * and the build status will be `TIMEOUT`. + *+ * + *.google.protobuf.Duration timeout = 12;
+ */ + public Builder clearTimeout() { + if (timeoutBuilder_ == null) { + timeout_ = null; + onChanged(); + } else { + timeout_ = null; + timeoutBuilder_ = null; + } + + return this; + } + /** + *+ * Amount of time that this build should be allowed to run, to second + * granularity. If this amount of time elapses, work on the build will cease + * and the build status will be `TIMEOUT`. + *+ * + *.google.protobuf.Duration timeout = 12;
+ */ + public com.google.protobuf.Duration.Builder getTimeoutBuilder() { + + onChanged(); + return getTimeoutFieldBuilder().getBuilder(); + } + /** + *+ * Amount of time that this build should be allowed to run, to second + * granularity. If this amount of time elapses, work on the build will cease + * and the build status will be `TIMEOUT`. + *+ * + *.google.protobuf.Duration timeout = 12;
+ */ + public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { + if (timeoutBuilder_ != null) { + return timeoutBuilder_.getMessageOrBuilder(); + } else { + return timeout_ == null ? + com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } + } + /** + *+ * Amount of time that this build should be allowed to run, to second + * granularity. If this amount of time elapses, work on the build will cease + * and the build status will be `TIMEOUT`. + *+ * + *.google.protobuf.Duration timeout = 12;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getTimeoutFieldBuilder() { + if (timeoutBuilder_ == null) { + timeoutBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + getTimeout(), + getParentForChildren(), + isClean()); + timeout_ = null; + } + return timeoutBuilder_; + } + + private com.google.protobuf.LazyStringList images_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureImagesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + images_ = new com.google.protobuf.LazyStringArrayList(images_); + bitField0_ |= 0x00000002; + } + } + /** + *+ * A list of images to be pushed upon the successful completion of all build + * steps. + * The images are pushed using the builder service account's credentials. + * The digests of the pushed images will be stored in the `Build` resource's + * results field. + * If any of the images fail to be pushed, the build status is marked + * `FAILURE`. + *+ * + *repeated string images = 13;
+ * @return A list containing the images. + */ + public com.google.protobuf.ProtocolStringList + getImagesList() { + return images_.getUnmodifiableView(); + } + /** + *+ * A list of images to be pushed upon the successful completion of all build + * steps. + * The images are pushed using the builder service account's credentials. + * The digests of the pushed images will be stored in the `Build` resource's + * results field. + * If any of the images fail to be pushed, the build status is marked + * `FAILURE`. + *+ * + *repeated string images = 13;
+ * @return The count of images. + */ + public int getImagesCount() { + return images_.size(); + } + /** + *+ * A list of images to be pushed upon the successful completion of all build + * steps. + * The images are pushed using the builder service account's credentials. + * The digests of the pushed images will be stored in the `Build` resource's + * results field. + * If any of the images fail to be pushed, the build status is marked + * `FAILURE`. + *+ * + *repeated string images = 13;
+ * @param index The index of the element to return. + * @return The images at the given index. + */ + public java.lang.String getImages(int index) { + return images_.get(index); + } + /** + *+ * A list of images to be pushed upon the successful completion of all build + * steps. + * The images are pushed using the builder service account's credentials. + * The digests of the pushed images will be stored in the `Build` resource's + * results field. + * If any of the images fail to be pushed, the build status is marked + * `FAILURE`. + *+ * + *repeated string images = 13;
+ * @param index The index of the value to return. + * @return The bytes of the images at the given index. + */ + public com.google.protobuf.ByteString + getImagesBytes(int index) { + return images_.getByteString(index); + } + /** + *+ * A list of images to be pushed upon the successful completion of all build + * steps. + * The images are pushed using the builder service account's credentials. + * The digests of the pushed images will be stored in the `Build` resource's + * results field. + * If any of the images fail to be pushed, the build status is marked + * `FAILURE`. + *+ * + *repeated string images = 13;
+ * @param index The index to set the value at. + * @param value The images to set. + * @return This builder for chaining. + */ + public Builder setImages( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureImagesIsMutable(); + images_.set(index, value); + onChanged(); + return this; + } + /** + *+ * A list of images to be pushed upon the successful completion of all build + * steps. + * The images are pushed using the builder service account's credentials. + * The digests of the pushed images will be stored in the `Build` resource's + * results field. + * If any of the images fail to be pushed, the build status is marked + * `FAILURE`. + *+ * + *repeated string images = 13;
+ * @param value The images to add. + * @return This builder for chaining. + */ + public Builder addImages( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureImagesIsMutable(); + images_.add(value); + onChanged(); + return this; + } + /** + *+ * A list of images to be pushed upon the successful completion of all build + * steps. + * The images are pushed using the builder service account's credentials. + * The digests of the pushed images will be stored in the `Build` resource's + * results field. + * If any of the images fail to be pushed, the build status is marked + * `FAILURE`. + *+ * + *repeated string images = 13;
+ * @param values The images to add. + * @return This builder for chaining. + */ + public Builder addAllImages( + java.lang.Iterablevalues) { + ensureImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, images_); + onChanged(); + return this; + } + /** + * + * A list of images to be pushed upon the successful completion of all build + * steps. + * The images are pushed using the builder service account's credentials. + * The digests of the pushed images will be stored in the `Build` resource's + * results field. + * If any of the images fail to be pushed, the build status is marked + * `FAILURE`. + *+ * + *repeated string images = 13;
+ * @return This builder for chaining. + */ + public Builder clearImages() { + images_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *+ * A list of images to be pushed upon the successful completion of all build + * steps. + * The images are pushed using the builder service account's credentials. + * The digests of the pushed images will be stored in the `Build` resource's + * results field. + * If any of the images fail to be pushed, the build status is marked + * `FAILURE`. + *+ * + *repeated string images = 13;
+ * @param value The bytes of the images to add. + * @return This builder for chaining. + */ + public Builder addImagesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureImagesIsMutable(); + images_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.Duration queueTtl_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> queueTtlBuilder_; + /** + *+ * TTL in queue for this build. If provided and the build is enqueued longer + * than this value, the build will expire and the build status will be + * `EXPIRED`. + * The TTL starts ticking from create_time. + *+ * + *.google.protobuf.Duration queue_ttl = 40;
+ * @return Whether the queueTtl field is set. + */ + public boolean hasQueueTtl() { + return queueTtlBuilder_ != null || queueTtl_ != null; + } + /** + *+ * TTL in queue for this build. If provided and the build is enqueued longer + * than this value, the build will expire and the build status will be + * `EXPIRED`. + * The TTL starts ticking from create_time. + *+ * + *.google.protobuf.Duration queue_ttl = 40;
+ * @return The queueTtl. + */ + public com.google.protobuf.Duration getQueueTtl() { + if (queueTtlBuilder_ == null) { + return queueTtl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : queueTtl_; + } else { + return queueTtlBuilder_.getMessage(); + } + } + /** + *+ * TTL in queue for this build. If provided and the build is enqueued longer + * than this value, the build will expire and the build status will be + * `EXPIRED`. + * The TTL starts ticking from create_time. + *+ * + *.google.protobuf.Duration queue_ttl = 40;
+ */ + public Builder setQueueTtl(com.google.protobuf.Duration value) { + if (queueTtlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queueTtl_ = value; + onChanged(); + } else { + queueTtlBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * TTL in queue for this build. If provided and the build is enqueued longer + * than this value, the build will expire and the build status will be + * `EXPIRED`. + * The TTL starts ticking from create_time. + *+ * + *.google.protobuf.Duration queue_ttl = 40;
+ */ + public Builder setQueueTtl( + com.google.protobuf.Duration.Builder builderForValue) { + if (queueTtlBuilder_ == null) { + queueTtl_ = builderForValue.build(); + onChanged(); + } else { + queueTtlBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * TTL in queue for this build. If provided and the build is enqueued longer + * than this value, the build will expire and the build status will be + * `EXPIRED`. + * The TTL starts ticking from create_time. + *+ * + *.google.protobuf.Duration queue_ttl = 40;
+ */ + public Builder mergeQueueTtl(com.google.protobuf.Duration value) { + if (queueTtlBuilder_ == null) { + if (queueTtl_ != null) { + queueTtl_ = + com.google.protobuf.Duration.newBuilder(queueTtl_).mergeFrom(value).buildPartial(); + } else { + queueTtl_ = value; + } + onChanged(); + } else { + queueTtlBuilder_.mergeFrom(value); + } + + return this; + } + /** + *+ * TTL in queue for this build. If provided and the build is enqueued longer + * than this value, the build will expire and the build status will be + * `EXPIRED`. + * The TTL starts ticking from create_time. + *+ * + *.google.protobuf.Duration queue_ttl = 40;
+ */ + public Builder clearQueueTtl() { + if (queueTtlBuilder_ == null) { + queueTtl_ = null; + onChanged(); + } else { + queueTtl_ = null; + queueTtlBuilder_ = null; + } + + return this; + } + /** + *+ * TTL in queue for this build. If provided and the build is enqueued longer + * than this value, the build will expire and the build status will be + * `EXPIRED`. + * The TTL starts ticking from create_time. + *+ * + *.google.protobuf.Duration queue_ttl = 40;
+ */ + public com.google.protobuf.Duration.Builder getQueueTtlBuilder() { + + onChanged(); + return getQueueTtlFieldBuilder().getBuilder(); + } + /** + *+ * TTL in queue for this build. If provided and the build is enqueued longer + * than this value, the build will expire and the build status will be + * `EXPIRED`. + * The TTL starts ticking from create_time. + *+ * + *.google.protobuf.Duration queue_ttl = 40;
+ */ + public com.google.protobuf.DurationOrBuilder getQueueTtlOrBuilder() { + if (queueTtlBuilder_ != null) { + return queueTtlBuilder_.getMessageOrBuilder(); + } else { + return queueTtl_ == null ? + com.google.protobuf.Duration.getDefaultInstance() : queueTtl_; + } + } + /** + *+ * TTL in queue for this build. If provided and the build is enqueued longer + * than this value, the build will expire and the build status will be + * `EXPIRED`. + * The TTL starts ticking from create_time. + *+ * + *.google.protobuf.Duration queue_ttl = 40;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getQueueTtlFieldBuilder() { + if (queueTtlBuilder_ == null) { + queueTtlBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + getQueueTtl(), + getParentForChildren(), + isClean()); + queueTtl_ = null; + } + return queueTtlBuilder_; + } + + private google.events.cloud.build.v1.Data.Artifacts artifacts_; + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.Artifacts, google.events.cloud.build.v1.Data.Artifacts.Builder, google.events.cloud.build.v1.Data.ArtifactsOrBuilder> artifactsBuilder_; + /** + *+ * Artifacts produced by the build that should be uploaded upon + * successful completion of all build steps. + *+ * + *.google.events.cloud.build.v1.Artifacts artifacts = 37;
+ * @return Whether the artifacts field is set. + */ + public boolean hasArtifacts() { + return artifactsBuilder_ != null || artifacts_ != null; + } + /** + *+ * Artifacts produced by the build that should be uploaded upon + * successful completion of all build steps. + *+ * + *.google.events.cloud.build.v1.Artifacts artifacts = 37;
+ * @return The artifacts. + */ + public google.events.cloud.build.v1.Data.Artifacts getArtifacts() { + if (artifactsBuilder_ == null) { + return artifacts_ == null ? google.events.cloud.build.v1.Data.Artifacts.getDefaultInstance() : artifacts_; + } else { + return artifactsBuilder_.getMessage(); + } + } + /** + *+ * Artifacts produced by the build that should be uploaded upon + * successful completion of all build steps. + *+ * + *.google.events.cloud.build.v1.Artifacts artifacts = 37;
+ */ + public Builder setArtifacts(google.events.cloud.build.v1.Data.Artifacts value) { + if (artifactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + artifacts_ = value; + onChanged(); + } else { + artifactsBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * Artifacts produced by the build that should be uploaded upon + * successful completion of all build steps. + *+ * + *.google.events.cloud.build.v1.Artifacts artifacts = 37;
+ */ + public Builder setArtifacts( + google.events.cloud.build.v1.Data.Artifacts.Builder builderForValue) { + if (artifactsBuilder_ == null) { + artifacts_ = builderForValue.build(); + onChanged(); + } else { + artifactsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * Artifacts produced by the build that should be uploaded upon + * successful completion of all build steps. + *+ * + *.google.events.cloud.build.v1.Artifacts artifacts = 37;
+ */ + public Builder mergeArtifacts(google.events.cloud.build.v1.Data.Artifacts value) { + if (artifactsBuilder_ == null) { + if (artifacts_ != null) { + artifacts_ = + google.events.cloud.build.v1.Data.Artifacts.newBuilder(artifacts_).mergeFrom(value).buildPartial(); + } else { + artifacts_ = value; + } + onChanged(); + } else { + artifactsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *+ * Artifacts produced by the build that should be uploaded upon + * successful completion of all build steps. + *+ * + *.google.events.cloud.build.v1.Artifacts artifacts = 37;
+ */ + public Builder clearArtifacts() { + if (artifactsBuilder_ == null) { + artifacts_ = null; + onChanged(); + } else { + artifacts_ = null; + artifactsBuilder_ = null; + } + + return this; + } + /** + *+ * Artifacts produced by the build that should be uploaded upon + * successful completion of all build steps. + *+ * + *.google.events.cloud.build.v1.Artifacts artifacts = 37;
+ */ + public google.events.cloud.build.v1.Data.Artifacts.Builder getArtifactsBuilder() { + + onChanged(); + return getArtifactsFieldBuilder().getBuilder(); + } + /** + *+ * Artifacts produced by the build that should be uploaded upon + * successful completion of all build steps. + *+ * + *.google.events.cloud.build.v1.Artifacts artifacts = 37;
+ */ + public google.events.cloud.build.v1.Data.ArtifactsOrBuilder getArtifactsOrBuilder() { + if (artifactsBuilder_ != null) { + return artifactsBuilder_.getMessageOrBuilder(); + } else { + return artifacts_ == null ? + google.events.cloud.build.v1.Data.Artifacts.getDefaultInstance() : artifacts_; + } + } + /** + *+ * Artifacts produced by the build that should be uploaded upon + * successful completion of all build steps. + *+ * + *.google.events.cloud.build.v1.Artifacts artifacts = 37;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.Artifacts, google.events.cloud.build.v1.Data.Artifacts.Builder, google.events.cloud.build.v1.Data.ArtifactsOrBuilder> + getArtifactsFieldBuilder() { + if (artifactsBuilder_ == null) { + artifactsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.Artifacts, google.events.cloud.build.v1.Data.Artifacts.Builder, google.events.cloud.build.v1.Data.ArtifactsOrBuilder>( + getArtifacts(), + getParentForChildren(), + isClean()); + artifacts_ = null; + } + return artifactsBuilder_; + } + + private java.lang.Object logsBucket_ = ""; + /** + *+ * Google Cloud Storage bucket where logs should be written (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. + *+ * + *string logs_bucket = 19;
+ * @return The logsBucket. + */ + public java.lang.String getLogsBucket() { + java.lang.Object ref = logsBucket_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logsBucket_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *+ * Google Cloud Storage bucket where logs should be written (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. + *+ * + *string logs_bucket = 19;
+ * @return The bytes for logsBucket. + */ + public com.google.protobuf.ByteString + getLogsBucketBytes() { + java.lang.Object ref = logsBucket_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logsBucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *+ * Google Cloud Storage bucket where logs should be written (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. + *+ * + *string logs_bucket = 19;
+ * @param value The logsBucket to set. + * @return This builder for chaining. + */ + public Builder setLogsBucket( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + logsBucket_ = value; + onChanged(); + return this; + } + /** + *+ * Google Cloud Storage bucket where logs should be written (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. + *+ * + *string logs_bucket = 19;
+ * @return This builder for chaining. + */ + public Builder clearLogsBucket() { + + logsBucket_ = getDefaultInstance().getLogsBucket(); + onChanged(); + return this; + } + /** + *+ * Google Cloud Storage bucket where logs should be written (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. + *+ * + *string logs_bucket = 19;
+ * @param value The bytes for logsBucket to set. + * @return This builder for chaining. + */ + public Builder setLogsBucketBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + logsBucket_ = value; + onChanged(); + return this; + } + + private google.events.cloud.build.v1.Data.SourceProvenance sourceProvenance_; + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.SourceProvenance, google.events.cloud.build.v1.Data.SourceProvenance.Builder, google.events.cloud.build.v1.Data.SourceProvenanceOrBuilder> sourceProvenanceBuilder_; + /** + *+ * A permanent fixed identifier for source. + *+ * + *.google.events.cloud.build.v1.SourceProvenance source_provenance = 21;
+ * @return Whether the sourceProvenance field is set. + */ + public boolean hasSourceProvenance() { + return sourceProvenanceBuilder_ != null || sourceProvenance_ != null; + } + /** + *+ * A permanent fixed identifier for source. + *+ * + *.google.events.cloud.build.v1.SourceProvenance source_provenance = 21;
+ * @return The sourceProvenance. + */ + public google.events.cloud.build.v1.Data.SourceProvenance getSourceProvenance() { + if (sourceProvenanceBuilder_ == null) { + return sourceProvenance_ == null ? google.events.cloud.build.v1.Data.SourceProvenance.getDefaultInstance() : sourceProvenance_; + } else { + return sourceProvenanceBuilder_.getMessage(); + } + } + /** + *+ * A permanent fixed identifier for source. + *+ * + *.google.events.cloud.build.v1.SourceProvenance source_provenance = 21;
+ */ + public Builder setSourceProvenance(google.events.cloud.build.v1.Data.SourceProvenance value) { + if (sourceProvenanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceProvenance_ = value; + onChanged(); + } else { + sourceProvenanceBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * A permanent fixed identifier for source. + *+ * + *.google.events.cloud.build.v1.SourceProvenance source_provenance = 21;
+ */ + public Builder setSourceProvenance( + google.events.cloud.build.v1.Data.SourceProvenance.Builder builderForValue) { + if (sourceProvenanceBuilder_ == null) { + sourceProvenance_ = builderForValue.build(); + onChanged(); + } else { + sourceProvenanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * A permanent fixed identifier for source. + *+ * + *.google.events.cloud.build.v1.SourceProvenance source_provenance = 21;
+ */ + public Builder mergeSourceProvenance(google.events.cloud.build.v1.Data.SourceProvenance value) { + if (sourceProvenanceBuilder_ == null) { + if (sourceProvenance_ != null) { + sourceProvenance_ = + google.events.cloud.build.v1.Data.SourceProvenance.newBuilder(sourceProvenance_).mergeFrom(value).buildPartial(); + } else { + sourceProvenance_ = value; + } + onChanged(); + } else { + sourceProvenanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *+ * A permanent fixed identifier for source. + *+ * + *.google.events.cloud.build.v1.SourceProvenance source_provenance = 21;
+ */ + public Builder clearSourceProvenance() { + if (sourceProvenanceBuilder_ == null) { + sourceProvenance_ = null; + onChanged(); + } else { + sourceProvenance_ = null; + sourceProvenanceBuilder_ = null; + } + + return this; + } + /** + *+ * A permanent fixed identifier for source. + *+ * + *.google.events.cloud.build.v1.SourceProvenance source_provenance = 21;
+ */ + public google.events.cloud.build.v1.Data.SourceProvenance.Builder getSourceProvenanceBuilder() { + + onChanged(); + return getSourceProvenanceFieldBuilder().getBuilder(); + } + /** + *+ * A permanent fixed identifier for source. + *+ * + *.google.events.cloud.build.v1.SourceProvenance source_provenance = 21;
+ */ + public google.events.cloud.build.v1.Data.SourceProvenanceOrBuilder getSourceProvenanceOrBuilder() { + if (sourceProvenanceBuilder_ != null) { + return sourceProvenanceBuilder_.getMessageOrBuilder(); + } else { + return sourceProvenance_ == null ? + google.events.cloud.build.v1.Data.SourceProvenance.getDefaultInstance() : sourceProvenance_; + } + } + /** + *+ * A permanent fixed identifier for source. + *+ * + *.google.events.cloud.build.v1.SourceProvenance source_provenance = 21;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.SourceProvenance, google.events.cloud.build.v1.Data.SourceProvenance.Builder, google.events.cloud.build.v1.Data.SourceProvenanceOrBuilder> + getSourceProvenanceFieldBuilder() { + if (sourceProvenanceBuilder_ == null) { + sourceProvenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.SourceProvenance, google.events.cloud.build.v1.Data.SourceProvenance.Builder, google.events.cloud.build.v1.Data.SourceProvenanceOrBuilder>( + getSourceProvenance(), + getParentForChildren(), + isClean()); + sourceProvenance_ = null; + } + return sourceProvenanceBuilder_; + } + + private java.lang.Object buildTriggerId_ = ""; + /** + *+ * The ID of the `BuildTrigger` that triggered this build, if it + * was triggered automatically. + *+ * + *string build_trigger_id = 22;
+ * @return The buildTriggerId. + */ + public java.lang.String getBuildTriggerId() { + java.lang.Object ref = buildTriggerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildTriggerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *+ * The ID of the `BuildTrigger` that triggered this build, if it + * was triggered automatically. + *+ * + *string build_trigger_id = 22;
+ * @return The bytes for buildTriggerId. + */ + public com.google.protobuf.ByteString + getBuildTriggerIdBytes() { + java.lang.Object ref = buildTriggerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildTriggerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *+ * The ID of the `BuildTrigger` that triggered this build, if it + * was triggered automatically. + *+ * + *string build_trigger_id = 22;
+ * @param value The buildTriggerId to set. + * @return This builder for chaining. + */ + public Builder setBuildTriggerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + buildTriggerId_ = value; + onChanged(); + return this; + } + /** + *+ * The ID of the `BuildTrigger` that triggered this build, if it + * was triggered automatically. + *+ * + *string build_trigger_id = 22;
+ * @return This builder for chaining. + */ + public Builder clearBuildTriggerId() { + + buildTriggerId_ = getDefaultInstance().getBuildTriggerId(); + onChanged(); + return this; + } + /** + *+ * The ID of the `BuildTrigger` that triggered this build, if it + * was triggered automatically. + *+ * + *string build_trigger_id = 22;
+ * @param value The bytes for buildTriggerId to set. + * @return This builder for chaining. + */ + public Builder setBuildTriggerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + buildTriggerId_ = value; + onChanged(); + return this; + } + + private google.events.cloud.build.v1.Data.BuildOptions options_; + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.BuildOptions, google.events.cloud.build.v1.Data.BuildOptions.Builder, google.events.cloud.build.v1.Data.BuildOptionsOrBuilder> optionsBuilder_; + /** + *+ * Special options for this build. + *+ * + *.google.events.cloud.build.v1.BuildOptions options = 23;
+ * @return Whether the options field is set. + */ + public boolean hasOptions() { + return optionsBuilder_ != null || options_ != null; + } + /** + *+ * Special options for this build. + *+ * + *.google.events.cloud.build.v1.BuildOptions options = 23;
+ * @return The options. + */ + public google.events.cloud.build.v1.Data.BuildOptions getOptions() { + if (optionsBuilder_ == null) { + return options_ == null ? google.events.cloud.build.v1.Data.BuildOptions.getDefaultInstance() : options_; + } else { + return optionsBuilder_.getMessage(); + } + } + /** + *+ * Special options for this build. + *+ * + *.google.events.cloud.build.v1.BuildOptions options = 23;
+ */ + public Builder setOptions(google.events.cloud.build.v1.Data.BuildOptions value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + options_ = value; + onChanged(); + } else { + optionsBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * Special options for this build. + *+ * + *.google.events.cloud.build.v1.BuildOptions options = 23;
+ */ + public Builder setOptions( + google.events.cloud.build.v1.Data.BuildOptions.Builder builderForValue) { + if (optionsBuilder_ == null) { + options_ = builderForValue.build(); + onChanged(); + } else { + optionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * Special options for this build. + *+ * + *.google.events.cloud.build.v1.BuildOptions options = 23;
+ */ + public Builder mergeOptions(google.events.cloud.build.v1.Data.BuildOptions value) { + if (optionsBuilder_ == null) { + if (options_ != null) { + options_ = + google.events.cloud.build.v1.Data.BuildOptions.newBuilder(options_).mergeFrom(value).buildPartial(); + } else { + options_ = value; + } + onChanged(); + } else { + optionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *+ * Special options for this build. + *+ * + *.google.events.cloud.build.v1.BuildOptions options = 23;
+ */ + public Builder clearOptions() { + if (optionsBuilder_ == null) { + options_ = null; + onChanged(); + } else { + options_ = null; + optionsBuilder_ = null; + } + + return this; + } + /** + *+ * Special options for this build. + *+ * + *.google.events.cloud.build.v1.BuildOptions options = 23;
+ */ + public google.events.cloud.build.v1.Data.BuildOptions.Builder getOptionsBuilder() { + + onChanged(); + return getOptionsFieldBuilder().getBuilder(); + } + /** + *+ * Special options for this build. + *+ * + *.google.events.cloud.build.v1.BuildOptions options = 23;
+ */ + public google.events.cloud.build.v1.Data.BuildOptionsOrBuilder getOptionsOrBuilder() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilder(); + } else { + return options_ == null ? + google.events.cloud.build.v1.Data.BuildOptions.getDefaultInstance() : options_; + } + } + /** + *+ * Special options for this build. + *+ * + *.google.events.cloud.build.v1.BuildOptions options = 23;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.BuildOptions, google.events.cloud.build.v1.Data.BuildOptions.Builder, google.events.cloud.build.v1.Data.BuildOptionsOrBuilder> + getOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.BuildOptions, google.events.cloud.build.v1.Data.BuildOptions.Builder, google.events.cloud.build.v1.Data.BuildOptionsOrBuilder>( + getOptions(), + getParentForChildren(), + isClean()); + options_ = null; + } + return optionsBuilder_; + } + + private java.lang.Object logUrl_ = ""; + /** + *+ * URL to logs for this build in Google Cloud Console. + *+ * + *string log_url = 25;
+ * @return The logUrl. + */ + public java.lang.String getLogUrl() { + java.lang.Object ref = logUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *+ * URL to logs for this build in Google Cloud Console. + *+ * + *string log_url = 25;
+ * @return The bytes for logUrl. + */ + public com.google.protobuf.ByteString + getLogUrlBytes() { + java.lang.Object ref = logUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *+ * URL to logs for this build in Google Cloud Console. + *+ * + *string log_url = 25;
+ * @param value The logUrl to set. + * @return This builder for chaining. + */ + public Builder setLogUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + logUrl_ = value; + onChanged(); + return this; + } + /** + *+ * URL to logs for this build in Google Cloud Console. + *+ * + *string log_url = 25;
+ * @return This builder for chaining. + */ + public Builder clearLogUrl() { + + logUrl_ = getDefaultInstance().getLogUrl(); + onChanged(); + return this; + } + /** + *+ * URL to logs for this build in Google Cloud Console. + *+ * + *string log_url = 25;
+ * @param value The bytes for logUrl to set. + * @return This builder for chaining. + */ + public Builder setLogUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + logUrl_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> substitutions_; + private com.google.protobuf.MapField+ internalGetSubstitutions() { + if (substitutions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SubstitutionsDefaultEntryHolder.defaultEntry); + } + return substitutions_; + } + private com.google.protobuf.MapField + internalGetMutableSubstitutions() { + onChanged();; + if (substitutions_ == null) { + substitutions_ = com.google.protobuf.MapField.newMapField( + SubstitutionsDefaultEntryHolder.defaultEntry); + } + if (!substitutions_.isMutable()) { + substitutions_ = substitutions_.copy(); + } + return substitutions_; + } + + public int getSubstitutionsCount() { + return internalGetSubstitutions().getMap().size(); + } + /** + * + * Substitutions data for `Build` resource. + *+ * + *map<string, string> substitutions = 29;
+ */ + + @java.lang.Override + public boolean containsSubstitutions( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetSubstitutions().getMap().containsKey(key); + } + /** + * Use {@link #getSubstitutionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.MapgetSubstitutions() { + return getSubstitutionsMap(); + } + /** + * + * Substitutions data for `Build` resource. + *+ * + *map<string, string> substitutions = 29;
+ */ + @java.lang.Override + + public java.util.MapgetSubstitutionsMap() { + return internalGetSubstitutions().getMap(); + } + /** + * + * Substitutions data for `Build` resource. + *+ * + *map<string, string> substitutions = 29;
+ */ + @java.lang.Override + + public java.lang.String getSubstitutionsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Mapmap = + internalGetSubstitutions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * Substitutions data for `Build` resource. + *+ * + *map<string, string> substitutions = 29;
+ */ + @java.lang.Override + + public java.lang.String getSubstitutionsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Mapmap = + internalGetSubstitutions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearSubstitutions() { + internalGetMutableSubstitutions().getMutableMap() + .clear(); + return this; + } + /** + * + * Substitutions data for `Build` resource. + *+ * + *map<string, string> substitutions = 29;
+ */ + + public Builder removeSubstitutions( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableSubstitutions().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map+ getMutableSubstitutions() { + return internalGetMutableSubstitutions().getMutableMap(); + } + /** + * + * Substitutions data for `Build` resource. + *+ * + *map<string, string> substitutions = 29;
+ */ + public Builder putSubstitutions( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableSubstitutions().getMutableMap() + .put(key, value); + return this; + } + /** + *+ * Substitutions data for `Build` resource. + *+ * + *map<string, string> substitutions = 29;
+ */ + + public Builder putAllSubstitutions( + java.util.Mapvalues) { + internalGetMutableSubstitutions().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.LazyStringList tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + bitField0_ |= 0x00000008; + } + } + /** + * + * Tags for annotation of a `Build`. These are not docker tags. + *+ * + *repeated string tags = 31;
+ * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList + getTagsList() { + return tags_.getUnmodifiableView(); + } + /** + *+ * Tags for annotation of a `Build`. These are not docker tags. + *+ * + *repeated string tags = 31;
+ * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + *+ * Tags for annotation of a `Build`. These are not docker tags. + *+ * + *repeated string tags = 31;
+ * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + *+ * Tags for annotation of a `Build`. These are not docker tags. + *+ * + *repeated string tags = 31;
+ * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString + getTagsBytes(int index) { + return tags_.getByteString(index); + } + /** + *+ * Tags for annotation of a `Build`. These are not docker tags. + *+ * + *repeated string tags = 31;
+ * @param index The index to set the value at. + * @param value The tags to set. + * @return This builder for chaining. + */ + public Builder setTags( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.set(index, value); + onChanged(); + return this; + } + /** + *+ * Tags for annotation of a `Build`. These are not docker tags. + *+ * + *repeated string tags = 31;
+ * @param value The tags to add. + * @return This builder for chaining. + */ + public Builder addTags( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + /** + *+ * Tags for annotation of a `Build`. These are not docker tags. + *+ * + *repeated string tags = 31;
+ * @param values The tags to add. + * @return This builder for chaining. + */ + public Builder addAllTags( + java.lang.Iterablevalues) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tags_); + onChanged(); + return this; + } + /** + * + * Tags for annotation of a `Build`. These are not docker tags. + *+ * + *repeated string tags = 31;
+ * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *+ * Tags for annotation of a `Build`. These are not docker tags. + *+ * + *repeated string tags = 31;
+ * @param value The bytes of the tags to add. + * @return This builder for chaining. + */ + public Builder addTagsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + + private java.util.Listsecrets_ = + java.util.Collections.emptyList(); + private void ensureSecretsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + secrets_ = new java.util.ArrayList (secrets_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + google.events.cloud.build.v1.Data.Secret, google.events.cloud.build.v1.Data.Secret.Builder, google.events.cloud.build.v1.Data.SecretOrBuilder> secretsBuilder_; + + /** + * + * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + public java.util.ListgetSecretsList() { + if (secretsBuilder_ == null) { + return java.util.Collections.unmodifiableList(secrets_); + } else { + return secretsBuilder_.getMessageList(); + } + } + /** + * + * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + public int getSecretsCount() { + if (secretsBuilder_ == null) { + return secrets_.size(); + } else { + return secretsBuilder_.getCount(); + } + } + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + public google.events.cloud.build.v1.Data.Secret getSecrets(int index) { + if (secretsBuilder_ == null) { + return secrets_.get(index); + } else { + return secretsBuilder_.getMessage(index); + } + } + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + public Builder setSecrets( + int index, google.events.cloud.build.v1.Data.Secret value) { + if (secretsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecretsIsMutable(); + secrets_.set(index, value); + onChanged(); + } else { + secretsBuilder_.setMessage(index, value); + } + return this; + } + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + public Builder setSecrets( + int index, google.events.cloud.build.v1.Data.Secret.Builder builderForValue) { + if (secretsBuilder_ == null) { + ensureSecretsIsMutable(); + secrets_.set(index, builderForValue.build()); + onChanged(); + } else { + secretsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + public Builder addSecrets(google.events.cloud.build.v1.Data.Secret value) { + if (secretsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecretsIsMutable(); + secrets_.add(value); + onChanged(); + } else { + secretsBuilder_.addMessage(value); + } + return this; + } + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + public Builder addSecrets( + int index, google.events.cloud.build.v1.Data.Secret value) { + if (secretsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecretsIsMutable(); + secrets_.add(index, value); + onChanged(); + } else { + secretsBuilder_.addMessage(index, value); + } + return this; + } + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + public Builder addSecrets( + google.events.cloud.build.v1.Data.Secret.Builder builderForValue) { + if (secretsBuilder_ == null) { + ensureSecretsIsMutable(); + secrets_.add(builderForValue.build()); + onChanged(); + } else { + secretsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + public Builder addSecrets( + int index, google.events.cloud.build.v1.Data.Secret.Builder builderForValue) { + if (secretsBuilder_ == null) { + ensureSecretsIsMutable(); + secrets_.add(index, builderForValue.build()); + onChanged(); + } else { + secretsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + public Builder addAllSecrets( + java.lang.Iterable extends google.events.cloud.build.v1.Data.Secret> values) { + if (secretsBuilder_ == null) { + ensureSecretsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, secrets_); + onChanged(); + } else { + secretsBuilder_.addAllMessages(values); + } + return this; + } + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + public Builder clearSecrets() { + if (secretsBuilder_ == null) { + secrets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + secretsBuilder_.clear(); + } + return this; + } + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + public Builder removeSecrets(int index) { + if (secretsBuilder_ == null) { + ensureSecretsIsMutable(); + secrets_.remove(index); + onChanged(); + } else { + secretsBuilder_.remove(index); + } + return this; + } + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + public google.events.cloud.build.v1.Data.Secret.Builder getSecretsBuilder( + int index) { + return getSecretsFieldBuilder().getBuilder(index); + } + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + public google.events.cloud.build.v1.Data.SecretOrBuilder getSecretsOrBuilder( + int index) { + if (secretsBuilder_ == null) { + return secrets_.get(index); } else { + return secretsBuilder_.getMessageOrBuilder(index); + } + } + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + public java.util.List extends google.events.cloud.build.v1.Data.SecretOrBuilder> + getSecretsOrBuilderList() { + if (secretsBuilder_ != null) { + return secretsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(secrets_); + } + } + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + public google.events.cloud.build.v1.Data.Secret.Builder addSecretsBuilder() { + return getSecretsFieldBuilder().addBuilder( + google.events.cloud.build.v1.Data.Secret.getDefaultInstance()); + } + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + public google.events.cloud.build.v1.Data.Secret.Builder addSecretsBuilder( + int index) { + return getSecretsFieldBuilder().addBuilder( + index, google.events.cloud.build.v1.Data.Secret.getDefaultInstance()); + } + /** + *+ * Secrets to decrypt using Cloud Key Management Service. + *+ * + *repeated .google.events.cloud.build.v1.Secret secrets = 32;
+ */ + public java.util.List+ getSecretsBuilderList() { + return getSecretsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + google.events.cloud.build.v1.Data.Secret, google.events.cloud.build.v1.Data.Secret.Builder, google.events.cloud.build.v1.Data.SecretOrBuilder> + getSecretsFieldBuilder() { + if (secretsBuilder_ == null) { + secretsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + google.events.cloud.build.v1.Data.Secret, google.events.cloud.build.v1.Data.Secret.Builder, google.events.cloud.build.v1.Data.SecretOrBuilder>( + secrets_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + secrets_ = null; + } + return secretsBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, google.events.cloud.build.v1.Data.TimeSpan> timing_; + private com.google.protobuf.MapField + internalGetTiming() { + if (timing_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TimingDefaultEntryHolder.defaultEntry); + } + return timing_; + } + private com.google.protobuf.MapField + internalGetMutableTiming() { + onChanged();; + if (timing_ == null) { + timing_ = com.google.protobuf.MapField.newMapField( + TimingDefaultEntryHolder.defaultEntry); + } + if (!timing_.isMutable()) { + timing_ = timing_.copy(); + } + return timing_; + } + + public int getTimingCount() { + return internalGetTiming().getMap().size(); + } + /** + * + * Stores timing information for phases of the build. Valid keys + * are: + * * BUILD: time to execute all build steps + * * PUSH: time to push all specified images. + * * FETCHSOURCE: time to fetch source. + * If the build does not specify source or images, + * these keys will not be included. + *+ * + *map<string, .google.events.cloud.build.v1.TimeSpan> timing = 33;
+ */ + + @java.lang.Override + public boolean containsTiming( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetTiming().getMap().containsKey(key); + } + /** + * Use {@link #getTimingMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.MapgetTiming() { + return getTimingMap(); + } + /** + * + * Stores timing information for phases of the build. Valid keys + * are: + * * BUILD: time to execute all build steps + * * PUSH: time to push all specified images. + * * FETCHSOURCE: time to fetch source. + * If the build does not specify source or images, + * these keys will not be included. + *+ * + *map<string, .google.events.cloud.build.v1.TimeSpan> timing = 33;
+ */ + @java.lang.Override + + public java.util.MapgetTimingMap() { + return internalGetTiming().getMap(); + } + /** + * + * Stores timing information for phases of the build. Valid keys + * are: + * * BUILD: time to execute all build steps + * * PUSH: time to push all specified images. + * * FETCHSOURCE: time to fetch source. + * If the build does not specify source or images, + * these keys will not be included. + *+ * + *map<string, .google.events.cloud.build.v1.TimeSpan> timing = 33;
+ */ + @java.lang.Override + + public google.events.cloud.build.v1.Data.TimeSpan getTimingOrDefault( + java.lang.String key, + google.events.cloud.build.v1.Data.TimeSpan defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Mapmap = + internalGetTiming().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * Stores timing information for phases of the build. Valid keys + * are: + * * BUILD: time to execute all build steps + * * PUSH: time to push all specified images. + * * FETCHSOURCE: time to fetch source. + * If the build does not specify source or images, + * these keys will not be included. + *+ * + *map<string, .google.events.cloud.build.v1.TimeSpan> timing = 33;
+ */ + @java.lang.Override + + public google.events.cloud.build.v1.Data.TimeSpan getTimingOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Mapmap = + internalGetTiming().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTiming() { + internalGetMutableTiming().getMutableMap() + .clear(); + return this; + } + /** + * + * Stores timing information for phases of the build. Valid keys + * are: + * * BUILD: time to execute all build steps + * * PUSH: time to push all specified images. + * * FETCHSOURCE: time to fetch source. + * If the build does not specify source or images, + * these keys will not be included. + *+ * + *map<string, .google.events.cloud.build.v1.TimeSpan> timing = 33;
+ */ + + public Builder removeTiming( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableTiming().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map+ getMutableTiming() { + return internalGetMutableTiming().getMutableMap(); + } + /** + * + * Stores timing information for phases of the build. Valid keys + * are: + * * BUILD: time to execute all build steps + * * PUSH: time to push all specified images. + * * FETCHSOURCE: time to fetch source. + * If the build does not specify source or images, + * these keys will not be included. + *+ * + *map<string, .google.events.cloud.build.v1.TimeSpan> timing = 33;
+ */ + public Builder putTiming( + java.lang.String key, + google.events.cloud.build.v1.Data.TimeSpan value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableTiming().getMutableMap() + .put(key, value); + return this; + } + /** + *+ * Stores timing information for phases of the build. Valid keys + * are: + * * BUILD: time to execute all build steps + * * PUSH: time to push all specified images. + * * FETCHSOURCE: time to fetch source. + * If the build does not specify source or images, + * these keys will not be included. + *+ * + *map<string, .google.events.cloud.build.v1.TimeSpan> timing = 33;
+ */ + + public Builder putAllTiming( + java.util.Mapvalues) { + internalGetMutableTiming().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.events.cloud.build.v1.BuildEventData) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.build.v1.BuildEventData) + private static final google.events.cloud.build.v1.Data.BuildEventData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.build.v1.Data.BuildEventData(); + } + + public static google.events.cloud.build.v1.Data.BuildEventData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser () { + @java.lang.Override + public BuildEventData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BuildEventData(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public google.events.cloud.build.v1.Data.BuildEventData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.events.cloud.build.v1.Source) + com.google.protobuf.MessageOrBuilder { + + /** + * + * If provided, get the source from this location in Google Cloud Storage. + *+ * + *.google.events.cloud.build.v1.StorageSource storage_source = 2;
+ * @return Whether the storageSource field is set. + */ + boolean hasStorageSource(); + /** + *+ * If provided, get the source from this location in Google Cloud Storage. + *+ * + *.google.events.cloud.build.v1.StorageSource storage_source = 2;
+ * @return The storageSource. + */ + google.events.cloud.build.v1.Data.StorageSource getStorageSource(); + /** + *+ * If provided, get the source from this location in Google Cloud Storage. + *+ * + *.google.events.cloud.build.v1.StorageSource storage_source = 2;
+ */ + google.events.cloud.build.v1.Data.StorageSourceOrBuilder getStorageSourceOrBuilder(); + + /** + *+ * If provided, get the source from this location in a Cloud Source + * Repository. + *+ * + *.google.events.cloud.build.v1.RepoSource repo_source = 3;
+ * @return Whether the repoSource field is set. + */ + boolean hasRepoSource(); + /** + *+ * If provided, get the source from this location in a Cloud Source + * Repository. + *+ * + *.google.events.cloud.build.v1.RepoSource repo_source = 3;
+ * @return The repoSource. + */ + google.events.cloud.build.v1.Data.RepoSource getRepoSource(); + /** + *+ * If provided, get the source from this location in a Cloud Source + * Repository. + *+ * + *.google.events.cloud.build.v1.RepoSource repo_source = 3;
+ */ + google.events.cloud.build.v1.Data.RepoSourceOrBuilder getRepoSourceOrBuilder(); + + public google.events.cloud.build.v1.Data.Source.SourceCase getSourceCase(); + } + /** + * Protobuf type {@code google.events.cloud.build.v1.Source} + */ + public static final class Source extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.events.cloud.build.v1.Source) + SourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Source.newBuilder() to construct. + private Source(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private Source() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Source(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Source( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + google.events.cloud.build.v1.Data.StorageSource.Builder subBuilder = null; + if (sourceCase_ == 2) { + subBuilder = ((google.events.cloud.build.v1.Data.StorageSource) source_).toBuilder(); + } + source_ = + input.readMessage(google.events.cloud.build.v1.Data.StorageSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((google.events.cloud.build.v1.Data.StorageSource) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 2; + break; + } + case 26: { + google.events.cloud.build.v1.Data.RepoSource.Builder subBuilder = null; + if (sourceCase_ == 3) { + subBuilder = ((google.events.cloud.build.v1.Data.RepoSource) source_).toBuilder(); + } + source_ = + input.readMessage(google.events.cloud.build.v1.Data.RepoSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((google.events.cloud.build.v1.Data.RepoSource) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 3; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.build.v1.Data.internal_static_google_events_cloud_build_v1_Source_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.build.v1.Data.internal_static_google_events_cloud_build_v1_Source_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.build.v1.Data.Source.class, google.events.cloud.build.v1.Data.Source.Builder.class); + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + public enum SourceCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STORAGE_SOURCE(2), + REPO_SOURCE(3), + SOURCE_NOT_SET(0); + private final int value; + private SourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 2: return STORAGE_SOURCE; + case 3: return REPO_SOURCE; + case 0: return SOURCE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public SourceCase + getSourceCase() { + return SourceCase.forNumber( + sourceCase_); + } + + public static final int STORAGE_SOURCE_FIELD_NUMBER = 2; + /** + *+ * If provided, get the source from this location in Google Cloud Storage. + *+ * + *.google.events.cloud.build.v1.StorageSource storage_source = 2;
+ * @return Whether the storageSource field is set. + */ + @java.lang.Override + public boolean hasStorageSource() { + return sourceCase_ == 2; + } + /** + *+ * If provided, get the source from this location in Google Cloud Storage. + *+ * + *.google.events.cloud.build.v1.StorageSource storage_source = 2;
+ * @return The storageSource. + */ + @java.lang.Override + public google.events.cloud.build.v1.Data.StorageSource getStorageSource() { + if (sourceCase_ == 2) { + return (google.events.cloud.build.v1.Data.StorageSource) source_; + } + return google.events.cloud.build.v1.Data.StorageSource.getDefaultInstance(); + } + /** + *+ * If provided, get the source from this location in Google Cloud Storage. + *+ * + *.google.events.cloud.build.v1.StorageSource storage_source = 2;
+ */ + @java.lang.Override + public google.events.cloud.build.v1.Data.StorageSourceOrBuilder getStorageSourceOrBuilder() { + if (sourceCase_ == 2) { + return (google.events.cloud.build.v1.Data.StorageSource) source_; + } + return google.events.cloud.build.v1.Data.StorageSource.getDefaultInstance(); + } + + public static final int REPO_SOURCE_FIELD_NUMBER = 3; + /** + *+ * If provided, get the source from this location in a Cloud Source + * Repository. + *+ * + *.google.events.cloud.build.v1.RepoSource repo_source = 3;
+ * @return Whether the repoSource field is set. + */ + @java.lang.Override + public boolean hasRepoSource() { + return sourceCase_ == 3; + } + /** + *+ * If provided, get the source from this location in a Cloud Source + * Repository. + *+ * + *.google.events.cloud.build.v1.RepoSource repo_source = 3;
+ * @return The repoSource. + */ + @java.lang.Override + public google.events.cloud.build.v1.Data.RepoSource getRepoSource() { + if (sourceCase_ == 3) { + return (google.events.cloud.build.v1.Data.RepoSource) source_; + } + return google.events.cloud.build.v1.Data.RepoSource.getDefaultInstance(); + } + /** + *+ * If provided, get the source from this location in a Cloud Source + * Repository. + *+ * + *.google.events.cloud.build.v1.RepoSource repo_source = 3;
+ */ + @java.lang.Override + public google.events.cloud.build.v1.Data.RepoSourceOrBuilder getRepoSourceOrBuilder() { + if (sourceCase_ == 3) { + return (google.events.cloud.build.v1.Data.RepoSource) source_; + } + return google.events.cloud.build.v1.Data.RepoSource.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (sourceCase_ == 2) { + output.writeMessage(2, (google.events.cloud.build.v1.Data.StorageSource) source_); + } + if (sourceCase_ == 3) { + output.writeMessage(3, (google.events.cloud.build.v1.Data.RepoSource) source_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (google.events.cloud.build.v1.Data.StorageSource) source_); + } + if (sourceCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (google.events.cloud.build.v1.Data.RepoSource) source_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof google.events.cloud.build.v1.Data.Source)) { + return super.equals(obj); + } + google.events.cloud.build.v1.Data.Source other = (google.events.cloud.build.v1.Data.Source) obj; + + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 2: + if (!getStorageSource() + .equals(other.getStorageSource())) return false; + break; + case 3: + if (!getRepoSource() + .equals(other.getRepoSource())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (sourceCase_) { + case 2: + hash = (37 * hash) + STORAGE_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getStorageSource().hashCode(); + break; + case 3: + hash = (37 * hash) + REPO_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getRepoSource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static google.events.cloud.build.v1.Data.Source parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.build.v1.Data.Source parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.build.v1.Data.Source parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.build.v1.Data.Source parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.build.v1.Data.Source parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static google.events.cloud.build.v1.Data.Source parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static google.events.cloud.build.v1.Data.Source parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.build.v1.Data.Source parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static google.events.cloud.build.v1.Data.Source parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static google.events.cloud.build.v1.Data.Source parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static google.events.cloud.build.v1.Data.Source parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static google.events.cloud.build.v1.Data.Source parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(google.events.cloud.build.v1.Data.Source prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.events.cloud.build.v1.Source} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builderimplements + // @@protoc_insertion_point(builder_implements:google.events.cloud.build.v1.Source) + google.events.cloud.build.v1.Data.SourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return google.events.cloud.build.v1.Data.internal_static_google_events_cloud_build_v1_Source_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return google.events.cloud.build.v1.Data.internal_static_google_events_cloud_build_v1_Source_fieldAccessorTable + .ensureFieldAccessorsInitialized( + google.events.cloud.build.v1.Data.Source.class, google.events.cloud.build.v1.Data.Source.Builder.class); + } + + // Construct using google.events.cloud.build.v1.Data.Source.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return google.events.cloud.build.v1.Data.internal_static_google_events_cloud_build_v1_Source_descriptor; + } + + @java.lang.Override + public google.events.cloud.build.v1.Data.Source getDefaultInstanceForType() { + return google.events.cloud.build.v1.Data.Source.getDefaultInstance(); + } + + @java.lang.Override + public google.events.cloud.build.v1.Data.Source build() { + google.events.cloud.build.v1.Data.Source result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public google.events.cloud.build.v1.Data.Source buildPartial() { + google.events.cloud.build.v1.Data.Source result = new google.events.cloud.build.v1.Data.Source(this); + if (sourceCase_ == 2) { + if (storageSourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = storageSourceBuilder_.build(); + } + } + if (sourceCase_ == 3) { + if (repoSourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = repoSourceBuilder_.build(); + } + } + result.sourceCase_ = sourceCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof google.events.cloud.build.v1.Data.Source) { + return mergeFrom((google.events.cloud.build.v1.Data.Source)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(google.events.cloud.build.v1.Data.Source other) { + if (other == google.events.cloud.build.v1.Data.Source.getDefaultInstance()) return this; + switch (other.getSourceCase()) { + case STORAGE_SOURCE: { + mergeStorageSource(other.getStorageSource()); + break; + } + case REPO_SOURCE: { + mergeRepoSource(other.getRepoSource()); + break; + } + case SOURCE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + google.events.cloud.build.v1.Data.Source parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (google.events.cloud.build.v1.Data.Source) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int sourceCase_ = 0; + private java.lang.Object source_; + public SourceCase + getSourceCase() { + return SourceCase.forNumber( + sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.StorageSource, google.events.cloud.build.v1.Data.StorageSource.Builder, google.events.cloud.build.v1.Data.StorageSourceOrBuilder> storageSourceBuilder_; + /** + * + * If provided, get the source from this location in Google Cloud Storage. + *+ * + *.google.events.cloud.build.v1.StorageSource storage_source = 2;
+ * @return Whether the storageSource field is set. + */ + @java.lang.Override + public boolean hasStorageSource() { + return sourceCase_ == 2; + } + /** + *+ * If provided, get the source from this location in Google Cloud Storage. + *+ * + *.google.events.cloud.build.v1.StorageSource storage_source = 2;
+ * @return The storageSource. + */ + @java.lang.Override + public google.events.cloud.build.v1.Data.StorageSource getStorageSource() { + if (storageSourceBuilder_ == null) { + if (sourceCase_ == 2) { + return (google.events.cloud.build.v1.Data.StorageSource) source_; + } + return google.events.cloud.build.v1.Data.StorageSource.getDefaultInstance(); + } else { + if (sourceCase_ == 2) { + return storageSourceBuilder_.getMessage(); + } + return google.events.cloud.build.v1.Data.StorageSource.getDefaultInstance(); + } + } + /** + *+ * If provided, get the source from this location in Google Cloud Storage. + *+ * + *.google.events.cloud.build.v1.StorageSource storage_source = 2;
+ */ + public Builder setStorageSource(google.events.cloud.build.v1.Data.StorageSource value) { + if (storageSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + storageSourceBuilder_.setMessage(value); + } + sourceCase_ = 2; + return this; + } + /** + *+ * If provided, get the source from this location in Google Cloud Storage. + *+ * + *.google.events.cloud.build.v1.StorageSource storage_source = 2;
+ */ + public Builder setStorageSource( + google.events.cloud.build.v1.Data.StorageSource.Builder builderForValue) { + if (storageSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + storageSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 2; + return this; + } + /** + *+ * If provided, get the source from this location in Google Cloud Storage. + *+ * + *.google.events.cloud.build.v1.StorageSource storage_source = 2;
+ */ + public Builder mergeStorageSource(google.events.cloud.build.v1.Data.StorageSource value) { + if (storageSourceBuilder_ == null) { + if (sourceCase_ == 2 && + source_ != google.events.cloud.build.v1.Data.StorageSource.getDefaultInstance()) { + source_ = google.events.cloud.build.v1.Data.StorageSource.newBuilder((google.events.cloud.build.v1.Data.StorageSource) source_) + .mergeFrom(value).buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 2) { + storageSourceBuilder_.mergeFrom(value); + } + storageSourceBuilder_.setMessage(value); + } + sourceCase_ = 2; + return this; + } + /** + *+ * If provided, get the source from this location in Google Cloud Storage. + *+ * + *.google.events.cloud.build.v1.StorageSource storage_source = 2;
+ */ + public Builder clearStorageSource() { + if (storageSourceBuilder_ == null) { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + } + storageSourceBuilder_.clear(); + } + return this; + } + /** + *+ * If provided, get the source from this location in Google Cloud Storage. + *+ * + *.google.events.cloud.build.v1.StorageSource storage_source = 2;
+ */ + public google.events.cloud.build.v1.Data.StorageSource.Builder getStorageSourceBuilder() { + return getStorageSourceFieldBuilder().getBuilder(); + } + /** + *+ * If provided, get the source from this location in Google Cloud Storage. + *+ * + *.google.events.cloud.build.v1.StorageSource storage_source = 2;
+ */ + @java.lang.Override + public google.events.cloud.build.v1.Data.StorageSourceOrBuilder getStorageSourceOrBuilder() { + if ((sourceCase_ == 2) && (storageSourceBuilder_ != null)) { + return storageSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 2) { + return (google.events.cloud.build.v1.Data.StorageSource) source_; + } + return google.events.cloud.build.v1.Data.StorageSource.getDefaultInstance(); + } + } + /** + *+ * If provided, get the source from this location in Google Cloud Storage. + *+ * + *.google.events.cloud.build.v1.StorageSource storage_source = 2;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.StorageSource, google.events.cloud.build.v1.Data.StorageSource.Builder, google.events.cloud.build.v1.Data.StorageSourceOrBuilder> + getStorageSourceFieldBuilder() { + if (storageSourceBuilder_ == null) { + if (!(sourceCase_ == 2)) { + source_ = google.events.cloud.build.v1.Data.StorageSource.getDefaultInstance(); + } + storageSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.StorageSource, google.events.cloud.build.v1.Data.StorageSource.Builder, google.events.cloud.build.v1.Data.StorageSourceOrBuilder>( + (google.events.cloud.build.v1.Data.StorageSource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 2; + onChanged();; + return storageSourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.RepoSource, google.events.cloud.build.v1.Data.RepoSource.Builder, google.events.cloud.build.v1.Data.RepoSourceOrBuilder> repoSourceBuilder_; + /** + *+ * If provided, get the source from this location in a Cloud Source + * Repository. + *+ * + *.google.events.cloud.build.v1.RepoSource repo_source = 3;
+ * @return Whether the repoSource field is set. + */ + @java.lang.Override + public boolean hasRepoSource() { + return sourceCase_ == 3; + } + /** + *+ * If provided, get the source from this location in a Cloud Source + * Repository. + *+ * + *.google.events.cloud.build.v1.RepoSource repo_source = 3;
+ * @return The repoSource. + */ + @java.lang.Override + public google.events.cloud.build.v1.Data.RepoSource getRepoSource() { + if (repoSourceBuilder_ == null) { + if (sourceCase_ == 3) { + return (google.events.cloud.build.v1.Data.RepoSource) source_; + } + return google.events.cloud.build.v1.Data.RepoSource.getDefaultInstance(); + } else { + if (sourceCase_ == 3) { + return repoSourceBuilder_.getMessage(); + } + return google.events.cloud.build.v1.Data.RepoSource.getDefaultInstance(); + } + } + /** + *+ * If provided, get the source from this location in a Cloud Source + * Repository. + *+ * + *.google.events.cloud.build.v1.RepoSource repo_source = 3;
+ */ + public Builder setRepoSource(google.events.cloud.build.v1.Data.RepoSource value) { + if (repoSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + repoSourceBuilder_.setMessage(value); + } + sourceCase_ = 3; + return this; + } + /** + *+ * If provided, get the source from this location in a Cloud Source + * Repository. + *+ * + *.google.events.cloud.build.v1.RepoSource repo_source = 3;
+ */ + public Builder setRepoSource( + google.events.cloud.build.v1.Data.RepoSource.Builder builderForValue) { + if (repoSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + repoSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 3; + return this; + } + /** + *+ * If provided, get the source from this location in a Cloud Source + * Repository. + *+ * + *.google.events.cloud.build.v1.RepoSource repo_source = 3;
+ */ + public Builder mergeRepoSource(google.events.cloud.build.v1.Data.RepoSource value) { + if (repoSourceBuilder_ == null) { + if (sourceCase_ == 3 && + source_ != google.events.cloud.build.v1.Data.RepoSource.getDefaultInstance()) { + source_ = google.events.cloud.build.v1.Data.RepoSource.newBuilder((google.events.cloud.build.v1.Data.RepoSource) source_) + .mergeFrom(value).buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 3) { + repoSourceBuilder_.mergeFrom(value); + } + repoSourceBuilder_.setMessage(value); + } + sourceCase_ = 3; + return this; + } + /** + *+ * If provided, get the source from this location in a Cloud Source + * Repository. + *+ * + *.google.events.cloud.build.v1.RepoSource repo_source = 3;
+ */ + public Builder clearRepoSource() { + if (repoSourceBuilder_ == null) { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + } + repoSourceBuilder_.clear(); + } + return this; + } + /** + *+ * If provided, get the source from this location in a Cloud Source + * Repository. + *+ * + *.google.events.cloud.build.v1.RepoSource repo_source = 3;
+ */ + public google.events.cloud.build.v1.Data.RepoSource.Builder getRepoSourceBuilder() { + return getRepoSourceFieldBuilder().getBuilder(); + } + /** + *+ * If provided, get the source from this location in a Cloud Source + * Repository. + *+ * + *.google.events.cloud.build.v1.RepoSource repo_source = 3;
+ */ + @java.lang.Override + public google.events.cloud.build.v1.Data.RepoSourceOrBuilder getRepoSourceOrBuilder() { + if ((sourceCase_ == 3) && (repoSourceBuilder_ != null)) { + return repoSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 3) { + return (google.events.cloud.build.v1.Data.RepoSource) source_; + } + return google.events.cloud.build.v1.Data.RepoSource.getDefaultInstance(); + } + } + /** + *+ * If provided, get the source from this location in a Cloud Source + * Repository. + *+ * + *.google.events.cloud.build.v1.RepoSource repo_source = 3;
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.RepoSource, google.events.cloud.build.v1.Data.RepoSource.Builder, google.events.cloud.build.v1.Data.RepoSourceOrBuilder> + getRepoSourceFieldBuilder() { + if (repoSourceBuilder_ == null) { + if (!(sourceCase_ == 3)) { + source_ = google.events.cloud.build.v1.Data.RepoSource.getDefaultInstance(); + } + repoSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + google.events.cloud.build.v1.Data.RepoSource, google.events.cloud.build.v1.Data.RepoSource.Builder, google.events.cloud.build.v1.Data.RepoSourceOrBuilder>( + (google.events.cloud.build.v1.Data.RepoSource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 3; + onChanged();; + return repoSourceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.events.cloud.build.v1.Source) + } + + // @@protoc_insertion_point(class_scope:google.events.cloud.build.v1.Source) + private static final google.events.cloud.build.v1.Data.Source DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new google.events.cloud.build.v1.Data.Source(); + } + + public static google.events.cloud.build.v1.Data.Source getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser