The main reason to use this endpoint is as a policy admin to debug access issues for a - * resource. - * - *
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (PoliciesClient policiesClient = PoliciesClient.create()) { - * String attachmentPoint = "attachmentPoint-686994899"; - * for (Policy element : policiesClient.listApplicablePolicies(attachmentPoint).iterateAll()) { - * // doThingsWith(element); - * } - * } - * }- * - * @param attachmentPoint Required. The Cloud resource at which the applicable policies are to be - * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource name, which means - * that the forward-slash character, `/`, must be written as `%2F`. For example, - * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListApplicablePoliciesPagedResponse listApplicablePolicies(String attachmentPoint) { - ListApplicablePoliciesRequest request = - ListApplicablePoliciesRequest.newBuilder().setAttachmentPoint(attachmentPoint).build(); - return listApplicablePolicies(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves all the policies that are attached to the specified resource, or anywhere in the - * ancestry of the resource. For example, for a project this endpoint would return all the - * `denyPolicy` kind policies attached to the project, its parent folder (if any), and its parent - * organization (if any). The endpoint requires the same permissions that it would take to call - * `ListPolicies` or `GetPolicy`. - * - *
The main reason to use this endpoint is as a policy admin to debug access issues for a - * resource. - * - *
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (PoliciesClient policiesClient = PoliciesClient.create()) { - * ListApplicablePoliciesRequest request = - * ListApplicablePoliciesRequest.newBuilder() - * .setAttachmentPoint("attachmentPoint-686994899") - * .setFilter("filter-1274492040") - * .setPageToken("pageToken873572522") - * .setPageSize(883849137) - * .build(); - * for (Policy element : policiesClient.listApplicablePolicies(request).iterateAll()) { - * // doThingsWith(element); - * } - * } - * }- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListApplicablePoliciesPagedResponse listApplicablePolicies( - ListApplicablePoliciesRequest request) { - return listApplicablePoliciesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves all the policies that are attached to the specified resource, or anywhere in the - * ancestry of the resource. For example, for a project this endpoint would return all the - * `denyPolicy` kind policies attached to the project, its parent folder (if any), and its parent - * organization (if any). The endpoint requires the same permissions that it would take to call - * `ListPolicies` or `GetPolicy`. - * - *
The main reason to use this endpoint is as a policy admin to debug access issues for a - * resource. - * - *
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (PoliciesClient policiesClient = PoliciesClient.create()) { - * ListApplicablePoliciesRequest request = - * ListApplicablePoliciesRequest.newBuilder() - * .setAttachmentPoint("attachmentPoint-686994899") - * .setFilter("filter-1274492040") - * .setPageToken("pageToken873572522") - * .setPageSize(883849137) - * .build(); - * ApiFuture- */ - public final UnaryCallablefuture = - * policiesClient.listApplicablePoliciesPagedCallable().futureCall(request); - * // Do something. - * for (Policy element : future.get().iterateAll()) { - * // doThingsWith(element); - * } - * } - * }
The main reason to use this endpoint is as a policy admin to debug access issues for a - * resource. - * - *
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (PoliciesClient policiesClient = PoliciesClient.create()) { - * ListApplicablePoliciesRequest request = - * ListApplicablePoliciesRequest.newBuilder() - * .setAttachmentPoint("attachmentPoint-686994899") - * .setFilter("filter-1274492040") - * .setPageToken("pageToken873572522") - * .setPageSize(883849137) - * .build(); - * while (true) { - * ListApplicablePoliciesResponse response = - * policiesClient.listApplicablePoliciesCallable().call(request); - * for (Policy element : response.getPoliciesList()) { - * // doThingsWith(element); - * } - * String nextPageToken = response.getNextPageToken(); - * if (!Strings.isNullOrEmpty(nextPageToken)) { - * request = request.toBuilder().setPageToken(nextPageToken).build(); - * } else { - * break; - * } - * } - * } - * }- */ - public final UnaryCallable
- * Retrieves all the policies that are attached to the specified resource, - * or anywhere in the ancestry of the resource. For example, for a project - * this endpoint would return all the `denyPolicy` kind policies attached to - * the project, its parent folder (if any), and its parent organization (if - * any). - * The endpoint requires the same permissions that it would take to call - * `ListPolicies` or `GetPolicy`. - * The main reason to use this endpoint is as a policy admin to debug access - * issues for a resource. - *- */ - public void listApplicablePolicies( - com.google.iam.v2.ListApplicablePoliciesRequest request, - io.grpc.stub.StreamObserver
- * Retrieves all the policies that are attached to the specified resource, - * or anywhere in the ancestry of the resource. For example, for a project - * this endpoint would return all the `denyPolicy` kind policies attached to - * the project, its parent folder (if any), and its parent organization (if - * any). - * The endpoint requires the same permissions that it would take to call - * `ListPolicies` or `GetPolicy`. - * The main reason to use this endpoint is as a policy admin to debug access - * issues for a resource. - *- */ - public void listApplicablePolicies( - com.google.iam.v2.ListApplicablePoliciesRequest request, - io.grpc.stub.StreamObserver
- * Retrieves all the policies that are attached to the specified resource, - * or anywhere in the ancestry of the resource. For example, for a project - * this endpoint would return all the `denyPolicy` kind policies attached to - * the project, its parent folder (if any), and its parent organization (if - * any). - * The endpoint requires the same permissions that it would take to call - * `ListPolicies` or `GetPolicy`. - * The main reason to use this endpoint is as a policy admin to debug access - * issues for a resource. - *- */ - public com.google.iam.v2.ListApplicablePoliciesResponse listApplicablePolicies( - com.google.iam.v2.ListApplicablePoliciesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListApplicablePoliciesMethod(), getCallOptions(), request); - } } /** @@ -789,8 +662,7 @@ public com.google.common.util.concurrent.ListenableFuture
- * Required. The resource that the policy is attached to, along with the kind - * of policy to create. Format: `policies/{attachment_point}/denypolicies` + * Required. The resource that the policy is attached to, along with the kind of policy + * to create. Format: `policies/{attachment_point}/denypolicies` * The attachment point is identified by its URL-encoded full resource name, * which means that the forward-slash character, `/`, must be written as * `%2F`. For example, @@ -171,8 +104,8 @@ public java.lang.String getParent() { * * *- * Required. The resource that the policy is attached to, along with the kind - * of policy to create. Format: `policies/{attachment_point}/denypolicies` + * Required. The resource that the policy is attached to, along with the kind of policy + * to create. Format: `policies/{attachment_point}/denypolicies` * The attachment point is identified by its URL-encoded full resource name, * which means that the forward-slash character, `/`, must be written as * `%2F`. For example, @@ -322,7 +255,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, policyId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -340,7 +273,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, policyId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -361,7 +294,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPolicy().equals(other.getPolicy())) return false; } if (!getPolicyId().equals(other.getPolicyId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -380,7 +313,7 @@ public int hashCode() { } hash = (37 * hash) + POLICY_ID_FIELD_NUMBER; hash = (53 * hash) + getPolicyId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -508,17 +441,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2.CreatePolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -628,7 +554,7 @@ public Builder mergeFrom(com.google.iam.v2.CreatePolicyRequest other) { policyId_ = other.policyId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -643,17 +569,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2.CreatePolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + policyId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2.CreatePolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -662,8 +620,8 @@ public Builder mergeFrom( * * *- * Required. The resource that the policy is attached to, along with the kind - * of policy to create. Format: `policies/{attachment_point}/denypolicies` + * Required. The resource that the policy is attached to, along with the kind of policy + * to create. Format: `policies/{attachment_point}/denypolicies` * The attachment point is identified by its URL-encoded full resource name, * which means that the forward-slash character, `/`, must be written as * `%2F`. For example, @@ -691,8 +649,8 @@ public java.lang.String getParent() { * * *- * Required. The resource that the policy is attached to, along with the kind - * of policy to create. Format: `policies/{attachment_point}/denypolicies` + * Required. The resource that the policy is attached to, along with the kind of policy + * to create. Format: `policies/{attachment_point}/denypolicies` * The attachment point is identified by its URL-encoded full resource name, * which means that the forward-slash character, `/`, must be written as * `%2F`. For example, @@ -720,8 +678,8 @@ public com.google.protobuf.ByteString getParentBytes() { * * *- * Required. The resource that the policy is attached to, along with the kind - * of policy to create. Format: `policies/{attachment_point}/denypolicies` + * Required. The resource that the policy is attached to, along with the kind of policy + * to create. Format: `policies/{attachment_point}/denypolicies` * The attachment point is identified by its URL-encoded full resource name, * which means that the forward-slash character, `/`, must be written as * `%2F`. For example, @@ -748,8 +706,8 @@ public Builder setParent(java.lang.String value) { * * *- * Required. The resource that the policy is attached to, along with the kind - * of policy to create. Format: `policies/{attachment_point}/denypolicies` + * Required. The resource that the policy is attached to, along with the kind of policy + * to create. Format: `policies/{attachment_point}/denypolicies` * The attachment point is identified by its URL-encoded full resource name, * which means that the forward-slash character, `/`, must be written as * `%2F`. For example, @@ -772,8 +730,8 @@ public Builder clearParent() { * * *- * Required. The resource that the policy is attached to, along with the kind - * of policy to create. Format: `policies/{attachment_point}/denypolicies` + * Required. The resource that the policy is attached to, along with the kind of policy + * to create. Format: `policies/{attachment_point}/denypolicies` * The attachment point is identified by its URL-encoded full resource name, * which means that the forward-slash character, `/`, must be written as * `%2F`. For example, @@ -1128,7 +1086,18 @@ public CreatePolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreatePolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequestOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequestOrBuilder.java index 35cbef4d..3825ae18 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequestOrBuilder.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequestOrBuilder.java @@ -27,8 +27,8 @@ public interface CreatePolicyRequestOrBuilder * * *- * Required. The resource that the policy is attached to, along with the kind - * of policy to create. Format: `policies/{attachment_point}/denypolicies` + * Required. The resource that the policy is attached to, along with the kind of policy + * to create. Format: `policies/{attachment_point}/denypolicies` * The attachment point is identified by its URL-encoded full resource name, * which means that the forward-slash character, `/`, must be written as * `%2F`. For example, @@ -46,8 +46,8 @@ public interface CreatePolicyRequestOrBuilder * * *- * Required. The resource that the policy is attached to, along with the kind - * of policy to create. Format: `policies/{attachment_point}/denypolicies` + * Required. The resource that the policy is attached to, along with the kind of policy + * to create. Format: `policies/{attachment_point}/denypolicies` * The attachment point is identified by its URL-encoded full resource name, * which means that the forward-slash character, `/`, must be written as * `%2F`. For example, diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequest.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequest.java index 44d2147b..3900d3dc 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequest.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeletePolicyRequest( - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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 com.google.iam.v2.PolicyProto .internal_static_google_iam_v2_DeletePolicyRequest_descriptor; @@ -188,9 +135,9 @@ public com.google.protobuf.ByteString getNameBytes() { * * *- * Optional. The expected `etag` of the policy to delete. If the value does - * not match the value that is stored in IAM, the request fails with a `409` - * error code and `ABORTED` status. + * Optional. The expected `etag` of the policy to delete. If the value does not match + * the value that is stored in IAM, the request fails with a `409` error code + * and `ABORTED` status. * If you omit this field, the policy is deleted regardless of its current * `etag`. *@@ -215,9 +162,9 @@ public java.lang.String getEtag() { * * *- * Optional. The expected `etag` of the policy to delete. If the value does - * not match the value that is stored in IAM, the request fails with a `409` - * error code and `ABORTED` status. + * Optional. The expected `etag` of the policy to delete. If the value does not match + * the value that is stored in IAM, the request fails with a `409` error code + * and `ABORTED` status. * If you omit this field, the policy is deleted regardless of its current * `etag`. *@@ -259,7 +206,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -274,7 +221,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -291,7 +238,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getEtag().equals(other.getEtag())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -306,7 +253,7 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -434,17 +381,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2.DeletePolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -540,7 +480,7 @@ public Builder mergeFrom(com.google.iam.v2.DeletePolicyRequest other) { etag_ = other.etag_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -555,17 +495,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2.DeletePolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2.DeletePolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -710,9 +676,9 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *- * Optional. The expected `etag` of the policy to delete. If the value does - * not match the value that is stored in IAM, the request fails with a `409` - * error code and `ABORTED` status. + * Optional. The expected `etag` of the policy to delete. If the value does not match + * the value that is stored in IAM, the request fails with a `409` error code + * and `ABORTED` status. * If you omit this field, the policy is deleted regardless of its current * `etag`. *@@ -736,9 +702,9 @@ public java.lang.String getEtag() { * * *- * Optional. The expected `etag` of the policy to delete. If the value does - * not match the value that is stored in IAM, the request fails with a `409` - * error code and `ABORTED` status. + * Optional. The expected `etag` of the policy to delete. If the value does not match + * the value that is stored in IAM, the request fails with a `409` error code + * and `ABORTED` status. * If you omit this field, the policy is deleted regardless of its current * `etag`. *@@ -762,9 +728,9 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *- * Optional. The expected `etag` of the policy to delete. If the value does - * not match the value that is stored in IAM, the request fails with a `409` - * error code and `ABORTED` status. + * Optional. The expected `etag` of the policy to delete. If the value does not match + * the value that is stored in IAM, the request fails with a `409` error code + * and `ABORTED` status. * If you omit this field, the policy is deleted regardless of its current * `etag`. *@@ -787,9 +753,9 @@ public Builder setEtag(java.lang.String value) { * * *- * Optional. The expected `etag` of the policy to delete. If the value does - * not match the value that is stored in IAM, the request fails with a `409` - * error code and `ABORTED` status. + * Optional. The expected `etag` of the policy to delete. If the value does not match + * the value that is stored in IAM, the request fails with a `409` error code + * and `ABORTED` status. * If you omit this field, the policy is deleted regardless of its current * `etag`. *@@ -808,9 +774,9 @@ public Builder clearEtag() { * * *- * Optional. The expected `etag` of the policy to delete. If the value does - * not match the value that is stored in IAM, the request fails with a `409` - * error code and `ABORTED` status. + * Optional. The expected `etag` of the policy to delete. If the value does not match + * the value that is stored in IAM, the request fails with a `409` error code + * and `ABORTED` status. * If you omit this field, the policy is deleted regardless of its current * `etag`. *@@ -863,7 +829,18 @@ public DeletePolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeletePolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequestOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequestOrBuilder.java index a0d077f2..9bdd7fc3 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequestOrBuilder.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequestOrBuilder.java @@ -64,9 +64,9 @@ public interface DeletePolicyRequestOrBuilder * * *- * Optional. The expected `etag` of the policy to delete. If the value does - * not match the value that is stored in IAM, the request fails with a `409` - * error code and `ABORTED` status. + * Optional. The expected `etag` of the policy to delete. If the value does not match + * the value that is stored in IAM, the request fails with a `409` error code + * and `ABORTED` status. * If you omit this field, the policy is deleted regardless of its current * `etag`. *@@ -80,9 +80,9 @@ public interface DeletePolicyRequestOrBuilder * * *- * Optional. The expected `etag` of the policy to delete. If the value does - * not match the value that is stored in IAM, the request fails with a `409` - * error code and `ABORTED` status. + * Optional. The expected `etag` of the policy to delete. If the value does not match + * the value that is stored in IAM, the request fails with a `409` error code + * and `ABORTED` status. * If you omit this field, the policy is deleted regardless of its current * `etag`. *diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRule.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRule.java index 61475584..f3bc03f5 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRule.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRule.java @@ -55,113 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DenyRule( - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - deniedPrincipals_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - deniedPrincipals_.add(s); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - exceptionPrincipals_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - exceptionPrincipals_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - deniedPermissions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - deniedPermissions_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - exceptionPermissions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - exceptionPermissions_.add(s); - break; - } - case 42: - { - com.google.type.Expr.Builder subBuilder = null; - if (denialCondition_ != null) { - subBuilder = denialCondition_.toBuilder(); - } - denialCondition_ = - input.readMessage(com.google.type.Expr.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(denialCondition_); - denialCondition_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - deniedPrincipals_ = deniedPrincipals_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - exceptionPrincipals_ = exceptionPrincipals_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - deniedPermissions_ = deniedPermissions_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - exceptionPermissions_ = exceptionPermissions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v2.DenyRuleProto.internal_static_google_iam_v2_DenyRule_descriptor; } @@ -698,7 +591,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (denialCondition_ != null) { output.writeMessage(5, getDenialCondition()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -742,7 +635,7 @@ public int getSerializedSize() { if (denialCondition_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDenialCondition()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -765,7 +658,7 @@ public boolean equals(final java.lang.Object obj) { if (hasDenialCondition()) { if (!getDenialCondition().equals(other.getDenialCondition())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -796,7 +689,7 @@ public int hashCode() { hash = (37 * hash) + DENIAL_CONDITION_FIELD_NUMBER; hash = (53 * hash) + getDenialCondition().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -922,17 +815,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2.DenyRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1095,7 +981,7 @@ public Builder mergeFrom(com.google.iam.v2.DenyRule other) { if (other.hasDenialCondition()) { mergeDenialCondition(other.getDenialCondition()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1110,17 +996,65 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2.DenyRule parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDeniedPrincipalsIsMutable(); + deniedPrincipals_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExceptionPrincipalsIsMutable(); + exceptionPrincipals_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDeniedPermissionsIsMutable(); + deniedPermissions_.add(s); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExceptionPermissionsIsMutable(); + exceptionPermissions_.add(s); + break; + } // case 34 + case 42: + { + input.readMessage(getDenialConditionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2.DenyRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2484,7 +2418,18 @@ public DenyRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DenyRule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/GetPolicyRequest.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/GetPolicyRequest.java index 89594074..e3888a12 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/GetPolicyRequest.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/GetPolicyRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetPolicyRequest( - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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 com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_GetPolicyRequest_descriptor; } @@ -190,7 +144,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -202,7 +156,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -218,7 +172,7 @@ public boolean equals(final java.lang.Object obj) { com.google.iam.v2.GetPolicyRequest other = (com.google.iam.v2.GetPolicyRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -231,7 +185,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -359,17 +313,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2.GetPolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -457,7 +404,7 @@ public Builder mergeFrom(com.google.iam.v2.GetPolicyRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -472,17 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2.GetPolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2.GetPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -654,7 +621,18 @@ public GetPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetPolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesRequest.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesRequest.java deleted file mode 100644 index fad84f5d..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesRequest.java +++ /dev/null @@ -1,1207 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -/** - * - * - *- * `ListApplicablePoliciesRequest` represents the Request message for the - * `ListApplicablePolicies` method. It provides the input for a filterable query - * of Policies that apply to a certain GCP Resource, specified by the field - * `attachment_point`, found on this message. - * Example: - * ``` - * { - * attachment_point: - * 'cloudresourcemanager.googleapis.com%2Forganizations%2F212345678901' - * filter: 'kind:denyPolicies' - * } - * ``` - *- * - * Protobuf type {@code google.iam.v2.ListApplicablePoliciesRequest} - */ -public final class ListApplicablePoliciesRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2.ListApplicablePoliciesRequest) - ListApplicablePoliciesRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListApplicablePoliciesRequest.newBuilder() to construct. - private ListApplicablePoliciesRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { - super(builder); - } - - private ListApplicablePoliciesRequest() { - attachmentPoint_ = ""; - filter_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListApplicablePoliciesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListApplicablePoliciesRequest( - 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(); - - attachmentPoint_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 32: - { - pageSize_ = input.readInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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 com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.ListApplicablePoliciesRequest.class, - com.google.iam.v2.ListApplicablePoliciesRequest.Builder.class); - } - - public static final int ATTACHMENT_POINT_FIELD_NUMBER = 1; - private volatile java.lang.Object attachmentPoint_; - /** - * - * - *- * Required. The Cloud resource at which the applicable policies are to be - * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource - * name, which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`. - *- * - *string attachment_point = 1 [(.google.api.field_behavior) = REQUIRED];
- * - * @return The attachmentPoint. - */ - @java.lang.Override - public java.lang.String getAttachmentPoint() { - java.lang.Object ref = attachmentPoint_; - 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(); - attachmentPoint_ = s; - return s; - } - } - /** - * - * - *- * Required. The Cloud resource at which the applicable policies are to be - * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource - * name, which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`. - *- * - *string attachment_point = 1 [(.google.api.field_behavior) = REQUIRED];
- * - * @return The bytes for attachmentPoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAttachmentPointBytes() { - java.lang.Object ref = attachmentPoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - attachmentPoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 2; - private volatile java.lang.Object filter_; - /** - * - * - *- * Filtering currently only supports the kind of policies to return, and - * must be in the format “kind:[policyKind1] OR kind:[policyKind2]”. New - * policy kinds may be added in the future without notice. - * Example value: “kind:denyPolicies” - *- * - *string filter = 2;
- * - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - 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(); - filter_ = s; - return s; - } - } - /** - * - * - *- * Filtering currently only supports the kind of policies to return, and - * must be in the format “kind:[policyKind1] OR kind:[policyKind2]”. New - * policy kinds may be added in the future without notice. - * Example value: “kind:denyPolicies” - *- * - *string filter = 2;
- * - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * - * - *- * If present, then retrieve the batch of results following the results from - * the preceding call to this method. `page_token` must be the value of - * `next_page_token` - * [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token] - * from the previous response. The values of other method parameters should - * be identical to those in the previous call. - *- * - *string page_token = 3;
- * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - 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(); - pageToken_ = s; - return s; - } - } - /** - * - * - *- * If present, then retrieve the batch of results following the results from - * the preceding call to this method. `page_token` must be the value of - * `next_page_token` - * [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token] - * from the previous response. The values of other method parameters should - * be identical to those in the previous call. - *- * - *string page_token = 3;
- * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 4; - private int pageSize_; - /** - * - * - *- * Limit on the number of policies to include in the response. - * Further policies can subsequently be obtained by including the - * [ListApplicablePoliciesResponse.next_page_token][google.iam.admin.v1.ListApplicablePoliciesResponse.next_page_token] - * in a subsequent request. - * The minimum is 25, and the maximum is 100. - *- * - *int32 page_size = 4;
- * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attachmentPoint_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attachmentPoint_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (pageSize_ != 0) { - output.writeInt32(4, pageSize_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attachmentPoint_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attachmentPoint_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); - } - 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 com.google.iam.v2.ListApplicablePoliciesRequest)) { - return super.equals(obj); - } - com.google.iam.v2.ListApplicablePoliciesRequest other = - (com.google.iam.v2.ListApplicablePoliciesRequest) obj; - - if (!getAttachmentPoint().equals(other.getAttachmentPoint())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (getPageSize() != other.getPageSize()) 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) + ATTACHMENT_POINT_FIELD_NUMBER; - hash = (53 * hash) + getAttachmentPoint().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest 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 com.google.iam.v2.ListApplicablePoliciesRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest 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 com.google.iam.v2.ListApplicablePoliciesRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest 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(com.google.iam.v2.ListApplicablePoliciesRequest 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; - } - /** - * - * - *- * `ListApplicablePoliciesRequest` represents the Request message for the - * `ListApplicablePolicies` method. It provides the input for a filterable query - * of Policies that apply to a certain GCP Resource, specified by the field - * `attachment_point`, found on this message. - * Example: - * ``` - * { - * attachment_point: - * 'cloudresourcemanager.googleapis.com%2Forganizations%2F212345678901' - * filter: 'kind:denyPolicies' - * } - * ``` - *- * - * Protobuf type {@code google.iam.v2.ListApplicablePoliciesRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder- implements - // @@protoc_insertion_point(builder_implements:google.iam.v2.ListApplicablePoliciesRequest) - com.google.iam.v2.ListApplicablePoliciesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.ListApplicablePoliciesRequest.class, - com.google.iam.v2.ListApplicablePoliciesRequest.Builder.class); - } - - // Construct using com.google.iam.v2.ListApplicablePoliciesRequest.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(); - attachmentPoint_ = ""; - - filter_ = ""; - - pageToken_ = ""; - - pageSize_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesRequest_descriptor; - } - - @java.lang.Override - public com.google.iam.v2.ListApplicablePoliciesRequest getDefaultInstanceForType() { - return com.google.iam.v2.ListApplicablePoliciesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2.ListApplicablePoliciesRequest build() { - com.google.iam.v2.ListApplicablePoliciesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2.ListApplicablePoliciesRequest buildPartial() { - com.google.iam.v2.ListApplicablePoliciesRequest result = - new com.google.iam.v2.ListApplicablePoliciesRequest(this); - result.attachmentPoint_ = attachmentPoint_; - result.filter_ = filter_; - result.pageToken_ = pageToken_; - result.pageSize_ = pageSize_; - 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 com.google.iam.v2.ListApplicablePoliciesRequest) { - return mergeFrom((com.google.iam.v2.ListApplicablePoliciesRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2.ListApplicablePoliciesRequest other) { - if (other == com.google.iam.v2.ListApplicablePoliciesRequest.getDefaultInstance()) - return this; - if (!other.getAttachmentPoint().isEmpty()) { - attachmentPoint_ = other.attachmentPoint_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - 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 { - com.google.iam.v2.ListApplicablePoliciesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2.ListApplicablePoliciesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object attachmentPoint_ = ""; - /** - * - * - * - * Required. The Cloud resource at which the applicable policies are to be - * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource - * name, which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`. - *- * - *string attachment_point = 1 [(.google.api.field_behavior) = REQUIRED];
- * - * @return The attachmentPoint. - */ - public java.lang.String getAttachmentPoint() { - java.lang.Object ref = attachmentPoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attachmentPoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *- * Required. The Cloud resource at which the applicable policies are to be - * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource - * name, which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`. - *- * - *string attachment_point = 1 [(.google.api.field_behavior) = REQUIRED];
- * - * @return The bytes for attachmentPoint. - */ - public com.google.protobuf.ByteString getAttachmentPointBytes() { - java.lang.Object ref = attachmentPoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - attachmentPoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *- * Required. The Cloud resource at which the applicable policies are to be - * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource - * name, which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`. - *- * - *string attachment_point = 1 [(.google.api.field_behavior) = REQUIRED];
- * - * @param value The attachmentPoint to set. - * @return This builder for chaining. - */ - public Builder setAttachmentPoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - attachmentPoint_ = value; - onChanged(); - return this; - } - /** - * - * - *- * Required. The Cloud resource at which the applicable policies are to be - * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource - * name, which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`. - *- * - *string attachment_point = 1 [(.google.api.field_behavior) = REQUIRED];
- * - * @return This builder for chaining. - */ - public Builder clearAttachmentPoint() { - - attachmentPoint_ = getDefaultInstance().getAttachmentPoint(); - onChanged(); - return this; - } - /** - * - * - *- * Required. The Cloud resource at which the applicable policies are to be - * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource - * name, which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`. - *- * - *string attachment_point = 1 [(.google.api.field_behavior) = REQUIRED];
- * - * @param value The bytes for attachmentPoint to set. - * @return This builder for chaining. - */ - public Builder setAttachmentPointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - attachmentPoint_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *- * Filtering currently only supports the kind of policies to return, and - * must be in the format “kind:[policyKind1] OR kind:[policyKind2]”. New - * policy kinds may be added in the future without notice. - * Example value: “kind:denyPolicies” - *- * - *string filter = 2;
- * - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *- * Filtering currently only supports the kind of policies to return, and - * must be in the format “kind:[policyKind1] OR kind:[policyKind2]”. New - * policy kinds may be added in the future without notice. - * Example value: “kind:denyPolicies” - *- * - *string filter = 2;
- * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *- * Filtering currently only supports the kind of policies to return, and - * must be in the format “kind:[policyKind1] OR kind:[policyKind2]”. New - * policy kinds may be added in the future without notice. - * Example value: “kind:denyPolicies” - *- * - *string filter = 2;
- * - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - * - * - *- * Filtering currently only supports the kind of policies to return, and - * must be in the format “kind:[policyKind1] OR kind:[policyKind2]”. New - * policy kinds may be added in the future without notice. - * Example value: “kind:denyPolicies” - *- * - *string filter = 2;
- * - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - * - * - *- * Filtering currently only supports the kind of policies to return, and - * must be in the format “kind:[policyKind1] OR kind:[policyKind2]”. New - * policy kinds may be added in the future without notice. - * Example value: “kind:denyPolicies” - *- * - *string filter = 2;
- * - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *- * If present, then retrieve the batch of results following the results from - * the preceding call to this method. `page_token` must be the value of - * `next_page_token` - * [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token] - * from the previous response. The values of other method parameters should - * be identical to those in the previous call. - *- * - *string page_token = 3;
- * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *- * If present, then retrieve the batch of results following the results from - * the preceding call to this method. `page_token` must be the value of - * `next_page_token` - * [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token] - * from the previous response. The values of other method parameters should - * be identical to those in the previous call. - *- * - *string page_token = 3;
- * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *- * If present, then retrieve the batch of results following the results from - * the preceding call to this method. `page_token` must be the value of - * `next_page_token` - * [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token] - * from the previous response. The values of other method parameters should - * be identical to those in the previous call. - *- * - *string page_token = 3;
- * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *- * If present, then retrieve the batch of results following the results from - * the preceding call to this method. `page_token` must be the value of - * `next_page_token` - * [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token] - * from the previous response. The values of other method parameters should - * be identical to those in the previous call. - *- * - *string page_token = 3;
- * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *- * If present, then retrieve the batch of results following the results from - * the preceding call to this method. `page_token` must be the value of - * `next_page_token` - * [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token] - * from the previous response. The values of other method parameters should - * be identical to those in the previous call. - *- * - *string page_token = 3;
- * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *- * Limit on the number of policies to include in the response. - * Further policies can subsequently be obtained by including the - * [ListApplicablePoliciesResponse.next_page_token][google.iam.admin.v1.ListApplicablePoliciesResponse.next_page_token] - * in a subsequent request. - * The minimum is 25, and the maximum is 100. - *- * - *int32 page_size = 4;
- * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *- * Limit on the number of policies to include in the response. - * Further policies can subsequently be obtained by including the - * [ListApplicablePoliciesResponse.next_page_token][google.iam.admin.v1.ListApplicablePoliciesResponse.next_page_token] - * in a subsequent request. - * The minimum is 25, and the maximum is 100. - *- * - *int32 page_size = 4;
- * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * - * - *- * Limit on the number of policies to include in the response. - * Further policies can subsequently be obtained by including the - * [ListApplicablePoliciesResponse.next_page_token][google.iam.admin.v1.ListApplicablePoliciesResponse.next_page_token] - * in a subsequent request. - * The minimum is 25, and the maximum is 100. - *- * - *int32 page_size = 4;
- * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - 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.iam.v2.ListApplicablePoliciesRequest) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2.ListApplicablePoliciesRequest) - private static final com.google.iam.v2.ListApplicablePoliciesRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2.ListApplicablePoliciesRequest(); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.ParserPARSER = - new com.google.protobuf.AbstractParser () { - @java.lang.Override - public ListApplicablePoliciesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListApplicablePoliciesRequest(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 com.google.iam.v2.ListApplicablePoliciesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesRequestOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesRequestOrBuilder.java deleted file mode 100644 index b4b91808..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesRequestOrBuilder.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -public interface ListApplicablePoliciesRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2.ListApplicablePoliciesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - * - * Required. The Cloud resource at which the applicable policies are to be - * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource - * name, which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`. - *- * - *string attachment_point = 1 [(.google.api.field_behavior) = REQUIRED];
- * - * @return The attachmentPoint. - */ - java.lang.String getAttachmentPoint(); - /** - * - * - *- * Required. The Cloud resource at which the applicable policies are to be - * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource - * name, which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`. - *- * - *string attachment_point = 1 [(.google.api.field_behavior) = REQUIRED];
- * - * @return The bytes for attachmentPoint. - */ - com.google.protobuf.ByteString getAttachmentPointBytes(); - - /** - * - * - *- * Filtering currently only supports the kind of policies to return, and - * must be in the format “kind:[policyKind1] OR kind:[policyKind2]”. New - * policy kinds may be added in the future without notice. - * Example value: “kind:denyPolicies” - *- * - *string filter = 2;
- * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *- * Filtering currently only supports the kind of policies to return, and - * must be in the format “kind:[policyKind1] OR kind:[policyKind2]”. New - * policy kinds may be added in the future without notice. - * Example value: “kind:denyPolicies” - *- * - *string filter = 2;
- * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *- * If present, then retrieve the batch of results following the results from - * the preceding call to this method. `page_token` must be the value of - * `next_page_token` - * [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token] - * from the previous response. The values of other method parameters should - * be identical to those in the previous call. - *- * - *string page_token = 3;
- * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *- * If present, then retrieve the batch of results following the results from - * the preceding call to this method. `page_token` must be the value of - * `next_page_token` - * [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token] - * from the previous response. The values of other method parameters should - * be identical to those in the previous call. - *- * - *string page_token = 3;
- * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *- * Limit on the number of policies to include in the response. - * Further policies can subsequently be obtained by including the - * [ListApplicablePoliciesResponse.next_page_token][google.iam.admin.v1.ListApplicablePoliciesResponse.next_page_token] - * in a subsequent request. - * The minimum is 25, and the maximum is 100. - *- * - *int32 page_size = 4;
- * - * @return The pageSize. - */ - int getPageSize(); -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesResponse.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesResponse.java deleted file mode 100644 index 6c31b640..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesResponse.java +++ /dev/null @@ -1,1503 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -/** - * - * - *- * Response message for [ListApplicablePolicies][] method. - *- * - * Protobuf type {@code google.iam.v2.ListApplicablePoliciesResponse} - */ -public final class ListApplicablePoliciesResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2.ListApplicablePoliciesResponse) - ListApplicablePoliciesResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListApplicablePoliciesResponse.newBuilder() to construct. - private ListApplicablePoliciesResponse( - com.google.protobuf.GeneratedMessageV3.Builder> builder) { - super(builder); - } - - private ListApplicablePoliciesResponse() { - policies_ = java.util.Collections.emptyList(); - inaccessible_ = com.google.protobuf.LazyStringArrayList.EMPTY; - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListApplicablePoliciesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListApplicablePoliciesResponse( - 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: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - policies_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - policies_.add( - input.readMessage(com.google.iam.v2.Policy.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - inaccessible_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - inaccessible_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - policies_ = java.util.Collections.unmodifiableList(policies_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - inaccessible_ = inaccessible_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.ListApplicablePoliciesResponse.class, - com.google.iam.v2.ListApplicablePoliciesResponse.Builder.class); - } - - public static final int POLICIES_FIELD_NUMBER = 1; - private java.util.List policies_; - /** - * - * - * - * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - @java.lang.Override - public java.util.ListgetPoliciesList() { - return policies_; - } - /** - * - * - * - * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - @java.lang.Override - public java.util.List extends com.google.iam.v2.PolicyOrBuilder> getPoliciesOrBuilderList() { - return policies_; - } - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - @java.lang.Override - public int getPoliciesCount() { - return policies_.size(); - } - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - @java.lang.Override - public com.google.iam.v2.Policy getPolicies(int index) { - return policies_.get(index); - } - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - @java.lang.Override - public com.google.iam.v2.PolicyOrBuilder getPoliciesOrBuilder(int index) { - return policies_.get(index); - } - - public static final int INACCESSIBLE_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList inaccessible_; - /** - * - * - *- * A list of resources that the caller does not have permission to retrieve. - * List or Get can be used to get detailed error messages. - * Get: `policies/{attachment-point}/denypolicies/{policy-id}` - * List: `policies/{attachment-point}/denypolicies` - *- * - *repeated string inaccessible = 2;
- * - * @return A list containing the inaccessible. - */ - public com.google.protobuf.ProtocolStringList getInaccessibleList() { - return inaccessible_; - } - /** - * - * - *- * A list of resources that the caller does not have permission to retrieve. - * List or Get can be used to get detailed error messages. - * Get: `policies/{attachment-point}/denypolicies/{policy-id}` - * List: `policies/{attachment-point}/denypolicies` - *- * - *repeated string inaccessible = 2;
- * - * @return The count of inaccessible. - */ - public int getInaccessibleCount() { - return inaccessible_.size(); - } - /** - * - * - *- * A list of resources that the caller does not have permission to retrieve. - * List or Get can be used to get detailed error messages. - * Get: `policies/{attachment-point}/denypolicies/{policy-id}` - * List: `policies/{attachment-point}/denypolicies` - *- * - *repeated string inaccessible = 2;
- * - * @param index The index of the element to return. - * @return The inaccessible at the given index. - */ - public java.lang.String getInaccessible(int index) { - return inaccessible_.get(index); - } - /** - * - * - *- * A list of resources that the caller does not have permission to retrieve. - * List or Get can be used to get detailed error messages. - * Get: `policies/{attachment-point}/denypolicies/{policy-id}` - * List: `policies/{attachment-point}/denypolicies` - *- * - *repeated string inaccessible = 2;
- * - * @param index The index of the value to return. - * @return The bytes of the inaccessible at the given index. - */ - public com.google.protobuf.ByteString getInaccessibleBytes(int index) { - return inaccessible_.getByteString(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *- * A page token that can be used in a - * [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest] - * to retrieve the next page. If this field is blank, there are no additional - * pages. - *- * - *string next_page_token = 3;
- * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - 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(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *- * A page token that can be used in a - * [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest] - * to retrieve the next page. If this field is blank, there are no additional - * pages. - *- * - *string next_page_token = 3;
- * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = 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 { - for (int i = 0; i < policies_.size(); i++) { - output.writeMessage(1, policies_.get(i)); - } - for (int i = 0; i < inaccessible_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, inaccessible_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < policies_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policies_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < inaccessible_.size(); i++) { - dataSize += computeStringSizeNoTag(inaccessible_.getRaw(i)); - } - size += dataSize; - size += 1 * getInaccessibleList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); - } - 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 com.google.iam.v2.ListApplicablePoliciesResponse)) { - return super.equals(obj); - } - com.google.iam.v2.ListApplicablePoliciesResponse other = - (com.google.iam.v2.ListApplicablePoliciesResponse) obj; - - if (!getPoliciesList().equals(other.getPoliciesList())) return false; - if (!getInaccessibleList().equals(other.getInaccessibleList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) 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(); - if (getPoliciesCount() > 0) { - hash = (37 * hash) + POLICIES_FIELD_NUMBER; - hash = (53 * hash) + getPoliciesList().hashCode(); - } - if (getInaccessibleCount() > 0) { - hash = (37 * hash) + INACCESSIBLE_FIELD_NUMBER; - hash = (53 * hash) + getInaccessibleList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse 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 com.google.iam.v2.ListApplicablePoliciesResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse 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 com.google.iam.v2.ListApplicablePoliciesResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse 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(com.google.iam.v2.ListApplicablePoliciesResponse 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; - } - /** - * - * - *- * Response message for [ListApplicablePolicies][] method. - *- * - * Protobuf type {@code google.iam.v2.ListApplicablePoliciesResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder- implements - // @@protoc_insertion_point(builder_implements:google.iam.v2.ListApplicablePoliciesResponse) - com.google.iam.v2.ListApplicablePoliciesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.ListApplicablePoliciesResponse.class, - com.google.iam.v2.ListApplicablePoliciesResponse.Builder.class); - } - - // Construct using com.google.iam.v2.ListApplicablePoliciesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPoliciesFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (policiesBuilder_ == null) { - policies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - policiesBuilder_.clear(); - } - inaccessible_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesResponse_descriptor; - } - - @java.lang.Override - public com.google.iam.v2.ListApplicablePoliciesResponse getDefaultInstanceForType() { - return com.google.iam.v2.ListApplicablePoliciesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2.ListApplicablePoliciesResponse build() { - com.google.iam.v2.ListApplicablePoliciesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2.ListApplicablePoliciesResponse buildPartial() { - com.google.iam.v2.ListApplicablePoliciesResponse result = - new com.google.iam.v2.ListApplicablePoliciesResponse(this); - int from_bitField0_ = bitField0_; - if (policiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - policies_ = java.util.Collections.unmodifiableList(policies_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.policies_ = policies_; - } else { - result.policies_ = policiesBuilder_.build(); - } - if (((bitField0_ & 0x00000002) != 0)) { - inaccessible_ = inaccessible_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.inaccessible_ = inaccessible_; - result.nextPageToken_ = nextPageToken_; - 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 com.google.iam.v2.ListApplicablePoliciesResponse) { - return mergeFrom((com.google.iam.v2.ListApplicablePoliciesResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2.ListApplicablePoliciesResponse other) { - if (other == com.google.iam.v2.ListApplicablePoliciesResponse.getDefaultInstance()) - return this; - if (policiesBuilder_ == null) { - if (!other.policies_.isEmpty()) { - if (policies_.isEmpty()) { - policies_ = other.policies_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePoliciesIsMutable(); - policies_.addAll(other.policies_); - } - onChanged(); - } - } else { - if (!other.policies_.isEmpty()) { - if (policiesBuilder_.isEmpty()) { - policiesBuilder_.dispose(); - policiesBuilder_ = null; - policies_ = other.policies_; - bitField0_ = (bitField0_ & ~0x00000001); - policiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getPoliciesFieldBuilder() - : null; - } else { - policiesBuilder_.addAllMessages(other.policies_); - } - } - } - if (!other.inaccessible_.isEmpty()) { - if (inaccessible_.isEmpty()) { - inaccessible_ = other.inaccessible_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureInaccessibleIsMutable(); - inaccessible_.addAll(other.inaccessible_); - } - onChanged(); - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - 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 { - com.google.iam.v2.ListApplicablePoliciesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2.ListApplicablePoliciesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List policies_ = java.util.Collections.emptyList(); - - private void ensurePoliciesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - policies_ = new java.util.ArrayList (policies_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v2.Policy, - com.google.iam.v2.Policy.Builder, - com.google.iam.v2.PolicyOrBuilder> - policiesBuilder_; - - /** - * - * - * - * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - public java.util.ListgetPoliciesList() { - if (policiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(policies_); - } else { - return policiesBuilder_.getMessageList(); - } - } - /** - * - * - * - * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - public int getPoliciesCount() { - if (policiesBuilder_ == null) { - return policies_.size(); - } else { - return policiesBuilder_.getCount(); - } - } - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - public com.google.iam.v2.Policy getPolicies(int index) { - if (policiesBuilder_ == null) { - return policies_.get(index); - } else { - return policiesBuilder_.getMessage(index); - } - } - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - public Builder setPolicies(int index, com.google.iam.v2.Policy value) { - if (policiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoliciesIsMutable(); - policies_.set(index, value); - onChanged(); - } else { - policiesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - public Builder setPolicies(int index, com.google.iam.v2.Policy.Builder builderForValue) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.set(index, builderForValue.build()); - onChanged(); - } else { - policiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - public Builder addPolicies(com.google.iam.v2.Policy value) { - if (policiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoliciesIsMutable(); - policies_.add(value); - onChanged(); - } else { - policiesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - public Builder addPolicies(int index, com.google.iam.v2.Policy value) { - if (policiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoliciesIsMutable(); - policies_.add(index, value); - onChanged(); - } else { - policiesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - public Builder addPolicies(com.google.iam.v2.Policy.Builder builderForValue) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.add(builderForValue.build()); - onChanged(); - } else { - policiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - public Builder addPolicies(int index, com.google.iam.v2.Policy.Builder builderForValue) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.add(index, builderForValue.build()); - onChanged(); - } else { - policiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - public Builder addAllPolicies(java.lang.Iterable extends com.google.iam.v2.Policy> values) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policies_); - onChanged(); - } else { - policiesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - public Builder clearPolicies() { - if (policiesBuilder_ == null) { - policies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - policiesBuilder_.clear(); - } - return this; - } - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - public Builder removePolicies(int index) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.remove(index); - onChanged(); - } else { - policiesBuilder_.remove(index); - } - return this; - } - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - public com.google.iam.v2.Policy.Builder getPoliciesBuilder(int index) { - return getPoliciesFieldBuilder().getBuilder(index); - } - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - public com.google.iam.v2.PolicyOrBuilder getPoliciesOrBuilder(int index) { - if (policiesBuilder_ == null) { - return policies_.get(index); - } else { - return policiesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - public java.util.List extends com.google.iam.v2.PolicyOrBuilder> getPoliciesOrBuilderList() { - if (policiesBuilder_ != null) { - return policiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(policies_); - } - } - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - public com.google.iam.v2.Policy.Builder addPoliciesBuilder() { - return getPoliciesFieldBuilder().addBuilder(com.google.iam.v2.Policy.getDefaultInstance()); - } - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - public com.google.iam.v2.Policy.Builder addPoliciesBuilder(int index) { - return getPoliciesFieldBuilder() - .addBuilder(index, com.google.iam.v2.Policy.getDefaultInstance()); - } - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - public java.util.ListgetPoliciesBuilderList() { - return getPoliciesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v2.Policy, - com.google.iam.v2.Policy.Builder, - com.google.iam.v2.PolicyOrBuilder> - getPoliciesFieldBuilder() { - if (policiesBuilder_ == null) { - policiesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v2.Policy, - com.google.iam.v2.Policy.Builder, - com.google.iam.v2.PolicyOrBuilder>( - policies_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - policies_ = null; - } - return policiesBuilder_; - } - - private com.google.protobuf.LazyStringList inaccessible_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureInaccessibleIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - inaccessible_ = new com.google.protobuf.LazyStringArrayList(inaccessible_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - * - * A list of resources that the caller does not have permission to retrieve. - * List or Get can be used to get detailed error messages. - * Get: `policies/{attachment-point}/denypolicies/{policy-id}` - * List: `policies/{attachment-point}/denypolicies` - *- * - *repeated string inaccessible = 2;
- * - * @return A list containing the inaccessible. - */ - public com.google.protobuf.ProtocolStringList getInaccessibleList() { - return inaccessible_.getUnmodifiableView(); - } - /** - * - * - *- * A list of resources that the caller does not have permission to retrieve. - * List or Get can be used to get detailed error messages. - * Get: `policies/{attachment-point}/denypolicies/{policy-id}` - * List: `policies/{attachment-point}/denypolicies` - *- * - *repeated string inaccessible = 2;
- * - * @return The count of inaccessible. - */ - public int getInaccessibleCount() { - return inaccessible_.size(); - } - /** - * - * - *- * A list of resources that the caller does not have permission to retrieve. - * List or Get can be used to get detailed error messages. - * Get: `policies/{attachment-point}/denypolicies/{policy-id}` - * List: `policies/{attachment-point}/denypolicies` - *- * - *repeated string inaccessible = 2;
- * - * @param index The index of the element to return. - * @return The inaccessible at the given index. - */ - public java.lang.String getInaccessible(int index) { - return inaccessible_.get(index); - } - /** - * - * - *- * A list of resources that the caller does not have permission to retrieve. - * List or Get can be used to get detailed error messages. - * Get: `policies/{attachment-point}/denypolicies/{policy-id}` - * List: `policies/{attachment-point}/denypolicies` - *- * - *repeated string inaccessible = 2;
- * - * @param index The index of the value to return. - * @return The bytes of the inaccessible at the given index. - */ - public com.google.protobuf.ByteString getInaccessibleBytes(int index) { - return inaccessible_.getByteString(index); - } - /** - * - * - *- * A list of resources that the caller does not have permission to retrieve. - * List or Get can be used to get detailed error messages. - * Get: `policies/{attachment-point}/denypolicies/{policy-id}` - * List: `policies/{attachment-point}/denypolicies` - *- * - *repeated string inaccessible = 2;
- * - * @param index The index to set the value at. - * @param value The inaccessible to set. - * @return This builder for chaining. - */ - public Builder setInaccessible(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureInaccessibleIsMutable(); - inaccessible_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *- * A list of resources that the caller does not have permission to retrieve. - * List or Get can be used to get detailed error messages. - * Get: `policies/{attachment-point}/denypolicies/{policy-id}` - * List: `policies/{attachment-point}/denypolicies` - *- * - *repeated string inaccessible = 2;
- * - * @param value The inaccessible to add. - * @return This builder for chaining. - */ - public Builder addInaccessible(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureInaccessibleIsMutable(); - inaccessible_.add(value); - onChanged(); - return this; - } - /** - * - * - *- * A list of resources that the caller does not have permission to retrieve. - * List or Get can be used to get detailed error messages. - * Get: `policies/{attachment-point}/denypolicies/{policy-id}` - * List: `policies/{attachment-point}/denypolicies` - *- * - *repeated string inaccessible = 2;
- * - * @param values The inaccessible to add. - * @return This builder for chaining. - */ - public Builder addAllInaccessible(java.lang.Iterablevalues) { - ensureInaccessibleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inaccessible_); - onChanged(); - return this; - } - /** - * - * - * - * A list of resources that the caller does not have permission to retrieve. - * List or Get can be used to get detailed error messages. - * Get: `policies/{attachment-point}/denypolicies/{policy-id}` - * List: `policies/{attachment-point}/denypolicies` - *- * - *repeated string inaccessible = 2;
- * - * @return This builder for chaining. - */ - public Builder clearInaccessible() { - inaccessible_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *- * A list of resources that the caller does not have permission to retrieve. - * List or Get can be used to get detailed error messages. - * Get: `policies/{attachment-point}/denypolicies/{policy-id}` - * List: `policies/{attachment-point}/denypolicies` - *- * - *repeated string inaccessible = 2;
- * - * @param value The bytes of the inaccessible to add. - * @return This builder for chaining. - */ - public Builder addInaccessibleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureInaccessibleIsMutable(); - inaccessible_.add(value); - onChanged(); - return this; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *- * A page token that can be used in a - * [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest] - * to retrieve the next page. If this field is blank, there are no additional - * pages. - *- * - *string next_page_token = 3;
- * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *- * A page token that can be used in a - * [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest] - * to retrieve the next page. If this field is blank, there are no additional - * pages. - *- * - *string next_page_token = 3;
- * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *- * A page token that can be used in a - * [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest] - * to retrieve the next page. If this field is blank, there are no additional - * pages. - *- * - *string next_page_token = 3;
- * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *- * A page token that can be used in a - * [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest] - * to retrieve the next page. If this field is blank, there are no additional - * pages. - *- * - *string next_page_token = 3;
- * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *- * A page token that can be used in a - * [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest] - * to retrieve the next page. If this field is blank, there are no additional - * pages. - *- * - *string next_page_token = 3;
- * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = 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.iam.v2.ListApplicablePoliciesResponse) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2.ListApplicablePoliciesResponse) - private static final com.google.iam.v2.ListApplicablePoliciesResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2.ListApplicablePoliciesResponse(); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.ParserPARSER = - new com.google.protobuf.AbstractParser () { - @java.lang.Override - public ListApplicablePoliciesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListApplicablePoliciesResponse(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 com.google.iam.v2.ListApplicablePoliciesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesResponseOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesResponseOrBuilder.java deleted file mode 100644 index f83bbeda..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesResponseOrBuilder.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/iam/v2/policy.proto - -package com.google.iam.v2; - -public interface ListApplicablePoliciesResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2.ListApplicablePoliciesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - * - * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - java.util.ListgetPoliciesList(); - /** - * - * - * - * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - com.google.iam.v2.Policy getPolicies(int index); - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - int getPoliciesCount(); - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - java.util.List extends com.google.iam.v2.PolicyOrBuilder> getPoliciesOrBuilderList(); - /** - * - * - *- * Ordered list starting from the resource on which this API was called - * then proceeding up the hierarchy. Policies for the same attachment point - * will be grouped, but no further ordering is guaranteed. - *- * - *repeated .google.iam.v2.Policy policies = 1;
- */ - com.google.iam.v2.PolicyOrBuilder getPoliciesOrBuilder(int index); - - /** - * - * - *- * A list of resources that the caller does not have permission to retrieve. - * List or Get can be used to get detailed error messages. - * Get: `policies/{attachment-point}/denypolicies/{policy-id}` - * List: `policies/{attachment-point}/denypolicies` - *- * - *repeated string inaccessible = 2;
- * - * @return A list containing the inaccessible. - */ - java.util.ListgetInaccessibleList(); - /** - * - * - * - * A list of resources that the caller does not have permission to retrieve. - * List or Get can be used to get detailed error messages. - * Get: `policies/{attachment-point}/denypolicies/{policy-id}` - * List: `policies/{attachment-point}/denypolicies` - *- * - *repeated string inaccessible = 2;
- * - * @return The count of inaccessible. - */ - int getInaccessibleCount(); - /** - * - * - *- * A list of resources that the caller does not have permission to retrieve. - * List or Get can be used to get detailed error messages. - * Get: `policies/{attachment-point}/denypolicies/{policy-id}` - * List: `policies/{attachment-point}/denypolicies` - *- * - *repeated string inaccessible = 2;
- * - * @param index The index of the element to return. - * @return The inaccessible at the given index. - */ - java.lang.String getInaccessible(int index); - /** - * - * - *- * A list of resources that the caller does not have permission to retrieve. - * List or Get can be used to get detailed error messages. - * Get: `policies/{attachment-point}/denypolicies/{policy-id}` - * List: `policies/{attachment-point}/denypolicies` - *- * - *repeated string inaccessible = 2;
- * - * @param index The index of the value to return. - * @return The bytes of the inaccessible at the given index. - */ - com.google.protobuf.ByteString getInaccessibleBytes(int index); - - /** - * - * - *- * A page token that can be used in a - * [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest] - * to retrieve the next page. If this field is blank, there are no additional - * pages. - *- * - *string next_page_token = 3;
- * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *- * A page token that can be used in a - * [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest] - * to retrieve the next page. If this field is blank, there are no additional - * pages. - *- * - *string next_page_token = 3;
- * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequest.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequest.java index 5665c5b7..124798c3 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequest.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListPoliciesRequest( - 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(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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 com.google.iam.v2.PolicyProto .internal_static_google_iam_v2_ListPoliciesRequest_descriptor; @@ -132,8 +74,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *- * Required. The resource that the policy is attached to, along with the kind - * of policy to list. Format: `policies/{attachment_point}/denypolicies` + * Required. The resource that the policy is attached to, along with the kind of policy + * to list. Format: + * `policies/{attachment_point}/denypolicies` * The attachment point is identified by its URL-encoded full resource name, * which means that the forward-slash character, `/`, must be written as * `%2F`. For example, @@ -162,8 +105,9 @@ public java.lang.String getParent() { * * *- * Required. The resource that the policy is attached to, along with the kind - * of policy to list. Format: `policies/{attachment_point}/denypolicies` + * Required. The resource that the policy is attached to, along with the kind of policy + * to list. Format: + * `policies/{attachment_point}/denypolicies` * The attachment point is identified by its URL-encoded full resource name, * which means that the forward-slash character, `/`, must be written as * `%2F`. For example, @@ -214,9 +158,8 @@ public int getPageSize() { * * *- * A page token received in a - * [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this - * token to retrieve the next page. + * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to + * retrieve the next page. ** *string page_token = 3;
@@ -239,9 +182,8 @@ public java.lang.String getPageToken() { * * *- * A page token received in a - * [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this - * token to retrieve the next page. + * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to + * retrieve the next page. ** *string page_token = 3;
@@ -284,7 +226,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -302,7 +244,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -320,7 +262,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -337,7 +279,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -465,17 +407,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2.ListPoliciesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -577,7 +512,7 @@ public Builder mergeFrom(com.google.iam.v2.ListPoliciesRequest other) { pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -592,17 +527,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2.ListPoliciesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2.ListPoliciesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -611,8 +578,9 @@ public Builder mergeFrom( * * *- * Required. The resource that the policy is attached to, along with the kind - * of policy to list. Format: `policies/{attachment_point}/denypolicies` + * Required. The resource that the policy is attached to, along with the kind of policy + * to list. Format: + * `policies/{attachment_point}/denypolicies` * The attachment point is identified by its URL-encoded full resource name, * which means that the forward-slash character, `/`, must be written as * `%2F`. For example, @@ -640,8 +608,9 @@ public java.lang.String getParent() { * * *- * Required. The resource that the policy is attached to, along with the kind - * of policy to list. Format: `policies/{attachment_point}/denypolicies` + * Required. The resource that the policy is attached to, along with the kind of policy + * to list. Format: + * `policies/{attachment_point}/denypolicies` * The attachment point is identified by its URL-encoded full resource name, * which means that the forward-slash character, `/`, must be written as * `%2F`. For example, @@ -669,8 +638,9 @@ public com.google.protobuf.ByteString getParentBytes() { * * *- * Required. The resource that the policy is attached to, along with the kind - * of policy to list. Format: `policies/{attachment_point}/denypolicies` + * Required. The resource that the policy is attached to, along with the kind of policy + * to list. Format: + * `policies/{attachment_point}/denypolicies` * The attachment point is identified by its URL-encoded full resource name, * which means that the forward-slash character, `/`, must be written as * `%2F`. For example, @@ -697,8 +667,9 @@ public Builder setParent(java.lang.String value) { * * *- * Required. The resource that the policy is attached to, along with the kind - * of policy to list. Format: `policies/{attachment_point}/denypolicies` + * Required. The resource that the policy is attached to, along with the kind of policy + * to list. Format: + * `policies/{attachment_point}/denypolicies` * The attachment point is identified by its URL-encoded full resource name, * which means that the forward-slash character, `/`, must be written as * `%2F`. For example, @@ -721,8 +692,9 @@ public Builder clearParent() { * * *- * Required. The resource that the policy is attached to, along with the kind - * of policy to list. Format: `policies/{attachment_point}/denypolicies` + * Required. The resource that the policy is attached to, along with the kind of policy + * to list. Format: + * `policies/{attachment_point}/denypolicies` * The attachment point is identified by its URL-encoded full resource name, * which means that the forward-slash character, `/`, must be written as * `%2F`. For example, @@ -807,9 +779,8 @@ public Builder clearPageSize() { * * *- * A page token received in a - * [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this - * token to retrieve the next page. + * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to + * retrieve the next page. ** *string page_token = 3;
@@ -831,9 +802,8 @@ public java.lang.String getPageToken() { * * *- * A page token received in a - * [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this - * token to retrieve the next page. + * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to + * retrieve the next page. ** *string page_token = 3;
@@ -855,9 +825,8 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *- * A page token received in a - * [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this - * token to retrieve the next page. + * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to + * retrieve the next page. ** *string page_token = 3;
@@ -878,9 +847,8 @@ public Builder setPageToken(java.lang.String value) { * * *- * A page token received in a - * [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this - * token to retrieve the next page. + * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to + * retrieve the next page. ** *string page_token = 3;
@@ -897,9 +865,8 @@ public Builder clearPageToken() { * * *- * A page token received in a - * [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this - * token to retrieve the next page. + * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to + * retrieve the next page. ** *string page_token = 3;
@@ -950,7 +917,18 @@ public ListPoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListPoliciesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequestOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequestOrBuilder.java index 5ccf0c27..bfea871b 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequestOrBuilder.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequestOrBuilder.java @@ -27,8 +27,9 @@ public interface ListPoliciesRequestOrBuilder * * *- * Required. The resource that the policy is attached to, along with the kind - * of policy to list. Format: `policies/{attachment_point}/denypolicies` + * Required. The resource that the policy is attached to, along with the kind of policy + * to list. Format: + * `policies/{attachment_point}/denypolicies` * The attachment point is identified by its URL-encoded full resource name, * which means that the forward-slash character, `/`, must be written as * `%2F`. For example, @@ -46,8 +47,9 @@ public interface ListPoliciesRequestOrBuilder * * *- * Required. The resource that the policy is attached to, along with the kind - * of policy to list. Format: `policies/{attachment_point}/denypolicies` + * Required. The resource that the policy is attached to, along with the kind of policy + * to list. Format: + * `policies/{attachment_point}/denypolicies` * The attachment point is identified by its URL-encoded full resource name, * which means that the forward-slash character, `/`, must be written as * `%2F`. For example, @@ -80,9 +82,8 @@ public interface ListPoliciesRequestOrBuilder * * *- * A page token received in a - * [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this - * token to retrieve the next page. + * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to + * retrieve the next page. ** *string page_token = 3;
@@ -94,9 +95,8 @@ public interface ListPoliciesRequestOrBuilder * * *- * A page token received in a - * [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this - * token to retrieve the next page. + * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to + * retrieve the next page. ** *string page_token = 3;
diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponse.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponse.java index fa2820bd..62cdb5ec 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponse.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponse.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListPoliciesResponse( - 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: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - policies_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - policies_.add( - input.readMessage(com.google.iam.v2.Policy.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - policies_ = java.util.Collections.unmodifiableList(policies_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v2.PolicyProto .internal_static_google_iam_v2_ListPoliciesResponse_descriptor; @@ -202,8 +142,7 @@ public com.google.iam.v2.PolicyOrBuilder getPoliciesOrBuilder(int index) { * * * - * A page token that you can use in a - * [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the + * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the * next page. If this field is omitted, there are no additional pages. ** @@ -227,8 +166,7 @@ public java.lang.String getNextPageToken() { * * *- * A page token that you can use in a - * [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the + * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the * next page. If this field is omitted, there are no additional pages. ** @@ -269,7 +207,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -284,7 +222,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -301,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPoliciesList().equals(other.getPoliciesList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -318,7 +256,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -447,19 +385,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2.ListPoliciesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPoliciesFieldBuilder(); - } } @java.lang.Override @@ -467,10 +396,11 @@ public Builder clear() { super.clear(); if (policiesBuilder_ == null) { policies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + policies_ = null; policiesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -591,7 +521,7 @@ public Builder mergeFrom(com.google.iam.v2.ListPoliciesResponse other) { nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -606,17 +536,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2.ListPoliciesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v2.Policy m = + input.readMessage(com.google.iam.v2.Policy.parser(), extensionRegistry); + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + policies_.add(m); + } else { + policiesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2.ListPoliciesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -969,8 +931,7 @@ public java.util.ListgetPoliciesBuilderList() * * * - * A page token that you can use in a - * [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the + * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the * next page. If this field is omitted, there are no additional pages. ** @@ -993,8 +954,7 @@ public java.lang.String getNextPageToken() { * * *- * A page token that you can use in a - * [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the + * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the * next page. If this field is omitted, there are no additional pages. ** @@ -1017,8 +977,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { * * *- * A page token that you can use in a - * [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the + * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the * next page. If this field is omitted, there are no additional pages. ** @@ -1040,8 +999,7 @@ public Builder setNextPageToken(java.lang.String value) { * * *- * A page token that you can use in a - * [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the + * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the * next page. If this field is omitted, there are no additional pages. ** @@ -1059,8 +1017,7 @@ public Builder clearNextPageToken() { * * *- * A page token that you can use in a - * [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the + * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the * next page. If this field is omitted, there are no additional pages. ** @@ -1112,7 +1069,18 @@ public ListPoliciesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListPoliciesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponseOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponseOrBuilder.java index 54a77f75..1faeb31c 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponseOrBuilder.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponseOrBuilder.java @@ -78,8 +78,7 @@ public interface ListPoliciesResponseOrBuilder * * *- * A page token that you can use in a - * [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the + * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the * next page. If this field is omitted, there are no additional pages. ** @@ -92,8 +91,7 @@ public interface ListPoliciesResponseOrBuilder * * *- * A page token that you can use in a - * [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the + * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the * next page. If this field is omitted, there are no additional pages. ** diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/Policy.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/Policy.java index 2de2078e..82a241e7 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/Policy.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/Policy.java @@ -58,161 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Policy( - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - uid_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - kind_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - annotations_ = - com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntryannotations__ = - input.readMessage( - AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 58: - { - 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 66: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 74: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (deleteTime_ != null) { - subBuilder = deleteTime_.toBuilder(); - } - deleteTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deleteTime_); - deleteTime_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - rules_ = new java.util.ArrayList (); - mutable_bitField0_ |= 0x00000002; - } - rules_.add( - input.readMessage(com.google.iam.v2.PolicyRule.parser(), extensionRegistry)); - break; - } - case 90: - { - java.lang.String s = input.readStringRequireUtf8(); - - managingAuthority_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_Policy_descriptor; } @@ -307,8 +152,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * * - * Immutable. The globally unique ID of the `Policy`. Assigned automatically - * when the `Policy` is created. + * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the + * `Policy` is created. ** *string uid = 2 [(.google.api.field_behavior) = IMMUTABLE];
@@ -331,8 +176,8 @@ public java.lang.String getUid() { * * *- * Immutable. The globally unique ID of the `Policy`. Assigned automatically - * when the `Policy` is created. + * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the + * `Policy` is created. ** *string uid = 2 [(.google.api.field_behavior) = IMMUTABLE];
@@ -358,8 +203,7 @@ public com.google.protobuf.ByteString getUidBytes() { * * *- * Output only. The kind of the `Policy`. Always contains the value - * `DenyPolicy`. + * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. ** *string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -382,8 +226,7 @@ public java.lang.String getKind() { * * *- * Output only. The kind of the `Policy`. Always contains the value - * `DenyPolicy`. + * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. ** *string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -719,8 +562,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *- * Output only. The time when the `Policy` was deleted. Empty if the policy is - * not deleted. + * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. ** *.google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -736,8 +578,7 @@ public boolean hasDeleteTime() { * * *
- * Output only. The time when the `Policy` was deleted. Empty if the policy is - * not deleted. + * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. ** *.google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -753,8 +594,7 @@ public com.google.protobuf.Timestamp getDeleteTime() { * * *
- * Output only. The time when the `Policy` was deleted. Empty if the policy is - * not deleted. + * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. ** *.google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -844,8 +684,8 @@ public com.google.iam.v2.PolicyRuleOrBuilder getRulesOrBuilder(int index) { * * *
- * Immutable. Specifies that this policy is managed by an authority and can - * only be modified by that authority. Usage is restricted. + * Immutable. Specifies that this policy is managed by an authority and can only be + * modified by that authority. Usage is restricted. ** *string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE];
@@ -868,8 +708,8 @@ public java.lang.String getManagingAuthority() { * * *- * Immutable. Specifies that this policy is managed by an authority and can - * only be modified by that authority. Usage is restricted. + * Immutable. Specifies that this policy is managed by an authority and can only be + * modified by that authority. Usage is restricted. ** *string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE];
@@ -935,7 +775,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(managingAuthority_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, managingAuthority_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -984,7 +824,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(managingAuthority_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, managingAuthority_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1019,7 +859,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getRulesList().equals(other.getRulesList())) return false; if (!getManagingAuthority().equals(other.getManagingAuthority())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1062,7 +902,7 @@ public int hashCode() { } hash = (37 * hash) + MANAGING_AUTHORITY_FIELD_NUMBER; hash = (53 * hash) + getManagingAuthority().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1207,19 +1047,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.iam.v2.Policy.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRulesFieldBuilder(); - } } @java.lang.Override @@ -1256,10 +1087,11 @@ public Builder clear() { } if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + rules_ = null; rulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); managingAuthority_ = ""; return this; @@ -1430,7 +1262,7 @@ public Builder mergeFrom(com.google.iam.v2.Policy other) { managingAuthority_ = other.managingAuthority_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1445,17 +1277,108 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2.Policy parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + kind_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntryannotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + break; + } // case 42 + case 50: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 66: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 + case 74: + { + input.readMessage(getDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 74 + case 82: + { + com.google.iam.v2.PolicyRule m = + input.readMessage(com.google.iam.v2.PolicyRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 82 + case 90: + { + managingAuthority_ = input.readStringRequireUtf8(); + + break; + } // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2.Policy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1612,8 +1535,8 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * * - * Immutable. The globally unique ID of the `Policy`. Assigned automatically - * when the `Policy` is created. + * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the + * `Policy` is created. ** *string uid = 2 [(.google.api.field_behavior) = IMMUTABLE];
@@ -1635,8 +1558,8 @@ public java.lang.String getUid() { * * *- * Immutable. The globally unique ID of the `Policy`. Assigned automatically - * when the `Policy` is created. + * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the + * `Policy` is created. ** *string uid = 2 [(.google.api.field_behavior) = IMMUTABLE];
@@ -1658,8 +1581,8 @@ public com.google.protobuf.ByteString getUidBytes() { * * *- * Immutable. The globally unique ID of the `Policy`. Assigned automatically - * when the `Policy` is created. + * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the + * `Policy` is created. ** *string uid = 2 [(.google.api.field_behavior) = IMMUTABLE];
@@ -1680,8 +1603,8 @@ public Builder setUid(java.lang.String value) { * * *- * Immutable. The globally unique ID of the `Policy`. Assigned automatically - * when the `Policy` is created. + * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the + * `Policy` is created. ** *string uid = 2 [(.google.api.field_behavior) = IMMUTABLE];
@@ -1698,8 +1621,8 @@ public Builder clearUid() { * * *- * Immutable. The globally unique ID of the `Policy`. Assigned automatically - * when the `Policy` is created. + * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the + * `Policy` is created. ** *string uid = 2 [(.google.api.field_behavior) = IMMUTABLE];
@@ -1723,8 +1646,7 @@ public Builder setUidBytes(com.google.protobuf.ByteString value) { * * *- * Output only. The kind of the `Policy`. Always contains the value - * `DenyPolicy`. + * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. ** *string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -1746,8 +1668,7 @@ public java.lang.String getKind() { * * *- * Output only. The kind of the `Policy`. Always contains the value - * `DenyPolicy`. + * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. ** *string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -1769,8 +1690,7 @@ public com.google.protobuf.ByteString getKindBytes() { * * *- * Output only. The kind of the `Policy`. Always contains the value - * `DenyPolicy`. + * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. ** *string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -1791,8 +1711,7 @@ public Builder setKind(java.lang.String value) { * * *- * Output only. The kind of the `Policy`. Always contains the value - * `DenyPolicy`. + * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. ** *string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -1809,8 +1728,7 @@ public Builder clearKind() { * * *- * Output only. The kind of the `Policy`. Always contains the value - * `DenyPolicy`. + * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. ** *string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -2646,8 +2564,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *- * Output only. The time when the `Policy` was deleted. Empty if the policy is - * not deleted. + * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. ** *@@ -2663,8 +2580,7 @@ public boolean hasDeleteTime() { * * *
- * Output only. The time when the `Policy` was deleted. Empty if the policy is - * not deleted. + * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. ** *@@ -2686,8 +2602,7 @@ public com.google.protobuf.Timestamp getDeleteTime() { * * *
- * Output only. The time when the `Policy` was deleted. Empty if the policy is - * not deleted. + * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. ** *@@ -2711,8 +2626,7 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp value) { * * *
- * Output only. The time when the `Policy` was deleted. Empty if the policy is - * not deleted. + * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. ** *@@ -2733,8 +2647,7 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
- * Output only. The time when the `Policy` was deleted. Empty if the policy is - * not deleted. + * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. ** *@@ -2760,8 +2673,7 @@ public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { * * *
- * Output only. The time when the `Policy` was deleted. Empty if the policy is - * not deleted. + * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. ** *@@ -2783,8 +2695,7 @@ public Builder clearDeleteTime() { * * *
- * Output only. The time when the `Policy` was deleted. Empty if the policy is - * not deleted. + * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. ** *@@ -2800,8 +2711,7 @@ public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { * * *
- * Output only. The time when the `Policy` was deleted. Empty if the policy is - * not deleted. + * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. ** *@@ -2821,8 +2731,7 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { * * *
- * Output only. The time when the `Policy` was deleted. Empty if the policy is - * not deleted. + * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. ** *@@ -3211,8 +3120,8 @@ public java.util.List
getRulesBuilderList( * * * - * Immutable. Specifies that this policy is managed by an authority and can - * only be modified by that authority. Usage is restricted. + * Immutable. Specifies that this policy is managed by an authority and can only be + * modified by that authority. Usage is restricted. ** *string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE];
@@ -3234,8 +3143,8 @@ public java.lang.String getManagingAuthority() { * * *- * Immutable. Specifies that this policy is managed by an authority and can - * only be modified by that authority. Usage is restricted. + * Immutable. Specifies that this policy is managed by an authority and can only be + * modified by that authority. Usage is restricted. ** *string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE];
@@ -3257,8 +3166,8 @@ public com.google.protobuf.ByteString getManagingAuthorityBytes() { * * *- * Immutable. Specifies that this policy is managed by an authority and can - * only be modified by that authority. Usage is restricted. + * Immutable. Specifies that this policy is managed by an authority and can only be + * modified by that authority. Usage is restricted. ** *string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE];
@@ -3279,8 +3188,8 @@ public Builder setManagingAuthority(java.lang.String value) { * * *- * Immutable. Specifies that this policy is managed by an authority and can - * only be modified by that authority. Usage is restricted. + * Immutable. Specifies that this policy is managed by an authority and can only be + * modified by that authority. Usage is restricted. ** *string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE];
@@ -3297,8 +3206,8 @@ public Builder clearManagingAuthority() { * * *- * Immutable. Specifies that this policy is managed by an authority and can - * only be modified by that authority. Usage is restricted. + * Immutable. Specifies that this policy is managed by an authority and can only be + * modified by that authority. Usage is restricted. ** *string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE];
@@ -3349,7 +3258,18 @@ public Policy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Policy(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadata.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadata.java index 3f3b95fc..b8aae544 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadata.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadata.java @@ -50,60 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PolicyOperationMetadata( - 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.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; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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 com.google.iam.v2.PolicyProto .internal_static_google_iam_v2_PolicyOperationMetadata_descriptor; @@ -182,7 +128,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (createTime_ != null) { output.writeMessage(1, getCreateTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -194,7 +140,7 @@ public int getSerializedSize() { if (createTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +160,7 @@ public boolean equals(final java.lang.Object obj) { if (hasCreateTime()) { if (!getCreateTime().equals(other.getCreateTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -229,7 +175,7 @@ public int hashCode() { hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreateTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -358,17 +304,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2.PolicyOperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -464,7 +403,7 @@ public Builder mergeFrom(com.google.iam.v2.PolicyOperationMetadata other) { if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -479,17 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2.PolicyOperationMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2.PolicyOperationMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -708,7 +667,18 @@ public PolicyOperationMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyOperationMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOrBuilder.java index 276617f9..84433497 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOrBuilder.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOrBuilder.java @@ -68,8 +68,8 @@ public interface PolicyOrBuilder * * *- * Immutable. The globally unique ID of the `Policy`. Assigned automatically - * when the `Policy` is created. + * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the + * `Policy` is created. ** *string uid = 2 [(.google.api.field_behavior) = IMMUTABLE];
@@ -81,8 +81,8 @@ public interface PolicyOrBuilder * * *- * Immutable. The globally unique ID of the `Policy`. Assigned automatically - * when the `Policy` is created. + * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the + * `Policy` is created. ** *string uid = 2 [(.google.api.field_behavior) = IMMUTABLE];
@@ -95,8 +95,7 @@ public interface PolicyOrBuilder * * *- * Output only. The kind of the `Policy`. Always contains the value - * `DenyPolicy`. + * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. ** *string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -108,8 +107,7 @@ public interface PolicyOrBuilder * * *- * Output only. The kind of the `Policy`. Always contains the value - * `DenyPolicy`. + * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. ** *string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -322,8 +320,7 @@ java.lang.String getAnnotationsOrDefault( * * *- * Output only. The time when the `Policy` was deleted. Empty if the policy is - * not deleted. + * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. ** *.google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -336,8 +333,7 @@ java.lang.String getAnnotationsOrDefault( * * *
- * Output only. The time when the `Policy` was deleted. Empty if the policy is - * not deleted. + * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. ** *.google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -350,8 +346,7 @@ java.lang.String getAnnotationsOrDefault( * * *
- * Output only. The time when the `Policy` was deleted. Empty if the policy is - * not deleted. + * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. ** *.google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -419,8 +414,8 @@ java.lang.String getAnnotationsOrDefault( * * *
- * Immutable. Specifies that this policy is managed by an authority and can - * only be modified by that authority. Usage is restricted. + * Immutable. Specifies that this policy is managed by an authority and can only be + * modified by that authority. Usage is restricted. ** *string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE];
@@ -432,8 +427,8 @@ java.lang.String getAnnotationsOrDefault( * * *- * Immutable. Specifies that this policy is managed by an authority and can - * only be modified by that authority. Usage is restricted. + * Immutable. Specifies that this policy is managed by an authority and can only be + * modified by that authority. Usage is restricted. ** *string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE];
diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyProto.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyProto.java index 7b921a99..9cbab033 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyProto.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyProto.java @@ -63,14 +63,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_iam_v2_DeletePolicyRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_iam_v2_DeletePolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2_ListApplicablePoliciesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2_ListApplicablePoliciesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2_ListApplicablePoliciesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2_ListApplicablePoliciesResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_iam_v2_PolicyOperationMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -114,44 +106,34 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "id\030\003 \001(\t\"A\n\023UpdatePolicyRequest\022*\n\006polic" + "y\030\001 \001(\0132\025.google.iam.v2.PolicyB\003\340A\002\";\n\023D" + "eletePolicyRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\021\n" - + "\004etag\030\002 \001(\tB\003\340A\001\"u\n\035ListApplicablePolici" - + "esRequest\022\035\n\020attachment_point\030\001 \001(\tB\003\340A\002" - + "\022\016\n\006filter\030\002 \001(\t\022\022\n\npage_token\030\003 \001(\t\022\021\n\t" - + "page_size\030\004 \001(\005\"x\n\036ListApplicablePolicie" - + "sResponse\022\'\n\010policies\030\001 \003(\0132\025.google.iam" - + ".v2.Policy\022\024\n\014inaccessible\030\002 \003(\t\022\027\n\017next" - + "_page_token\030\003 \001(\t\"J\n\027PolicyOperationMeta" - + "data\022/\n\013create_time\030\001 \001(\0132\032.google.proto" - + "buf.Timestamp2\224\010\n\010Policies\022\203\001\n\014ListPolic" - + "ies\022\".google.iam.v2.ListPoliciesRequest\032" - + "#.google.iam.v2.ListPoliciesResponse\"*\202\323" - + "\344\223\002\033\022\031/v2/{parent=policies/*/*}\332A\006parent" - + "\022m\n\tGetPolicy\022\037.google.iam.v2.GetPolicyR" - + "equest\032\025.google.iam.v2.Policy\"(\202\323\344\223\002\033\022\031/" - + "v2/{name=policies/*/*/*}\332A\004name\022\272\001\n\014Crea" - + "tePolicy\022\".google.iam.v2.CreatePolicyReq" - + "uest\032\035.google.longrunning.Operation\"g\202\323\344" - + "\223\002#\"\031/v2/{parent=policies/*/*}:\006policy\332A" - + "\027parent,policy,policy_id\312A!\n\006Policy\022\027Pol" - + "icyOperationMetadata\022\247\001\n\014UpdatePolicy\022\"." - + "google.iam.v2.UpdatePolicyRequest\032\035.goog" - + "le.longrunning.Operation\"T\202\323\344\223\002*\032 /v2/{p" - + "olicy.name=policies/*/*/*}:\006policy\312A!\n\006P" - + "olicy\022\027PolicyOperationMetadata\022\237\001\n\014Delet" - + "ePolicy\022\".google.iam.v2.DeletePolicyRequ" - + "est\032\035.google.longrunning.Operation\"L\202\323\344\223" - + "\002\033*\031/v2/{name=policies/*/*/*}\332A\004name\312A!\n" - + "\006Policy\022\027PolicyOperationMetadata\022\301\001\n\026Lis" - + "tApplicablePolicies\022,.google.iam.v2.List" - + "ApplicablePoliciesRequest\032-.google.iam.v" - + "2.ListApplicablePoliciesResponse\"J\202\323\344\223\0021" - + "\022//v2/{attachment_point=*}:listApplicabl" - + "ePolicies\332A\020attachment_point\032F\312A\022iam.goo" - + "gleapis.com\322A.https://www.googleapis.com" - + "/auth/cloud-platformB\200\001\n\021com.google.iam." - + "v2B\013PolicyProtoP\001Z0google.golang.org/gen" - + "proto/googleapis/iam/v2;iam\252\002\023Google.Clo" - + "ud.Iam.V2\312\002\023Google\\Cloud\\Iam\\V2b\006proto3" + + "\004etag\030\002 \001(\tB\003\340A\001\"J\n\027PolicyOperationMetad" + + "ata\022/\n\013create_time\030\001 \001(\0132\032.google.protob" + + "uf.Timestamp2\320\006\n\010Policies\022\203\001\n\014ListPolici" + + "es\022\".google.iam.v2.ListPoliciesRequest\032#" + + ".google.iam.v2.ListPoliciesResponse\"*\202\323\344" + + "\223\002\033\022\031/v2/{parent=policies/*/*}\332A\006parent\022" + + "m\n\tGetPolicy\022\037.google.iam.v2.GetPolicyRe" + + "quest\032\025.google.iam.v2.Policy\"(\202\323\344\223\002\033\022\031/v" + + "2/{name=policies/*/*/*}\332A\004name\022\272\001\n\014Creat" + + "ePolicy\022\".google.iam.v2.CreatePolicyRequ" + + "est\032\035.google.longrunning.Operation\"g\202\323\344\223" + + "\002#\"\031/v2/{parent=policies/*/*}:\006policy\332A\027" + + "parent,policy,policy_id\312A!\n\006Policy\022\027Poli" + + "cyOperationMetadata\022\247\001\n\014UpdatePolicy\022\".g" + + "oogle.iam.v2.UpdatePolicyRequest\032\035.googl" + + "e.longrunning.Operation\"T\202\323\344\223\002*\032 /v2/{po" + + "licy.name=policies/*/*/*}:\006policy\312A!\n\006Po" + + "licy\022\027PolicyOperationMetadata\022\237\001\n\014Delete" + + "Policy\022\".google.iam.v2.DeletePolicyReque" + + "st\032\035.google.longrunning.Operation\"L\202\323\344\223\002" + + "\033*\031/v2/{name=policies/*/*/*}\332A\004name\312A!\n\006" + + "Policy\022\027PolicyOperationMetadata\032F\312A\022iam." + + "googleapis.com\322A.https://www.googleapis." + + "com/auth/cloud-platformB\200\001\n\021com.google.i" + + "am.v2B\013PolicyProtoP\001Z0google.golang.org/" + + "genproto/googleapis/iam/v2;iam\252\002\023Google." + + "Cloud.Iam.V2\312\002\023Google\\Cloud\\Iam\\V2b\006prot" + + "o3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -244,24 +226,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "Etag", }); - internal_static_google_iam_v2_ListApplicablePoliciesRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_iam_v2_ListApplicablePoliciesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2_ListApplicablePoliciesRequest_descriptor, - new java.lang.String[] { - "AttachmentPoint", "Filter", "PageToken", "PageSize", - }); - internal_static_google_iam_v2_ListApplicablePoliciesResponse_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_iam_v2_ListApplicablePoliciesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2_ListApplicablePoliciesResponse_descriptor, - new java.lang.String[] { - "Policies", "Inaccessible", "NextPageToken", - }); internal_static_google_iam_v2_PolicyOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(8); internal_static_google_iam_v2_PolicyOperationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_iam_v2_PolicyOperationMetadata_descriptor, diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyRule.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyRule.java index c1de50c9..032fa2bb 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyRule.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyRule.java @@ -52,66 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PolicyRule( - 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(); - - description_ = s; - break; - } - case 18: - { - com.google.iam.v2.DenyRule.Builder subBuilder = null; - if (kindCase_ == 2) { - subBuilder = ((com.google.iam.v2.DenyRule) kind_).toBuilder(); - } - kind_ = input.readMessage(com.google.iam.v2.DenyRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.iam.v2.DenyRule) kind_); - kind_ = subBuilder.buildPartial(); - } - kindCase_ = 2; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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 com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_PolicyRule_descriptor; } @@ -290,7 +230,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (kindCase_ == 2) { output.writeMessage(2, (com.google.iam.v2.DenyRule) kind_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -307,7 +247,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, (com.google.iam.v2.DenyRule) kind_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -331,7 +271,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -352,7 +292,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -478,22 +418,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2.PolicyRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} 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 (denyRuleBuilder_ != null) { + denyRuleBuilder_.clear(); + } description_ = ""; kindCase_ = 0; @@ -596,7 +532,7 @@ public Builder mergeFrom(com.google.iam.v2.PolicyRule other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,17 +547,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2.PolicyRule parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getDenyRuleFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2.PolicyRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -987,7 +949,18 @@ public PolicyRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequest.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequest.java index d9f857e3..d7810fed 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequest.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequest.java @@ -50,59 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdatePolicyRequest( - 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.iam.v2.Policy.Builder subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = input.readMessage(com.google.iam.v2.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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 com.google.iam.v2.PolicyProto .internal_static_google_iam_v2_UpdatePolicyRequest_descriptor; @@ -190,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (policy_ != null) { output.writeMessage(1, getPolicy()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -202,7 +149,7 @@ public int getSerializedSize() { if (policy_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicy()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -221,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPolicy()) { if (!getPolicy().equals(other.getPolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -236,7 +183,7 @@ public int hashCode() { hash = (37 * hash) + POLICY_FIELD_NUMBER; hash = (53 * hash) + getPolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -364,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2.UpdatePolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -470,7 +410,7 @@ public Builder mergeFrom(com.google.iam.v2.UpdatePolicyRequest other) { if (other.hasPolicy()) { mergePolicy(other.getPolicy()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -485,17 +425,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2.UpdatePolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2.UpdatePolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -735,7 +695,18 @@ public UpdatePolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdatePolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/src/main/proto/google/iam/v2/policy.proto b/proto-google-iam-v2/src/main/proto/google/iam/v2/policy.proto index b21d44fa..d8923d3b 100644 --- a/proto-google-iam-v2/src/main/proto/google/iam/v2/policy.proto +++ b/proto-google-iam-v2/src/main/proto/google/iam/v2/policy.proto @@ -33,8 +33,7 @@ option php_namespace = "Google\\Cloud\\Iam\\V2"; // An interface for managing Identity and Access Management (IAM) policies. service Policies { option (google.api.default_host) = "iam.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; // Retrieves the policies of the specified kind that are attached to a // resource. @@ -75,8 +74,7 @@ service Policies { // // To update a policy, you should use a read-modify-write loop: // - // 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current - // version of the policy. + // 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy. // 2. Modify the policy as needed. // 3. Use `UpdatePolicy` to write the updated policy. // @@ -103,24 +101,6 @@ service Policies { metadata_type: "PolicyOperationMetadata" }; } - - // Retrieves all the policies that are attached to the specified resource, - // or anywhere in the ancestry of the resource. For example, for a project - // this endpoint would return all the `denyPolicy` kind policies attached to - // the project, its parent folder (if any), and its parent organization (if - // any). - // The endpoint requires the same permissions that it would take to call - // `ListPolicies` or `GetPolicy`. - // - // The main reason to use this endpoint is as a policy admin to debug access - // issues for a resource. - rpc ListApplicablePolicies(ListApplicablePoliciesRequest) - returns (ListApplicablePoliciesResponse) { - option (google.api.http) = { - get: "/v2/{attachment_point=*}:listApplicablePolicies" - }; - option (google.api.method_signature) = "attachment_point"; - } } // Data for an IAM policy. @@ -139,12 +119,11 @@ message Policy { // Responses always contain the numeric ID. string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - // Immutable. The globally unique ID of the `Policy`. Assigned automatically - // when the `Policy` is created. + // Immutable. The globally unique ID of the `Policy`. Assigned automatically when the + // `Policy` is created. string uid = 2 [(google.api.field_behavior) = IMMUTABLE]; - // Output only. The kind of the `Policy`. Always contains the value - // `DenyPolicy`. + // Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. string kind = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // A user-specified description of the `Policy`. This value can be up to 63 @@ -164,24 +143,20 @@ message Policy { string etag = 6; // Output only. The time when the `Policy` was created. - google.protobuf.Timestamp create_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the `Policy` was last updated. - google.protobuf.Timestamp update_time = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The time when the `Policy` was deleted. Empty if the policy is - // not deleted. - google.protobuf.Timestamp delete_time = 9 - [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. + google.protobuf.Timestamp delete_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // A list of rules that specify the behavior of the `Policy`. All of the rules // should be of the `kind` specified in the `Policy`. repeated PolicyRule rules = 10; - // Immutable. Specifies that this policy is managed by an authority and can - // only be modified by that authority. Usage is restricted. + // Immutable. Specifies that this policy is managed by an authority and can only be + // modified by that authority. Usage is restricted. string managing_authority = 11 [(google.api.field_behavior) = IMMUTABLE]; } @@ -199,8 +174,9 @@ message PolicyRule { // Request message for `ListPolicies`. message ListPoliciesRequest { - // Required. The resource that the policy is attached to, along with the kind - // of policy to list. Format: `policies/{attachment_point}/denypolicies` + // Required. The resource that the policy is attached to, along with the kind of policy + // to list. Format: + // `policies/{attachment_point}/denypolicies` // // // The attachment point is identified by its URL-encoded full resource name, @@ -216,9 +192,8 @@ message ListPoliciesRequest { // the value 1000. int32 page_size = 2; - // A page token received in a - // [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this - // token to retrieve the next page. + // A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to + // retrieve the next page. string page_token = 3; } @@ -227,8 +202,7 @@ message ListPoliciesResponse { // Metadata for the policies that are attached to the resource. repeated Policy policies = 1; - // A page token that you can use in a - // [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the + // A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the // next page. If this field is omitted, there are no additional pages. string next_page_token = 2; } @@ -250,8 +224,8 @@ message GetPolicyRequest { // Request message for `CreatePolicy`. message CreatePolicyRequest { - // Required. The resource that the policy is attached to, along with the kind - // of policy to create. Format: `policies/{attachment_point}/denypolicies` + // Required. The resource that the policy is attached to, along with the kind of policy + // to create. Format: `policies/{attachment_point}/denypolicies` // // // The attachment point is identified by its URL-encoded full resource name, @@ -297,78 +271,15 @@ message DeletePolicyRequest { // name. For projects, you can use the alphanumeric or the numeric ID. string name = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. The expected `etag` of the policy to delete. If the value does - // not match the value that is stored in IAM, the request fails with a `409` - // error code and `ABORTED` status. + // Optional. The expected `etag` of the policy to delete. If the value does not match + // the value that is stored in IAM, the request fails with a `409` error code + // and `ABORTED` status. // // If you omit this field, the policy is deleted regardless of its current // `etag`. string etag = 2 [(google.api.field_behavior) = OPTIONAL]; } -// `ListApplicablePoliciesRequest` represents the Request message for the -// `ListApplicablePolicies` method. It provides the input for a filterable query -// of Policies that apply to a certain GCP Resource, specified by the field -// `attachment_point`, found on this message. -// Example: -// ``` -// { -// attachment_point: -// 'cloudresourcemanager.googleapis.com%2Forganizations%2F212345678901' -// filter: 'kind:denyPolicies' -// } -// ``` -message ListApplicablePoliciesRequest { - // Required. The Cloud resource at which the applicable policies are to be - // retrieved. Format: `{attachment-point}` Use the URL-encoded full resource - // name, which means that the forward-slash character, `/`, must be written as - // `%2F`. For example, - // `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`. - string attachment_point = 1 [(google.api.field_behavior) = REQUIRED]; - - // Filtering currently only supports the kind of policies to return, and - // must be in the format “kind:[policyKind1] OR kind:[policyKind2]”. New - // policy kinds may be added in the future without notice. - // - // Example value: “kind:denyPolicies” - string filter = 2; - - // If present, then retrieve the batch of results following the results from - // the preceding call to this method. `page_token` must be the value of - // `next_page_token` - // [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token] - // from the previous response. The values of other method parameters should - // be identical to those in the previous call. - string page_token = 3; - - // Limit on the number of policies to include in the response. - // Further policies can subsequently be obtained by including the - // [ListApplicablePoliciesResponse.next_page_token][google.iam.admin.v1.ListApplicablePoliciesResponse.next_page_token] - // in a subsequent request. - // The minimum is 25, and the maximum is 100. - int32 page_size = 4; -} - -// Response message for [ListApplicablePolicies][] method. -message ListApplicablePoliciesResponse { - // Ordered list starting from the resource on which this API was called - // then proceeding up the hierarchy. Policies for the same attachment point - // will be grouped, but no further ordering is guaranteed. - repeated Policy policies = 1; - - // A list of resources that the caller does not have permission to retrieve. - // List or Get can be used to get detailed error messages. - // Get: `policies/{attachment-point}/denypolicies/{policy-id}` - // List: `policies/{attachment-point}/denypolicies` - repeated string inaccessible = 2; - - // A page token that can be used in a - // [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest] - // to retrieve the next page. If this field is blank, there are no additional - // pages. - string next_page_token = 3; -} - // Metadata for long-running `Policy` operations. message PolicyOperationMetadata { // Timestamp when the `google.longrunning.Operation` was created. diff --git a/proto-google-iam-v2beta/pom.xml b/proto-google-iam-v2beta/pom.xml index 2954a33e..cb827650 100644 --- a/proto-google-iam-v2beta/pom.xml +++ b/proto-google-iam-v2beta/pom.xml @@ -4,13 +4,13 @@4.0.0 com.google.api.grpc proto-google-iam-v2beta -1.6.1 +1.6.2 proto-google-iam-v2beta Proto library for proto-google-iam-v1 com.google.cloud google-iam-parent -1.6.1 +1.6.2 diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequest.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequest.java index dc8b15da..4c91193e 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequest.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequest.java @@ -53,73 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreatePolicyRequest( - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.iam.v2beta.Policy.Builder subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = input.readMessage(com.google.iam.v2beta.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - policyId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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 com.google.iam.v2beta.PolicyProto .internal_static_google_iam_v2beta_CreatePolicyRequest_descriptor; @@ -322,7 +255,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, policyId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -340,7 +273,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, policyId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -362,7 +295,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPolicy().equals(other.getPolicy())) return false; } if (!getPolicyId().equals(other.getPolicyId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -381,7 +314,7 @@ public int hashCode() { } hash = (37 * hash) + POLICY_ID_FIELD_NUMBER; hash = (53 * hash) + getPolicyId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -510,17 +443,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2beta.CreatePolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -630,7 +556,7 @@ public Builder mergeFrom(com.google.iam.v2beta.CreatePolicyRequest other) { policyId_ = other.policyId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -645,17 +571,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2beta.CreatePolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + policyId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2beta.CreatePolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1132,7 +1090,18 @@ public CreatePolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreatePolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequest.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequest.java index 9899a5c3..255a71ec 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequest.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeletePolicyRequest( - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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 com.google.iam.v2beta.PolicyProto .internal_static_google_iam_v2beta_DeletePolicyRequest_descriptor; @@ -259,7 +206,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -274,7 +221,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -292,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getEtag().equals(other.getEtag())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -307,7 +254,7 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -436,17 +383,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2beta.DeletePolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -542,7 +482,7 @@ public Builder mergeFrom(com.google.iam.v2beta.DeletePolicyRequest other) { etag_ = other.etag_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -557,17 +497,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2beta.DeletePolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2beta.DeletePolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -865,7 +831,18 @@ public DeletePolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeletePolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRule.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRule.java index d7af806b..b776f7b1 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRule.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRule.java @@ -55,113 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DenyRule( - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - deniedPrincipals_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - deniedPrincipals_.add(s); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - exceptionPrincipals_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - exceptionPrincipals_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - deniedPermissions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - deniedPermissions_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - exceptionPermissions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - exceptionPermissions_.add(s); - break; - } - case 42: - { - com.google.type.Expr.Builder subBuilder = null; - if (denialCondition_ != null) { - subBuilder = denialCondition_.toBuilder(); - } - denialCondition_ = - input.readMessage(com.google.type.Expr.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(denialCondition_); - denialCondition_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - deniedPrincipals_ = deniedPrincipals_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - exceptionPrincipals_ = exceptionPrincipals_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - deniedPermissions_ = deniedPermissions_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - exceptionPermissions_ = exceptionPermissions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v2beta.DenyRuleProto .internal_static_google_iam_v2beta_DenyRule_descriptor; @@ -700,7 +593,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (denialCondition_ != null) { output.writeMessage(5, getDenialCondition()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -744,7 +637,7 @@ public int getSerializedSize() { if (denialCondition_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDenialCondition()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -767,7 +660,7 @@ public boolean equals(final java.lang.Object obj) { if (hasDenialCondition()) { if (!getDenialCondition().equals(other.getDenialCondition())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -798,7 +691,7 @@ public int hashCode() { hash = (37 * hash) + DENIAL_CONDITION_FIELD_NUMBER; hash = (53 * hash) + getDenialCondition().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -925,17 +818,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2beta.DenyRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1099,7 +985,7 @@ public Builder mergeFrom(com.google.iam.v2beta.DenyRule other) { if (other.hasDenialCondition()) { mergeDenialCondition(other.getDenialCondition()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1114,17 +1000,65 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2beta.DenyRule parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDeniedPrincipalsIsMutable(); + deniedPrincipals_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExceptionPrincipalsIsMutable(); + exceptionPrincipals_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDeniedPermissionsIsMutable(); + deniedPermissions_.add(s); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExceptionPermissionsIsMutable(); + exceptionPermissions_.add(s); + break; + } // case 34 + case 42: + { + input.readMessage(getDenialConditionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2beta.DenyRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2488,7 +2422,18 @@ public DenyRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DenyRule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequest.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequest.java index 2775a53c..b579600e 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequest.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetPolicyRequest( - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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 com.google.iam.v2beta.PolicyProto .internal_static_google_iam_v2beta_GetPolicyRequest_descriptor; @@ -191,7 +145,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -203,7 +157,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -219,7 +173,7 @@ public boolean equals(final java.lang.Object obj) { com.google.iam.v2beta.GetPolicyRequest other = (com.google.iam.v2beta.GetPolicyRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -232,7 +186,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -361,17 +315,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2beta.GetPolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -460,7 +407,7 @@ public Builder mergeFrom(com.google.iam.v2beta.GetPolicyRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -475,17 +422,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2beta.GetPolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2beta.GetPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -657,7 +624,18 @@ public GetPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetPolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequest.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequest.java index 5f6f150c..c66f7d36 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequest.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListPoliciesRequest( - 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(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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 com.google.iam.v2beta.PolicyProto .internal_static_google_iam_v2beta_ListPoliciesRequest_descriptor; @@ -284,7 +226,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -302,7 +244,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -321,7 +263,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -338,7 +280,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -467,17 +409,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2beta.ListPoliciesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -579,7 +514,7 @@ public Builder mergeFrom(com.google.iam.v2beta.ListPoliciesRequest other) { pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -594,17 +529,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2beta.ListPoliciesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2beta.ListPoliciesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -952,7 +919,18 @@ public ListPoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListPoliciesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponse.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponse.java index 68ede72d..b7559c50 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponse.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponse.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListPoliciesResponse( - 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: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - policies_ = new java.util.ArrayList (); - mutable_bitField0_ |= 0x00000001; - } - policies_.add( - input.readMessage(com.google.iam.v2beta.Policy.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - policies_ = java.util.Collections.unmodifiableList(policies_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v2beta.PolicyProto .internal_static_google_iam_v2beta_ListPoliciesResponse_descriptor; @@ -268,7 +208,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -283,7 +223,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -301,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPoliciesList().equals(other.getPoliciesList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -318,7 +258,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -447,19 +387,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2beta.ListPoliciesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPoliciesFieldBuilder(); - } } @java.lang.Override @@ -467,10 +398,11 @@ public Builder clear() { super.clear(); if (policiesBuilder_ == null) { policies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + policies_ = null; policiesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -591,7 +523,7 @@ public Builder mergeFrom(com.google.iam.v2beta.ListPoliciesResponse other) { nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -606,17 +538,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2beta.ListPoliciesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v2beta.Policy m = + input.readMessage(com.google.iam.v2beta.Policy.parser(), extensionRegistry); + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + policies_.add(m); + } else { + policiesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2beta.ListPoliciesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1111,7 +1075,18 @@ public ListPoliciesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListPoliciesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/Policy.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/Policy.java index 08ae40c8..a2e1a8b7 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/Policy.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/Policy.java @@ -57,154 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Policy( - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - uid_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - kind_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - annotations_ = - com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry annotations__ = - input.readMessage( - AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 58: - { - 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 66: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 74: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (deleteTime_ != null) { - subBuilder = deleteTime_.toBuilder(); - } - deleteTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deleteTime_); - deleteTime_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - rules_ = new java.util.ArrayList (); - mutable_bitField0_ |= 0x00000002; - } - rules_.add( - input.readMessage(com.google.iam.v2beta.PolicyRule.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v2beta.PolicyProto.internal_static_google_iam_v2beta_Policy_descriptor; } @@ -870,7 +722,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < rules_.size(); i++) { output.writeMessage(10, rules_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -916,7 +768,7 @@ public int getSerializedSize() { for (int i = 0; i < rules_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, rules_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -950,7 +802,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDeleteTime().equals(other.getDeleteTime())) return false; } if (!getRulesList().equals(other.getRulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -991,7 +843,7 @@ public int hashCode() { hash = (37 * hash) + RULES_FIELD_NUMBER; hash = (53 * hash) + getRulesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1137,19 +989,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.iam.v2beta.Policy.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRulesFieldBuilder(); - } } @java.lang.Override @@ -1186,10 +1029,11 @@ public Builder clear() { } if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + rules_ = null; rulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -1353,7 +1197,7 @@ public Builder mergeFrom(com.google.iam.v2beta.Policy other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1368,17 +1212,102 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2beta.Policy parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + kind_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + break; + } // case 42 + case 50: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 66: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 + case 74: + { + input.readMessage(getDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 74 + case 82: + { + com.google.iam.v2beta.PolicyRule m = + input.readMessage(com.google.iam.v2beta.PolicyRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2beta.Policy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3151,7 +3080,18 @@ public Policy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Policy(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadata.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadata.java index c1bdb7b3..766a87f7 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadata.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadata.java @@ -50,60 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PolicyOperationMetadata( - 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.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; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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 com.google.iam.v2beta.PolicyProto .internal_static_google_iam_v2beta_PolicyOperationMetadata_descriptor; @@ -182,7 +128,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (createTime_ != null) { output.writeMessage(1, getCreateTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -194,7 +140,7 @@ public int getSerializedSize() { if (createTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +160,7 @@ public boolean equals(final java.lang.Object obj) { if (hasCreateTime()) { if (!getCreateTime().equals(other.getCreateTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -229,7 +175,7 @@ public int hashCode() { hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreateTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -358,17 +304,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2beta.PolicyOperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -464,7 +403,7 @@ public Builder mergeFrom(com.google.iam.v2beta.PolicyOperationMetadata other) { if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -479,17 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2beta.PolicyOperationMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2beta.PolicyOperationMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -708,7 +667,18 @@ public PolicyOperationMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyOperationMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyRule.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyRule.java index d58b2590..27084c7c 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyRule.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyRule.java @@ -52,66 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PolicyRule( - 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(); - - description_ = s; - break; - } - case 18: - { - com.google.iam.v2beta.DenyRule.Builder subBuilder = null; - if (kindCase_ == 2) { - subBuilder = ((com.google.iam.v2beta.DenyRule) kind_).toBuilder(); - } - kind_ = input.readMessage(com.google.iam.v2beta.DenyRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.iam.v2beta.DenyRule) kind_); - kind_ = subBuilder.buildPartial(); - } - kindCase_ = 2; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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 com.google.iam.v2beta.PolicyProto .internal_static_google_iam_v2beta_PolicyRule_descriptor; @@ -292,7 +232,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (kindCase_ == 2) { output.writeMessage(2, (com.google.iam.v2beta.DenyRule) kind_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -309,7 +249,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, (com.google.iam.v2beta.DenyRule) kind_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -333,7 +273,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -354,7 +294,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,22 +422,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2beta.PolicyRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} 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 (denyRuleBuilder_ != null) { + denyRuleBuilder_.clear(); + } description_ = ""; kindCase_ = 0; @@ -601,7 +537,7 @@ public Builder mergeFrom(com.google.iam.v2beta.PolicyRule other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -616,17 +552,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2beta.PolicyRule parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getDenyRuleFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2beta.PolicyRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -992,7 +954,18 @@ public PolicyRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequest.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequest.java index 5904fc84..95eabcdd 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequest.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequest.java @@ -50,59 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdatePolicyRequest( - 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.iam.v2beta.Policy.Builder subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = input.readMessage(com.google.iam.v2beta.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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 com.google.iam.v2beta.PolicyProto .internal_static_google_iam_v2beta_UpdatePolicyRequest_descriptor; @@ -190,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (policy_ != null) { output.writeMessage(1, getPolicy()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -202,7 +149,7 @@ public int getSerializedSize() { if (policy_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicy()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -222,7 +169,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPolicy()) { if (!getPolicy().equals(other.getPolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -237,7 +184,7 @@ public int hashCode() { hash = (37 * hash) + POLICY_FIELD_NUMBER; hash = (53 * hash) + getPolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -366,17 +313,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2beta.UpdatePolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -472,7 +412,7 @@ public Builder mergeFrom(com.google.iam.v2beta.UpdatePolicyRequest other) { if (other.hasPolicy()) { mergePolicy(other.getPolicy()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -487,17 +427,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2beta.UpdatePolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2beta.UpdatePolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -739,7 +699,18 @@ public UpdatePolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdatePolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/renovate.json b/renovate.json index 0d9e4a62..c52f7a39 100644 --- a/renovate.json +++ b/renovate.json @@ -10,6 +10,7 @@ ":maintainLockFilesDisabled", ":autodetectPinVersions" ], + "ignorePaths": [".kokoro/requirements.txt"], "packageRules": [ { "packagePatterns": [ diff --git a/samples/cloud-client/snippets/pom.xml b/samples/cloud-client/snippets/pom.xml index b1fb9963..44a9522b 100644 --- a/samples/cloud-client/snippets/pom.xml +++ b/samples/cloud-client/snippets/pom.xml @@ -26,7 +26,7 @@ com.google.apis google-api-services-cloudresourcemanager -v3-rev20220828-2.0.0 +v3-rev20220925-2.0.0 com.google.auth @@ -39,9 +39,10 @@1.42.2 - com.google.apis -google-api-services-iam -v2beta-rev20220713-2.0.0 +com.google.cloud +google-iam-policy +1.6.1 +compile com.google.apis diff --git a/samples/cloud-client/snippets/src/main/java/CreateDenyPolicy.java b/samples/cloud-client/snippets/src/main/java/CreateDenyPolicy.java index 5cbc966e..d9ea32da 100644 --- a/samples/cloud-client/snippets/src/main/java/CreateDenyPolicy.java +++ b/samples/cloud-client/snippets/src/main/java/CreateDenyPolicy.java @@ -16,11 +16,11 @@ // [START iam_create_deny_policy] -import com.google.iam.v2beta.CreatePolicyRequest; -import com.google.iam.v2beta.DenyRule; -import com.google.iam.v2beta.PoliciesClient; -import com.google.iam.v2beta.Policy; -import com.google.iam.v2beta.PolicyRule; +import com.google.iam.v2.CreatePolicyRequest; +import com.google.iam.v2.DenyRule; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; +import com.google.iam.v2.PolicyRule; import com.google.longrunning.Operation; import com.google.type.Expr; import java.io.IOException; diff --git a/samples/cloud-client/snippets/src/main/java/DeleteDenyPolicy.java b/samples/cloud-client/snippets/src/main/java/DeleteDenyPolicy.java index bf98545c..ef0b9d49 100644 --- a/samples/cloud-client/snippets/src/main/java/DeleteDenyPolicy.java +++ b/samples/cloud-client/snippets/src/main/java/DeleteDenyPolicy.java @@ -16,8 +16,8 @@ // [START iam_delete_deny_policy] -import com.google.iam.v2beta.DeletePolicyRequest; -import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2.DeletePolicyRequest; +import com.google.iam.v2.PoliciesClient; import com.google.longrunning.Operation; import java.io.IOException; import java.net.URLEncoder; diff --git a/samples/cloud-client/snippets/src/main/java/GetDenyPolicy.java b/samples/cloud-client/snippets/src/main/java/GetDenyPolicy.java index 10b1b5c2..0cf4e96c 100644 --- a/samples/cloud-client/snippets/src/main/java/GetDenyPolicy.java +++ b/samples/cloud-client/snippets/src/main/java/GetDenyPolicy.java @@ -16,9 +16,9 @@ // [START iam_get_deny_policy] -import com.google.iam.v2beta.GetPolicyRequest; -import com.google.iam.v2beta.PoliciesClient; -import com.google.iam.v2beta.Policy; +import com.google.iam.v2.GetPolicyRequest; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; import java.io.IOException; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; diff --git a/samples/cloud-client/snippets/src/main/java/ListDenyPolicies.java b/samples/cloud-client/snippets/src/main/java/ListDenyPolicies.java index b8f89da3..566a5946 100644 --- a/samples/cloud-client/snippets/src/main/java/ListDenyPolicies.java +++ b/samples/cloud-client/snippets/src/main/java/ListDenyPolicies.java @@ -16,8 +16,8 @@ // [START iam_list_deny_policy] -import com.google.iam.v2beta.PoliciesClient; -import com.google.iam.v2beta.Policy; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; import java.io.IOException; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; diff --git a/samples/cloud-client/snippets/src/main/java/UpdateDenyPolicy.java b/samples/cloud-client/snippets/src/main/java/UpdateDenyPolicy.java index e0846d7c..28e6bb91 100644 --- a/samples/cloud-client/snippets/src/main/java/UpdateDenyPolicy.java +++ b/samples/cloud-client/snippets/src/main/java/UpdateDenyPolicy.java @@ -16,11 +16,11 @@ // [START iam_update_deny_policy] -import com.google.iam.v2beta.DenyRule; -import com.google.iam.v2beta.PoliciesClient; -import com.google.iam.v2beta.Policy; -import com.google.iam.v2beta.PolicyRule; -import com.google.iam.v2beta.UpdatePolicyRequest; +import com.google.iam.v2.DenyRule; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; +import com.google.iam.v2.PolicyRule; +import com.google.iam.v2.UpdatePolicyRequest; import com.google.longrunning.Operation; import com.google.type.Expr; import java.io.IOException; diff --git a/samples/cloud-client/snippets/src/test/java/DenyIT.java b/samples/cloud-client/snippets/src/test/java/DenyIT.java index a0af4cbc..76db0dbc 100644 --- a/samples/cloud-client/snippets/src/test/java/DenyIT.java +++ b/samples/cloud-client/snippets/src/test/java/DenyIT.java @@ -17,8 +17,8 @@ import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertWithMessage; -import com.google.iam.v2beta.PoliciesClient; -import com.google.iam.v2beta.Policy; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; diff --git a/versions.txt b/versions.txt index e1f86383..361cf793 100644 --- a/versions.txt +++ b/versions.txt @@ -1,10 +1,10 @@ # Format: # module:released-version:current-version -proto-google-iam-v1:1.6.1:1.6.1 -grpc-google-iam-v1:1.6.1:1.6.1 -proto-google-iam-v2beta:1.6.1:1.6.1 -grpc-google-iam-v2beta:1.6.1:1.6.1 -google-iam-policy:1.6.1:1.6.1 -proto-google-iam-v2:1.6.1:1.6.1 -grpc-google-iam-v2:1.6.1:1.6.1 +proto-google-iam-v1:1.6.2:1.6.2 +grpc-google-iam-v1:1.6.2:1.6.2 +proto-google-iam-v2beta:1.6.2:1.6.2 +grpc-google-iam-v2beta:1.6.2:1.6.2 +google-iam-policy:1.6.2:1.6.2 +proto-google-iam-v2:1.6.2:1.6.2 +grpc-google-iam-v2:1.6.2:1.6.2