diff --git a/gapic-generator-java-bom/pom.xml b/gapic-generator-java-bom/pom.xml index dc9dbdaa47..9ecc9b29b3 100644 --- a/gapic-generator-java-bom/pom.xml +++ b/gapic-generator-java-bom/pom.xml @@ -119,6 +119,11 @@ proto-google-iam-v3 1.50.4-SNAPSHOT + + com.google.api.grpc + proto-google-iam-v3beta + 1.50.4-SNAPSHOT + @@ -141,6 +146,11 @@ grpc-google-iam-v3 1.50.4-SNAPSHOT + + com.google.api.grpc + grpc-google-iam-v3beta + 1.50.4-SNAPSHOT + diff --git a/generation_config.yaml b/generation_config.yaml index f36f326154..a5e3a29b66 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -49,4 +49,5 @@ libraries: - proto_path: google/iam/v1 - proto_path: google/iam/v2 - proto_path: google/iam/v2beta - - proto_path: google/iam/v3 \ No newline at end of file + - proto_path: google/iam/v3 + - proto_path: google/iam/v3beta \ No newline at end of file diff --git a/java-iam/grpc-google-iam-v3beta/pom.xml b/java-iam/grpc-google-iam-v3beta/pom.xml new file mode 100644 index 0000000000..3fce3fce42 --- /dev/null +++ b/java-iam/grpc-google-iam-v3beta/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-iam-v3beta + 1.50.4-SNAPSHOT + grpc-google-iam-v3beta + GRPC library for proto-google-iam-v1 + + com.google.cloud + google-iam-parent + 1.50.4-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v3beta + + + com.google.guava + guava + + + diff --git a/java-iam/grpc-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingsGrpc.java b/java-iam/grpc-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingsGrpc.java new file mode 100644 index 0000000000..4e58618bc0 --- /dev/null +++ b/java-iam/grpc-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingsGrpc.java @@ -0,0 +1,1122 @@ +/* + * Copyright 2025 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. + */ +package com.google.iam.v3beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * An interface for managing Identity and Access Management (IAM) policy
+ * bindings.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/iam/v3beta/policy_bindings_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class PolicyBindingsGrpc { + + private PolicyBindingsGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.iam.v3beta.PolicyBindings"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.CreatePolicyBindingRequest, com.google.longrunning.Operation> + getCreatePolicyBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreatePolicyBinding", + requestType = com.google.iam.v3beta.CreatePolicyBindingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.CreatePolicyBindingRequest, com.google.longrunning.Operation> + getCreatePolicyBindingMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.CreatePolicyBindingRequest, com.google.longrunning.Operation> + getCreatePolicyBindingMethod; + if ((getCreatePolicyBindingMethod = PolicyBindingsGrpc.getCreatePolicyBindingMethod) == null) { + synchronized (PolicyBindingsGrpc.class) { + if ((getCreatePolicyBindingMethod = PolicyBindingsGrpc.getCreatePolicyBindingMethod) + == null) { + PolicyBindingsGrpc.getCreatePolicyBindingMethod = + getCreatePolicyBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreatePolicyBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.CreatePolicyBindingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBindingsMethodDescriptorSupplier("CreatePolicyBinding")) + .build(); + } + } + } + return getCreatePolicyBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.GetPolicyBindingRequest, com.google.iam.v3beta.PolicyBinding> + getGetPolicyBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPolicyBinding", + requestType = com.google.iam.v3beta.GetPolicyBindingRequest.class, + responseType = com.google.iam.v3beta.PolicyBinding.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.GetPolicyBindingRequest, com.google.iam.v3beta.PolicyBinding> + getGetPolicyBindingMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.GetPolicyBindingRequest, com.google.iam.v3beta.PolicyBinding> + getGetPolicyBindingMethod; + if ((getGetPolicyBindingMethod = PolicyBindingsGrpc.getGetPolicyBindingMethod) == null) { + synchronized (PolicyBindingsGrpc.class) { + if ((getGetPolicyBindingMethod = PolicyBindingsGrpc.getGetPolicyBindingMethod) == null) { + PolicyBindingsGrpc.getGetPolicyBindingMethod = + getGetPolicyBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicyBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.GetPolicyBindingRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.PolicyBinding.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBindingsMethodDescriptorSupplier("GetPolicyBinding")) + .build(); + } + } + } + return getGetPolicyBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.UpdatePolicyBindingRequest, com.google.longrunning.Operation> + getUpdatePolicyBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdatePolicyBinding", + requestType = com.google.iam.v3beta.UpdatePolicyBindingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.UpdatePolicyBindingRequest, com.google.longrunning.Operation> + getUpdatePolicyBindingMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.UpdatePolicyBindingRequest, com.google.longrunning.Operation> + getUpdatePolicyBindingMethod; + if ((getUpdatePolicyBindingMethod = PolicyBindingsGrpc.getUpdatePolicyBindingMethod) == null) { + synchronized (PolicyBindingsGrpc.class) { + if ((getUpdatePolicyBindingMethod = PolicyBindingsGrpc.getUpdatePolicyBindingMethod) + == null) { + PolicyBindingsGrpc.getUpdatePolicyBindingMethod = + getUpdatePolicyBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdatePolicyBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.UpdatePolicyBindingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBindingsMethodDescriptorSupplier("UpdatePolicyBinding")) + .build(); + } + } + } + return getUpdatePolicyBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.DeletePolicyBindingRequest, com.google.longrunning.Operation> + getDeletePolicyBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeletePolicyBinding", + requestType = com.google.iam.v3beta.DeletePolicyBindingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.DeletePolicyBindingRequest, com.google.longrunning.Operation> + getDeletePolicyBindingMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.DeletePolicyBindingRequest, com.google.longrunning.Operation> + getDeletePolicyBindingMethod; + if ((getDeletePolicyBindingMethod = PolicyBindingsGrpc.getDeletePolicyBindingMethod) == null) { + synchronized (PolicyBindingsGrpc.class) { + if ((getDeletePolicyBindingMethod = PolicyBindingsGrpc.getDeletePolicyBindingMethod) + == null) { + PolicyBindingsGrpc.getDeletePolicyBindingMethod = + getDeletePolicyBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeletePolicyBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.DeletePolicyBindingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBindingsMethodDescriptorSupplier("DeletePolicyBinding")) + .build(); + } + } + } + return getDeletePolicyBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.ListPolicyBindingsRequest, + com.google.iam.v3beta.ListPolicyBindingsResponse> + getListPolicyBindingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPolicyBindings", + requestType = com.google.iam.v3beta.ListPolicyBindingsRequest.class, + responseType = com.google.iam.v3beta.ListPolicyBindingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.ListPolicyBindingsRequest, + com.google.iam.v3beta.ListPolicyBindingsResponse> + getListPolicyBindingsMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.ListPolicyBindingsRequest, + com.google.iam.v3beta.ListPolicyBindingsResponse> + getListPolicyBindingsMethod; + if ((getListPolicyBindingsMethod = PolicyBindingsGrpc.getListPolicyBindingsMethod) == null) { + synchronized (PolicyBindingsGrpc.class) { + if ((getListPolicyBindingsMethod = PolicyBindingsGrpc.getListPolicyBindingsMethod) + == null) { + PolicyBindingsGrpc.getListPolicyBindingsMethod = + getListPolicyBindingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListPolicyBindings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.ListPolicyBindingsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.ListPolicyBindingsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBindingsMethodDescriptorSupplier("ListPolicyBindings")) + .build(); + } + } + } + return getListPolicyBindingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest, + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse> + getSearchTargetPolicyBindingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchTargetPolicyBindings", + requestType = com.google.iam.v3beta.SearchTargetPolicyBindingsRequest.class, + responseType = com.google.iam.v3beta.SearchTargetPolicyBindingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest, + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse> + getSearchTargetPolicyBindingsMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest, + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse> + getSearchTargetPolicyBindingsMethod; + if ((getSearchTargetPolicyBindingsMethod = + PolicyBindingsGrpc.getSearchTargetPolicyBindingsMethod) + == null) { + synchronized (PolicyBindingsGrpc.class) { + if ((getSearchTargetPolicyBindingsMethod = + PolicyBindingsGrpc.getSearchTargetPolicyBindingsMethod) + == null) { + PolicyBindingsGrpc.getSearchTargetPolicyBindingsMethod = + getSearchTargetPolicyBindingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "SearchTargetPolicyBindings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBindingsMethodDescriptorSupplier("SearchTargetPolicyBindings")) + .build(); + } + } + } + return getSearchTargetPolicyBindingsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static PolicyBindingsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyBindingsStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsStub(channel, callOptions); + } + }; + return PolicyBindingsStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static PolicyBindingsBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyBindingsBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsBlockingV2Stub(channel, callOptions); + } + }; + return PolicyBindingsBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PolicyBindingsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyBindingsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsBlockingStub(channel, callOptions); + } + }; + return PolicyBindingsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PolicyBindingsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyBindingsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsFutureStub(channel, callOptions); + } + }; + return PolicyBindingsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * An interface for managing Identity and Access Management (IAM) policy
+   * bindings.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is created, the policy is applied to the target.
+     * 
+ */ + default void createPolicyBinding( + com.google.iam.v3beta.CreatePolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreatePolicyBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a policy binding.
+     * 
+ */ + default void getPolicyBinding( + com.google.iam.v3beta.GetPolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetPolicyBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on the policy and target in the
+     * binding to update, and the IAM permission to remove the existing policy
+     * from the binding. Target is immutable and cannot be updated. Once the
+     * binding is updated, the new policy is applied to the target.
+     * 
+ */ + default void updatePolicyBinding( + com.google.iam.v3beta.UpdatePolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdatePolicyBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is deleted, the policy no longer applies to the target.
+     * 
+ */ + default void deletePolicyBinding( + com.google.iam.v3beta.DeletePolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeletePolicyBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists policy bindings.
+     * 
+ */ + default void listPolicyBindings( + com.google.iam.v3beta.ListPolicyBindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPolicyBindingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Search policy bindings by target. Returns all policy binding objects bound
+     * directly to target.
+     * 
+ */ + default void searchTargetPolicyBindings( + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSearchTargetPolicyBindingsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service PolicyBindings. + * + *
+   * An interface for managing Identity and Access Management (IAM) policy
+   * bindings.
+   * 
+ */ + public abstract static class PolicyBindingsImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return PolicyBindingsGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service PolicyBindings. + * + *
+   * An interface for managing Identity and Access Management (IAM) policy
+   * bindings.
+   * 
+ */ + public static final class PolicyBindingsStub + extends io.grpc.stub.AbstractAsyncStub { + private PolicyBindingsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyBindingsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is created, the policy is applied to the target.
+     * 
+ */ + public void createPolicyBinding( + com.google.iam.v3beta.CreatePolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreatePolicyBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a policy binding.
+     * 
+ */ + public void getPolicyBinding( + com.google.iam.v3beta.GetPolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPolicyBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on the policy and target in the
+     * binding to update, and the IAM permission to remove the existing policy
+     * from the binding. Target is immutable and cannot be updated. Once the
+     * binding is updated, the new policy is applied to the target.
+     * 
+ */ + public void updatePolicyBinding( + com.google.iam.v3beta.UpdatePolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdatePolicyBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is deleted, the policy no longer applies to the target.
+     * 
+ */ + public void deletePolicyBinding( + com.google.iam.v3beta.DeletePolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeletePolicyBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists policy bindings.
+     * 
+ */ + public void listPolicyBindings( + com.google.iam.v3beta.ListPolicyBindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPolicyBindingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Search policy bindings by target. Returns all policy binding objects bound
+     * directly to target.
+     * 
+ */ + public void searchTargetPolicyBindings( + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchTargetPolicyBindingsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service PolicyBindings. + * + *
+   * An interface for managing Identity and Access Management (IAM) policy
+   * bindings.
+   * 
+ */ + public static final class PolicyBindingsBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private PolicyBindingsBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyBindingsBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is created, the policy is applied to the target.
+     * 
+ */ + public com.google.longrunning.Operation createPolicyBinding( + com.google.iam.v3beta.CreatePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a policy binding.
+     * 
+ */ + public com.google.iam.v3beta.PolicyBinding getPolicyBinding( + com.google.iam.v3beta.GetPolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on the policy and target in the
+     * binding to update, and the IAM permission to remove the existing policy
+     * from the binding. Target is immutable and cannot be updated. Once the
+     * binding is updated, the new policy is applied to the target.
+     * 
+ */ + public com.google.longrunning.Operation updatePolicyBinding( + com.google.iam.v3beta.UpdatePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdatePolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is deleted, the policy no longer applies to the target.
+     * 
+ */ + public com.google.longrunning.Operation deletePolicyBinding( + com.google.iam.v3beta.DeletePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists policy bindings.
+     * 
+ */ + public com.google.iam.v3beta.ListPolicyBindingsResponse listPolicyBindings( + com.google.iam.v3beta.ListPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPolicyBindingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Search policy bindings by target. Returns all policy binding objects bound
+     * directly to target.
+     * 
+ */ + public com.google.iam.v3beta.SearchTargetPolicyBindingsResponse searchTargetPolicyBindings( + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchTargetPolicyBindingsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service PolicyBindings. + * + *
+   * An interface for managing Identity and Access Management (IAM) policy
+   * bindings.
+   * 
+ */ + public static final class PolicyBindingsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private PolicyBindingsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyBindingsBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is created, the policy is applied to the target.
+     * 
+ */ + public com.google.longrunning.Operation createPolicyBinding( + com.google.iam.v3beta.CreatePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a policy binding.
+     * 
+ */ + public com.google.iam.v3beta.PolicyBinding getPolicyBinding( + com.google.iam.v3beta.GetPolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on the policy and target in the
+     * binding to update, and the IAM permission to remove the existing policy
+     * from the binding. Target is immutable and cannot be updated. Once the
+     * binding is updated, the new policy is applied to the target.
+     * 
+ */ + public com.google.longrunning.Operation updatePolicyBinding( + com.google.iam.v3beta.UpdatePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdatePolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is deleted, the policy no longer applies to the target.
+     * 
+ */ + public com.google.longrunning.Operation deletePolicyBinding( + com.google.iam.v3beta.DeletePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists policy bindings.
+     * 
+ */ + public com.google.iam.v3beta.ListPolicyBindingsResponse listPolicyBindings( + com.google.iam.v3beta.ListPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPolicyBindingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Search policy bindings by target. Returns all policy binding objects bound
+     * directly to target.
+     * 
+ */ + public com.google.iam.v3beta.SearchTargetPolicyBindingsResponse searchTargetPolicyBindings( + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchTargetPolicyBindingsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service PolicyBindings. + * + *
+   * An interface for managing Identity and Access Management (IAM) policy
+   * bindings.
+   * 
+ */ + public static final class PolicyBindingsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private PolicyBindingsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyBindingsFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBindingsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is created, the policy is applied to the target.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createPolicyBinding(com.google.iam.v3beta.CreatePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreatePolicyBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a policy binding.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getPolicyBinding(com.google.iam.v3beta.GetPolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPolicyBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on the policy and target in the
+     * binding to update, and the IAM permission to remove the existing policy
+     * from the binding. Target is immutable and cannot be updated. Once the
+     * binding is updated, the new policy is applied to the target.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updatePolicyBinding(com.google.iam.v3beta.UpdatePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdatePolicyBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a policy binding and returns a long-running operation.
+     * Callers will need the IAM permissions on both the policy and target.
+     * Once the binding is deleted, the policy no longer applies to the target.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deletePolicyBinding(com.google.iam.v3beta.DeletePolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeletePolicyBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists policy bindings.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v3beta.ListPolicyBindingsResponse> + listPolicyBindings(com.google.iam.v3beta.ListPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPolicyBindingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Search policy bindings by target. Returns all policy binding objects bound
+     * directly to target.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse> + searchTargetPolicyBindings( + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchTargetPolicyBindingsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_POLICY_BINDING = 0; + private static final int METHODID_GET_POLICY_BINDING = 1; + private static final int METHODID_UPDATE_POLICY_BINDING = 2; + private static final int METHODID_DELETE_POLICY_BINDING = 3; + private static final int METHODID_LIST_POLICY_BINDINGS = 4; + private static final int METHODID_SEARCH_TARGET_POLICY_BINDINGS = 5; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_POLICY_BINDING: + serviceImpl.createPolicyBinding( + (com.google.iam.v3beta.CreatePolicyBindingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_POLICY_BINDING: + serviceImpl.getPolicyBinding( + (com.google.iam.v3beta.GetPolicyBindingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_POLICY_BINDING: + serviceImpl.updatePolicyBinding( + (com.google.iam.v3beta.UpdatePolicyBindingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_POLICY_BINDING: + serviceImpl.deletePolicyBinding( + (com.google.iam.v3beta.DeletePolicyBindingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_POLICY_BINDINGS: + serviceImpl.listPolicyBindings( + (com.google.iam.v3beta.ListPolicyBindingsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_SEARCH_TARGET_POLICY_BINDINGS: + serviceImpl.searchTargetPolicyBindings( + (com.google.iam.v3beta.SearchTargetPolicyBindingsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreatePolicyBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.CreatePolicyBindingRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_POLICY_BINDING))) + .addMethod( + getGetPolicyBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.GetPolicyBindingRequest, + com.google.iam.v3beta.PolicyBinding>(service, METHODID_GET_POLICY_BINDING))) + .addMethod( + getUpdatePolicyBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.UpdatePolicyBindingRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_POLICY_BINDING))) + .addMethod( + getDeletePolicyBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.DeletePolicyBindingRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_POLICY_BINDING))) + .addMethod( + getListPolicyBindingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.ListPolicyBindingsRequest, + com.google.iam.v3beta.ListPolicyBindingsResponse>( + service, METHODID_LIST_POLICY_BINDINGS))) + .addMethod( + getSearchTargetPolicyBindingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest, + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse>( + service, METHODID_SEARCH_TARGET_POLICY_BINDINGS))) + .build(); + } + + private abstract static class PolicyBindingsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PolicyBindingsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("PolicyBindings"); + } + } + + private static final class PolicyBindingsFileDescriptorSupplier + extends PolicyBindingsBaseDescriptorSupplier { + PolicyBindingsFileDescriptorSupplier() {} + } + + private static final class PolicyBindingsMethodDescriptorSupplier + extends PolicyBindingsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + PolicyBindingsMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PolicyBindingsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new PolicyBindingsFileDescriptorSupplier()) + .addMethod(getCreatePolicyBindingMethod()) + .addMethod(getGetPolicyBindingMethod()) + .addMethod(getUpdatePolicyBindingMethod()) + .addMethod(getDeletePolicyBindingMethod()) + .addMethod(getListPolicyBindingsMethod()) + .addMethod(getSearchTargetPolicyBindingsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-iam/grpc-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesGrpc.java b/java-iam/grpc-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesGrpc.java new file mode 100644 index 0000000000..65c8524162 --- /dev/null +++ b/java-iam/grpc-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesGrpc.java @@ -0,0 +1,1184 @@ +/* + * Copyright 2025 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. + */ +package com.google.iam.v3beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Manages Identity and Access Management (IAM) principal access boundary
+ * policies.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/iam/v3beta/principal_access_boundary_policies_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class PrincipalAccessBoundaryPoliciesGrpc { + + private PrincipalAccessBoundaryPoliciesGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.iam.v3beta.PrincipalAccessBoundaryPolicies"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getCreatePrincipalAccessBoundaryPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreatePrincipalAccessBoundaryPolicy", + requestType = com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getCreatePrincipalAccessBoundaryPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getCreatePrincipalAccessBoundaryPolicyMethod; + if ((getCreatePrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getCreatePrincipalAccessBoundaryPolicyMethod) + == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + if ((getCreatePrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getCreatePrincipalAccessBoundaryPolicyMethod) + == null) { + PrincipalAccessBoundaryPoliciesGrpc.getCreatePrincipalAccessBoundaryPolicyMethod = + getCreatePrincipalAccessBoundaryPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "CreatePrincipalAccessBoundaryPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier( + "CreatePrincipalAccessBoundaryPolicy")) + .build(); + } + } + } + return getCreatePrincipalAccessBoundaryPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy> + getGetPrincipalAccessBoundaryPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPrincipalAccessBoundaryPolicy", + requestType = com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest.class, + responseType = com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy> + getGetPrincipalAccessBoundaryPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy> + getGetPrincipalAccessBoundaryPolicyMethod; + if ((getGetPrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getGetPrincipalAccessBoundaryPolicyMethod) + == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + if ((getGetPrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getGetPrincipalAccessBoundaryPolicyMethod) + == null) { + PrincipalAccessBoundaryPoliciesGrpc.getGetPrincipalAccessBoundaryPolicyMethod = + getGetPrincipalAccessBoundaryPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetPrincipalAccessBoundaryPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy + .getDefaultInstance())) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier( + "GetPrincipalAccessBoundaryPolicy")) + .build(); + } + } + } + return getGetPrincipalAccessBoundaryPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getUpdatePrincipalAccessBoundaryPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdatePrincipalAccessBoundaryPolicy", + requestType = com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getUpdatePrincipalAccessBoundaryPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getUpdatePrincipalAccessBoundaryPolicyMethod; + if ((getUpdatePrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getUpdatePrincipalAccessBoundaryPolicyMethod) + == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + if ((getUpdatePrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getUpdatePrincipalAccessBoundaryPolicyMethod) + == null) { + PrincipalAccessBoundaryPoliciesGrpc.getUpdatePrincipalAccessBoundaryPolicyMethod = + getUpdatePrincipalAccessBoundaryPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "UpdatePrincipalAccessBoundaryPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier( + "UpdatePrincipalAccessBoundaryPolicy")) + .build(); + } + } + } + return getUpdatePrincipalAccessBoundaryPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getDeletePrincipalAccessBoundaryPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeletePrincipalAccessBoundaryPolicy", + requestType = com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getDeletePrincipalAccessBoundaryPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation> + getDeletePrincipalAccessBoundaryPolicyMethod; + if ((getDeletePrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getDeletePrincipalAccessBoundaryPolicyMethod) + == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + if ((getDeletePrincipalAccessBoundaryPolicyMethod = + PrincipalAccessBoundaryPoliciesGrpc.getDeletePrincipalAccessBoundaryPolicyMethod) + == null) { + PrincipalAccessBoundaryPoliciesGrpc.getDeletePrincipalAccessBoundaryPolicyMethod = + getDeletePrincipalAccessBoundaryPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "DeletePrincipalAccessBoundaryPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier( + "DeletePrincipalAccessBoundaryPolicy")) + .build(); + } + } + } + return getDeletePrincipalAccessBoundaryPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest, + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse> + getListPrincipalAccessBoundaryPoliciesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPrincipalAccessBoundaryPolicies", + requestType = com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest.class, + responseType = com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest, + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse> + getListPrincipalAccessBoundaryPoliciesMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest, + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse> + getListPrincipalAccessBoundaryPoliciesMethod; + if ((getListPrincipalAccessBoundaryPoliciesMethod = + PrincipalAccessBoundaryPoliciesGrpc.getListPrincipalAccessBoundaryPoliciesMethod) + == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + if ((getListPrincipalAccessBoundaryPoliciesMethod = + PrincipalAccessBoundaryPoliciesGrpc.getListPrincipalAccessBoundaryPoliciesMethod) + == null) { + PrincipalAccessBoundaryPoliciesGrpc.getListPrincipalAccessBoundaryPoliciesMethod = + getListPrincipalAccessBoundaryPoliciesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "ListPrincipalAccessBoundaryPolicies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier( + "ListPrincipalAccessBoundaryPolicies")) + .build(); + } + } + } + return getListPrincipalAccessBoundaryPoliciesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest, + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse> + getSearchPrincipalAccessBoundaryPolicyBindingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchPrincipalAccessBoundaryPolicyBindings", + requestType = com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest.class, + responseType = + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest, + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse> + getSearchPrincipalAccessBoundaryPolicyBindingsMethod() { + io.grpc.MethodDescriptor< + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest, + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse> + getSearchPrincipalAccessBoundaryPolicyBindingsMethod; + if ((getSearchPrincipalAccessBoundaryPolicyBindingsMethod = + PrincipalAccessBoundaryPoliciesGrpc + .getSearchPrincipalAccessBoundaryPolicyBindingsMethod) + == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + if ((getSearchPrincipalAccessBoundaryPolicyBindingsMethod = + PrincipalAccessBoundaryPoliciesGrpc + .getSearchPrincipalAccessBoundaryPolicyBindingsMethod) + == null) { + PrincipalAccessBoundaryPoliciesGrpc.getSearchPrincipalAccessBoundaryPolicyBindingsMethod = + getSearchPrincipalAccessBoundaryPolicyBindingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "SearchPrincipalAccessBoundaryPolicyBindings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta + .SearchPrincipalAccessBoundaryPolicyBindingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v3beta + .SearchPrincipalAccessBoundaryPolicyBindingsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier( + "SearchPrincipalAccessBoundaryPolicyBindings")) + .build(); + } + } + } + return getSearchPrincipalAccessBoundaryPolicyBindingsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static PrincipalAccessBoundaryPoliciesStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PrincipalAccessBoundaryPoliciesStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesStub(channel, callOptions); + } + }; + return PrincipalAccessBoundaryPoliciesStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static PrincipalAccessBoundaryPoliciesBlockingV2Stub newBlockingV2Stub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PrincipalAccessBoundaryPoliciesBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesBlockingV2Stub(channel, callOptions); + } + }; + return PrincipalAccessBoundaryPoliciesBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PrincipalAccessBoundaryPoliciesBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PrincipalAccessBoundaryPoliciesBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesBlockingStub(channel, callOptions); + } + }; + return PrincipalAccessBoundaryPoliciesBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PrincipalAccessBoundaryPoliciesFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PrincipalAccessBoundaryPoliciesFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesFutureStub(channel, callOptions); + } + }; + return PrincipalAccessBoundaryPoliciesFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Manages Identity and Access Management (IAM) principal access boundary
+   * policies.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a principal access boundary policy, and returns a long running
+     * operation.
+     * 
+ */ + default void createPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreatePrincipalAccessBoundaryPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a principal access boundary policy.
+     * 
+ */ + default void getPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetPrincipalAccessBoundaryPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a principal access boundary policy.
+     * 
+ */ + default void updatePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdatePrincipalAccessBoundaryPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a principal access boundary policy.
+     * 
+ */ + default void deletePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeletePrincipalAccessBoundaryPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists principal access boundary policies.
+     * 
+ */ + default void listPrincipalAccessBoundaryPolicies( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest request, + io.grpc.stub.StreamObserver< + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPrincipalAccessBoundaryPoliciesMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns all policy bindings that bind a specific policy if a user has
+     * searchPolicyBindings permission on that policy.
+     * 
+ */ + default void searchPrincipalAccessBoundaryPolicyBindings( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest request, + io.grpc.stub.StreamObserver< + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSearchPrincipalAccessBoundaryPolicyBindingsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service PrincipalAccessBoundaryPolicies. + * + *
+   * Manages Identity and Access Management (IAM) principal access boundary
+   * policies.
+   * 
+ */ + public abstract static class PrincipalAccessBoundaryPoliciesImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return PrincipalAccessBoundaryPoliciesGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service + * PrincipalAccessBoundaryPolicies. + * + *
+   * Manages Identity and Access Management (IAM) principal access boundary
+   * policies.
+   * 
+ */ + public static final class PrincipalAccessBoundaryPoliciesStub + extends io.grpc.stub.AbstractAsyncStub { + private PrincipalAccessBoundaryPoliciesStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PrincipalAccessBoundaryPoliciesStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a principal access boundary policy, and returns a long running
+     * operation.
+     * 
+ */ + public void createPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreatePrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a principal access boundary policy.
+     * 
+ */ + public void getPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a principal access boundary policy.
+     * 
+ */ + public void updatePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdatePrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a principal access boundary policy.
+     * 
+ */ + public void deletePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeletePrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists principal access boundary policies.
+     * 
+ */ + public void listPrincipalAccessBoundaryPolicies( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest request, + io.grpc.stub.StreamObserver< + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPrincipalAccessBoundaryPoliciesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns all policy bindings that bind a specific policy if a user has
+     * searchPolicyBindings permission on that policy.
+     * 
+ */ + public void searchPrincipalAccessBoundaryPolicyBindings( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest request, + io.grpc.stub.StreamObserver< + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel() + .newCall(getSearchPrincipalAccessBoundaryPolicyBindingsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service PrincipalAccessBoundaryPolicies. + * + *
+   * Manages Identity and Access Management (IAM) principal access boundary
+   * policies.
+   * 
+ */ + public static final class PrincipalAccessBoundaryPoliciesBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private PrincipalAccessBoundaryPoliciesBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PrincipalAccessBoundaryPoliciesBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a principal access boundary policy, and returns a long running
+     * operation.
+     * 
+ */ + public com.google.longrunning.Operation createPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a principal access boundary policy.
+     * 
+ */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a principal access boundary policy.
+     * 
+ */ + public com.google.longrunning.Operation updatePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdatePrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a principal access boundary policy.
+     * 
+ */ + public com.google.longrunning.Operation deletePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists principal access boundary policies.
+     * 
+ */ + public com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse + listPrincipalAccessBoundaryPolicies( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPrincipalAccessBoundaryPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns all policy bindings that bind a specific policy if a user has
+     * searchPolicyBindings permission on that policy.
+     * 
+ */ + public com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + searchPrincipalAccessBoundaryPolicyBindings( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), + getSearchPrincipalAccessBoundaryPolicyBindingsMethod(), + getCallOptions(), + request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service + * PrincipalAccessBoundaryPolicies. + * + *
+   * Manages Identity and Access Management (IAM) principal access boundary
+   * policies.
+   * 
+ */ + public static final class PrincipalAccessBoundaryPoliciesBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private PrincipalAccessBoundaryPoliciesBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PrincipalAccessBoundaryPoliciesBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a principal access boundary policy, and returns a long running
+     * operation.
+     * 
+ */ + public com.google.longrunning.Operation createPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a principal access boundary policy.
+     * 
+ */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a principal access boundary policy.
+     * 
+ */ + public com.google.longrunning.Operation updatePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdatePrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a principal access boundary policy.
+     * 
+ */ + public com.google.longrunning.Operation deletePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePrincipalAccessBoundaryPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists principal access boundary policies.
+     * 
+ */ + public com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse + listPrincipalAccessBoundaryPolicies( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPrincipalAccessBoundaryPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns all policy bindings that bind a specific policy if a user has
+     * searchPolicyBindings permission on that policy.
+     * 
+ */ + public com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + searchPrincipalAccessBoundaryPolicyBindings( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), + getSearchPrincipalAccessBoundaryPolicyBindingsMethod(), + getCallOptions(), + request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * PrincipalAccessBoundaryPolicies. + * + *
+   * Manages Identity and Access Management (IAM) principal access boundary
+   * policies.
+   * 
+ */ + public static final class PrincipalAccessBoundaryPoliciesFutureStub + extends io.grpc.stub.AbstractFutureStub { + private PrincipalAccessBoundaryPoliciesFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PrincipalAccessBoundaryPoliciesFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PrincipalAccessBoundaryPoliciesFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a principal access boundary policy, and returns a long running
+     * operation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreatePrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Gets a principal access boundary policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy> + getPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Updates a principal access boundary policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updatePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdatePrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Deletes a principal access boundary policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deletePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeletePrincipalAccessBoundaryPolicyMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Lists principal access boundary policies.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse> + listPrincipalAccessBoundaryPolicies( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPrincipalAccessBoundaryPoliciesMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Returns all policy bindings that bind a specific policy if a user has
+     * searchPolicyBindings permission on that policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse> + searchPrincipalAccessBoundaryPolicyBindings( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel() + .newCall(getSearchPrincipalAccessBoundaryPolicyBindingsMethod(), getCallOptions()), + request); + } + } + + private static final int METHODID_CREATE_PRINCIPAL_ACCESS_BOUNDARY_POLICY = 0; + private static final int METHODID_GET_PRINCIPAL_ACCESS_BOUNDARY_POLICY = 1; + private static final int METHODID_UPDATE_PRINCIPAL_ACCESS_BOUNDARY_POLICY = 2; + private static final int METHODID_DELETE_PRINCIPAL_ACCESS_BOUNDARY_POLICY = 3; + private static final int METHODID_LIST_PRINCIPAL_ACCESS_BOUNDARY_POLICIES = 4; + private static final int METHODID_SEARCH_PRINCIPAL_ACCESS_BOUNDARY_POLICY_BINDINGS = 5; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_PRINCIPAL_ACCESS_BOUNDARY_POLICY: + serviceImpl.createPrincipalAccessBoundaryPolicy( + (com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_PRINCIPAL_ACCESS_BOUNDARY_POLICY: + serviceImpl.getPrincipalAccessBoundaryPolicy( + (com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_PRINCIPAL_ACCESS_BOUNDARY_POLICY: + serviceImpl.updatePrincipalAccessBoundaryPolicy( + (com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_PRINCIPAL_ACCESS_BOUNDARY_POLICY: + serviceImpl.deletePrincipalAccessBoundaryPolicy( + (com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_PRINCIPAL_ACCESS_BOUNDARY_POLICIES: + serviceImpl.listPrincipalAccessBoundaryPolicies( + (com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse>) + responseObserver); + break; + case METHODID_SEARCH_PRINCIPAL_ACCESS_BOUNDARY_POLICY_BINDINGS: + serviceImpl.searchPrincipalAccessBoundaryPolicyBindings( + (com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreatePrincipalAccessBoundaryPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_PRINCIPAL_ACCESS_BOUNDARY_POLICY))) + .addMethod( + getGetPrincipalAccessBoundaryPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy>( + service, METHODID_GET_PRINCIPAL_ACCESS_BOUNDARY_POLICY))) + .addMethod( + getUpdatePrincipalAccessBoundaryPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_PRINCIPAL_ACCESS_BOUNDARY_POLICY))) + .addMethod( + getDeletePrincipalAccessBoundaryPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_PRINCIPAL_ACCESS_BOUNDARY_POLICY))) + .addMethod( + getListPrincipalAccessBoundaryPoliciesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest, + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse>( + service, METHODID_LIST_PRINCIPAL_ACCESS_BOUNDARY_POLICIES))) + .addMethod( + getSearchPrincipalAccessBoundaryPolicyBindingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest, + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse>( + service, METHODID_SEARCH_PRINCIPAL_ACCESS_BOUNDARY_POLICY_BINDINGS))) + .build(); + } + + private abstract static class PrincipalAccessBoundaryPoliciesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PrincipalAccessBoundaryPoliciesBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("PrincipalAccessBoundaryPolicies"); + } + } + + private static final class PrincipalAccessBoundaryPoliciesFileDescriptorSupplier + extends PrincipalAccessBoundaryPoliciesBaseDescriptorSupplier { + PrincipalAccessBoundaryPoliciesFileDescriptorSupplier() {} + } + + private static final class PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier + extends PrincipalAccessBoundaryPoliciesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + PrincipalAccessBoundaryPoliciesMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PrincipalAccessBoundaryPoliciesGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor( + new PrincipalAccessBoundaryPoliciesFileDescriptorSupplier()) + .addMethod(getCreatePrincipalAccessBoundaryPolicyMethod()) + .addMethod(getGetPrincipalAccessBoundaryPolicyMethod()) + .addMethod(getUpdatePrincipalAccessBoundaryPolicyMethod()) + .addMethod(getDeletePrincipalAccessBoundaryPolicyMethod()) + .addMethod(getListPrincipalAccessBoundaryPoliciesMethod()) + .addMethod(getSearchPrincipalAccessBoundaryPolicyBindingsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-iam/pom.xml b/java-iam/pom.xml index 7404ac2152..f1b1f4a5a6 100644 --- a/java-iam/pom.xml +++ b/java-iam/pom.xml @@ -54,6 +54,16 @@ pom import + + com.google.api.grpc + proto-google-iam-v3beta + 1.50.4-SNAPSHOT + + + com.google.api.grpc + grpc-google-iam-v3beta + 1.50.4-SNAPSHOT + com.google.guava guava-bom @@ -152,9 +162,11 @@ grpc-google-iam-v2beta grpc-google-iam-v2 grpc-google-iam-v3 + grpc-google-iam-v3beta proto-google-iam-v2beta proto-google-iam-v2 proto-google-iam-v3 + proto-google-iam-v3beta grpc-google-iam-v1 diff --git a/java-iam/proto-google-iam-v3beta/clirr-ignored-differences.xml b/java-iam/proto-google-iam-v3beta/clirr-ignored-differences.xml new file mode 100644 index 0000000000..70e35c1538 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/clirr-ignored-differences.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/java-iam/proto-google-iam-v3beta/pom.xml b/java-iam/proto-google-iam-v3beta/pom.xml new file mode 100644 index 0000000000..f7bd6dd3b8 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/pom.xml @@ -0,0 +1,33 @@ + + 4.0.0 + com.google.api.grpc + proto-google-iam-v3beta + 1.50.4-SNAPSHOT + proto-google-iam-v3beta + Proto library for proto-google-iam-v1 + + com.google.cloud + google-iam-parent + 1.50.4-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/CreatePolicyBindingRequest.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/CreatePolicyBindingRequest.java new file mode 100644 index 0000000000..22d9e58459 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/CreatePolicyBindingRequest.java @@ -0,0 +1,1352 @@ +/* + * Copyright 2025 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/v3beta/policy_bindings_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for CreatePolicyBinding method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.CreatePolicyBindingRequest} + */ +public final class CreatePolicyBindingRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.CreatePolicyBindingRequest) + CreatePolicyBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreatePolicyBindingRequest.newBuilder() to construct. + private CreatePolicyBindingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreatePolicyBindingRequest() { + parent_ = ""; + policyBindingId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreatePolicyBindingRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_CreatePolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_CreatePolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.CreatePolicyBindingRequest.class, + com.google.iam.v3beta.CreatePolicyBindingRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource where this policy binding will be created.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource where this policy binding will be created.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_BINDING_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object policyBindingId_ = ""; + + /** + * + * + *
+   * Required. The ID to use for the policy binding, which will become the final
+   * component of the policy binding's resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policyBindingId. + */ + @java.lang.Override + public java.lang.String getPolicyBindingId() { + java.lang.Object ref = policyBindingId_; + 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(); + policyBindingId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID to use for the policy binding, which will become the final
+   * component of the policy binding's resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for policyBindingId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPolicyBindingIdBytes() { + java.lang.Object ref = policyBindingId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyBindingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_BINDING_FIELD_NUMBER = 3; + private com.google.iam.v3beta.PolicyBinding policyBinding_; + + /** + * + * + *
+   * Required. The policy binding to create.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBinding field is set. + */ + @java.lang.Override + public boolean hasPolicyBinding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The policy binding to create.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBinding. + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding getPolicyBinding() { + return policyBinding_ == null + ? com.google.iam.v3beta.PolicyBinding.getDefaultInstance() + : policyBinding_; + } + + /** + * + * + *
+   * Required. The policy binding to create.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingOrBuilder() { + return policyBinding_ == null + ? com.google.iam.v3beta.PolicyBinding.getDefaultInstance() + : policyBinding_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request and preview the creation, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + 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(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyBindingId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, policyBindingId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPolicyBinding()); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyBindingId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, policyBindingId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPolicyBinding()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + size += getUnknownFields().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.v3beta.CreatePolicyBindingRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.CreatePolicyBindingRequest other = + (com.google.iam.v3beta.CreatePolicyBindingRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getPolicyBindingId().equals(other.getPolicyBindingId())) return false; + if (hasPolicyBinding() != other.hasPolicyBinding()) return false; + if (hasPolicyBinding()) { + if (!getPolicyBinding().equals(other.getPolicyBinding())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + POLICY_BINDING_ID_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBindingId().hashCode(); + if (hasPolicyBinding()) { + hash = (37 * hash) + POLICY_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBinding().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest 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.v3beta.CreatePolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest 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.v3beta.CreatePolicyBindingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest 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.v3beta.CreatePolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest 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.v3beta.CreatePolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest 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.v3beta.CreatePolicyBindingRequest 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; + } + + /** + * + * + *
+   * Request message for CreatePolicyBinding method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.CreatePolicyBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.CreatePolicyBindingRequest) + com.google.iam.v3beta.CreatePolicyBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_CreatePolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_CreatePolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.CreatePolicyBindingRequest.class, + com.google.iam.v3beta.CreatePolicyBindingRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.CreatePolicyBindingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPolicyBindingFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + policyBindingId_ = ""; + policyBinding_ = null; + if (policyBindingBuilder_ != null) { + policyBindingBuilder_.dispose(); + policyBindingBuilder_ = null; + } + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_CreatePolicyBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.CreatePolicyBindingRequest getDefaultInstanceForType() { + return com.google.iam.v3beta.CreatePolicyBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.CreatePolicyBindingRequest build() { + com.google.iam.v3beta.CreatePolicyBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.CreatePolicyBindingRequest buildPartial() { + com.google.iam.v3beta.CreatePolicyBindingRequest result = + new com.google.iam.v3beta.CreatePolicyBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.CreatePolicyBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.policyBindingId_ = policyBindingId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.policyBinding_ = + policyBindingBuilder_ == null ? policyBinding_ : policyBindingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.validateOnly_ = validateOnly_; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3beta.CreatePolicyBindingRequest) { + return mergeFrom((com.google.iam.v3beta.CreatePolicyBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.CreatePolicyBindingRequest other) { + if (other == com.google.iam.v3beta.CreatePolicyBindingRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPolicyBindingId().isEmpty()) { + policyBindingId_ = other.policyBindingId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPolicyBinding()) { + mergePolicyBinding(other.getPolicyBinding()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + policyBindingId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getPolicyBindingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource where this policy binding will be created.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this policy binding will be created.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this policy binding will be created.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this policy binding will be created.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this policy binding will be created.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object policyBindingId_ = ""; + + /** + * + * + *
+     * Required. The ID to use for the policy binding, which will become the final
+     * component of the policy binding's resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policyBindingId. + */ + public java.lang.String getPolicyBindingId() { + java.lang.Object ref = policyBindingId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyBindingId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the policy binding, which will become the final
+     * component of the policy binding's resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for policyBindingId. + */ + public com.google.protobuf.ByteString getPolicyBindingIdBytes() { + java.lang.Object ref = policyBindingId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyBindingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the policy binding, which will become the final
+     * component of the policy binding's resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The policyBindingId to set. + * @return This builder for chaining. + */ + public Builder setPolicyBindingId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + policyBindingId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the policy binding, which will become the final
+     * component of the policy binding's resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPolicyBindingId() { + policyBindingId_ = getDefaultInstance().getPolicyBindingId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the policy binding, which will become the final
+     * component of the policy binding's resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for policyBindingId to set. + * @return This builder for chaining. + */ + public Builder setPolicyBindingIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + policyBindingId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.iam.v3beta.PolicyBinding policyBinding_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + policyBindingBuilder_; + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBinding field is set. + */ + public boolean hasPolicyBinding() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBinding. + */ + public com.google.iam.v3beta.PolicyBinding getPolicyBinding() { + if (policyBindingBuilder_ == null) { + return policyBinding_ == null + ? com.google.iam.v3beta.PolicyBinding.getDefaultInstance() + : policyBinding_; + } else { + return policyBindingBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPolicyBinding(com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policyBinding_ = value; + } else { + policyBindingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPolicyBinding(com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingBuilder_ == null) { + policyBinding_ = builderForValue.build(); + } else { + policyBindingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePolicyBinding(com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && policyBinding_ != null + && policyBinding_ != com.google.iam.v3beta.PolicyBinding.getDefaultInstance()) { + getPolicyBindingBuilder().mergeFrom(value); + } else { + policyBinding_ = value; + } + } else { + policyBindingBuilder_.mergeFrom(value); + } + if (policyBinding_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPolicyBinding() { + bitField0_ = (bitField0_ & ~0x00000004); + policyBinding_ = null; + if (policyBindingBuilder_ != null) { + policyBindingBuilder_.dispose(); + policyBindingBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PolicyBinding.Builder getPolicyBindingBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPolicyBindingFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingOrBuilder() { + if (policyBindingBuilder_ != null) { + return policyBindingBuilder_.getMessageOrBuilder(); + } else { + return policyBinding_ == null + ? com.google.iam.v3beta.PolicyBinding.getDefaultInstance() + : policyBinding_; + } + } + + /** + * + * + *
+     * Required. The policy binding to create.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + getPolicyBindingFieldBuilder() { + if (policyBindingBuilder_ == null) { + policyBindingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder>( + getPolicyBinding(), getParentForChildren(), isClean()); + policyBinding_ = null; + } + return policyBindingBuilder_; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request and preview the creation, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the creation, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the creation, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000008); + validateOnly_ = false; + 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.v3beta.CreatePolicyBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.CreatePolicyBindingRequest) + private static final com.google.iam.v3beta.CreatePolicyBindingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.CreatePolicyBindingRequest(); + } + + public static com.google.iam.v3beta.CreatePolicyBindingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePolicyBindingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.CreatePolicyBindingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/CreatePolicyBindingRequestOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/CreatePolicyBindingRequestOrBuilder.java new file mode 100644 index 0000000000..aaf7252b2e --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/CreatePolicyBindingRequestOrBuilder.java @@ -0,0 +1,167 @@ +/* + * Copyright 2025 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/v3beta/policy_bindings_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface CreatePolicyBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.CreatePolicyBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource where this policy binding will be created.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource where this policy binding will be created.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID to use for the policy binding, which will become the final
+   * component of the policy binding's resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policyBindingId. + */ + java.lang.String getPolicyBindingId(); + + /** + * + * + *
+   * Required. The ID to use for the policy binding, which will become the final
+   * component of the policy binding's resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for policyBindingId. + */ + com.google.protobuf.ByteString getPolicyBindingIdBytes(); + + /** + * + * + *
+   * Required. The policy binding to create.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBinding field is set. + */ + boolean hasPolicyBinding(); + + /** + * + * + *
+   * Required. The policy binding to create.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBinding. + */ + com.google.iam.v3beta.PolicyBinding getPolicyBinding(); + + /** + * + * + *
+   * Required. The policy binding to create.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingOrBuilder(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the creation, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/CreatePrincipalAccessBoundaryPolicyRequest.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/CreatePrincipalAccessBoundaryPolicyRequest.java new file mode 100644 index 0000000000..5d922af9c4 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/CreatePrincipalAccessBoundaryPolicyRequest.java @@ -0,0 +1,1366 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policies_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for CreatePrincipalAccessBoundaryPolicyRequest method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest} + */ +public final class CreatePrincipalAccessBoundaryPolicyRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest) + CreatePrincipalAccessBoundaryPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreatePrincipalAccessBoundaryPolicyRequest.newBuilder() to construct. + private CreatePrincipalAccessBoundaryPolicyRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreatePrincipalAccessBoundaryPolicyRequest() { + parent_ = ""; + principalAccessBoundaryPolicyId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreatePrincipalAccessBoundaryPolicyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource where this principal access boundary policy
+   * will be created. Only organizations are supported.
+   *
+   * Format:
+   *   `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource where this principal access boundary policy
+   * will be created. Only organizations are supported.
+   *
+   * Format:
+   *   `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRINCIPAL_ACCESS_BOUNDARY_POLICY_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object principalAccessBoundaryPolicyId_ = ""; + + /** + * + * + *
+   * Required. The ID to use for the principal access boundary policy, which
+   * will become the final component of the principal access boundary policy's
+   * resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicyId. + */ + @java.lang.Override + public java.lang.String getPrincipalAccessBoundaryPolicyId() { + java.lang.Object ref = principalAccessBoundaryPolicyId_; + 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(); + principalAccessBoundaryPolicyId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID to use for the principal access boundary policy, which
+   * will become the final component of the principal access boundary policy's
+   * resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for principalAccessBoundaryPolicyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrincipalAccessBoundaryPolicyIdBytes() { + java.lang.Object ref = principalAccessBoundaryPolicyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + principalAccessBoundaryPolicyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRINCIPAL_ACCESS_BOUNDARY_POLICY_FIELD_NUMBER = 3; + private com.google.iam.v3beta.PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy_; + + /** + * + * + *
+   * Required. The principal access boundary policy to create.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the principalAccessBoundaryPolicy field is set. + */ + @java.lang.Override + public boolean hasPrincipalAccessBoundaryPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The principal access boundary policy to create.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicy. + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy() { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } + + /** + * + * + *
+   * Required. The principal access boundary policy to create.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPolicyOrBuilder() { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request and preview the creation, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + 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(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principalAccessBoundaryPolicyId_)) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, principalAccessBoundaryPolicyId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPrincipalAccessBoundaryPolicy()); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principalAccessBoundaryPolicyId_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 2, principalAccessBoundaryPolicyId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getPrincipalAccessBoundaryPolicy()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + size += getUnknownFields().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.v3beta.CreatePrincipalAccessBoundaryPolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest other = + (com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getPrincipalAccessBoundaryPolicyId().equals(other.getPrincipalAccessBoundaryPolicyId())) + return false; + if (hasPrincipalAccessBoundaryPolicy() != other.hasPrincipalAccessBoundaryPolicy()) + return false; + if (hasPrincipalAccessBoundaryPolicy()) { + if (!getPrincipalAccessBoundaryPolicy().equals(other.getPrincipalAccessBoundaryPolicy())) + return false; + } + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PRINCIPAL_ACCESS_BOUNDARY_POLICY_ID_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalAccessBoundaryPolicyId().hashCode(); + if (hasPrincipalAccessBoundaryPolicy()) { + hash = (37 * hash) + PRINCIPAL_ACCESS_BOUNDARY_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalAccessBoundaryPolicy().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest 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.v3beta.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest 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.v3beta.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest 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.v3beta.CreatePrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest 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.v3beta.CreatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest 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.v3beta.CreatePrincipalAccessBoundaryPolicyRequest 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; + } + + /** + * + * + *
+   * Request message for CreatePrincipalAccessBoundaryPolicyRequest method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest) + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPrincipalAccessBoundaryPolicyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + principalAccessBoundaryPolicyId_ = ""; + principalAccessBoundaryPolicy_ = null; + if (principalAccessBoundaryPolicyBuilder_ != null) { + principalAccessBoundaryPolicyBuilder_.dispose(); + principalAccessBoundaryPolicyBuilder_ = null; + } + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest + getDefaultInstanceForType() { + return com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest build() { + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest buildPartial() { + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest result = + new com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.principalAccessBoundaryPolicyId_ = principalAccessBoundaryPolicyId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.principalAccessBoundaryPolicy_ = + principalAccessBoundaryPolicyBuilder_ == null + ? principalAccessBoundaryPolicy_ + : principalAccessBoundaryPolicyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.validateOnly_ = validateOnly_; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3beta.CreatePrincipalAccessBoundaryPolicyRequest) { + return mergeFrom((com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest other) { + if (other + == com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPrincipalAccessBoundaryPolicyId().isEmpty()) { + principalAccessBoundaryPolicyId_ = other.principalAccessBoundaryPolicyId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPrincipalAccessBoundaryPolicy()) { + mergePrincipalAccessBoundaryPolicy(other.getPrincipalAccessBoundaryPolicy()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + principalAccessBoundaryPolicyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getPrincipalAccessBoundaryPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource where this principal access boundary policy
+     * will be created. Only organizations are supported.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this principal access boundary policy
+     * will be created. Only organizations are supported.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this principal access boundary policy
+     * will be created. Only organizations are supported.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this principal access boundary policy
+     * will be created. Only organizations are supported.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this principal access boundary policy
+     * will be created. Only organizations are supported.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object principalAccessBoundaryPolicyId_ = ""; + + /** + * + * + *
+     * Required. The ID to use for the principal access boundary policy, which
+     * will become the final component of the principal access boundary policy's
+     * resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicyId. + */ + public java.lang.String getPrincipalAccessBoundaryPolicyId() { + java.lang.Object ref = principalAccessBoundaryPolicyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principalAccessBoundaryPolicyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the principal access boundary policy, which
+     * will become the final component of the principal access boundary policy's
+     * resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for principalAccessBoundaryPolicyId. + */ + public com.google.protobuf.ByteString getPrincipalAccessBoundaryPolicyIdBytes() { + java.lang.Object ref = principalAccessBoundaryPolicyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + principalAccessBoundaryPolicyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the principal access boundary policy, which
+     * will become the final component of the principal access boundary policy's
+     * resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The principalAccessBoundaryPolicyId to set. + * @return This builder for chaining. + */ + public Builder setPrincipalAccessBoundaryPolicyId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + principalAccessBoundaryPolicyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the principal access boundary policy, which
+     * will become the final component of the principal access boundary policy's
+     * resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearPrincipalAccessBoundaryPolicyId() { + principalAccessBoundaryPolicyId_ = getDefaultInstance().getPrincipalAccessBoundaryPolicyId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the principal access boundary policy, which
+     * will become the final component of the principal access boundary policy's
+     * resource name.
+     *
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, hyphens, or dots. Pattern,
+     * /[a-z][a-z0-9-\.]{2,62}/.
+     * 
+ * + * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for principalAccessBoundaryPolicyId to set. + * @return This builder for chaining. + */ + public Builder setPrincipalAccessBoundaryPolicyIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + principalAccessBoundaryPolicyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.iam.v3beta.PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder> + principalAccessBoundaryPolicyBuilder_; + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the principalAccessBoundaryPolicy field is set. + */ + public boolean hasPrincipalAccessBoundaryPolicy() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicy. + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy() { + if (principalAccessBoundaryPolicyBuilder_ == null) { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } else { + return principalAccessBoundaryPolicyBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + principalAccessBoundaryPolicy_ = value; + } else { + principalAccessBoundaryPolicyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder builderForValue) { + if (principalAccessBoundaryPolicyBuilder_ == null) { + principalAccessBoundaryPolicy_ = builderForValue.build(); + } else { + principalAccessBoundaryPolicyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPolicyBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && principalAccessBoundaryPolicy_ != null + && principalAccessBoundaryPolicy_ + != com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance()) { + getPrincipalAccessBoundaryPolicyBuilder().mergeFrom(value); + } else { + principalAccessBoundaryPolicy_ = value; + } + } else { + principalAccessBoundaryPolicyBuilder_.mergeFrom(value); + } + if (principalAccessBoundaryPolicy_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPrincipalAccessBoundaryPolicy() { + bitField0_ = (bitField0_ & ~0x00000004); + principalAccessBoundaryPolicy_ = null; + if (principalAccessBoundaryPolicyBuilder_ != null) { + principalAccessBoundaryPolicyBuilder_.dispose(); + principalAccessBoundaryPolicyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder + getPrincipalAccessBoundaryPolicyBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPrincipalAccessBoundaryPolicyFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPolicyOrBuilder() { + if (principalAccessBoundaryPolicyBuilder_ != null) { + return principalAccessBoundaryPolicyBuilder_.getMessageOrBuilder(); + } else { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } + } + + /** + * + * + *
+     * Required. The principal access boundary policy to create.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder> + getPrincipalAccessBoundaryPolicyFieldBuilder() { + if (principalAccessBoundaryPolicyBuilder_ == null) { + principalAccessBoundaryPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder>( + getPrincipalAccessBoundaryPolicy(), getParentForChildren(), isClean()); + principalAccessBoundaryPolicy_ = null; + } + return principalAccessBoundaryPolicyBuilder_; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request and preview the creation, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the creation, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the creation, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000008); + validateOnly_ = false; + 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.v3beta.CreatePrincipalAccessBoundaryPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest) + private static final com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest(); + } + + public static com.google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePrincipalAccessBoundaryPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.CreatePrincipalAccessBoundaryPolicyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/CreatePrincipalAccessBoundaryPolicyRequestOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/CreatePrincipalAccessBoundaryPolicyRequestOrBuilder.java new file mode 100644 index 0000000000..1f29ffa4b6 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/CreatePrincipalAccessBoundaryPolicyRequestOrBuilder.java @@ -0,0 +1,162 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policies_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface CreatePrincipalAccessBoundaryPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.CreatePrincipalAccessBoundaryPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource where this principal access boundary policy
+   * will be created. Only organizations are supported.
+   *
+   * Format:
+   *   `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource where this principal access boundary policy
+   * will be created. Only organizations are supported.
+   *
+   * Format:
+   *   `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID to use for the principal access boundary policy, which
+   * will become the final component of the principal access boundary policy's
+   * resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicyId. + */ + java.lang.String getPrincipalAccessBoundaryPolicyId(); + + /** + * + * + *
+   * Required. The ID to use for the principal access boundary policy, which
+   * will become the final component of the principal access boundary policy's
+   * resource name.
+   *
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, hyphens, or dots. Pattern,
+   * /[a-z][a-z0-9-\.]{2,62}/.
+   * 
+ * + * string principal_access_boundary_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for principalAccessBoundaryPolicyId. + */ + com.google.protobuf.ByteString getPrincipalAccessBoundaryPolicyIdBytes(); + + /** + * + * + *
+   * Required. The principal access boundary policy to create.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the principalAccessBoundaryPolicy field is set. + */ + boolean hasPrincipalAccessBoundaryPolicy(); + + /** + * + * + *
+   * Required. The principal access boundary policy to create.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicy. + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy(); + + /** + * + * + *
+   * Required. The principal access boundary policy to create.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPolicyOrBuilder(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the creation, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/DeletePolicyBindingRequest.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/DeletePolicyBindingRequest.java new file mode 100644 index 0000000000..113bb86dc4 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/DeletePolicyBindingRequest.java @@ -0,0 +1,994 @@ +/* + * Copyright 2025 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/v3beta/policy_bindings_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for DeletePolicyBinding method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.DeletePolicyBindingRequest} + */ +public final class DeletePolicyBindingRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.DeletePolicyBindingRequest) + DeletePolicyBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeletePolicyBindingRequest.newBuilder() to construct. + private DeletePolicyBindingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeletePolicyBindingRequest() { + name_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeletePolicyBindingRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_DeletePolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_DeletePolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.DeletePolicyBindingRequest.class, + com.google.iam.v3beta.DeletePolicyBindingRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the policy binding to delete.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the policy binding to delete.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. The etag of the policy binding.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The etag of the policy binding.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request and preview the deletion, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + size += getUnknownFields().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.v3beta.DeletePolicyBindingRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.DeletePolicyBindingRequest other = + (com.google.iam.v3beta.DeletePolicyBindingRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest 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.v3beta.DeletePolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest 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.v3beta.DeletePolicyBindingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest 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.v3beta.DeletePolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest 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.v3beta.DeletePolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest 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.v3beta.DeletePolicyBindingRequest 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; + } + + /** + * + * + *
+   * Request message for DeletePolicyBinding method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.DeletePolicyBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.DeletePolicyBindingRequest) + com.google.iam.v3beta.DeletePolicyBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_DeletePolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_DeletePolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.DeletePolicyBindingRequest.class, + com.google.iam.v3beta.DeletePolicyBindingRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.DeletePolicyBindingRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + etag_ = ""; + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_DeletePolicyBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.DeletePolicyBindingRequest getDefaultInstanceForType() { + return com.google.iam.v3beta.DeletePolicyBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.DeletePolicyBindingRequest build() { + com.google.iam.v3beta.DeletePolicyBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.DeletePolicyBindingRequest buildPartial() { + com.google.iam.v3beta.DeletePolicyBindingRequest result = + new com.google.iam.v3beta.DeletePolicyBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.DeletePolicyBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.validateOnly_ = validateOnly_; + } + } + + @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.v3beta.DeletePolicyBindingRequest) { + return mergeFrom((com.google.iam.v3beta.DeletePolicyBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.DeletePolicyBindingRequest other) { + if (other == com.google.iam.v3beta.DeletePolicyBindingRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the policy binding to delete.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the policy binding to delete.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the policy binding to delete.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the policy binding to delete.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the policy binding to delete.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. The etag of the policy binding.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The etag of the policy binding.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The etag of the policy binding.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag of the policy binding.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag of the policy binding.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request and preview the deletion, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the deletion, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the deletion, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000004); + validateOnly_ = false; + 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.v3beta.DeletePolicyBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.DeletePolicyBindingRequest) + private static final com.google.iam.v3beta.DeletePolicyBindingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.DeletePolicyBindingRequest(); + } + + public static com.google.iam.v3beta.DeletePolicyBindingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePolicyBindingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.DeletePolicyBindingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/DeletePolicyBindingRequestOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/DeletePolicyBindingRequestOrBuilder.java new file mode 100644 index 0000000000..ff3424039b --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/DeletePolicyBindingRequestOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2025 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/v3beta/policy_bindings_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface DeletePolicyBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.DeletePolicyBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the policy binding to delete.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the policy binding to delete.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The etag of the policy binding.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. The etag of the policy binding.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the deletion, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/DeletePrincipalAccessBoundaryPolicyRequest.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/DeletePrincipalAccessBoundaryPolicyRequest.java new file mode 100644 index 0000000000..b772fdd26c --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/DeletePrincipalAccessBoundaryPolicyRequest.java @@ -0,0 +1,1079 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policies_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for DeletePrincipalAccessBoundaryPolicy method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest} + */ +public final class DeletePrincipalAccessBoundaryPolicyRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest) + DeletePrincipalAccessBoundaryPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeletePrincipalAccessBoundaryPolicyRequest.newBuilder() to construct. + private DeletePrincipalAccessBoundaryPolicyRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeletePrincipalAccessBoundaryPolicyRequest() { + name_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeletePrincipalAccessBoundaryPolicyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to delete.
+   *
+   * Format:
+   *   `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to delete.
+   *
+   * Format:
+   *   `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. The etag of the principal access boundary policy.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The etag of the principal access boundary policy.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request and preview the deletion, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int FORCE_FIELD_NUMBER = 4; + private boolean force_ = false; + + /** + * + * + *
+   * Optional. If set to true, the request will force the deletion of the policy
+   * even if the policy is referenced in policy bindings.
+   * 
+ * + * bool force = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + if (force_ != false) { + output.writeBool(4, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, force_); + } + size += getUnknownFields().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.v3beta.DeletePrincipalAccessBoundaryPolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest other = + (com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (getForce() != other.getForce()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest 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.v3beta.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest 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.v3beta.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest 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.v3beta.DeletePrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest 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.v3beta.DeletePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest 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.v3beta.DeletePrincipalAccessBoundaryPolicyRequest 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; + } + + /** + * + * + *
+   * Request message for DeletePrincipalAccessBoundaryPolicy method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest) + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + etag_ = ""; + validateOnly_ = false; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest + getDefaultInstanceForType() { + return com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest build() { + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest buildPartial() { + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest result = + new com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.force_ = force_; + } + } + + @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.v3beta.DeletePrincipalAccessBoundaryPolicyRequest) { + return mergeFrom((com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest other) { + if (other + == com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + force_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to delete.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to delete.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to delete.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to delete.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to delete.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. The etag of the principal access boundary policy.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The etag of the principal access boundary policy.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The etag of the principal access boundary policy.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag of the principal access boundary policy.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag of the principal access boundary policy.
+     * If this is provided, it must match the server's etag.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request and preview the deletion, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the deletion, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the deletion, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000004); + validateOnly_ = false; + onChanged(); + return this; + } + + private boolean force_; + + /** + * + * + *
+     * Optional. If set to true, the request will force the deletion of the policy
+     * even if the policy is referenced in policy bindings.
+     * 
+ * + * bool force = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + /** + * + * + *
+     * Optional. If set to true, the request will force the deletion of the policy
+     * even if the policy is referenced in policy bindings.
+     * 
+ * + * bool force = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set to true, the request will force the deletion of the policy
+     * even if the policy is referenced in policy bindings.
+     * 
+ * + * bool force = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000008); + force_ = false; + 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.v3beta.DeletePrincipalAccessBoundaryPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest) + private static final com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest(); + } + + public static com.google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePrincipalAccessBoundaryPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.DeletePrincipalAccessBoundaryPolicyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/DeletePrincipalAccessBoundaryPolicyRequestOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/DeletePrincipalAccessBoundaryPolicyRequestOrBuilder.java new file mode 100644 index 0000000000..c24db0acca --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/DeletePrincipalAccessBoundaryPolicyRequestOrBuilder.java @@ -0,0 +1,118 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policies_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface DeletePrincipalAccessBoundaryPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.DeletePrincipalAccessBoundaryPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to delete.
+   *
+   * Format:
+   *   `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to delete.
+   *
+   * Format:
+   *   `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The etag of the principal access boundary policy.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. The etag of the principal access boundary policy.
+   * If this is provided, it must match the server's etag.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the deletion, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. If set to true, the request will force the deletion of the policy
+   * even if the policy is referenced in policy bindings.
+   * 
+ * + * bool force = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/FolderLocationName.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/FolderLocationName.java new file mode 100644 index 0000000000..7eeeec3590 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/FolderLocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2025 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. + */ + +package com.google.iam.v3beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class FolderLocationName implements ResourceName { + private static final PathTemplate FOLDER_LOCATION = + PathTemplate.createWithoutUrlEncoding("folders/{folder}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String folder; + private final String location; + + @Deprecated + protected FolderLocationName() { + folder = null; + location = null; + } + + private FolderLocationName(Builder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getFolder() { + return folder; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static FolderLocationName of(String folder, String location) { + return newBuilder().setFolder(folder).setLocation(location).build(); + } + + public static String format(String folder, String location) { + return newBuilder().setFolder(folder).setLocation(location).build().toString(); + } + + public static FolderLocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + FOLDER_LOCATION.validatedMatch( + formattedString, "FolderLocationName.parse: formattedString not in valid format"); + return of(matchMap.get("folder"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (FolderLocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return FOLDER_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return FOLDER_LOCATION.instantiate("folder", folder, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + FolderLocationName that = ((FolderLocationName) o); + return Objects.equals(this.folder, that.folder) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(folder); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for folders/{folder}/locations/{location}. */ + public static class Builder { + private String folder; + private String location; + + protected Builder() {} + + public String getFolder() { + return folder; + } + + public String getLocation() { + return location; + } + + public Builder setFolder(String folder) { + this.folder = folder; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(FolderLocationName folderLocationName) { + this.folder = folderLocationName.folder; + this.location = folderLocationName.location; + } + + public FolderLocationName build() { + return new FolderLocationName(this); + } + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/GetPolicyBindingRequest.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/GetPolicyBindingRequest.java new file mode 100644 index 0000000000..cc93a244fc --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/GetPolicyBindingRequest.java @@ -0,0 +1,696 @@ +/* + * Copyright 2025 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/v3beta/policy_bindings_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for GetPolicyBinding method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.GetPolicyBindingRequest} + */ +public final class GetPolicyBindingRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.GetPolicyBindingRequest) + GetPolicyBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetPolicyBindingRequest.newBuilder() to construct. + private GetPolicyBindingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetPolicyBindingRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetPolicyBindingRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_GetPolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_GetPolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.GetPolicyBindingRequest.class, + com.google.iam.v3beta.GetPolicyBindingRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the policy binding to retrieve.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the policy binding to retrieve.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.v3beta.GetPolicyBindingRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.GetPolicyBindingRequest other = + (com.google.iam.v3beta.GetPolicyBindingRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest 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.v3beta.GetPolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest 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.v3beta.GetPolicyBindingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest 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.v3beta.GetPolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest 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.v3beta.GetPolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest 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.v3beta.GetPolicyBindingRequest 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; + } + + /** + * + * + *
+   * Request message for GetPolicyBinding method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.GetPolicyBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.GetPolicyBindingRequest) + com.google.iam.v3beta.GetPolicyBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_GetPolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_GetPolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.GetPolicyBindingRequest.class, + com.google.iam.v3beta.GetPolicyBindingRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.GetPolicyBindingRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_GetPolicyBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.GetPolicyBindingRequest getDefaultInstanceForType() { + return com.google.iam.v3beta.GetPolicyBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.GetPolicyBindingRequest build() { + com.google.iam.v3beta.GetPolicyBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.GetPolicyBindingRequest buildPartial() { + com.google.iam.v3beta.GetPolicyBindingRequest result = + new com.google.iam.v3beta.GetPolicyBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.GetPolicyBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v3beta.GetPolicyBindingRequest) { + return mergeFrom((com.google.iam.v3beta.GetPolicyBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.GetPolicyBindingRequest other) { + if (other == com.google.iam.v3beta.GetPolicyBindingRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the policy binding to retrieve.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the policy binding to retrieve.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the policy binding to retrieve.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the policy binding to retrieve.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the policy binding to retrieve.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + 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.v3beta.GetPolicyBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.GetPolicyBindingRequest) + private static final com.google.iam.v3beta.GetPolicyBindingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.GetPolicyBindingRequest(); + } + + public static com.google.iam.v3beta.GetPolicyBindingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPolicyBindingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.GetPolicyBindingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/GetPolicyBindingRequestOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/GetPolicyBindingRequestOrBuilder.java new file mode 100644 index 0000000000..c0dfbc1a59 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/GetPolicyBindingRequestOrBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright 2025 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/v3beta/policy_bindings_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface GetPolicyBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.GetPolicyBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the policy binding to retrieve.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the policy binding to retrieve.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/GetPrincipalAccessBoundaryPolicyRequest.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/GetPrincipalAccessBoundaryPolicyRequest.java new file mode 100644 index 0000000000..9c15e68863 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/GetPrincipalAccessBoundaryPolicyRequest.java @@ -0,0 +1,676 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policies_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for GetPrincipalAccessBoundaryPolicy method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest} + */ +public final class GetPrincipalAccessBoundaryPolicyRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest) + GetPrincipalAccessBoundaryPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetPrincipalAccessBoundaryPolicyRequest.newBuilder() to construct. + private GetPrincipalAccessBoundaryPolicyRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetPrincipalAccessBoundaryPolicyRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetPrincipalAccessBoundaryPolicyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to retrieve.
+   *
+   * Format:
+   *   `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to retrieve.
+   *
+   * Format:
+   *   `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.v3beta.GetPrincipalAccessBoundaryPolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest other = + (com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest 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.v3beta.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest 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.v3beta.GetPrincipalAccessBoundaryPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest 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.v3beta.GetPrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest 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.v3beta.GetPrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest 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.v3beta.GetPrincipalAccessBoundaryPolicyRequest 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; + } + + /** + * + * + *
+   * Request message for GetPrincipalAccessBoundaryPolicy method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest) + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest + getDefaultInstanceForType() { + return com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest build() { + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest buildPartial() { + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest result = + new com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.v3beta.GetPrincipalAccessBoundaryPolicyRequest) { + return mergeFrom((com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest other) { + if (other + == com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to retrieve.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to retrieve.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to retrieve.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to retrieve.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy to retrieve.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + 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.v3beta.GetPrincipalAccessBoundaryPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest) + private static final com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest(); + } + + public static com.google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPrincipalAccessBoundaryPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.GetPrincipalAccessBoundaryPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/GetPrincipalAccessBoundaryPolicyRequestOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/GetPrincipalAccessBoundaryPolicyRequestOrBuilder.java new file mode 100644 index 0000000000..2ca2edad0a --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/GetPrincipalAccessBoundaryPolicyRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policies_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface GetPrincipalAccessBoundaryPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.GetPrincipalAccessBoundaryPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to retrieve.
+   *
+   * Format:
+   *   `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the principal access boundary policy to retrieve.
+   *
+   * Format:
+   *   `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsRequest.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsRequest.java new file mode 100644 index 0000000000..074f2bd14d --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsRequest.java @@ -0,0 +1,1293 @@ +/* + * Copyright 2025 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/v3beta/policy_bindings_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for ListPolicyBindings method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.ListPolicyBindingsRequest} + */ +public final class ListPolicyBindingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.ListPolicyBindingsRequest) + ListPolicyBindingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListPolicyBindingsRequest.newBuilder() to construct. + private ListPolicyBindingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPolicyBindingsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPolicyBindingsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.ListPolicyBindingsRequest.class, + com.google.iam.v3beta.ListPolicyBindingsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of policy
+   * bindings.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of policy
+   * bindings.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of policy bindings to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 50 policy bindings will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListPolicyBindings` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListPolicyBindings` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListPolicyBindings` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListPolicyBindings` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. Filter
+   * rules are case insensitive. Some eligible fields for filtering are:
+   *
+   * + `target`
+   * + `policy`
+   *
+   * Some examples of filter queries:
+   *
+   * * `target:ex*`: The binding target's name starts with "ex".
+   * * `target:example`: The binding target's name is `example`.
+   * * `policy:example`: The binding policy's name is `example`.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. Filter
+   * rules are case insensitive. Some eligible fields for filtering are:
+   *
+   * + `target`
+   * + `policy`
+   *
+   * Some examples of filter queries:
+   *
+   * * `target:ex*`: The binding target's name starts with "ex".
+   * * `target:example`: The binding target's name is `example`.
+   * * `policy:example`: The binding policy's name is `example`.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + 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(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + size += getUnknownFields().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.v3beta.ListPolicyBindingsRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.ListPolicyBindingsRequest other = + (com.google.iam.v3beta.ListPolicyBindingsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest 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.v3beta.ListPolicyBindingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest 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.v3beta.ListPolicyBindingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest 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.v3beta.ListPolicyBindingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest 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.v3beta.ListPolicyBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest 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.v3beta.ListPolicyBindingsRequest 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; + } + + /** + * + * + *
+   * Request message for ListPolicyBindings method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.ListPolicyBindingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.ListPolicyBindingsRequest) + com.google.iam.v3beta.ListPolicyBindingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.ListPolicyBindingsRequest.class, + com.google.iam.v3beta.ListPolicyBindingsRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.ListPolicyBindingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPolicyBindingsRequest getDefaultInstanceForType() { + return com.google.iam.v3beta.ListPolicyBindingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.ListPolicyBindingsRequest build() { + com.google.iam.v3beta.ListPolicyBindingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPolicyBindingsRequest buildPartial() { + com.google.iam.v3beta.ListPolicyBindingsRequest result = + new com.google.iam.v3beta.ListPolicyBindingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.ListPolicyBindingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + } + + @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.v3beta.ListPolicyBindingsRequest) { + return mergeFrom((com.google.iam.v3beta.ListPolicyBindingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.ListPolicyBindingsRequest other) { + if (other == com.google.iam.v3beta.ListPolicyBindingsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of policy
+     * bindings.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of policy
+     * bindings.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of policy
+     * bindings.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of policy
+     * bindings.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of policy
+     * bindings.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListPolicyBindings` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListPolicyBindings` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListPolicyBindings` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListPolicyBindings` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListPolicyBindings` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListPolicyBindings` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListPolicyBindings` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListPolicyBindings` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListPolicyBindings` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListPolicyBindings` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. Filter
+     * rules are case insensitive. Some eligible fields for filtering are:
+     *
+     * + `target`
+     * + `policy`
+     *
+     * Some examples of filter queries:
+     *
+     * * `target:ex*`: The binding target's name starts with "ex".
+     * * `target:example`: The binding target's name is `example`.
+     * * `policy:example`: The binding policy's name is `example`.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. Filter
+     * rules are case insensitive. Some eligible fields for filtering are:
+     *
+     * + `target`
+     * + `policy`
+     *
+     * Some examples of filter queries:
+     *
+     * * `target:ex*`: The binding target's name starts with "ex".
+     * * `target:example`: The binding target's name is `example`.
+     * * `policy:example`: The binding policy's name is `example`.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. Filter
+     * rules are case insensitive. Some eligible fields for filtering are:
+     *
+     * + `target`
+     * + `policy`
+     *
+     * Some examples of filter queries:
+     *
+     * * `target:ex*`: The binding target's name starts with "ex".
+     * * `target:example`: The binding target's name is `example`.
+     * * `policy:example`: The binding policy's name is `example`.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. Filter
+     * rules are case insensitive. Some eligible fields for filtering are:
+     *
+     * + `target`
+     * + `policy`
+     *
+     * Some examples of filter queries:
+     *
+     * * `target:ex*`: The binding target's name starts with "ex".
+     * * `target:example`: The binding target's name is `example`.
+     * * `policy:example`: The binding policy's name is `example`.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An expression for filtering the results of the request. Filter
+     * rules are case insensitive. Some eligible fields for filtering are:
+     *
+     * + `target`
+     * + `policy`
+     *
+     * Some examples of filter queries:
+     *
+     * * `target:ex*`: The binding target's name starts with "ex".
+     * * `target:example`: The binding target's name is `example`.
+     * * `policy:example`: The binding policy's name is `example`.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000008; + 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.v3beta.ListPolicyBindingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.ListPolicyBindingsRequest) + private static final com.google.iam.v3beta.ListPolicyBindingsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.ListPolicyBindingsRequest(); + } + + public static com.google.iam.v3beta.ListPolicyBindingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPolicyBindingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.ListPolicyBindingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsRequestOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsRequestOrBuilder.java new file mode 100644 index 0000000000..37f78d4a5a --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsRequestOrBuilder.java @@ -0,0 +1,169 @@ +/* + * Copyright 2025 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/v3beta/policy_bindings_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface ListPolicyBindingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.ListPolicyBindingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of policy
+   * bindings.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of policy
+   * bindings.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of policy bindings to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 50 policy bindings will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListPolicyBindings` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListPolicyBindings` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListPolicyBindings` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListPolicyBindings` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. Filter
+   * rules are case insensitive. Some eligible fields for filtering are:
+   *
+   * + `target`
+   * + `policy`
+   *
+   * Some examples of filter queries:
+   *
+   * * `target:ex*`: The binding target's name starts with "ex".
+   * * `target:example`: The binding target's name is `example`.
+   * * `policy:example`: The binding policy's name is `example`.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. An expression for filtering the results of the request. Filter
+   * rules are case insensitive. Some eligible fields for filtering are:
+   *
+   * + `target`
+   * + `policy`
+   *
+   * Some examples of filter queries:
+   *
+   * * `target:ex*`: The binding target's name starts with "ex".
+   * * `target:example`: The binding target's name is `example`.
+   * * `policy:example`: The binding policy's name is `example`.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsResponse.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsResponse.java new file mode 100644 index 0000000000..022309f71f --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsResponse.java @@ -0,0 +1,1160 @@ +/* + * Copyright 2025 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/v3beta/policy_bindings_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * Response message for ListPolicyBindings method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.ListPolicyBindingsResponse} + */ +public final class ListPolicyBindingsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.ListPolicyBindingsResponse) + ListPolicyBindingsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListPolicyBindingsResponse.newBuilder() to construct. + private ListPolicyBindingsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPolicyBindingsResponse() { + policyBindings_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPolicyBindingsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.ListPolicyBindingsResponse.class, + com.google.iam.v3beta.ListPolicyBindingsResponse.Builder.class); + } + + public static final int POLICY_BINDINGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List policyBindings_; + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public java.util.List getPolicyBindingsList() { + return policyBindings_; + } + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public java.util.List + getPolicyBindingsOrBuilderList() { + return policyBindings_; + } + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public int getPolicyBindingsCount() { + return policyBindings_.size(); + } + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding getPolicyBindings(int index) { + return policyBindings_.get(index); + } + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index) { + return policyBindings_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 < policyBindings_.size(); i++) { + output.writeMessage(1, policyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < policyBindings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().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.v3beta.ListPolicyBindingsResponse)) { + return super.equals(obj); + } + com.google.iam.v3beta.ListPolicyBindingsResponse other = + (com.google.iam.v3beta.ListPolicyBindingsResponse) obj; + + if (!getPolicyBindingsList().equals(other.getPolicyBindingsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPolicyBindingsCount() > 0) { + hash = (37 * hash) + POLICY_BINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBindingsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse 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.v3beta.ListPolicyBindingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse 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.v3beta.ListPolicyBindingsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse 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.v3beta.ListPolicyBindingsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse 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.v3beta.ListPolicyBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse 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.v3beta.ListPolicyBindingsResponse 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 ListPolicyBindings method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.ListPolicyBindingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.ListPolicyBindingsResponse) + com.google.iam.v3beta.ListPolicyBindingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.ListPolicyBindingsResponse.class, + com.google.iam.v3beta.ListPolicyBindingsResponse.Builder.class); + } + + // Construct using com.google.iam.v3beta.ListPolicyBindingsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (policyBindingsBuilder_ == null) { + policyBindings_ = java.util.Collections.emptyList(); + } else { + policyBindings_ = null; + policyBindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_ListPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPolicyBindingsResponse getDefaultInstanceForType() { + return com.google.iam.v3beta.ListPolicyBindingsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.ListPolicyBindingsResponse build() { + com.google.iam.v3beta.ListPolicyBindingsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPolicyBindingsResponse buildPartial() { + com.google.iam.v3beta.ListPolicyBindingsResponse result = + new com.google.iam.v3beta.ListPolicyBindingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.iam.v3beta.ListPolicyBindingsResponse result) { + if (policyBindingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyBindings_ = java.util.Collections.unmodifiableList(policyBindings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policyBindings_ = policyBindings_; + } else { + result.policyBindings_ = policyBindingsBuilder_.build(); + } + } + + private void buildPartial0(com.google.iam.v3beta.ListPolicyBindingsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @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.v3beta.ListPolicyBindingsResponse) { + return mergeFrom((com.google.iam.v3beta.ListPolicyBindingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.ListPolicyBindingsResponse other) { + if (other == com.google.iam.v3beta.ListPolicyBindingsResponse.getDefaultInstance()) + return this; + if (policyBindingsBuilder_ == null) { + if (!other.policyBindings_.isEmpty()) { + if (policyBindings_.isEmpty()) { + policyBindings_ = other.policyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyBindingsIsMutable(); + policyBindings_.addAll(other.policyBindings_); + } + onChanged(); + } + } else { + if (!other.policyBindings_.isEmpty()) { + if (policyBindingsBuilder_.isEmpty()) { + policyBindingsBuilder_.dispose(); + policyBindingsBuilder_ = null; + policyBindings_ = other.policyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + policyBindingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPolicyBindingsFieldBuilder() + : null; + } else { + policyBindingsBuilder_.addAllMessages(other.policyBindings_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v3beta.PolicyBinding m = + input.readMessage( + com.google.iam.v3beta.PolicyBinding.parser(), extensionRegistry); + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(m); + } else { + policyBindingsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List policyBindings_ = + java.util.Collections.emptyList(); + + private void ensurePolicyBindingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyBindings_ = + new java.util.ArrayList(policyBindings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + policyBindingsBuilder_; + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public java.util.List getPolicyBindingsList() { + if (policyBindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyBindings_); + } else { + return policyBindingsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public int getPolicyBindingsCount() { + if (policyBindingsBuilder_ == null) { + return policyBindings_.size(); + } else { + return policyBindingsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding getPolicyBindings(int index) { + if (policyBindingsBuilder_ == null) { + return policyBindings_.get(index); + } else { + return policyBindingsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder setPolicyBindings(int index, com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.set(index, value); + onChanged(); + } else { + policyBindingsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder setPolicyBindings( + int index, com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.set(index, builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.add(value); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(int index, com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.add(index, value); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings( + int index, com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(index, builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addAllPolicyBindings( + java.lang.Iterable values) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyBindings_); + onChanged(); + } else { + policyBindingsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder clearPolicyBindings() { + if (policyBindingsBuilder_ == null) { + policyBindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policyBindingsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder removePolicyBindings(int index) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.remove(index); + onChanged(); + } else { + policyBindingsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding.Builder getPolicyBindingsBuilder(int index) { + return getPolicyBindingsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index) { + if (policyBindingsBuilder_ == null) { + return policyBindings_.get(index); + } else { + return policyBindingsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public java.util.List + getPolicyBindingsOrBuilderList() { + if (policyBindingsBuilder_ != null) { + return policyBindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyBindings_); + } + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding.Builder addPolicyBindingsBuilder() { + return getPolicyBindingsFieldBuilder() + .addBuilder(com.google.iam.v3beta.PolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding.Builder addPolicyBindingsBuilder(int index) { + return getPolicyBindingsFieldBuilder() + .addBuilder(index, com.google.iam.v3beta.PolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * The policy bindings from the specified parent.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public java.util.List + getPolicyBindingsBuilderList() { + return getPolicyBindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + getPolicyBindingsFieldBuilder() { + if (policyBindingsBuilder_ == null) { + policyBindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder>( + policyBindings_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + policyBindings_ = null; + } + return policyBindingsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000002; + 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.v3beta.ListPolicyBindingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.ListPolicyBindingsResponse) + private static final com.google.iam.v3beta.ListPolicyBindingsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.ListPolicyBindingsResponse(); + } + + public static com.google.iam.v3beta.ListPolicyBindingsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPolicyBindingsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.ListPolicyBindingsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsResponseOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsResponseOrBuilder.java new file mode 100644 index 0000000000..c0bb54914a --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPolicyBindingsResponseOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2025 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/v3beta/policy_bindings_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface ListPolicyBindingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.ListPolicyBindingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + java.util.List getPolicyBindingsList(); + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + com.google.iam.v3beta.PolicyBinding getPolicyBindings(int index); + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + int getPolicyBindingsCount(); + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + java.util.List + getPolicyBindingsOrBuilderList(); + + /** + * + * + *
+   * The policy bindings from the specified parent.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesRequest.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesRequest.java new file mode 100644 index 0000000000..97360f7ed4 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesRequest.java @@ -0,0 +1,1036 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policies_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for ListPrincipalAccessBoundaryPolicies method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest} + */ +public final class ListPrincipalAccessBoundaryPoliciesRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest) + ListPrincipalAccessBoundaryPoliciesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListPrincipalAccessBoundaryPoliciesRequest.newBuilder() to construct. + private ListPrincipalAccessBoundaryPoliciesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPrincipalAccessBoundaryPoliciesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPrincipalAccessBoundaryPoliciesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest.class, + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of principal
+   * access boundary policies.
+   *
+   * Format:
+   *   `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of principal
+   * access boundary policies.
+   *
+   * Format:
+   *   `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of principal access boundary policies to
+   * return. The service may return fewer than this value.
+   *
+   * If unspecified, at most 50 principal access boundary policies will be
+   * returned. The maximum value is 1000; values above 1000 will be coerced to
+   * 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + 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(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().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.v3beta.ListPrincipalAccessBoundaryPoliciesRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest other = + (com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest 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.v3beta.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest 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.v3beta.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest 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.v3beta.ListPrincipalAccessBoundaryPoliciesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest 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.v3beta.ListPrincipalAccessBoundaryPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest 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.v3beta.ListPrincipalAccessBoundaryPoliciesRequest 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; + } + + /** + * + * + *
+   * Request message for ListPrincipalAccessBoundaryPolicies method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest) + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest.class, + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest + getDefaultInstanceForType() { + return com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest build() { + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest buildPartial() { + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest result = + new com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @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.v3beta.ListPrincipalAccessBoundaryPoliciesRequest) { + return mergeFrom((com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest other) { + if (other + == com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of principal
+     * access boundary policies.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of principal
+     * access boundary policies.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of principal
+     * access boundary policies.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of principal
+     * access boundary policies.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource, which owns the collection of principal
+     * access boundary policies.
+     *
+     * Format:
+     *   `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of principal access boundary policies to
+     * return. The service may return fewer than this value.
+     *
+     * If unspecified, at most 50 principal access boundary policies will be
+     * returned. The maximum value is 1000; values above 1000 will be coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of principal access boundary policies to
+     * return. The service may return fewer than this value.
+     *
+     * If unspecified, at most 50 principal access boundary policies will be
+     * returned. The maximum value is 1000; values above 1000 will be coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of principal access boundary policies to
+     * return. The service may return fewer than this value.
+     *
+     * If unspecified, at most 50 principal access boundary policies will be
+     * returned. The maximum value is 1000; values above 1000 will be coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + 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.v3beta.ListPrincipalAccessBoundaryPoliciesRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest) + private static final com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest(); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPrincipalAccessBoundaryPoliciesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.ListPrincipalAccessBoundaryPoliciesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesRequestOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesRequestOrBuilder.java new file mode 100644 index 0000000000..224450b989 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesRequestOrBuilder.java @@ -0,0 +1,120 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policies_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface ListPrincipalAccessBoundaryPoliciesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of principal
+   * access boundary policies.
+   *
+   * Format:
+   *   `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource, which owns the collection of principal
+   * access boundary policies.
+   *
+   * Format:
+   *   `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of principal access boundary policies to
+   * return. The service may return fewer than this value.
+   *
+   * If unspecified, at most 50 principal access boundary policies will be
+   * returned. The maximum value is 1000; values above 1000 will be coerced to
+   * 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListPrincipalAccessBoundaryPolicies` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesResponse.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesResponse.java new file mode 100644 index 0000000000..72c26f29ba --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesResponse.java @@ -0,0 +1,1244 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policies_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * Response message for ListPrincipalAccessBoundaryPolicies method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse} + */ +public final class ListPrincipalAccessBoundaryPoliciesResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse) + ListPrincipalAccessBoundaryPoliciesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListPrincipalAccessBoundaryPoliciesResponse.newBuilder() to construct. + private ListPrincipalAccessBoundaryPoliciesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPrincipalAccessBoundaryPoliciesResponse() { + principalAccessBoundaryPolicies_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPrincipalAccessBoundaryPoliciesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse.class, + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse.Builder.class); + } + + public static final int PRINCIPAL_ACCESS_BOUNDARY_POLICIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + principalAccessBoundaryPolicies_; + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + @java.lang.Override + public java.util.List + getPrincipalAccessBoundaryPoliciesList() { + return principalAccessBoundaryPolicies_; + } + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + @java.lang.Override + public java.util.List + getPrincipalAccessBoundaryPoliciesOrBuilderList() { + return principalAccessBoundaryPolicies_; + } + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + @java.lang.Override + public int getPrincipalAccessBoundaryPoliciesCount() { + return principalAccessBoundaryPolicies_.size(); + } + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicies( + int index) { + return principalAccessBoundaryPolicies_.get(index); + } + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPoliciesOrBuilder(int index) { + return principalAccessBoundaryPolicies_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 < principalAccessBoundaryPolicies_.size(); i++) { + output.writeMessage(1, principalAccessBoundaryPolicies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < principalAccessBoundaryPolicies_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, principalAccessBoundaryPolicies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().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.v3beta.ListPrincipalAccessBoundaryPoliciesResponse)) { + return super.equals(obj); + } + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse other = + (com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse) obj; + + if (!getPrincipalAccessBoundaryPoliciesList() + .equals(other.getPrincipalAccessBoundaryPoliciesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPrincipalAccessBoundaryPoliciesCount() > 0) { + hash = (37 * hash) + PRINCIPAL_ACCESS_BOUNDARY_POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalAccessBoundaryPoliciesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse 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.v3beta.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse 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.v3beta.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse 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.v3beta.ListPrincipalAccessBoundaryPoliciesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse + 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.v3beta.ListPrincipalAccessBoundaryPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse 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.v3beta.ListPrincipalAccessBoundaryPoliciesResponse 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 ListPrincipalAccessBoundaryPolicies method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse) + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse.class, + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse.Builder.class); + } + + // Construct using + // com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (principalAccessBoundaryPoliciesBuilder_ == null) { + principalAccessBoundaryPolicies_ = java.util.Collections.emptyList(); + } else { + principalAccessBoundaryPolicies_ = null; + principalAccessBoundaryPoliciesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse + getDefaultInstanceForType() { + return com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse build() { + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse buildPartial() { + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse result = + new com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse result) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + principalAccessBoundaryPolicies_ = + java.util.Collections.unmodifiableList(principalAccessBoundaryPolicies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.principalAccessBoundaryPolicies_ = principalAccessBoundaryPolicies_; + } else { + result.principalAccessBoundaryPolicies_ = principalAccessBoundaryPoliciesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @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.v3beta.ListPrincipalAccessBoundaryPoliciesResponse) { + return mergeFrom((com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse other) { + if (other + == com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse.getDefaultInstance()) + return this; + if (principalAccessBoundaryPoliciesBuilder_ == null) { + if (!other.principalAccessBoundaryPolicies_.isEmpty()) { + if (principalAccessBoundaryPolicies_.isEmpty()) { + principalAccessBoundaryPolicies_ = other.principalAccessBoundaryPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.addAll(other.principalAccessBoundaryPolicies_); + } + onChanged(); + } + } else { + if (!other.principalAccessBoundaryPolicies_.isEmpty()) { + if (principalAccessBoundaryPoliciesBuilder_.isEmpty()) { + principalAccessBoundaryPoliciesBuilder_.dispose(); + principalAccessBoundaryPoliciesBuilder_ = null; + principalAccessBoundaryPolicies_ = other.principalAccessBoundaryPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + principalAccessBoundaryPoliciesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPrincipalAccessBoundaryPoliciesFieldBuilder() + : null; + } else { + principalAccessBoundaryPoliciesBuilder_.addAllMessages( + other.principalAccessBoundaryPolicies_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy m = + input.readMessage( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.parser(), + extensionRegistry); + if (principalAccessBoundaryPoliciesBuilder_ == null) { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.add(m); + } else { + principalAccessBoundaryPoliciesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + principalAccessBoundaryPolicies_ = java.util.Collections.emptyList(); + + private void ensurePrincipalAccessBoundaryPoliciesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + principalAccessBoundaryPolicies_ = + new java.util.ArrayList( + principalAccessBoundaryPolicies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder> + principalAccessBoundaryPoliciesBuilder_; + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public java.util.List + getPrincipalAccessBoundaryPoliciesList() { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + return java.util.Collections.unmodifiableList(principalAccessBoundaryPolicies_); + } else { + return principalAccessBoundaryPoliciesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public int getPrincipalAccessBoundaryPoliciesCount() { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + return principalAccessBoundaryPolicies_.size(); + } else { + return principalAccessBoundaryPoliciesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicies( + int index) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + return principalAccessBoundaryPolicies_.get(index); + } else { + return principalAccessBoundaryPoliciesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder setPrincipalAccessBoundaryPolicies( + int index, com.google.iam.v3beta.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.set(index, value); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder setPrincipalAccessBoundaryPolicies( + int index, com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder builderForValue) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.set(index, builderForValue.build()); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder addPrincipalAccessBoundaryPolicies( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.add(value); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder addPrincipalAccessBoundaryPolicies( + int index, com.google.iam.v3beta.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.add(index, value); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder addPrincipalAccessBoundaryPolicies( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder builderForValue) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.add(builderForValue.build()); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder addPrincipalAccessBoundaryPolicies( + int index, com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder builderForValue) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.add(index, builderForValue.build()); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder addAllPrincipalAccessBoundaryPolicies( + java.lang.Iterable values) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, principalAccessBoundaryPolicies_); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder clearPrincipalAccessBoundaryPolicies() { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + principalAccessBoundaryPolicies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public Builder removePrincipalAccessBoundaryPolicies(int index) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + ensurePrincipalAccessBoundaryPoliciesIsMutable(); + principalAccessBoundaryPolicies_.remove(index); + onChanged(); + } else { + principalAccessBoundaryPoliciesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder + getPrincipalAccessBoundaryPoliciesBuilder(int index) { + return getPrincipalAccessBoundaryPoliciesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPoliciesOrBuilder(int index) { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + return principalAccessBoundaryPolicies_.get(index); + } else { + return principalAccessBoundaryPoliciesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public java.util.List + getPrincipalAccessBoundaryPoliciesOrBuilderList() { + if (principalAccessBoundaryPoliciesBuilder_ != null) { + return principalAccessBoundaryPoliciesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(principalAccessBoundaryPolicies_); + } + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder + addPrincipalAccessBoundaryPoliciesBuilder() { + return getPrincipalAccessBoundaryPoliciesFieldBuilder() + .addBuilder(com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance()); + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder + addPrincipalAccessBoundaryPoliciesBuilder(int index) { + return getPrincipalAccessBoundaryPoliciesFieldBuilder() + .addBuilder( + index, com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance()); + } + + /** + * + * + *
+     * The principal access boundary policies from the specified parent.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + public java.util.List + getPrincipalAccessBoundaryPoliciesBuilderList() { + return getPrincipalAccessBoundaryPoliciesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder> + getPrincipalAccessBoundaryPoliciesFieldBuilder() { + if (principalAccessBoundaryPoliciesBuilder_ == null) { + principalAccessBoundaryPoliciesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder>( + principalAccessBoundaryPolicies_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + principalAccessBoundaryPolicies_ = null; + } + return principalAccessBoundaryPoliciesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000002; + 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.v3beta.ListPrincipalAccessBoundaryPoliciesResponse) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse) + private static final com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse(); + } + + public static com.google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPrincipalAccessBoundaryPoliciesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.ListPrincipalAccessBoundaryPoliciesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesResponseOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesResponseOrBuilder.java new file mode 100644 index 0000000000..b3eddaecb0 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/ListPrincipalAccessBoundaryPoliciesResponseOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policies_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface ListPrincipalAccessBoundaryPoliciesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.ListPrincipalAccessBoundaryPoliciesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + java.util.List + getPrincipalAccessBoundaryPoliciesList(); + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicies(int index); + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + int getPrincipalAccessBoundaryPoliciesCount(); + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + java.util.List + getPrincipalAccessBoundaryPoliciesOrBuilderList(); + + /** + * + * + *
+   * The principal access boundary policies from the specified parent.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + * + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPoliciesOrBuilder(int index); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/LocationName.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/LocationName.java new file mode 100644 index 0000000000..7a1101e81b --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2025 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. + */ + +package com.google.iam.v3beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/OperationMetadata.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/OperationMetadata.java new file mode 100644 index 0000000000..07757c07cc --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/OperationMetadata.java @@ -0,0 +1,1904 @@ +/* + * Copyright 2025 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/v3beta/operation_metadata.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.OperationMetadataProto + .internal_static_google_iam_v3beta_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.OperationMetadataProto + .internal_static_google_iam_v3beta_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.OperationMetadata.class, + com.google.iam.v3beta.OperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + 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(); + target_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + 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(); + verb_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + 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(); + statusMessage_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + 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(); + apiVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + size += getUnknownFields().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.v3beta.OperationMetadata)) { + return super.equals(obj); + } + com.google.iam.v3beta.OperationMetadata other = (com.google.iam.v3beta.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.OperationMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.OperationMetadata 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.v3beta.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.OperationMetadata 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.v3beta.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.OperationMetadata 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.v3beta.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.OperationMetadata 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.v3beta.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.OperationMetadata 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.v3beta.OperationMetadata 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; + } + + /** + * + * + *
+   * Represents the metadata of the long-running operation.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.OperationMetadata) + com.google.iam.v3beta.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.OperationMetadataProto + .internal_static_google_iam_v3beta_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.OperationMetadataProto + .internal_static_google_iam_v3beta_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.OperationMetadata.class, + com.google.iam.v3beta.OperationMetadata.Builder.class); + } + + // Construct using com.google.iam.v3beta.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.OperationMetadataProto + .internal_static_google_iam_v3beta_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.OperationMetadata getDefaultInstanceForType() { + return com.google.iam.v3beta.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.OperationMetadata build() { + com.google.iam.v3beta.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.OperationMetadata buildPartial() { + com.google.iam.v3beta.OperationMetadata result = + new com.google.iam.v3beta.OperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.OperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.apiVersion_ = apiVersion_; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3beta.OperationMetadata) { + return mergeFrom((com.google.iam.v3beta.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.OperationMetadata other) { + if (other == com.google.iam.v3beta.OperationMetadata.getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000020); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000040; + 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.v3beta.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.OperationMetadata) + private static final com.google.iam.v3beta.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.OperationMetadata(); + } + + public static com.google.iam.v3beta.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/OperationMetadataOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/OperationMetadataOrBuilder.java new file mode 100644 index 0000000000..8f032dca76 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/OperationMetadataOrBuilder.java @@ -0,0 +1,227 @@ +/* + * Copyright 2025 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/v3beta/operation_metadata.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/OperationMetadataProto.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/OperationMetadataProto.java new file mode 100644 index 0000000000..aef4dc1055 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/OperationMetadataProto.java @@ -0,0 +1,90 @@ +/* + * Copyright 2025 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/v3beta/operation_metadata.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public final class OperationMetadataProto { + private OperationMetadataProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_OperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n*google/iam/v3beta/operation_metadata.p" + + "roto\022\021google.iam.v3beta\032\037google/api/fiel" + + "d_behavior.proto\032\037google/protobuf/timest" + + "amp.proto\"\200\002\n\021OperationMetadata\0224\n\013creat" + + "e_time\030\001 \001(\0132\032.google.protobuf.Timestamp" + + "B\003\340A\003\0221\n\010end_time\030\002 \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\003\022\023\n\006target\030\003 \001(\tB\003\340A\003\022\021\n" + + "\004verb\030\004 \001(\tB\003\340A\003\022\033\n\016status_message\030\005 \001(\t" + + "B\003\340A\003\022#\n\026requested_cancellation\030\006 \001(\010B\003\340" + + "A\003\022\030\n\013api_version\030\007 \001(\tB\003\340A\003B\224\001\n\025com.goo" + + "gle.iam.v3betaB\026OperationMetadataProtoP\001" + + "Z-cloud.google.com/go/iam/apiv3beta/iamp" + + "b;iampb\252\002\027Google.Cloud.Iam.V3Beta\312\002\027Goog" + + "le\\Cloud\\Iam\\V3betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_iam_v3beta_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_iam_v3beta_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusMessage", + "RequestedCancellation", + "ApiVersion", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/OrganizationLocationName.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/OrganizationLocationName.java new file mode 100644 index 0000000000..2b7902ddae --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/OrganizationLocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2025 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. + */ + +package com.google.iam.v3beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class OrganizationLocationName implements ResourceName { + private static final PathTemplate ORGANIZATION_LOCATION = + PathTemplate.createWithoutUrlEncoding("organizations/{organization}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String organization; + private final String location; + + @Deprecated + protected OrganizationLocationName() { + organization = null; + location = null; + } + + private OrganizationLocationName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static OrganizationLocationName of(String organization, String location) { + return newBuilder().setOrganization(organization).setLocation(location).build(); + } + + public static String format(String organization, String location) { + return newBuilder().setOrganization(organization).setLocation(location).build().toString(); + } + + public static OrganizationLocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ORGANIZATION_LOCATION.validatedMatch( + formattedString, "OrganizationLocationName.parse: formattedString not in valid format"); + return of(matchMap.get("organization"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (OrganizationLocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ORGANIZATION_LOCATION.instantiate("organization", organization, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + OrganizationLocationName that = ((OrganizationLocationName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for organizations/{organization}/locations/{location}. */ + public static class Builder { + private String organization; + private String location; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(OrganizationLocationName organizationLocationName) { + this.organization = organizationLocationName.organization; + this.location = organizationLocationName.location; + } + + public OrganizationLocationName build() { + return new OrganizationLocationName(this); + } + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PolicyBinding.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PolicyBinding.java new file mode 100644 index 0000000000..6082760000 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PolicyBinding.java @@ -0,0 +1,5082 @@ +/* + * Copyright 2025 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/v3beta/policy_binding_resources.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * IAM policy binding resource.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.PolicyBinding} + */ +public final class PolicyBinding extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.PolicyBinding) + PolicyBindingOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PolicyBinding.newBuilder() to construct. + private PolicyBinding(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PolicyBinding() { + name_ = ""; + uid_ = ""; + etag_ = ""; + displayName_ = ""; + policyKind_ = 0; + policy_ = ""; + policyUid_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PolicyBinding(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PolicyBinding.class, + com.google.iam.v3beta.PolicyBinding.Builder.class); + } + + /** + * + * + *
+   * Different policy kinds supported in this binding.
+   * 
+ * + * Protobuf enum {@code google.iam.v3beta.PolicyBinding.PolicyKind} + */ + public enum PolicyKind implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified policy kind; Not a valid state
+     * 
+ * + * POLICY_KIND_UNSPECIFIED = 0; + */ + POLICY_KIND_UNSPECIFIED(0), + /** + * + * + *
+     * Principal access boundary policy kind
+     * 
+ * + * PRINCIPAL_ACCESS_BOUNDARY = 1; + */ + PRINCIPAL_ACCESS_BOUNDARY(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified policy kind; Not a valid state
+     * 
+ * + * POLICY_KIND_UNSPECIFIED = 0; + */ + public static final int POLICY_KIND_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Principal access boundary policy kind
+     * 
+ * + * PRINCIPAL_ACCESS_BOUNDARY = 1; + */ + public static final int PRINCIPAL_ACCESS_BOUNDARY_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PolicyKind valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PolicyKind forNumber(int value) { + switch (value) { + case 0: + return POLICY_KIND_UNSPECIFIED; + case 1: + return PRINCIPAL_ACCESS_BOUNDARY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PolicyKind findValueByNumber(int number) { + return PolicyKind.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBinding.getDescriptor().getEnumTypes().get(0); + } + + private static final PolicyKind[] VALUES = values(); + + public static PolicyKind valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PolicyKind(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.iam.v3beta.PolicyBinding.PolicyKind) + } + + public interface TargetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.PolicyBinding.Target) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Immutable. Full Resource Name used for principal access boundary policy
+     * bindings. The principal set must be directly parented by the policy
+     * binding's parent or same as the parent if the target is a
+     * project/folder/organization.
+     *
+     * Examples:
+     * * For binding's parented by an organization:
+     *   * Organization:
+     *   `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+     *   * Workforce Identity:
+     *   `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+     *   * Workspace Identity:
+     *   `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * For binding's parented by a folder:
+     *   * Folder:
+     *   `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+     * * For binding's parented by a project:
+     *   * Project:
+     *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+     *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+     *   * Workload Identity Pool:
+     *   `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+     * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return Whether the principalSet field is set. + */ + boolean hasPrincipalSet(); + + /** + * + * + *
+     * Immutable. Full Resource Name used for principal access boundary policy
+     * bindings. The principal set must be directly parented by the policy
+     * binding's parent or same as the parent if the target is a
+     * project/folder/organization.
+     *
+     * Examples:
+     * * For binding's parented by an organization:
+     *   * Organization:
+     *   `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+     *   * Workforce Identity:
+     *   `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+     *   * Workspace Identity:
+     *   `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * For binding's parented by a folder:
+     *   * Folder:
+     *   `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+     * * For binding's parented by a project:
+     *   * Project:
+     *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+     *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+     *   * Workload Identity Pool:
+     *   `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+     * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The principalSet. + */ + java.lang.String getPrincipalSet(); + + /** + * + * + *
+     * Immutable. Full Resource Name used for principal access boundary policy
+     * bindings. The principal set must be directly parented by the policy
+     * binding's parent or same as the parent if the target is a
+     * project/folder/organization.
+     *
+     * Examples:
+     * * For binding's parented by an organization:
+     *   * Organization:
+     *   `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+     *   * Workforce Identity:
+     *   `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+     *   * Workspace Identity:
+     *   `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * For binding's parented by a folder:
+     *   * Folder:
+     *   `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+     * * For binding's parented by a project:
+     *   * Project:
+     *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+     *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+     *   * Workload Identity Pool:
+     *   `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+     * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for principalSet. + */ + com.google.protobuf.ByteString getPrincipalSetBytes(); + + com.google.iam.v3beta.PolicyBinding.Target.TargetCase getTargetCase(); + } + + /** + * + * + *
+   * Target is the full resource name of the resource to which the policy will
+   * be bound. Immutable once set.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.PolicyBinding.Target} + */ + public static final class Target extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.PolicyBinding.Target) + TargetOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Target.newBuilder() to construct. + private Target(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Target() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Target(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_Target_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_Target_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PolicyBinding.Target.class, + com.google.iam.v3beta.PolicyBinding.Target.Builder.class); + } + + private int targetCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object target_; + + public enum TargetCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PRINCIPAL_SET(1), + TARGET_NOT_SET(0); + private final int value; + + private TargetCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TargetCase valueOf(int value) { + return forNumber(value); + } + + public static TargetCase forNumber(int value) { + switch (value) { + case 1: + return PRINCIPAL_SET; + case 0: + return TARGET_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TargetCase getTargetCase() { + return TargetCase.forNumber(targetCase_); + } + + public static final int PRINCIPAL_SET_FIELD_NUMBER = 1; + + /** + * + * + *
+     * Immutable. Full Resource Name used for principal access boundary policy
+     * bindings. The principal set must be directly parented by the policy
+     * binding's parent or same as the parent if the target is a
+     * project/folder/organization.
+     *
+     * Examples:
+     * * For binding's parented by an organization:
+     *   * Organization:
+     *   `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+     *   * Workforce Identity:
+     *   `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+     *   * Workspace Identity:
+     *   `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * For binding's parented by a folder:
+     *   * Folder:
+     *   `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+     * * For binding's parented by a project:
+     *   * Project:
+     *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+     *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+     *   * Workload Identity Pool:
+     *   `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+     * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return Whether the principalSet field is set. + */ + public boolean hasPrincipalSet() { + return targetCase_ == 1; + } + + /** + * + * + *
+     * Immutable. Full Resource Name used for principal access boundary policy
+     * bindings. The principal set must be directly parented by the policy
+     * binding's parent or same as the parent if the target is a
+     * project/folder/organization.
+     *
+     * Examples:
+     * * For binding's parented by an organization:
+     *   * Organization:
+     *   `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+     *   * Workforce Identity:
+     *   `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+     *   * Workspace Identity:
+     *   `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * For binding's parented by a folder:
+     *   * Folder:
+     *   `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+     * * For binding's parented by a project:
+     *   * Project:
+     *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+     *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+     *   * Workload Identity Pool:
+     *   `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+     * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The principalSet. + */ + public java.lang.String getPrincipalSet() { + java.lang.Object ref = ""; + if (targetCase_ == 1) { + ref = target_; + } + 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(); + if (targetCase_ == 1) { + target_ = s; + } + return s; + } + } + + /** + * + * + *
+     * Immutable. Full Resource Name used for principal access boundary policy
+     * bindings. The principal set must be directly parented by the policy
+     * binding's parent or same as the parent if the target is a
+     * project/folder/organization.
+     *
+     * Examples:
+     * * For binding's parented by an organization:
+     *   * Organization:
+     *   `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+     *   * Workforce Identity:
+     *   `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+     *   * Workspace Identity:
+     *   `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * For binding's parented by a folder:
+     *   * Folder:
+     *   `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+     * * For binding's parented by a project:
+     *   * Project:
+     *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+     *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+     *   * Workload Identity Pool:
+     *   `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+     * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for principalSet. + */ + public com.google.protobuf.ByteString getPrincipalSetBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 1) { + ref = target_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 1) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (targetCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, target_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (targetCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, target_); + } + size += getUnknownFields().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.v3beta.PolicyBinding.Target)) { + return super.equals(obj); + } + com.google.iam.v3beta.PolicyBinding.Target other = + (com.google.iam.v3beta.PolicyBinding.Target) obj; + + if (!getTargetCase().equals(other.getTargetCase())) return false; + switch (targetCase_) { + case 1: + if (!getPrincipalSet().equals(other.getPrincipalSet())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (targetCase_) { + case 1: + hash = (37 * hash) + PRINCIPAL_SET_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalSet().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.PolicyBinding.Target parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PolicyBinding.Target 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.v3beta.PolicyBinding.Target parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PolicyBinding.Target 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.v3beta.PolicyBinding.Target parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PolicyBinding.Target parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PolicyBinding.Target parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PolicyBinding.Target 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.v3beta.PolicyBinding.Target parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PolicyBinding.Target 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.v3beta.PolicyBinding.Target parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PolicyBinding.Target 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.v3beta.PolicyBinding.Target 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; + } + + /** + * + * + *
+     * Target is the full resource name of the resource to which the policy will
+     * be bound. Immutable once set.
+     * 
+ * + * Protobuf type {@code google.iam.v3beta.PolicyBinding.Target} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.PolicyBinding.Target) + com.google.iam.v3beta.PolicyBinding.TargetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_Target_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_Target_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PolicyBinding.Target.class, + com.google.iam.v3beta.PolicyBinding.Target.Builder.class); + } + + // Construct using com.google.iam.v3beta.PolicyBinding.Target.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + targetCase_ = 0; + target_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_Target_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding.Target getDefaultInstanceForType() { + return com.google.iam.v3beta.PolicyBinding.Target.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding.Target build() { + com.google.iam.v3beta.PolicyBinding.Target result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding.Target buildPartial() { + com.google.iam.v3beta.PolicyBinding.Target result = + new com.google.iam.v3beta.PolicyBinding.Target(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.PolicyBinding.Target result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.iam.v3beta.PolicyBinding.Target result) { + result.targetCase_ = targetCase_; + result.target_ = this.target_; + } + + @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.v3beta.PolicyBinding.Target) { + return mergeFrom((com.google.iam.v3beta.PolicyBinding.Target) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.PolicyBinding.Target other) { + if (other == com.google.iam.v3beta.PolicyBinding.Target.getDefaultInstance()) return this; + switch (other.getTargetCase()) { + case PRINCIPAL_SET: + { + targetCase_ = 1; + target_ = other.target_; + onChanged(); + break; + } + case TARGET_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + targetCase_ = 1; + target_ = s; + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int targetCase_ = 0; + private java.lang.Object target_; + + public TargetCase getTargetCase() { + return TargetCase.forNumber(targetCase_); + } + + public Builder clearTarget() { + targetCase_ = 0; + target_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * Immutable. Full Resource Name used for principal access boundary policy
+       * bindings. The principal set must be directly parented by the policy
+       * binding's parent or same as the parent if the target is a
+       * project/folder/organization.
+       *
+       * Examples:
+       * * For binding's parented by an organization:
+       *   * Organization:
+       *   `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+       *   * Workforce Identity:
+       *   `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+       *   * Workspace Identity:
+       *   `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+       * * For binding's parented by a folder:
+       *   * Folder:
+       *   `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+       * * For binding's parented by a project:
+       *   * Project:
+       *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+       *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+       *   * Workload Identity Pool:
+       *   `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+       * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return Whether the principalSet field is set. + */ + @java.lang.Override + public boolean hasPrincipalSet() { + return targetCase_ == 1; + } + + /** + * + * + *
+       * Immutable. Full Resource Name used for principal access boundary policy
+       * bindings. The principal set must be directly parented by the policy
+       * binding's parent or same as the parent if the target is a
+       * project/folder/organization.
+       *
+       * Examples:
+       * * For binding's parented by an organization:
+       *   * Organization:
+       *   `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+       *   * Workforce Identity:
+       *   `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+       *   * Workspace Identity:
+       *   `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+       * * For binding's parented by a folder:
+       *   * Folder:
+       *   `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+       * * For binding's parented by a project:
+       *   * Project:
+       *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+       *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+       *   * Workload Identity Pool:
+       *   `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+       * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The principalSet. + */ + @java.lang.Override + public java.lang.String getPrincipalSet() { + java.lang.Object ref = ""; + if (targetCase_ == 1) { + ref = target_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetCase_ == 1) { + target_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Immutable. Full Resource Name used for principal access boundary policy
+       * bindings. The principal set must be directly parented by the policy
+       * binding's parent or same as the parent if the target is a
+       * project/folder/organization.
+       *
+       * Examples:
+       * * For binding's parented by an organization:
+       *   * Organization:
+       *   `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+       *   * Workforce Identity:
+       *   `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+       *   * Workspace Identity:
+       *   `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+       * * For binding's parented by a folder:
+       *   * Folder:
+       *   `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+       * * For binding's parented by a project:
+       *   * Project:
+       *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+       *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+       *   * Workload Identity Pool:
+       *   `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+       * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for principalSet. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrincipalSetBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 1) { + ref = target_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 1) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Immutable. Full Resource Name used for principal access boundary policy
+       * bindings. The principal set must be directly parented by the policy
+       * binding's parent or same as the parent if the target is a
+       * project/folder/organization.
+       *
+       * Examples:
+       * * For binding's parented by an organization:
+       *   * Organization:
+       *   `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+       *   * Workforce Identity:
+       *   `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+       *   * Workspace Identity:
+       *   `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+       * * For binding's parented by a folder:
+       *   * Folder:
+       *   `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+       * * For binding's parented by a project:
+       *   * Project:
+       *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+       *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+       *   * Workload Identity Pool:
+       *   `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+       * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The principalSet to set. + * @return This builder for chaining. + */ + public Builder setPrincipalSet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetCase_ = 1; + target_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * Immutable. Full Resource Name used for principal access boundary policy
+       * bindings. The principal set must be directly parented by the policy
+       * binding's parent or same as the parent if the target is a
+       * project/folder/organization.
+       *
+       * Examples:
+       * * For binding's parented by an organization:
+       *   * Organization:
+       *   `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+       *   * Workforce Identity:
+       *   `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+       *   * Workspace Identity:
+       *   `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+       * * For binding's parented by a folder:
+       *   * Folder:
+       *   `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+       * * For binding's parented by a project:
+       *   * Project:
+       *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+       *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+       *   * Workload Identity Pool:
+       *   `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+       * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearPrincipalSet() { + if (targetCase_ == 1) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Immutable. Full Resource Name used for principal access boundary policy
+       * bindings. The principal set must be directly parented by the policy
+       * binding's parent or same as the parent if the target is a
+       * project/folder/organization.
+       *
+       * Examples:
+       * * For binding's parented by an organization:
+       *   * Organization:
+       *   `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID`
+       *   * Workforce Identity:
+       *   `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID`
+       *   * Workspace Identity:
+       *   `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+       * * For binding's parented by a folder:
+       *   * Folder:
+       *   `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID`
+       * * For binding's parented by a project:
+       *   * Project:
+       *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER`
+       *     * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID`
+       *   * Workload Identity Pool:
+       *   `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID`
+       * 
+ * + * string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for principalSet to set. + * @return This builder for chaining. + */ + public Builder setPrincipalSetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetCase_ = 1; + target_ = 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.v3beta.PolicyBinding.Target) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.PolicyBinding.Target) + private static final com.google.iam.v3beta.PolicyBinding.Target DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.PolicyBinding.Target(); + } + + public static com.google.iam.v3beta.PolicyBinding.Target getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Target parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.PolicyBinding.Target getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The name of the policy binding, in the format
+   * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder, or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The name of the policy binding, in the format
+   * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder, or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + + /** + * + * + *
+   * Output only. The globally unique ID of the policy binding. Assigned when
+   * the policy binding is created.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + 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(); + uid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The globally unique ID of the policy binding. Assigned when
+   * the policy binding is created.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. The etag for the policy binding.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The etag for the policy binding.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. The description of the policy binding. Must be less than or equal
+   * to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The description of the policy binding. Must be less than or equal
+   * to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 5; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int TARGET_FIELD_NUMBER = 6; + private com.google.iam.v3beta.PolicyBinding.Target target_; + + /** + * + * + *
+   * Required. Immutable. Target is the full resource name of the resource to
+   * which the policy will be bound. Immutable once set.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + @java.lang.Override + public boolean hasTarget() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Immutable. Target is the full resource name of the resource to
+   * which the policy will be bound. Immutable once set.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding.Target getTarget() { + return target_ == null + ? com.google.iam.v3beta.PolicyBinding.Target.getDefaultInstance() + : target_; + } + + /** + * + * + *
+   * Required. Immutable. Target is the full resource name of the resource to
+   * which the policy will be bound. Immutable once set.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding.TargetOrBuilder getTargetOrBuilder() { + return target_ == null + ? com.google.iam.v3beta.PolicyBinding.Target.getDefaultInstance() + : target_; + } + + public static final int POLICY_KIND_FIELD_NUMBER = 11; + private int policyKind_ = 0; + + /** + * + * + *
+   * Immutable. The kind of the policy to attach in this binding. This field
+   * must be one of the following:
+   *
+   * - Left empty (will be automatically set to the policy kind)
+   * - The input policy kind
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for policyKind. + */ + @java.lang.Override + public int getPolicyKindValue() { + return policyKind_; + } + + /** + * + * + *
+   * Immutable. The kind of the policy to attach in this binding. This field
+   * must be one of the following:
+   *
+   * - Left empty (will be automatically set to the policy kind)
+   * - The input policy kind
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The policyKind. + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding.PolicyKind getPolicyKind() { + com.google.iam.v3beta.PolicyBinding.PolicyKind result = + com.google.iam.v3beta.PolicyBinding.PolicyKind.forNumber(policyKind_); + return result == null ? com.google.iam.v3beta.PolicyBinding.PolicyKind.UNRECOGNIZED : result; + } + + public static final int POLICY_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object policy_ = ""; + + /** + * + * + *
+   * Required. Immutable. The resource name of the policy to be bound. The
+   * binding parent and policy must belong to the same organization.
+   * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policy. + */ + @java.lang.Override + public java.lang.String getPolicy() { + java.lang.Object ref = policy_; + 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(); + policy_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Immutable. The resource name of the policy to be bound. The
+   * binding parent and policy must belong to the same organization.
+   * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for policy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPolicyBytes() { + java.lang.Object ref = policy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_UID_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object policyUid_ = ""; + + /** + * + * + *
+   * Output only. The globally unique ID of the policy to be bound.
+   * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The policyUid. + */ + @java.lang.Override + public java.lang.String getPolicyUid() { + java.lang.Object ref = policyUid_; + 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(); + policyUid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The globally unique ID of the policy to be bound.
+   * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for policyUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPolicyUidBytes() { + java.lang.Object ref = policyUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONDITION_FIELD_NUMBER = 8; + private com.google.type.Expr condition_; + + /** + * + * + *
+   * Optional. The condition to apply to the policy binding. When set, the
+   * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+   * joined by the
+   * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+   * cannot contain more than 250 characters.
+   *
+   * The condition is currently only supported when bound to policies of kind
+   * principal access boundary.
+   *
+   * When the bound policy is a principal access boundary policy, the only
+   * supported attributes in any subexpression are `principal.type` and
+   * `principal.subject`. An example expression is: "principal.type ==
+   * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+   * 'bob@example.com'".
+   *
+   * Allowed operations for `principal.subject`:
+   *
+   * - `principal.subject == <principal subject string>`
+   * - `principal.subject != <principal subject string>`
+   * - `principal.subject in [<list of principal subjects>]`
+   * - `principal.subject.startsWith(<string>)`
+   * - `principal.subject.endsWith(<string>)`
+   *
+   * Allowed operations for `principal.type`:
+   *
+   * - `principal.type == <principal type string>`
+   * - `principal.type != <principal type string>`
+   * - `principal.type in [<list of principal types>]`
+   *
+   * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+   * Service Account. Allowed string must be one of:
+   *
+   * - iam.googleapis.com/WorkspaceIdentity
+   * - iam.googleapis.com/WorkforcePoolIdentity
+   * - iam.googleapis.com/WorkloadPoolIdentity
+   * - iam.googleapis.com/ServiceAccount
+   * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the condition field is set. + */ + @java.lang.Override + public boolean hasCondition() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The condition to apply to the policy binding. When set, the
+   * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+   * joined by the
+   * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+   * cannot contain more than 250 characters.
+   *
+   * The condition is currently only supported when bound to policies of kind
+   * principal access boundary.
+   *
+   * When the bound policy is a principal access boundary policy, the only
+   * supported attributes in any subexpression are `principal.type` and
+   * `principal.subject`. An example expression is: "principal.type ==
+   * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+   * 'bob@example.com'".
+   *
+   * Allowed operations for `principal.subject`:
+   *
+   * - `principal.subject == <principal subject string>`
+   * - `principal.subject != <principal subject string>`
+   * - `principal.subject in [<list of principal subjects>]`
+   * - `principal.subject.startsWith(<string>)`
+   * - `principal.subject.endsWith(<string>)`
+   *
+   * Allowed operations for `principal.type`:
+   *
+   * - `principal.type == <principal type string>`
+   * - `principal.type != <principal type string>`
+   * - `principal.type in [<list of principal types>]`
+   *
+   * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+   * Service Account. Allowed string must be one of:
+   *
+   * - iam.googleapis.com/WorkspaceIdentity
+   * - iam.googleapis.com/WorkforcePoolIdentity
+   * - iam.googleapis.com/WorkloadPoolIdentity
+   * - iam.googleapis.com/ServiceAccount
+   * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + @java.lang.Override + public com.google.type.Expr getCondition() { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } + + /** + * + * + *
+   * Optional. The condition to apply to the policy binding. When set, the
+   * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+   * joined by the
+   * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+   * cannot contain more than 250 characters.
+   *
+   * The condition is currently only supported when bound to policies of kind
+   * principal access boundary.
+   *
+   * When the bound policy is a principal access boundary policy, the only
+   * supported attributes in any subexpression are `principal.type` and
+   * `principal.subject`. An example expression is: "principal.type ==
+   * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+   * 'bob@example.com'".
+   *
+   * Allowed operations for `principal.subject`:
+   *
+   * - `principal.subject == <principal subject string>`
+   * - `principal.subject != <principal subject string>`
+   * - `principal.subject in [<list of principal subjects>]`
+   * - `principal.subject.startsWith(<string>)`
+   * - `principal.subject.endsWith(<string>)`
+   *
+   * Allowed operations for `principal.type`:
+   *
+   * - `principal.type == <principal type string>`
+   * - `principal.type != <principal type string>`
+   * - `principal.type in [<list of principal types>]`
+   *
+   * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+   * Service Account. Allowed string must be one of:
+   *
+   * - iam.googleapis.com/WorkspaceIdentity
+   * - iam.googleapis.com/WorkforcePoolIdentity
+   * - iam.googleapis.com/WorkloadPoolIdentity
+   * - iam.googleapis.com/ServiceAccount
+   * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.type.ExprOrBuilder getConditionOrBuilder() { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time when the policy binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The time when the policy binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time when the policy binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time when the policy binding was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Output only. The time when the policy binding was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time when the policy binding was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, etag_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 5); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getTarget()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, policy_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getCondition()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(9, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(10, getUpdateTime()); + } + if (policyKind_ + != com.google.iam.v3beta.PolicyBinding.PolicyKind.POLICY_KIND_UNSPECIFIED.getNumber()) { + output.writeEnum(11, policyKind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, policyUid_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, etag_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, annotations__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getTarget()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, policy_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCondition()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getUpdateTime()); + } + if (policyKind_ + != com.google.iam.v3beta.PolicyBinding.PolicyKind.POLICY_KIND_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, policyKind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, policyUid_); + } + size += getUnknownFields().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.v3beta.PolicyBinding)) { + return super.equals(obj); + } + com.google.iam.v3beta.PolicyBinding other = (com.google.iam.v3beta.PolicyBinding) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUid().equals(other.getUid())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (hasTarget() != other.hasTarget()) return false; + if (hasTarget()) { + if (!getTarget().equals(other.getTarget())) return false; + } + if (policyKind_ != other.policyKind_) return false; + if (!getPolicy().equals(other.getPolicy())) return false; + if (!getPolicyUid().equals(other.getPolicyUid())) return false; + if (hasCondition() != other.hasCondition()) return false; + if (hasCondition()) { + if (!getCondition().equals(other.getCondition())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + if (hasTarget()) { + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + } + hash = (37 * hash) + POLICY_KIND_FIELD_NUMBER; + hash = (53 * hash) + policyKind_; + hash = (37 * hash) + POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPolicy().hashCode(); + hash = (37 * hash) + POLICY_UID_FIELD_NUMBER; + hash = (53 * hash) + getPolicyUid().hashCode(); + if (hasCondition()) { + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.PolicyBinding parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PolicyBinding 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.v3beta.PolicyBinding parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PolicyBinding 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.v3beta.PolicyBinding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PolicyBinding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PolicyBinding parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PolicyBinding 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.v3beta.PolicyBinding parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PolicyBinding 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.v3beta.PolicyBinding parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PolicyBinding 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.v3beta.PolicyBinding 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; + } + + /** + * + * + *
+   * IAM policy binding resource.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.PolicyBinding} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.PolicyBinding) + com.google.iam.v3beta.PolicyBindingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PolicyBinding.class, + com.google.iam.v3beta.PolicyBinding.Builder.class); + } + + // Construct using com.google.iam.v3beta.PolicyBinding.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTargetFieldBuilder(); + getConditionFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + uid_ = ""; + etag_ = ""; + displayName_ = ""; + internalGetMutableAnnotations().clear(); + target_ = null; + if (targetBuilder_ != null) { + targetBuilder_.dispose(); + targetBuilder_ = null; + } + policyKind_ = 0; + policy_ = ""; + policyUid_ = ""; + condition_ = null; + if (conditionBuilder_ != null) { + conditionBuilder_.dispose(); + conditionBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingResourcesProto + .internal_static_google_iam_v3beta_PolicyBinding_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding getDefaultInstanceForType() { + return com.google.iam.v3beta.PolicyBinding.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding build() { + com.google.iam.v3beta.PolicyBinding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding buildPartial() { + com.google.iam.v3beta.PolicyBinding result = new com.google.iam.v3beta.PolicyBinding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.PolicyBinding result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.target_ = targetBuilder_ == null ? target_ : targetBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.policyKind_ = policyKind_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.policy_ = policy_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.policyUid_ = policyUid_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.condition_ = conditionBuilder_ == null ? condition_ : conditionBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3beta.PolicyBinding) { + return mergeFrom((com.google.iam.v3beta.PolicyBinding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.PolicyBinding other) { + if (other == com.google.iam.v3beta.PolicyBinding.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000008; + onChanged(); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + bitField0_ |= 0x00000010; + if (other.hasTarget()) { + mergeTarget(other.getTarget()); + } + if (other.policyKind_ != 0) { + setPolicyKindValue(other.getPolicyKindValue()); + } + if (!other.getPolicy().isEmpty()) { + policy_ = other.policy_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getPolicyUid().isEmpty()) { + policyUid_ = other.policyUid_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasCondition()) { + mergeCondition(other.getCondition()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getTargetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + policy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 58 + case 66: + { + input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 66 + case 74: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 74 + case 82: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 82 + case 88: + { + policyKind_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 88 + case 98: + { + policyUid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 98 + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The name of the policy binding, in the format
+     * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder, or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The name of the policy binding, in the format
+     * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder, or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The name of the policy binding, in the format
+     * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder, or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The name of the policy binding, in the format
+     * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder, or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The name of the policy binding, in the format
+     * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+     * The binding parent is the closest Resource Manager resource (project,
+     * folder, or organization) to the binding target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + + /** + * + * + *
+     * Output only. The globally unique ID of the policy binding. Assigned when
+     * the policy binding is created.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy binding. Assigned when
+     * the policy binding is created.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy binding. Assigned when
+     * the policy binding is created.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy binding. Assigned when
+     * the policy binding is created.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy binding. Assigned when
+     * the policy binding is created.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. The etag for the policy binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The etag for the policy binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The etag for the policy binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag for the policy binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag for the policy binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. The description of the policy binding. Must be less than or equal
+     * to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the policy binding. Must be less than or equal
+     * to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the policy binding. Must be less than or equal
+     * to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the policy binding. Must be less than or equal
+     * to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the policy binding. Must be less than or equal
+     * to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + bitField0_ |= 0x00000010; + return internalGetMutableAnnotations().getMutableMap(); + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + + /** + * + * + *
+     * Optional. User-defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private com.google.iam.v3beta.PolicyBinding.Target target_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v3beta.PolicyBinding.Target, + com.google.iam.v3beta.PolicyBinding.Target.Builder, + com.google.iam.v3beta.PolicyBinding.TargetOrBuilder> + targetBuilder_; + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + public boolean hasTarget() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + public com.google.iam.v3beta.PolicyBinding.Target getTarget() { + if (targetBuilder_ == null) { + return target_ == null + ? com.google.iam.v3beta.PolicyBinding.Target.getDefaultInstance() + : target_; + } else { + return targetBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTarget(com.google.iam.v3beta.PolicyBinding.Target value) { + if (targetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + } else { + targetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTarget(com.google.iam.v3beta.PolicyBinding.Target.Builder builderForValue) { + if (targetBuilder_ == null) { + target_ = builderForValue.build(); + } else { + targetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTarget(com.google.iam.v3beta.PolicyBinding.Target value) { + if (targetBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && target_ != null + && target_ != com.google.iam.v3beta.PolicyBinding.Target.getDefaultInstance()) { + getTargetBuilder().mergeFrom(value); + } else { + target_ = value; + } + } else { + targetBuilder_.mergeFrom(value); + } + if (target_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTarget() { + bitField0_ = (bitField0_ & ~0x00000020); + target_ = null; + if (targetBuilder_ != null) { + targetBuilder_.dispose(); + targetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PolicyBinding.Target.Builder getTargetBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getTargetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PolicyBinding.TargetOrBuilder getTargetOrBuilder() { + if (targetBuilder_ != null) { + return targetBuilder_.getMessageOrBuilder(); + } else { + return target_ == null + ? com.google.iam.v3beta.PolicyBinding.Target.getDefaultInstance() + : target_; + } + } + + /** + * + * + *
+     * Required. Immutable. Target is the full resource name of the resource to
+     * which the policy will be bound. Immutable once set.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v3beta.PolicyBinding.Target, + com.google.iam.v3beta.PolicyBinding.Target.Builder, + com.google.iam.v3beta.PolicyBinding.TargetOrBuilder> + getTargetFieldBuilder() { + if (targetBuilder_ == null) { + targetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v3beta.PolicyBinding.Target, + com.google.iam.v3beta.PolicyBinding.Target.Builder, + com.google.iam.v3beta.PolicyBinding.TargetOrBuilder>( + getTarget(), getParentForChildren(), isClean()); + target_ = null; + } + return targetBuilder_; + } + + private int policyKind_ = 0; + + /** + * + * + *
+     * Immutable. The kind of the policy to attach in this binding. This field
+     * must be one of the following:
+     *
+     * - Left empty (will be automatically set to the policy kind)
+     * - The input policy kind
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for policyKind. + */ + @java.lang.Override + public int getPolicyKindValue() { + return policyKind_; + } + + /** + * + * + *
+     * Immutable. The kind of the policy to attach in this binding. This field
+     * must be one of the following:
+     *
+     * - Left empty (will be automatically set to the policy kind)
+     * - The input policy kind
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for policyKind to set. + * @return This builder for chaining. + */ + public Builder setPolicyKindValue(int value) { + policyKind_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The kind of the policy to attach in this binding. This field
+     * must be one of the following:
+     *
+     * - Left empty (will be automatically set to the policy kind)
+     * - The input policy kind
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The policyKind. + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding.PolicyKind getPolicyKind() { + com.google.iam.v3beta.PolicyBinding.PolicyKind result = + com.google.iam.v3beta.PolicyBinding.PolicyKind.forNumber(policyKind_); + return result == null ? com.google.iam.v3beta.PolicyBinding.PolicyKind.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Immutable. The kind of the policy to attach in this binding. This field
+     * must be one of the following:
+     *
+     * - Left empty (will be automatically set to the policy kind)
+     * - The input policy kind
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The policyKind to set. + * @return This builder for chaining. + */ + public Builder setPolicyKind(com.google.iam.v3beta.PolicyBinding.PolicyKind value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + policyKind_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The kind of the policy to attach in this binding. This field
+     * must be one of the following:
+     *
+     * - Left empty (will be automatically set to the policy kind)
+     * - The input policy kind
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearPolicyKind() { + bitField0_ = (bitField0_ & ~0x00000040); + policyKind_ = 0; + onChanged(); + return this; + } + + private java.lang.Object policy_ = ""; + + /** + * + * + *
+     * Required. Immutable. The resource name of the policy to be bound. The
+     * binding parent and policy must belong to the same organization.
+     * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policy. + */ + public java.lang.String getPolicy() { + java.lang.Object ref = policy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. The resource name of the policy to be bound. The
+     * binding parent and policy must belong to the same organization.
+     * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for policy. + */ + public com.google.protobuf.ByteString getPolicyBytes() { + java.lang.Object ref = policy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. The resource name of the policy to be bound. The
+     * binding parent and policy must belong to the same organization.
+     * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The policy to set. + * @return This builder for chaining. + */ + public Builder setPolicy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + policy_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The resource name of the policy to be bound. The
+     * binding parent and policy must belong to the same organization.
+     * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearPolicy() { + policy_ = getDefaultInstance().getPolicy(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The resource name of the policy to be bound. The
+     * binding parent and policy must belong to the same organization.
+     * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for policy to set. + * @return This builder for chaining. + */ + public Builder setPolicyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + policy_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object policyUid_ = ""; + + /** + * + * + *
+     * Output only. The globally unique ID of the policy to be bound.
+     * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The policyUid. + */ + public java.lang.String getPolicyUid() { + java.lang.Object ref = policyUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy to be bound.
+     * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for policyUid. + */ + public com.google.protobuf.ByteString getPolicyUidBytes() { + java.lang.Object ref = policyUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy to be bound.
+     * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The policyUid to set. + * @return This builder for chaining. + */ + public Builder setPolicyUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + policyUid_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy to be bound.
+     * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPolicyUid() { + policyUid_ = getDefaultInstance().getPolicyUid(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The globally unique ID of the policy to be bound.
+     * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for policyUid to set. + * @return This builder for chaining. + */ + public Builder setPolicyUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + policyUid_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.type.Expr condition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> + conditionBuilder_; + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the condition field is set. + */ + public boolean hasCondition() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + public com.google.type.Expr getCondition() { + if (conditionBuilder_ == null) { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } else { + return conditionBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setCondition(com.google.type.Expr value) { + if (conditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + } else { + conditionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setCondition(com.google.type.Expr.Builder builderForValue) { + if (conditionBuilder_ == null) { + condition_ = builderForValue.build(); + } else { + conditionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeCondition(com.google.type.Expr value) { + if (conditionBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && condition_ != null + && condition_ != com.google.type.Expr.getDefaultInstance()) { + getConditionBuilder().mergeFrom(value); + } else { + condition_ = value; + } + } else { + conditionBuilder_.mergeFrom(value); + } + if (condition_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearCondition() { + bitField0_ = (bitField0_ & ~0x00000200); + condition_ = null; + if (conditionBuilder_ != null) { + conditionBuilder_.dispose(); + conditionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.type.Expr.Builder getConditionBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getConditionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.type.ExprOrBuilder getConditionOrBuilder() { + if (conditionBuilder_ != null) { + return conditionBuilder_.getMessageOrBuilder(); + } else { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } + } + + /** + * + * + *
+     * Optional. The condition to apply to the policy binding. When set, the
+     * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+     * joined by the
+     * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+     * cannot contain more than 250 characters.
+     *
+     * The condition is currently only supported when bound to policies of kind
+     * principal access boundary.
+     *
+     * When the bound policy is a principal access boundary policy, the only
+     * supported attributes in any subexpression are `principal.type` and
+     * `principal.subject`. An example expression is: "principal.type ==
+     * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+     * 'bob@example.com'".
+     *
+     * Allowed operations for `principal.subject`:
+     *
+     * - `principal.subject == <principal subject string>`
+     * - `principal.subject != <principal subject string>`
+     * - `principal.subject in [<list of principal subjects>]`
+     * - `principal.subject.startsWith(<string>)`
+     * - `principal.subject.endsWith(<string>)`
+     *
+     * Allowed operations for `principal.type`:
+     *
+     * - `principal.type == <principal type string>`
+     * - `principal.type != <principal type string>`
+     * - `principal.type in [<list of principal types>]`
+     *
+     * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+     * Service Account. Allowed string must be one of:
+     *
+     * - iam.googleapis.com/WorkspaceIdentity
+     * - iam.googleapis.com/WorkforcePoolIdentity
+     * - iam.googleapis.com/WorkloadPoolIdentity
+     * - iam.googleapis.com/ServiceAccount
+     * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> + getConditionFieldBuilder() { + if (conditionBuilder_ == null) { + conditionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder>( + getCondition(), getParentForChildren(), isClean()); + condition_ = null; + } + return conditionBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000400); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the policy binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000800); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the policy binding was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @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.v3beta.PolicyBinding) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.PolicyBinding) + private static final com.google.iam.v3beta.PolicyBinding DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.PolicyBinding(); + } + + public static com.google.iam.v3beta.PolicyBinding getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PolicyBinding parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.PolicyBinding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingName.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingName.java new file mode 100644 index 0000000000..990031ea10 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingName.java @@ -0,0 +1,449 @@ +/* + * Copyright 2025 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. + */ + +package com.google.iam.v3beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class PolicyBindingName implements ResourceName { + private static final PathTemplate ORGANIZATION_LOCATION_POLICY_BINDING = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/locations/{location}/policyBindings/{policy_binding}"); + private static final PathTemplate FOLDER_LOCATION_POLICY_BINDING = + PathTemplate.createWithoutUrlEncoding( + "folders/{folder}/locations/{location}/policyBindings/{policy_binding}"); + private static final PathTemplate PROJECT_LOCATION_POLICY_BINDING = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/policyBindings/{policy_binding}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String organization; + private final String location; + private final String policyBinding; + private final String folder; + private final String project; + + @Deprecated + protected PolicyBindingName() { + organization = null; + location = null; + policyBinding = null; + folder = null; + project = null; + } + + private PolicyBindingName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + location = Preconditions.checkNotNull(builder.getLocation()); + policyBinding = Preconditions.checkNotNull(builder.getPolicyBinding()); + folder = null; + project = null; + pathTemplate = ORGANIZATION_LOCATION_POLICY_BINDING; + } + + private PolicyBindingName(FolderLocationPolicyBindingBuilder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + location = Preconditions.checkNotNull(builder.getLocation()); + policyBinding = Preconditions.checkNotNull(builder.getPolicyBinding()); + organization = null; + project = null; + pathTemplate = FOLDER_LOCATION_POLICY_BINDING; + } + + private PolicyBindingName(ProjectLocationPolicyBindingBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + policyBinding = Preconditions.checkNotNull(builder.getPolicyBinding()); + organization = null; + folder = null; + pathTemplate = PROJECT_LOCATION_POLICY_BINDING; + } + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public String getPolicyBinding() { + return policyBinding; + } + + public String getFolder() { + return folder; + } + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public static Builder newOrganizationLocationPolicyBindingBuilder() { + return new Builder(); + } + + public static FolderLocationPolicyBindingBuilder newFolderLocationPolicyBindingBuilder() { + return new FolderLocationPolicyBindingBuilder(); + } + + public static ProjectLocationPolicyBindingBuilder newProjectLocationPolicyBindingBuilder() { + return new ProjectLocationPolicyBindingBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static PolicyBindingName of(String organization, String location, String policyBinding) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build(); + } + + public static PolicyBindingName ofOrganizationLocationPolicyBindingName( + String organization, String location, String policyBinding) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build(); + } + + public static PolicyBindingName ofFolderLocationPolicyBindingName( + String folder, String location, String policyBinding) { + return newFolderLocationPolicyBindingBuilder() + .setFolder(folder) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build(); + } + + public static PolicyBindingName ofProjectLocationPolicyBindingName( + String project, String location, String policyBinding) { + return newProjectLocationPolicyBindingBuilder() + .setProject(project) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build(); + } + + public static String format(String organization, String location, String policyBinding) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build() + .toString(); + } + + public static String formatOrganizationLocationPolicyBindingName( + String organization, String location, String policyBinding) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build() + .toString(); + } + + public static String formatFolderLocationPolicyBindingName( + String folder, String location, String policyBinding) { + return newFolderLocationPolicyBindingBuilder() + .setFolder(folder) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build() + .toString(); + } + + public static String formatProjectLocationPolicyBindingName( + String project, String location, String policyBinding) { + return newProjectLocationPolicyBindingBuilder() + .setProject(project) + .setLocation(location) + .setPolicyBinding(policyBinding) + .build() + .toString(); + } + + public static PolicyBindingName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (ORGANIZATION_LOCATION_POLICY_BINDING.matches(formattedString)) { + Map matchMap = ORGANIZATION_LOCATION_POLICY_BINDING.match(formattedString); + return ofOrganizationLocationPolicyBindingName( + matchMap.get("organization"), matchMap.get("location"), matchMap.get("policy_binding")); + } else if (FOLDER_LOCATION_POLICY_BINDING.matches(formattedString)) { + Map matchMap = FOLDER_LOCATION_POLICY_BINDING.match(formattedString); + return ofFolderLocationPolicyBindingName( + matchMap.get("folder"), matchMap.get("location"), matchMap.get("policy_binding")); + } else if (PROJECT_LOCATION_POLICY_BINDING.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_POLICY_BINDING.match(formattedString); + return ofProjectLocationPolicyBindingName( + matchMap.get("project"), matchMap.get("location"), matchMap.get("policy_binding")); + } + throw new ValidationException("PolicyBindingName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (PolicyBindingName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_LOCATION_POLICY_BINDING.matches(formattedString) + || FOLDER_LOCATION_POLICY_BINDING.matches(formattedString) + || PROJECT_LOCATION_POLICY_BINDING.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (policyBinding != null) { + fieldMapBuilder.put("policy_binding", policyBinding); + } + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + if (project != null) { + fieldMapBuilder.put("project", project); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + PolicyBindingName that = ((PolicyBindingName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.location, that.location) + && Objects.equals(this.policyBinding, that.policyBinding) + && Objects.equals(this.folder, that.folder) + && Objects.equals(this.project, that.project); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(policyBinding); + h *= 1000003; + h ^= Objects.hashCode(folder); + h *= 1000003; + h ^= Objects.hashCode(project); + return h; + } + + /** + * Builder for organizations/{organization}/locations/{location}/policyBindings/{policy_binding}. + */ + public static class Builder { + private String organization; + private String location; + private String policyBinding; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public String getPolicyBinding() { + return policyBinding; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setPolicyBinding(String policyBinding) { + this.policyBinding = policyBinding; + return this; + } + + private Builder(PolicyBindingName policyBindingName) { + Preconditions.checkArgument( + Objects.equals(policyBindingName.pathTemplate, ORGANIZATION_LOCATION_POLICY_BINDING), + "toBuilder is only supported when PolicyBindingName has the pattern of" + + " organizations/{organization}/locations/{location}/policyBindings/{policy_binding}"); + this.organization = policyBindingName.organization; + this.location = policyBindingName.location; + this.policyBinding = policyBindingName.policyBinding; + } + + public PolicyBindingName build() { + return new PolicyBindingName(this); + } + } + + /** Builder for folders/{folder}/locations/{location}/policyBindings/{policy_binding}. */ + public static class FolderLocationPolicyBindingBuilder { + private String folder; + private String location; + private String policyBinding; + + protected FolderLocationPolicyBindingBuilder() {} + + public String getFolder() { + return folder; + } + + public String getLocation() { + return location; + } + + public String getPolicyBinding() { + return policyBinding; + } + + public FolderLocationPolicyBindingBuilder setFolder(String folder) { + this.folder = folder; + return this; + } + + public FolderLocationPolicyBindingBuilder setLocation(String location) { + this.location = location; + return this; + } + + public FolderLocationPolicyBindingBuilder setPolicyBinding(String policyBinding) { + this.policyBinding = policyBinding; + return this; + } + + public PolicyBindingName build() { + return new PolicyBindingName(this); + } + } + + /** Builder for projects/{project}/locations/{location}/policyBindings/{policy_binding}. */ + public static class ProjectLocationPolicyBindingBuilder { + private String project; + private String location; + private String policyBinding; + + protected ProjectLocationPolicyBindingBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getPolicyBinding() { + return policyBinding; + } + + public ProjectLocationPolicyBindingBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationPolicyBindingBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationPolicyBindingBuilder setPolicyBinding(String policyBinding) { + this.policyBinding = policyBinding; + return this; + } + + public PolicyBindingName build() { + return new PolicyBindingName(this); + } + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingOrBuilder.java new file mode 100644 index 0000000000..d07ca817e7 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingOrBuilder.java @@ -0,0 +1,602 @@ +/* + * Copyright 2025 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/v3beta/policy_binding_resources.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface PolicyBindingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.PolicyBinding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The name of the policy binding, in the format
+   * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder, or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The name of the policy binding, in the format
+   * `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
+   * The binding parent is the closest Resource Manager resource (project,
+   * folder, or organization) to the binding target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The globally unique ID of the policy binding. Assigned when
+   * the policy binding is created.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + java.lang.String getUid(); + + /** + * + * + *
+   * Output only. The globally unique ID of the policy binding. Assigned when
+   * the policy binding is created.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Optional. The etag for the policy binding.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. The etag for the policy binding.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. The description of the policy binding. Must be less than or equal
+   * to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. The description of the policy binding. Must be less than or equal
+   * to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAnnotationsCount(); + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsAnnotations(java.lang.String key); + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getAnnotationsMap(); + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. User-defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. Immutable. Target is the full resource name of the resource to
+   * which the policy will be bound. Immutable once set.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the target field is set. + */ + boolean hasTarget(); + + /** + * + * + *
+   * Required. Immutable. Target is the full resource name of the resource to
+   * which the policy will be bound. Immutable once set.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The target. + */ + com.google.iam.v3beta.PolicyBinding.Target getTarget(); + + /** + * + * + *
+   * Required. Immutable. Target is the full resource name of the resource to
+   * which the policy will be bound. Immutable once set.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.Target target = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3beta.PolicyBinding.TargetOrBuilder getTargetOrBuilder(); + + /** + * + * + *
+   * Immutable. The kind of the policy to attach in this binding. This field
+   * must be one of the following:
+   *
+   * - Left empty (will be automatically set to the policy kind)
+   * - The input policy kind
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for policyKind. + */ + int getPolicyKindValue(); + + /** + * + * + *
+   * Immutable. The kind of the policy to attach in this binding. This field
+   * must be one of the following:
+   *
+   * - Left empty (will be automatically set to the policy kind)
+   * - The input policy kind
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding.PolicyKind policy_kind = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The policyKind. + */ + com.google.iam.v3beta.PolicyBinding.PolicyKind getPolicyKind(); + + /** + * + * + *
+   * Required. Immutable. The resource name of the policy to be bound. The
+   * binding parent and policy must belong to the same organization.
+   * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policy. + */ + java.lang.String getPolicy(); + + /** + * + * + *
+   * Required. Immutable. The resource name of the policy to be bound. The
+   * binding parent and policy must belong to the same organization.
+   * 
+ * + * + * string policy = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for policy. + */ + com.google.protobuf.ByteString getPolicyBytes(); + + /** + * + * + *
+   * Output only. The globally unique ID of the policy to be bound.
+   * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The policyUid. + */ + java.lang.String getPolicyUid(); + + /** + * + * + *
+   * Output only. The globally unique ID of the policy to be bound.
+   * 
+ * + * string policy_uid = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for policyUid. + */ + com.google.protobuf.ByteString getPolicyUidBytes(); + + /** + * + * + *
+   * Optional. The condition to apply to the policy binding. When set, the
+   * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+   * joined by the
+   * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+   * cannot contain more than 250 characters.
+   *
+   * The condition is currently only supported when bound to policies of kind
+   * principal access boundary.
+   *
+   * When the bound policy is a principal access boundary policy, the only
+   * supported attributes in any subexpression are `principal.type` and
+   * `principal.subject`. An example expression is: "principal.type ==
+   * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+   * 'bob@example.com'".
+   *
+   * Allowed operations for `principal.subject`:
+   *
+   * - `principal.subject == <principal subject string>`
+   * - `principal.subject != <principal subject string>`
+   * - `principal.subject in [<list of principal subjects>]`
+   * - `principal.subject.startsWith(<string>)`
+   * - `principal.subject.endsWith(<string>)`
+   *
+   * Allowed operations for `principal.type`:
+   *
+   * - `principal.type == <principal type string>`
+   * - `principal.type != <principal type string>`
+   * - `principal.type in [<list of principal types>]`
+   *
+   * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+   * Service Account. Allowed string must be one of:
+   *
+   * - iam.googleapis.com/WorkspaceIdentity
+   * - iam.googleapis.com/WorkforcePoolIdentity
+   * - iam.googleapis.com/WorkloadPoolIdentity
+   * - iam.googleapis.com/ServiceAccount
+   * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the condition field is set. + */ + boolean hasCondition(); + + /** + * + * + *
+   * Optional. The condition to apply to the policy binding. When set, the
+   * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+   * joined by the
+   * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+   * cannot contain more than 250 characters.
+   *
+   * The condition is currently only supported when bound to policies of kind
+   * principal access boundary.
+   *
+   * When the bound policy is a principal access boundary policy, the only
+   * supported attributes in any subexpression are `principal.type` and
+   * `principal.subject`. An example expression is: "principal.type ==
+   * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+   * 'bob@example.com'".
+   *
+   * Allowed operations for `principal.subject`:
+   *
+   * - `principal.subject == <principal subject string>`
+   * - `principal.subject != <principal subject string>`
+   * - `principal.subject in [<list of principal subjects>]`
+   * - `principal.subject.startsWith(<string>)`
+   * - `principal.subject.endsWith(<string>)`
+   *
+   * Allowed operations for `principal.type`:
+   *
+   * - `principal.type == <principal type string>`
+   * - `principal.type != <principal type string>`
+   * - `principal.type in [<list of principal types>]`
+   *
+   * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+   * Service Account. Allowed string must be one of:
+   *
+   * - iam.googleapis.com/WorkspaceIdentity
+   * - iam.googleapis.com/WorkforcePoolIdentity
+   * - iam.googleapis.com/WorkloadPoolIdentity
+   * - iam.googleapis.com/ServiceAccount
+   * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The condition. + */ + com.google.type.Expr getCondition(); + + /** + * + * + *
+   * Optional. The condition to apply to the policy binding. When set, the
+   * `expression` field in the `Expr` must include from 1 to 10 subexpressions,
+   * joined by the
+   * "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and
+   * cannot contain more than 250 characters.
+   *
+   * The condition is currently only supported when bound to policies of kind
+   * principal access boundary.
+   *
+   * When the bound policy is a principal access boundary policy, the only
+   * supported attributes in any subexpression are `principal.type` and
+   * `principal.subject`. An example expression is: "principal.type ==
+   * 'iam.googleapis.com/ServiceAccount'" or "principal.subject ==
+   * 'bob@example.com'".
+   *
+   * Allowed operations for `principal.subject`:
+   *
+   * - `principal.subject == <principal subject string>`
+   * - `principal.subject != <principal subject string>`
+   * - `principal.subject in [<list of principal subjects>]`
+   * - `principal.subject.startsWith(<string>)`
+   * - `principal.subject.endsWith(<string>)`
+   *
+   * Allowed operations for `principal.type`:
+   *
+   * - `principal.type == <principal type string>`
+   * - `principal.type != <principal type string>`
+   * - `principal.type in [<list of principal types>]`
+   *
+   * Supported principal types are Workspace, Workforce Pool, Workload Pool and
+   * Service Account. Allowed string must be one of:
+   *
+   * - iam.googleapis.com/WorkspaceIdentity
+   * - iam.googleapis.com/WorkforcePoolIdentity
+   * - iam.googleapis.com/WorkloadPoolIdentity
+   * - iam.googleapis.com/ServiceAccount
+   * 
+ * + * .google.type.Expr condition = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.type.ExprOrBuilder getConditionOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the policy binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time when the policy binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time when the policy binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the policy binding was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the policy binding was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the policy binding was most recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingResourcesProto.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingResourcesProto.java new file mode 100644 index 0000000000..1774a60a5b --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingResourcesProto.java @@ -0,0 +1,153 @@ +/* + * Copyright 2025 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/v3beta/policy_binding_resources.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public final class PolicyBindingResourcesProto { + private PolicyBindingResourcesProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_PolicyBinding_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_PolicyBinding_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_PolicyBinding_Target_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_PolicyBinding_Target_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_PolicyBinding_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_PolicyBinding_AnnotationsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "0google/iam/v3beta/policy_binding_resou" + + "rces.proto\022\021google.iam.v3beta\032\037google/ap" + + "i/field_behavior.proto\032\033google/api/field" + + "_info.proto\032\031google/api/resource.proto\032\037" + + "google/protobuf/timestamp.proto\032\026google/type/expr.proto\"\342\007\n\r" + + "PolicyBinding\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\030\n" + + "\003uid\030\002 \001(\tB\013\340A\003\342\214\317\327\010\002\010\001\022\021\n" + + "\004etag\030\003 \001(\tB\003\340A\001\022\031\n" + + "\014display_name\030\004 \001(\tB\003\340A\001\022K\n" + + "\013annotations\030\005 \003(\01321.google.iam.v" + + "3beta.PolicyBinding.AnnotationsEntryB\003\340A\001\022?\n" + + "\006target\030\006" + + " \001(\0132\'.google.iam.v3beta.PolicyBinding.TargetB\006\340A\005\340A\002\022E\n" + + "\013policy_kind\030\013" + + " \001(\0162+.google.iam.v3beta.PolicyBinding.PolicyKindB\003\340A\005\022\026\n" + + "\006policy\030\007 \001(\tB\006\340A\005\340A\002\022\027\n\n" + + "policy_uid\030\014 \001(\tB\003\340A\003\022)\n" + + "\tcondition\030\010 \001(\0132\021.google.type.ExprB\003\340A\001\0224\n" + + "\013create_time\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\n" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0320\n" + + "\006Target\022\034\n\r" + + "principal_set\030\001 \001(\tB\003\340A\005H\000B\010\n" + + "\006target\0322\n" + + "\020AnnotationsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"H\n\n" + + "PolicyKind\022\033\n" + + "\027POLICY_KIND_UNSPECIFIED\020\000\022\035\n" + + "\031PRINCIPAL_ACCESS_BOUNDARY\020\001:\250\002\352A\244\002\n" + + " iam.googleapis.com/PolicyBinding\022Qorganizations/{organization}/locations/{loca" + + "tion}/policyBindings/{policy_binding}\022Efolders/{folder}/locations/{location}/pol" + + "icyBindings/{policy_binding}\022Gprojects/{" + + "project}/locations/{location}/policyBindings/{policy_binding}*\016policyBindings2\r" + + "policyBindingB\231\001\n" + + "\025com.google.iam.v3betaB\033PolicyBindingResourcesProtoP\001Z-cloud.goo" + + "gle.com/go/iam/apiv3beta/iampb;iampb\252\002\027G" + + "oogle.Cloud.Iam.V3Beta\312\002\027Google\\Cloud\\Iam\\V3betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.type.ExprProto.getDescriptor(), + }); + internal_static_google_iam_v3beta_PolicyBinding_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_iam_v3beta_PolicyBinding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_PolicyBinding_descriptor, + new java.lang.String[] { + "Name", + "Uid", + "Etag", + "DisplayName", + "Annotations", + "Target", + "PolicyKind", + "Policy", + "PolicyUid", + "Condition", + "CreateTime", + "UpdateTime", + }); + internal_static_google_iam_v3beta_PolicyBinding_Target_descriptor = + internal_static_google_iam_v3beta_PolicyBinding_descriptor.getNestedTypes().get(0); + internal_static_google_iam_v3beta_PolicyBinding_Target_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_PolicyBinding_Target_descriptor, + new java.lang.String[] { + "PrincipalSet", "Target", + }); + internal_static_google_iam_v3beta_PolicyBinding_AnnotationsEntry_descriptor = + internal_static_google_iam_v3beta_PolicyBinding_descriptor.getNestedTypes().get(1); + internal_static_google_iam_v3beta_PolicyBinding_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_PolicyBinding_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.FieldInfoProto.fieldInfo); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.type.ExprProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingsServiceProto.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingsServiceProto.java new file mode 100644 index 0000000000..da9facdab5 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PolicyBindingsServiceProto.java @@ -0,0 +1,273 @@ +/* + * Copyright 2025 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/v3beta/policy_bindings_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public final class PolicyBindingsServiceProto { + private PolicyBindingsServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_CreatePolicyBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_CreatePolicyBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_GetPolicyBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_GetPolicyBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_DeletePolicyBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_DeletePolicyBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_ListPolicyBindingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_ListPolicyBindingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_ListPolicyBindingsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_ListPolicyBindingsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "/google/iam/v3beta/policy_bindings_serv" + + "ice.proto\022\021google.iam.v3beta\032\034google/api" + + "/annotations.proto\032\027google/api/client.pr" + + "oto\032\037google/api/field_behavior.proto\032\031go" + + "ogle/api/resource.proto\032*google/iam/v3beta/operation_metadata.proto\0320google/iam/" + + "v3beta/policy_binding_resources.proto\032#g" + + "oogle/longrunning/operations.proto\032\033google/protobuf/empty.proto\032" + + " google/protobuf/field_mask.proto\"\321\001\n" + + "\032CreatePolicyBindingRequest\0228\n" + + "\006parent\030\001 \001(\tB(\340A\002\372A\"\022" + + " iam.googleapis.com/PolicyBinding\022\036\n" + + "\021policy_binding_id\030\002 \001(\tB\003\340A\002\022=\n" + + "\016policy_binding\030\003 \001(\0132" + + " .google.iam.v3beta.PolicyBindingB\003\340A\002\022\032\n\r" + + "validate_only\030\004 \001(\010B\003\340A\001\"Q\n" + + "\027GetPolicyBindingRequest\0226\n" + + "\004name\030\001 \001(\tB(\340A\002\372A\"\n" + + " iam.googleapis.com/PolicyBinding\"\255\001\n" + + "\032UpdatePolicyBindingRequest\022=\n" + + "\016policy_binding\030\001 \001(\0132" + + " .google.iam.v3beta.PolicyBindingB\003\340A\002\022\032\n\r" + + "validate_only\030\002 \001(\010B\003\340A\001\0224\n" + + "\013update_mask\030\003" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\"\203\001\n" + + "\032DeletePolicyBindingRequest\0226\n" + + "\004name\030\001 \001(\tB(\340A\002\372A\"\n" + + " iam.googleapis.com/PolicyBinding\022\021\n" + + "\004etag\030\002 \001(\tB\003\340A\001\022\032\n\r" + + "validate_only\030\003 \001(\010B\003\340A\001\"\233\001\n" + + "\031ListPolicyBindingsRequest\0228\n" + + "\006parent\030\001 \001(\tB(\340A\002\372A\"\022" + + " iam.googleapis.com/PolicyBinding\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\"u\n" + + "\032ListPolicyBindingsResponse\0229\n" + + "\017policy_bindings\030\001 \003(\0132 .google.iam.v3beta.PolicyBinding\022\034\n" + + "\017next_page_token\030\002 \001(\tB\003\340A\001\"\243\001\n" + + "!SearchTargetPolicyBindingsRequest\022\023\n" + + "\006target\030\001 \001(\tB\003\340A\002\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\0228\n" + + "\006parent\030\005 \001(\tB(\340A\002\372A\"\022 iam.googleapis.com/PolicyBinding\"}\n" + + "\"SearchTargetPolicyBindingsResponse\0229\n" + + "\017policy_bindings\030\001 \003(\0132 .google.iam.v3beta.PolicyBinding\022\034\n" + + "\017next_page_token\030\002 \001(\tB\003\340A\0012\214\022\n" + + "\016PolicyBindings\022\234\003\n" + + "\023CreatePolicyBinding\022-.go" + + "ogle.iam.v3beta.CreatePolicyBindingRequest\032\035.google.longrunning.Operation\"\266\002\312A\"\n" + + "\r" + + "PolicyBinding\022\021OperationMetadata\332A\'pare" + + "nt,policy_binding,policy_binding_id\202\323\344\223\002" + + "\340\001\"6/v3beta/{parent=projects/*/locations" + + "/*}/policyBindings:\016policy_bindingZG\"5/v3beta/{parent=folders/*/locations/*}/pol" + + "icyBindings:\016policy_bindingZM\";/v3beta/{" + + "parent=organizations/*/locations/*}/policyBindings:\016policy_binding\022\241\002\n" + + "\020GetPolicyBinding\022*.google.iam.v3beta.GetPolicyBindingRequest\032" + + " .google.iam.v3beta.PolicyBi" + + "nding\"\276\001\332A\004name\202\323\344\223\002\260\001\0226/v3beta/{name=pr" + + "ojects/*/locations/*/policyBindings/*}Z7\0225/v3beta/{name=folders/*/locations/*/po" + + "licyBindings/*}Z=\022;/v3beta/{name=organiz" + + "ations/*/locations/*/policyBindings/*}\022\274\003\n" + + "\023UpdatePolicyBinding\022-.google.iam.v3be" + + "ta.UpdatePolicyBindingRequest\032\035.google.longrunning.Operation\"\326\002\312A\"\n\r" + + "PolicyBinding\022\021OperationMetadata\332A\032policy_binding,up" + + "date_mask\202\323\344\223\002\215\0022E/v3beta/{policy_bindin" + + "g.name=projects/*/locations/*/policyBindings/*}:\016policy_bindingZV2D/v3beta/{poli" + + "cy_binding.name=folders/*/locations/*/policyBindings/*}:\016policy_bindingZ\\2J/v3be" + + "ta/{policy_binding.name=organizations/*/" + + "locations/*/policyBindings/*}:\016policy_binding\022\321\002\n" + + "\023DeletePolicyBinding\022-.google.i" + + "am.v3beta.DeletePolicyBindingRequest\032\035.google.longrunning.Operation\"\353\001\312A*\n" + + "\025google.protobuf.Empty\022\021OperationMetadata\332A\004na" + + "me\202\323\344\223\002\260\001*6/v3beta/{name=projects/*/loca" + + "tions/*/policyBindings/*}Z7*5/v3beta/{name=folders/*/locations/*/policyBindings/" + + "*}Z=*;/v3beta/{name=organizations/*/locations/*/policyBindings/*}\022\264\002\n" + + "\022ListPolicyBindings\022,.google.iam.v3beta.ListPolicyB" + + "indingsRequest\032-.google.iam.v3beta.ListP" + + "olicyBindingsResponse\"\300\001\332A\006parent\202\323\344\223\002\260\001" + + "\0226/v3beta/{parent=projects/*/locations/*}/policyBindingsZ7\0225/v3beta/{parent=fold" + + "ers/*/locations/*}/policyBindingsZ=\022;/v3" + + "beta/{parent=organizations/*/locations/*}/policyBindings\022\244\003\n" + + "\032SearchTargetPolicyBindings\0224.google.iam.v3beta.SearchTarget" + + "PolicyBindingsRequest\0325.google.iam.v3bet" + + "a.SearchTargetPolicyBindingsResponse\"\230\002\332A\r" + + "parent,target\202\323\344\223\002\201\002\022Q/v3beta/{parent=" + + "projects/*/locations/*}/policyBindings:searchTargetPolicyBindingsZR\022P/v3beta/{pa" + + "rent=folders/*/locations/*}/policyBindings:searchTargetPolicyBindingsZX\022V/v3beta" + + "/{parent=organizations/*/locations/*}/policyBindings:searchTargetPolicyBindings\032" + + "F\312A\022iam.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\304\002\n" + + "\025com.google.iam.v3betaB\032PolicyBindingsService" + + "ProtoP\001Z-cloud.google.com/go/iam/apiv3be" + + "ta/iampb;iampb\252\002\027Google.Cloud.Iam.V3Beta\312\002\027Google\\Cloud\\Iam\\V3beta\352A\\\n" + + "\'iam.googleapis.com/OrganizationLocation\0221organiza" + + "tions/{organization}/locations/{location}\352AJ\n" + + "!iam.googleapis.com/FolderLocation\022%folders/{folder}/locations/{location}b\006" + + "proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.iam.v3beta.OperationMetadataProto.getDescriptor(), + com.google.iam.v3beta.PolicyBindingResourcesProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_iam_v3beta_CreatePolicyBindingRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_iam_v3beta_CreatePolicyBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_CreatePolicyBindingRequest_descriptor, + new java.lang.String[] { + "Parent", "PolicyBindingId", "PolicyBinding", "ValidateOnly", + }); + internal_static_google_iam_v3beta_GetPolicyBindingRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_iam_v3beta_GetPolicyBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_GetPolicyBindingRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_descriptor, + new java.lang.String[] { + "PolicyBinding", "ValidateOnly", "UpdateMask", + }); + internal_static_google_iam_v3beta_DeletePolicyBindingRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_iam_v3beta_DeletePolicyBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_DeletePolicyBindingRequest_descriptor, + new java.lang.String[] { + "Name", "Etag", "ValidateOnly", + }); + internal_static_google_iam_v3beta_ListPolicyBindingsRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_iam_v3beta_ListPolicyBindingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_ListPolicyBindingsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_iam_v3beta_ListPolicyBindingsResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_iam_v3beta_ListPolicyBindingsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_ListPolicyBindingsResponse_descriptor, + new java.lang.String[] { + "PolicyBindings", "NextPageToken", + }); + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_descriptor, + new java.lang.String[] { + "Target", "PageSize", "PageToken", "Parent", + }); + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_descriptor, + new java.lang.String[] { + "PolicyBindings", "NextPageToken", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.iam.v3beta.OperationMetadataProto.getDescriptor(); + com.google.iam.v3beta.PolicyBindingResourcesProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesServiceProto.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesServiceProto.java new file mode 100644 index 0000000000..ad4651c3c2 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPoliciesServiceProto.java @@ -0,0 +1,282 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policies_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public final class PrincipalAccessBoundaryPoliciesServiceProto { + private PrincipalAccessBoundaryPoliciesServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nBgoogle/iam/v3beta/principal_access_bou" + + "ndary_policies_service.proto\022\021google.iam" + + ".v3beta\032\034google/api/annotations.proto\032\027g" + + "oogle/api/client.proto\032\037google/api/field" + + "_behavior.proto\032\031google/api/resource.pro" + + "to\032*google/iam/v3beta/operation_metadata" + + ".proto\0320google/iam/v3beta/policy_binding" + + "_resources.proto\032Bgoogle/iam/v3beta/prin" + + "cipal_access_boundary_policy_resources.p" + + "roto\032#google/longrunning/operations.prot" + + "o\032\033google/protobuf/empty.proto\032 google/p" + + "rotobuf/field_mask.proto\"\245\002\n*CreatePrinc" + + "ipalAccessBoundaryPolicyRequest\022H\n\006paren" + + "t\030\001 \001(\tB8\340A\002\372A2\0220iam.googleapis.com/Prin" + + "cipalAccessBoundaryPolicy\0220\n#principal_a" + + "ccess_boundary_policy_id\030\002 \001(\tB\003\340A\002\022_\n p" + + "rincipal_access_boundary_policy\030\003 \001(\01320." + + "google.iam.v3beta.PrincipalAccessBoundar" + + "yPolicyB\003\340A\002\022\032\n\rvalidate_only\030\004 \001(\010B\003\340A\001" + + "\"q\n\'GetPrincipalAccessBoundaryPolicyRequ" + + "est\022F\n\004name\030\001 \001(\tB8\340A\002\372A2\n0iam.googleapi" + + "s.com/PrincipalAccessBoundaryPolicy\"\337\001\n*" + + "UpdatePrincipalAccessBoundaryPolicyReque" + + "st\022_\n principal_access_boundary_policy\030\001" + + " \001(\01320.google.iam.v3beta.PrincipalAccess" + + "BoundaryPolicyB\003\340A\002\022\032\n\rvalidate_only\030\002 \001" + + "(\010B\003\340A\001\0224\n\013update_mask\030\003 \001(\0132\032.google.pr" + + "otobuf.FieldMaskB\003\340A\001\"\267\001\n*DeletePrincipa" + + "lAccessBoundaryPolicyRequest\022F\n\004name\030\001 \001" + + "(\tB8\340A\002\372A2\n0iam.googleapis.com/Principal" + + "AccessBoundaryPolicy\022\021\n\004etag\030\002 \001(\tB\003\340A\001\022" + + "\032\n\rvalidate_only\030\003 \001(\010B\003\340A\001\022\022\n\005force\030\004 \001" + + "(\010B\003\340A\001\"\247\001\n*ListPrincipalAccessBoundaryP" + + "oliciesRequest\022H\n\006parent\030\001 \001(\tB8\340A\002\372A2\0220" + + "iam.googleapis.com/PrincipalAccessBounda" + + "ryPolicy\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage" + + "_token\030\003 \001(\tB\003\340A\001\"\251\001\n+ListPrincipalAcces" + + "sBoundaryPoliciesResponse\022\\\n\"principal_a" + + "ccess_boundary_policies\030\001 \003(\01320.google.i" + + "am.v3beta.PrincipalAccessBoundaryPolicy\022" + + "\034\n\017next_page_token\030\002 \001(\tB\003\340A\001\"\255\001\n2Search" + + "PrincipalAccessBoundaryPolicyBindingsReq" + + "uest\022F\n\004name\030\001 \001(\tB8\340A\002\372A2\n0iam.googleap" + + "is.com/PrincipalAccessBoundaryPolicy\022\026\n\t" + + "page_size\030\003 \001(\005B\003\340A\001\022\027\n\npage_token\030\004 \001(\t" + + "B\003\340A\001\"\216\001\n3SearchPrincipalAccessBoundaryP" + + "olicyBindingsResponse\0229\n\017policy_bindings" + + "\030\001 \003(\0132 .google.iam.v3beta.PolicyBinding" + + "\022\034\n\017next_page_token\030\002 \001(\tB\003\340A\0012\250\017\n\037Princ" + + "ipalAccessBoundaryPolicies\022\377\002\n#CreatePri" + + "ncipalAccessBoundaryPolicy\022=.google.iam." + + "v3beta.CreatePrincipalAccessBoundaryPoli" + + "cyRequest\032\035.google.longrunning.Operation" + + "\"\371\001\312A2\n\035PrincipalAccessBoundaryPolicy\022\021O" + + "perationMetadata\332AKparent,principal_acce" + + "ss_boundary_policy,principal_access_boun" + + "dary_policy_id\202\323\344\223\002p\"L/v3beta/{parent=or" + + "ganizations/*/locations/*}/principalAcce" + + "ssBoundaryPolicies: principal_access_bou" + + "ndary_policy\022\355\001\n GetPrincipalAccessBound" + + "aryPolicy\022:.google.iam.v3beta.GetPrincip" + + "alAccessBoundaryPolicyRequest\0320.google.i" + + "am.v3beta.PrincipalAccessBoundaryPolicy\"" + + "[\332A\004name\202\323\344\223\002N\022L/v3beta/{name=organizati" + + "ons/*/locations/*/principalAccessBoundar" + + "yPolicies/*}\022\202\003\n#UpdatePrincipalAccessBo" + + "undaryPolicy\022=.google.iam.v3beta.UpdateP" + + "rincipalAccessBoundaryPolicyRequest\032\035.go" + + "ogle.longrunning.Operation\"\374\001\312A2\n\035Princi" + + "palAccessBoundaryPolicy\022\021OperationMetada" + + "ta\332A,principal_access_boundary_policy,up" + + "date_mask\202\323\344\223\002\221\0012m/v3beta/{principal_acc" + + "ess_boundary_policy.name=organizations/*" + + "/locations/*/principalAccessBoundaryPoli" + + "cies/*}: principal_access_boundary_polic" + + "y\022\216\002\n#DeletePrincipalAccessBoundaryPolic" + + "y\022=.google.iam.v3beta.DeletePrincipalAcc" + + "essBoundaryPolicyRequest\032\035.google.longru" + + "nning.Operation\"\210\001\312A*\n\025google.protobuf.E" + + "mpty\022\021OperationMetadata\332A\004name\202\323\344\223\002N*L/v" + + "3beta/{name=organizations/*/locations/*/" + + "principalAccessBoundaryPolicies/*}\022\203\002\n#L" + + "istPrincipalAccessBoundaryPolicies\022=.goo" + + "gle.iam.v3beta.ListPrincipalAccessBounda" + + "ryPoliciesRequest\032>.google.iam.v3beta.Li" + + "stPrincipalAccessBoundaryPoliciesRespons" + + "e\"]\332A\006parent\202\323\344\223\002N\022L/v3beta/{parent=orga" + + "nizations/*/locations/*}/principalAccess" + + "BoundaryPolicies\022\256\002\n+SearchPrincipalAcce" + + "ssBoundaryPolicyBindings\022E.google.iam.v3" + + "beta.SearchPrincipalAccessBoundaryPolicy" + + "BindingsRequest\032F.google.iam.v3beta.Sear" + + "chPrincipalAccessBoundaryPolicyBindingsR" + + "esponse\"p\332A\004name\202\323\344\223\002c\022a/v3beta/{name=or" + + "ganizations/*/locations/*/principalAcces" + + "sBoundaryPolicies/*}:searchPolicyBinding" + + "s\032F\312A\022iam.googleapis.com\322A.https://www.g" + + "oogleapis.com/auth/cloud-platformB\251\001\n\025co" + + "m.google.iam.v3betaB+PrincipalAccessBoun" + + "daryPoliciesServiceProtoP\001Z-cloud.google" + + ".com/go/iam/apiv3beta/iampb;iampb\252\002\027Goog" + + "le.Cloud.Iam.V3Beta\312\002\027Google\\Cloud\\Iam\\V" + + "3betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.iam.v3beta.OperationMetadataProto.getDescriptor(), + com.google.iam.v3beta.PolicyBindingResourcesProto.getDescriptor(), + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_CreatePrincipalAccessBoundaryPolicyRequest_descriptor, + new java.lang.String[] { + "Parent", + "PrincipalAccessBoundaryPolicyId", + "PrincipalAccessBoundaryPolicy", + "ValidateOnly", + }); + internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_GetPrincipalAccessBoundaryPolicyRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_descriptor, + new java.lang.String[] { + "PrincipalAccessBoundaryPolicy", "ValidateOnly", "UpdateMask", + }); + internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_DeletePrincipalAccessBoundaryPolicyRequest_descriptor, + new java.lang.String[] { + "Name", "Etag", "ValidateOnly", "Force", + }); + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_ListPrincipalAccessBoundaryPoliciesResponse_descriptor, + new java.lang.String[] { + "PrincipalAccessBoundaryPolicies", "NextPageToken", + }); + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_descriptor, + new java.lang.String[] { + "Name", "PageSize", "PageToken", + }); + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_descriptor, + new java.lang.String[] { + "PolicyBindings", "NextPageToken", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.iam.v3beta.OperationMetadataProto.getDescriptor(); + com.google.iam.v3beta.PolicyBindingResourcesProto.getDescriptor(); + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicy.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicy.java new file mode 100644 index 0000000000..cb7f84dfd5 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicy.java @@ -0,0 +1,2580 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policy_resources.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * An IAM principal access boundary policy resource.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.PrincipalAccessBoundaryPolicy} + */ +public final class PrincipalAccessBoundaryPolicy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.PrincipalAccessBoundaryPolicy) + PrincipalAccessBoundaryPolicyOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PrincipalAccessBoundaryPolicy.newBuilder() to construct. + private PrincipalAccessBoundaryPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PrincipalAccessBoundaryPolicy() { + name_ = ""; + uid_ = ""; + etag_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PrincipalAccessBoundaryPolicy(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.class, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of the principal access boundary policy.
+   *
+   * The following format is supported:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The resource name of the principal access boundary policy.
+   *
+   * The following format is supported:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + + /** + * + * + *
+   * Output only. The globally unique ID of the principal access boundary
+   * policy.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + 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(); + uid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The globally unique ID of the principal access boundary
+   * policy.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. The etag for the principal access boundary.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The etag for the principal access boundary.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy. Must be
+   * less than or equal to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy. Must be
+   * less than or equal to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 5; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was most
+   * recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was most
+   * recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was most
+   * recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DETAILS_FIELD_NUMBER = 8; + private com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details_; + + /** + * + * + *
+   * Optional. The details for the principal access boundary policy.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the details field is set. + */ + @java.lang.Override + public boolean hasDetails() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. The details for the principal access boundary policy.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The details. + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails getDetails() { + return details_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.getDefaultInstance() + : details_; + } + + /** + * + * + *
+   * Optional. The details for the principal access boundary policy.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsOrBuilder getDetailsOrBuilder() { + return details_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.getDefaultInstance() + : details_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, etag_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 5); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(8, getDetails()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, etag_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, annotations__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getDetails()); + } + size += getUnknownFields().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.v3beta.PrincipalAccessBoundaryPolicy)) { + return super.equals(obj); + } + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy other = + (com.google.iam.v3beta.PrincipalAccessBoundaryPolicy) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUid().equals(other.getUid())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasDetails() != other.hasDetails()) return false; + if (hasDetails()) { + if (!getDetails().equals(other.getDetails())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasDetails()) { + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy 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.v3beta.PrincipalAccessBoundaryPolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy 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.v3beta.PrincipalAccessBoundaryPolicy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy 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.v3beta.PrincipalAccessBoundaryPolicy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy 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.v3beta.PrincipalAccessBoundaryPolicy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy 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.v3beta.PrincipalAccessBoundaryPolicy 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; + } + + /** + * + * + *
+   * An IAM principal access boundary policy resource.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.PrincipalAccessBoundaryPolicy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.PrincipalAccessBoundaryPolicy) + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.class, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder.class); + } + + // Construct using com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getDetailsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + uid_ = ""; + etag_ = ""; + displayName_ = ""; + internalGetMutableAnnotations().clear(); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + details_ = null; + if (detailsBuilder_ != null) { + detailsBuilder_.dispose(); + detailsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getDefaultInstanceForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy build() { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy buildPartial() { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy result = + new com.google.iam.v3beta.PrincipalAccessBoundaryPolicy(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.PrincipalAccessBoundaryPolicy result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.details_ = detailsBuilder_ == null ? details_ : detailsBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3beta.PrincipalAccessBoundaryPolicy) { + return mergeFrom((com.google.iam.v3beta.PrincipalAccessBoundaryPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.PrincipalAccessBoundaryPolicy other) { + if (other == com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000008; + onChanged(); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + bitField0_ |= 0x00000010; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasDetails()) { + mergeDetails(other.getDetails()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage(getDetailsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of the principal access boundary policy.
+     *
+     * The following format is supported:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the principal access boundary policy.
+     *
+     * The following format is supported:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the principal access boundary policy.
+     *
+     * The following format is supported:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the principal access boundary policy.
+     *
+     * The following format is supported:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the principal access boundary policy.
+     *
+     * The following format is supported:
+     * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + + /** + * + * + *
+     * Output only. The globally unique ID of the principal access boundary
+     * policy.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The globally unique ID of the principal access boundary
+     * policy.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The globally unique ID of the principal access boundary
+     * policy.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The globally unique ID of the principal access boundary
+     * policy.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The globally unique ID of the principal access boundary
+     * policy.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. The etag for the principal access boundary.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The etag for the principal access boundary.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The etag for the principal access boundary.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag for the principal access boundary.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag for the principal access boundary.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy. Must be
+     * less than or equal to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy. Must be
+     * less than or equal to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy. Must be
+     * less than or equal to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy. Must be
+     * less than or equal to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy. Must be
+     * less than or equal to 63 characters.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + bitField0_ |= 0x00000010; + return internalGetMutableAnnotations().getMutableMap(); + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + + /** + * + * + *
+     * Optional. User defined annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations
+     * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the principal access boundary policy was most
+     * recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsOrBuilder> + detailsBuilder_; + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the details field is set. + */ + public boolean hasDetails() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The details. + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails getDetails() { + if (detailsBuilder_ == null) { + return details_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.getDefaultInstance() + : details_; + } else { + return detailsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDetails(com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails value) { + if (detailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + } else { + detailsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDetails( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.Builder builderForValue) { + if (detailsBuilder_ == null) { + details_ = builderForValue.build(); + } else { + detailsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDetails(com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails value) { + if (detailsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && details_ != null + && details_ + != com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails + .getDefaultInstance()) { + getDetailsBuilder().mergeFrom(value); + } else { + details_ = value; + } + } else { + detailsBuilder_.mergeFrom(value); + } + if (details_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDetails() { + bitField0_ = (bitField0_ & ~0x00000080); + details_ = null; + if (detailsBuilder_ != null) { + detailsBuilder_.dispose(); + detailsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.Builder getDetailsBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getDetailsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsOrBuilder + getDetailsOrBuilder() { + if (detailsBuilder_ != null) { + return detailsBuilder_.getMessageOrBuilder(); + } else { + return details_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.getDefaultInstance() + : details_; + } + } + + /** + * + * + *
+     * Optional. The details for the principal access boundary policy.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsOrBuilder> + getDetailsFieldBuilder() { + if (detailsBuilder_ == null) { + detailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsOrBuilder>( + getDetails(), getParentForChildren(), isClean()); + details_ = null; + } + return detailsBuilder_; + } + + @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.v3beta.PrincipalAccessBoundaryPolicy) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.PrincipalAccessBoundaryPolicy) + private static final com.google.iam.v3beta.PrincipalAccessBoundaryPolicy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.PrincipalAccessBoundaryPolicy(); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrincipalAccessBoundaryPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.PrincipalAccessBoundaryPolicy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyDetails.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyDetails.java new file mode 100644 index 0000000000..b018e8faf0 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyDetails.java @@ -0,0 +1,1264 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policy_resources.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * Principal access boundary policy details
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails} + */ +public final class PrincipalAccessBoundaryPolicyDetails + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails) + PrincipalAccessBoundaryPolicyDetailsOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PrincipalAccessBoundaryPolicyDetails.newBuilder() to construct. + private PrincipalAccessBoundaryPolicyDetails( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PrincipalAccessBoundaryPolicyDetails() { + rules_ = java.util.Collections.emptyList(); + enforcementVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PrincipalAccessBoundaryPolicyDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.class, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.Builder.class); + } + + public static final int RULES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List rules_; + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getRulesList() { + return rules_; + } + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getRulesCount() { + return rules_.size(); + } + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule getRules(int index) { + return rules_.get(index); + } + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleOrBuilder getRulesOrBuilder( + int index) { + return rules_.get(index); + } + + public static final int ENFORCEMENT_VERSION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object enforcementVersion_ = ""; + + /** + * + * + *
+   * Optional.
+   * The version number (for example, `1` or `latest`) that indicates which
+   * permissions are able to be blocked by the policy. If empty, the PAB policy
+   * version will be set to the most recent version number at the time of the
+   * policy's creation.
+   * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enforcementVersion. + */ + @java.lang.Override + public java.lang.String getEnforcementVersion() { + java.lang.Object ref = enforcementVersion_; + 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(); + enforcementVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional.
+   * The version number (for example, `1` or `latest`) that indicates which
+   * permissions are able to be blocked by the policy. If empty, the PAB policy
+   * version will be set to the most recent version number at the time of the
+   * policy's creation.
+   * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for enforcementVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnforcementVersionBytes() { + java.lang.Object ref = enforcementVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + enforcementVersion_ = 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 < rules_.size(); i++) { + output.writeMessage(1, rules_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(enforcementVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, enforcementVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < rules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rules_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(enforcementVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, enforcementVersion_); + } + size += getUnknownFields().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.v3beta.PrincipalAccessBoundaryPolicyDetails)) { + return super.equals(obj); + } + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails other = + (com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails) obj; + + if (!getRulesList().equals(other.getRulesList())) return false; + if (!getEnforcementVersion().equals(other.getEnforcementVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRulesCount() > 0) { + hash = (37 * hash) + RULES_FIELD_NUMBER; + hash = (53 * hash) + getRulesList().hashCode(); + } + hash = (37 * hash) + ENFORCEMENT_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getEnforcementVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails 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.v3beta.PrincipalAccessBoundaryPolicyDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails 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.v3beta.PrincipalAccessBoundaryPolicyDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails 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.v3beta.PrincipalAccessBoundaryPolicyDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails 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.v3beta.PrincipalAccessBoundaryPolicyDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails 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.v3beta.PrincipalAccessBoundaryPolicyDetails 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; + } + + /** + * + * + *
+   * Principal access boundary policy details
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails) + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.class, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.Builder.class); + } + + // Construct using com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + } else { + rules_ = null; + rulesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + enforcementVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails getDefaultInstanceForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails build() { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails buildPartial() { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails result = + new com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails result) { + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + } + + private void buildPartial0(com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enforcementVersion_ = enforcementVersion_; + } + } + + @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.v3beta.PrincipalAccessBoundaryPolicyDetails) { + return mergeFrom((com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails other) { + if (other == com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails.getDefaultInstance()) + return this; + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + rulesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRulesFieldBuilder() + : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + if (!other.getEnforcementVersion().isEmpty()) { + enforcementVersion_ = other.enforcementVersion_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule m = + input.readMessage( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.parser(), + extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 10 + case 34: + { + enforcementVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 34 + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List rules_ = + java.util.Collections.emptyList(); + + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rules_ = + new java.util.ArrayList( + rules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleOrBuilder> + rulesBuilder_; + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRules( + int index, com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.set(index, value); + onChanged(); + } else { + rulesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRules( + int index, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRules(com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRules( + int index, com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(index, value); + onChanged(); + } else { + rulesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRules( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRules( + int index, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllRules( + java.lang.Iterable + values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder getRulesBuilder( + int index) { + return getRulesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleOrBuilder getRulesOrBuilder( + int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleOrBuilder> + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder addRulesBuilder() { + return getRulesFieldBuilder() + .addBuilder(com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder addRulesBuilder( + int index) { + return getRulesFieldBuilder() + .addBuilder( + index, com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. A list of principal access boundary policy rules. The number of
+     * rules in a policy is limited to 500.
+     * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleOrBuilder>( + rules_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + private java.lang.Object enforcementVersion_ = ""; + + /** + * + * + *
+     * Optional.
+     * The version number (for example, `1` or `latest`) that indicates which
+     * permissions are able to be blocked by the policy. If empty, the PAB policy
+     * version will be set to the most recent version number at the time of the
+     * policy's creation.
+     * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enforcementVersion. + */ + public java.lang.String getEnforcementVersion() { + java.lang.Object ref = enforcementVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + enforcementVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional.
+     * The version number (for example, `1` or `latest`) that indicates which
+     * permissions are able to be blocked by the policy. If empty, the PAB policy
+     * version will be set to the most recent version number at the time of the
+     * policy's creation.
+     * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for enforcementVersion. + */ + public com.google.protobuf.ByteString getEnforcementVersionBytes() { + java.lang.Object ref = enforcementVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + enforcementVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional.
+     * The version number (for example, `1` or `latest`) that indicates which
+     * permissions are able to be blocked by the policy. If empty, the PAB policy
+     * version will be set to the most recent version number at the time of the
+     * policy's creation.
+     * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enforcementVersion to set. + * @return This builder for chaining. + */ + public Builder setEnforcementVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + enforcementVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional.
+     * The version number (for example, `1` or `latest`) that indicates which
+     * permissions are able to be blocked by the policy. If empty, the PAB policy
+     * version will be set to the most recent version number at the time of the
+     * policy's creation.
+     * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnforcementVersion() { + enforcementVersion_ = getDefaultInstance().getEnforcementVersion(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional.
+     * The version number (for example, `1` or `latest`) that indicates which
+     * permissions are able to be blocked by the policy. If empty, the PAB policy
+     * version will be set to the most recent version number at the time of the
+     * policy's creation.
+     * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for enforcementVersion to set. + * @return This builder for chaining. + */ + public Builder setEnforcementVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + enforcementVersion_ = value; + bitField0_ |= 0x00000002; + 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.v3beta.PrincipalAccessBoundaryPolicyDetails) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails) + private static final com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails(); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrincipalAccessBoundaryPolicyDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.PrincipalAccessBoundaryPolicyDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyDetailsOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyDetailsOrBuilder.java new file mode 100644 index 0000000000..781194a963 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyDetailsOrBuilder.java @@ -0,0 +1,131 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policy_resources.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface PrincipalAccessBoundaryPolicyDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getRulesList(); + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule getRules(int index); + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getRulesCount(); + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getRulesOrBuilderList(); + + /** + * + * + *
+   * Required. A list of principal access boundary policy rules. The number of
+   * rules in a policy is limited to 500.
+   * 
+ * + * + * repeated .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleOrBuilder getRulesOrBuilder(int index); + + /** + * + * + *
+   * Optional.
+   * The version number (for example, `1` or `latest`) that indicates which
+   * permissions are able to be blocked by the policy. If empty, the PAB policy
+   * version will be set to the most recent version number at the time of the
+   * policy's creation.
+   * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enforcementVersion. + */ + java.lang.String getEnforcementVersion(); + + /** + * + * + *
+   * Optional.
+   * The version number (for example, `1` or `latest`) that indicates which
+   * permissions are able to be blocked by the policy. If empty, the PAB policy
+   * version will be set to the most recent version number at the time of the
+   * policy's creation.
+   * 
+ * + * string enforcement_version = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for enforcementVersion. + */ + com.google.protobuf.ByteString getEnforcementVersionBytes(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyName.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyName.java new file mode 100644 index 0000000000..2fff2faacf --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyName.java @@ -0,0 +1,243 @@ +/* + * Copyright 2025 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. + */ + +package com.google.iam.v3beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class PrincipalAccessBoundaryPolicyName implements ResourceName { + private static final PathTemplate ORGANIZATION_LOCATION_PRINCIPAL_ACCESS_BOUNDARY_POLICY = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}"); + private volatile Map fieldValuesMap; + private final String organization; + private final String location; + private final String principalAccessBoundaryPolicy; + + @Deprecated + protected PrincipalAccessBoundaryPolicyName() { + organization = null; + location = null; + principalAccessBoundaryPolicy = null; + } + + private PrincipalAccessBoundaryPolicyName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + location = Preconditions.checkNotNull(builder.getLocation()); + principalAccessBoundaryPolicy = + Preconditions.checkNotNull(builder.getPrincipalAccessBoundaryPolicy()); + } + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public String getPrincipalAccessBoundaryPolicy() { + return principalAccessBoundaryPolicy; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static PrincipalAccessBoundaryPolicyName of( + String organization, String location, String principalAccessBoundaryPolicy) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setPrincipalAccessBoundaryPolicy(principalAccessBoundaryPolicy) + .build(); + } + + public static String format( + String organization, String location, String principalAccessBoundaryPolicy) { + return newBuilder() + .setOrganization(organization) + .setLocation(location) + .setPrincipalAccessBoundaryPolicy(principalAccessBoundaryPolicy) + .build() + .toString(); + } + + public static PrincipalAccessBoundaryPolicyName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ORGANIZATION_LOCATION_PRINCIPAL_ACCESS_BOUNDARY_POLICY.validatedMatch( + formattedString, + "PrincipalAccessBoundaryPolicyName.parse: formattedString not in valid format"); + return of( + matchMap.get("organization"), + matchMap.get("location"), + matchMap.get("principal_access_boundary_policy")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (PrincipalAccessBoundaryPolicyName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_LOCATION_PRINCIPAL_ACCESS_BOUNDARY_POLICY.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (principalAccessBoundaryPolicy != null) { + fieldMapBuilder.put("principal_access_boundary_policy", principalAccessBoundaryPolicy); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ORGANIZATION_LOCATION_PRINCIPAL_ACCESS_BOUNDARY_POLICY.instantiate( + "organization", + organization, + "location", + location, + "principal_access_boundary_policy", + principalAccessBoundaryPolicy); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + PrincipalAccessBoundaryPolicyName that = ((PrincipalAccessBoundaryPolicyName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.location, that.location) + && Objects.equals(this.principalAccessBoundaryPolicy, that.principalAccessBoundaryPolicy); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(principalAccessBoundaryPolicy); + return h; + } + + /** + * Builder for + * organizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}. + */ + public static class Builder { + private String organization; + private String location; + private String principalAccessBoundaryPolicy; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public String getPrincipalAccessBoundaryPolicy() { + return principalAccessBoundaryPolicy; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setPrincipalAccessBoundaryPolicy(String principalAccessBoundaryPolicy) { + this.principalAccessBoundaryPolicy = principalAccessBoundaryPolicy; + return this; + } + + private Builder(PrincipalAccessBoundaryPolicyName principalAccessBoundaryPolicyName) { + this.organization = principalAccessBoundaryPolicyName.organization; + this.location = principalAccessBoundaryPolicyName.location; + this.principalAccessBoundaryPolicy = + principalAccessBoundaryPolicyName.principalAccessBoundaryPolicy; + } + + public PrincipalAccessBoundaryPolicyName build() { + return new PrincipalAccessBoundaryPolicyName(this); + } + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyOrBuilder.java new file mode 100644 index 0000000000..4fece550f4 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyOrBuilder.java @@ -0,0 +1,353 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policy_resources.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface PrincipalAccessBoundaryPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.PrincipalAccessBoundaryPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the principal access boundary policy.
+   *
+   * The following format is supported:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the principal access boundary policy.
+   *
+   * The following format is supported:
+   * `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The globally unique ID of the principal access boundary
+   * policy.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + java.lang.String getUid(); + + /** + * + * + *
+   * Output only. The globally unique ID of the principal access boundary
+   * policy.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Optional. The etag for the principal access boundary.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. The etag for the principal access boundary.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy. Must be
+   * less than or equal to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy. Must be
+   * less than or equal to 63 characters.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAnnotationsCount(); + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsAnnotations(java.lang.String key); + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getAnnotationsMap(); + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. User defined annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations
+   * 
+ * + * map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was most
+   * recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was most
+   * recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the principal access boundary policy was most
+   * recently updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. The details for the principal access boundary policy.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the details field is set. + */ + boolean hasDetails(); + + /** + * + * + *
+   * Optional. The details for the principal access boundary policy.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The details. + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails getDetails(); + + /** + * + * + *
+   * Optional. The details for the principal access boundary policy.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyDetails details = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsOrBuilder getDetailsOrBuilder(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyResourcesProto.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyResourcesProto.java new file mode 100644 index 0000000000..599ac6b788 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyResourcesProto.java @@ -0,0 +1,160 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policy_resources.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public final class PrincipalAccessBoundaryPolicyResourcesProto { + private PrincipalAccessBoundaryPolicyResourcesProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_AnnotationsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "Bgoogle/iam/v3beta/principal_access_boundary_policy_resources.proto\022\021google.iam" + + ".v3beta\032\037google/api/field_behavior.proto" + + "\032\033google/api/field_info.proto\032\031google/ap" + + "i/resource.proto\032\037google/protobuf/timestamp.proto\"\265\005\n" + + "\035PrincipalAccessBoundaryPolicy\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\030\n" + + "\003uid\030\002 \001(\tB\013\340A\003\342\214\317\327\010\002\010\001\022\021\n" + + "\004etag\030\003 \001(\tB\003\340A\001\022\031\n" + + "\014display_name\030\004 \001(\tB\003\340A\001\022[\n" + + "\013annotations\030\005 \003(\0132A.go" + + "ogle.iam.v3beta.PrincipalAccessBoundaryPolicy.AnnotationsEntryB\003\340A\001\0224\n" + + "\013create_time\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022M\n" + + "\007details\030\010 \001(\01327.googl" + + "e.iam.v3beta.PrincipalAccessBoundaryPolicyDetailsB\003\340A\001\0322\n" + + "\020AnnotationsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:\354\001\352A\350\001\n" + + "0iam.googleapis.com/PrincipalAccessBoundaryPol" + + "icy\022torganizations/{organization}/locations/{location}/principalAccessBoundaryPo" + + "licies/{principal_access_boundary_policy" + + "}*\037principalAccessBoundaryPolicies2\035principalAccessBoundaryPolicy\"\222\001\n" + + "$PrincipalAccessBoundaryPolicyDetails\022H\n" + + "\005rules\030\001 \003(" + + "\01324.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleB\003\340A\002\022 \n" + + "\023enforcement_version\030\004 \001(\tB\003\340A\001\"\324\001\n" + + "!PrincipalAccessBoundaryPolicyRule\022\030\n" + + "\013description\030\001 \001(\tB\003\340A\001\022\026\n" + + "\tresources\030\002 \003(\tB\003\340A\002\022P\n" + + "\006effect\030\003 \001(\0162;" + + ".google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.EffectB\003\340A\002\"+\n" + + "\006Effect\022\026\n" + + "\022EFFECT_UNSPECIFIED\020\000\022\t\n" + + "\005ALLOW\020\001B\251\001\n" + + "\025com.google.iam.v3betaB+PrincipalAccessBoundary" + + "PolicyResourcesProtoP\001Z-cloud.google.com" + + "/go/iam/apiv3beta/iampb;iampb\252\002\027Google.C" + + "loud.Iam.V3Beta\312\002\027Google\\Cloud\\Iam\\V3betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_descriptor, + new java.lang.String[] { + "Name", + "Uid", + "Etag", + "DisplayName", + "Annotations", + "CreateTime", + "UpdateTime", + "Details", + }); + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_AnnotationsEntry_descriptor = + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_descriptor + .getNestedTypes() + .get(0); + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicy_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyDetails_descriptor, + new java.lang.String[] { + "Rules", "EnforcementVersion", + }); + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_descriptor, + new java.lang.String[] { + "Description", "Resources", "Effect", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.FieldInfoProto.fieldInfo); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyRule.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyRule.java new file mode 100644 index 0000000000..70f0a37d22 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyRule.java @@ -0,0 +1,1398 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policy_resources.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * Principal access boundary policy rule that defines the resource boundary.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.PrincipalAccessBoundaryPolicyRule} + */ +public final class PrincipalAccessBoundaryPolicyRule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.PrincipalAccessBoundaryPolicyRule) + PrincipalAccessBoundaryPolicyRuleOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PrincipalAccessBoundaryPolicyRule.newBuilder() to construct. + private PrincipalAccessBoundaryPolicyRule( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PrincipalAccessBoundaryPolicyRule() { + description_ = ""; + resources_ = com.google.protobuf.LazyStringArrayList.emptyList(); + effect_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PrincipalAccessBoundaryPolicyRule(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.class, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder.class); + } + + /** + * + * + *
+   * An effect to describe the access relationship.
+   * 
+ * + * Protobuf enum {@code google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect} + */ + public enum Effect implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Effect unspecified.
+     * 
+ * + * EFFECT_UNSPECIFIED = 0; + */ + EFFECT_UNSPECIFIED(0), + /** + * + * + *
+     * Allows access to the resources in this rule.
+     * 
+ * + * ALLOW = 1; + */ + ALLOW(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Effect unspecified.
+     * 
+ * + * EFFECT_UNSPECIFIED = 0; + */ + public static final int EFFECT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Allows access to the resources in this rule.
+     * 
+ * + * ALLOW = 1; + */ + public static final int ALLOW_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Effect valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Effect forNumber(int value) { + switch (value) { + case 0: + return EFFECT_UNSPECIFIED; + case 1: + return ALLOW; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Effect findValueByNumber(int number) { + return Effect.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Effect[] VALUES = values(); + + public static Effect valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Effect(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect) + } + + public static final int DESCRIPTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy rule.
+   * Must be less than or equal to 256 characters.
+   * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy rule.
+   * Must be less than or equal to 256 characters.
+   * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList resources_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   *   or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the resources. + */ + public com.google.protobuf.ProtocolStringList getResourcesList() { + return resources_; + } + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   *   or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of resources. + */ + public int getResourcesCount() { + return resources_.size(); + } + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   *   or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The resources at the given index. + */ + public java.lang.String getResources(int index) { + return resources_.get(index); + } + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   *   or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the resources at the given index. + */ + public com.google.protobuf.ByteString getResourcesBytes(int index) { + return resources_.getByteString(index); + } + + public static final int EFFECT_FIELD_NUMBER = 3; + private int effect_ = 0; + + /** + * + * + *
+   * Required. The access relationship of principals to the resources in this
+   * rule.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for effect. + */ + @java.lang.Override + public int getEffectValue() { + return effect_; + } + + /** + * + * + *
+   * Required. The access relationship of principals to the resources in this
+   * rule.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The effect. + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect getEffect() { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect result = + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect.forNumber(effect_); + return result == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect.UNRECOGNIZED + : result; + } + + 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(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); + } + for (int i = 0; i < resources_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resources_.getRaw(i)); + } + if (effect_ + != com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect.EFFECT_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, effect_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); + } + { + int dataSize = 0; + for (int i = 0; i < resources_.size(); i++) { + dataSize += computeStringSizeNoTag(resources_.getRaw(i)); + } + size += dataSize; + size += 1 * getResourcesList().size(); + } + if (effect_ + != com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect.EFFECT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, effect_); + } + size += getUnknownFields().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.v3beta.PrincipalAccessBoundaryPolicyRule)) { + return super.equals(obj); + } + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule other = + (com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule) obj; + + if (!getDescription().equals(other.getDescription())) return false; + if (!getResourcesList().equals(other.getResourcesList())) return false; + if (effect_ != other.effect_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getResourcesCount() > 0) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResourcesList().hashCode(); + } + hash = (37 * hash) + EFFECT_FIELD_NUMBER; + hash = (53 * hash) + effect_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule 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.v3beta.PrincipalAccessBoundaryPolicyRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule 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.v3beta.PrincipalAccessBoundaryPolicyRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule 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.v3beta.PrincipalAccessBoundaryPolicyRule parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule 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.v3beta.PrincipalAccessBoundaryPolicyRule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule 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.v3beta.PrincipalAccessBoundaryPolicyRule 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; + } + + /** + * + * + *
+   * Principal access boundary policy rule that defines the resource boundary.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.PrincipalAccessBoundaryPolicyRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.PrincipalAccessBoundaryPolicyRule) + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.class, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Builder.class); + } + + // Construct using com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + description_ = ""; + resources_ = com.google.protobuf.LazyStringArrayList.emptyList(); + effect_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyResourcesProto + .internal_static_google_iam_v3beta_PrincipalAccessBoundaryPolicyRule_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule getDefaultInstanceForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule build() { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule buildPartial() { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule result = + new com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + resources_.makeImmutable(); + result.resources_ = resources_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.effect_ = effect_; + } + } + + @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.v3beta.PrincipalAccessBoundaryPolicyRule) { + return mergeFrom((com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule other) { + if (other == com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.getDefaultInstance()) + return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.resources_.isEmpty()) { + if (resources_.isEmpty()) { + resources_ = other.resources_; + bitField0_ |= 0x00000002; + } else { + ensureResourcesIsMutable(); + resources_.addAll(other.resources_); + } + onChanged(); + } + if (other.effect_ != 0) { + setEffectValue(other.getEffectValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourcesIsMutable(); + resources_.add(s); + break; + } // case 18 + case 24: + { + effect_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy rule.
+     * Must be less than or equal to 256 characters.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy rule.
+     * Must be less than or equal to 256 characters.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy rule.
+     * Must be less than or equal to 256 characters.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy rule.
+     * Must be less than or equal to 256 characters.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the principal access boundary policy rule.
+     * Must be less than or equal to 256 characters.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList resources_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureResourcesIsMutable() { + if (!resources_.isModifiable()) { + resources_ = new com.google.protobuf.LazyStringArrayList(resources_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     *   or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the resources. + */ + public com.google.protobuf.ProtocolStringList getResourcesList() { + resources_.makeImmutable(); + return resources_; + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     *   or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of resources. + */ + public int getResourcesCount() { + return resources_.size(); + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     *   or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The resources at the given index. + */ + public java.lang.String getResources(int index) { + return resources_.get(index); + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     *   or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the resources at the given index. + */ + public com.google.protobuf.ByteString getResourcesBytes(int index) { + return resources_.getByteString(index); + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     *   or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The resources to set. + * @return This builder for chaining. + */ + public Builder setResources(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     *   or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The resources to add. + * @return This builder for chaining. + */ + public Builder addResources(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     *   or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The resources to add. + * @return This builder for chaining. + */ + public Builder addAllResources(java.lang.Iterable values) { + ensureResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resources_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     *   or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearResources() { + resources_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A list of Resource Manager resources. If a resource is listed in
+     * the rule, then the rule applies for that resource and its descendants. The
+     * number of resources in a policy is limited to 500 across all rules in the
+     * policy.
+     *
+     * The following resource types are supported:
+     *
+     * * Organizations, such as
+     * `//cloudresourcemanager.googleapis.com/organizations/123`.
+     * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+     * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+     *   or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+     * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the resources to add. + * @return This builder for chaining. + */ + public Builder addResourcesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureResourcesIsMutable(); + resources_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int effect_ = 0; + + /** + * + * + *
+     * Required. The access relationship of principals to the resources in this
+     * rule.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for effect. + */ + @java.lang.Override + public int getEffectValue() { + return effect_; + } + + /** + * + * + *
+     * Required. The access relationship of principals to the resources in this
+     * rule.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for effect to set. + * @return This builder for chaining. + */ + public Builder setEffectValue(int value) { + effect_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The access relationship of principals to the resources in this
+     * rule.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The effect. + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect getEffect() { + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect result = + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect.forNumber(effect_); + return result == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Required. The access relationship of principals to the resources in this
+     * rule.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The effect to set. + * @return This builder for chaining. + */ + public Builder setEffect(com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + effect_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The access relationship of principals to the resources in this
+     * rule.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearEffect() { + bitField0_ = (bitField0_ & ~0x00000004); + effect_ = 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.v3beta.PrincipalAccessBoundaryPolicyRule) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.PrincipalAccessBoundaryPolicyRule) + private static final com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule(); + } + + public static com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrincipalAccessBoundaryPolicyRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.PrincipalAccessBoundaryPolicyRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyRuleOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyRuleOrBuilder.java new file mode 100644 index 0000000000..5f353febd7 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/PrincipalAccessBoundaryPolicyRuleOrBuilder.java @@ -0,0 +1,184 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policy_resources.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface PrincipalAccessBoundaryPolicyRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.PrincipalAccessBoundaryPolicyRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy rule.
+   * Must be less than or equal to 256 characters.
+   * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. The description of the principal access boundary policy rule.
+   * Must be less than or equal to 256 characters.
+   * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   *   or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the resources. + */ + java.util.List getResourcesList(); + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   *   or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of resources. + */ + int getResourcesCount(); + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   *   or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The resources at the given index. + */ + java.lang.String getResources(int index); + + /** + * + * + *
+   * Required. A list of Resource Manager resources. If a resource is listed in
+   * the rule, then the rule applies for that resource and its descendants. The
+   * number of resources in a policy is limited to 500 across all rules in the
+   * policy.
+   *
+   * The following resource types are supported:
+   *
+   * * Organizations, such as
+   * `//cloudresourcemanager.googleapis.com/organizations/123`.
+   * * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`.
+   * * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123`
+   *   or `//cloudresourcemanager.googleapis.com/projects/my-project-id`.
+   * 
+ * + * repeated string resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the resources at the given index. + */ + com.google.protobuf.ByteString getResourcesBytes(int index); + + /** + * + * + *
+   * Required. The access relationship of principals to the resources in this
+   * rule.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for effect. + */ + int getEffectValue(); + + /** + * + * + *
+   * Required. The access relationship of principals to the resources in this
+   * rule.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect effect = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The effect. + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyRule.Effect getEffect(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsRequest.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsRequest.java new file mode 100644 index 0000000000..f236f92b04 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsRequest.java @@ -0,0 +1,1031 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policies_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for SearchPrincipalAccessBoundaryPolicyBindings rpc.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest} + */ +public final class SearchPrincipalAccessBoundaryPolicyBindingsRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest) + SearchPrincipalAccessBoundaryPolicyBindingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder() to construct. + private SearchPrincipalAccessBoundaryPolicyBindingsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchPrincipalAccessBoundaryPolicyBindingsRequest() { + name_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchPrincipalAccessBoundaryPolicyBindingsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest.class, + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the principal access boundary policy.
+   * Format:
+   *  `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the principal access boundary policy.
+   * Format:
+   *  `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of policy bindings to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 50 policy bindings will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+   * retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+   * that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+   * retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+   * that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += getUnknownFields().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.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest other = + (com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest 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.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest 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.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest 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.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest + 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.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest 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.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest 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; + } + + /** + * + * + *
+   * Request message for SearchPrincipalAccessBoundaryPolicyBindings rpc.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest) + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest.class, + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest.Builder + .class); + } + + // Construct using + // com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest + getDefaultInstanceForType() { + return com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest build() { + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest buildPartial() { + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest result = + new com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @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.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest) { + return mergeFrom( + (com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest other) { + if (other + == com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the principal access boundary policy.
+     * Format:
+     *  `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy.
+     * Format:
+     *  `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy.
+     * Format:
+     *  `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy.
+     * Format:
+     *  `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the principal access boundary policy.
+     * Format:
+     *  `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+     * retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+     * that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+     * retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+     * that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+     * retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+     * that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+     * retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+     * that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+     * retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+     * that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + 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.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest) + private static final com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest(); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser< + SearchPrincipalAccessBoundaryPolicyBindingsRequest> + PARSER = + new com.google.protobuf.AbstractParser< + SearchPrincipalAccessBoundaryPolicyBindingsRequest>() { + @java.lang.Override + public SearchPrincipalAccessBoundaryPolicyBindingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsRequestOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsRequestOrBuilder.java new file mode 100644 index 0000000000..e752f11755 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsRequestOrBuilder.java @@ -0,0 +1,115 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policies_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface SearchPrincipalAccessBoundaryPolicyBindingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the principal access boundary policy.
+   * Format:
+   *  `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the principal access boundary policy.
+   * Format:
+   *  `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The maximum number of policy bindings to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 50 policy bindings will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+   * retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+   * that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to
+   * retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call
+   * that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsResponse.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsResponse.java new file mode 100644 index 0000000000..d02a97cc7b --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsResponse.java @@ -0,0 +1,1187 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policies_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * Response message for SearchPrincipalAccessBoundaryPolicyBindings rpc.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse} + */ +public final class SearchPrincipalAccessBoundaryPolicyBindingsResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse) + SearchPrincipalAccessBoundaryPolicyBindingsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use SearchPrincipalAccessBoundaryPolicyBindingsResponse.newBuilder() to construct. + private SearchPrincipalAccessBoundaryPolicyBindingsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchPrincipalAccessBoundaryPolicyBindingsResponse() { + policyBindings_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchPrincipalAccessBoundaryPolicyBindingsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse.class, + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse.Builder + .class); + } + + public static final int POLICY_BINDINGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List policyBindings_; + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public java.util.List getPolicyBindingsList() { + return policyBindings_; + } + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public java.util.List + getPolicyBindingsOrBuilderList() { + return policyBindings_; + } + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public int getPolicyBindingsCount() { + return policyBindings_.size(); + } + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding getPolicyBindings(int index) { + return policyBindings_.get(index); + } + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index) { + return policyBindings_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 < policyBindings_.size(); i++) { + output.writeMessage(1, policyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < policyBindings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().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.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse)) { + return super.equals(obj); + } + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse other = + (com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse) obj; + + if (!getPolicyBindingsList().equals(other.getPolicyBindingsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPolicyBindingsCount() > 0) { + hash = (37 * hash) + POLICY_BINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBindingsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse 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.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse 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.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse 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.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + 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.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse 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.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse 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 SearchPrincipalAccessBoundaryPolicyBindings rpc.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse) + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse.class, + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse.Builder + .class); + } + + // Construct using + // com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (policyBindingsBuilder_ == null) { + policyBindings_ = java.util.Collections.emptyList(); + } else { + policyBindings_ = null; + policyBindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_SearchPrincipalAccessBoundaryPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + getDefaultInstanceForType() { + return com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse build() { + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + buildPartial() { + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse result = + new com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse result) { + if (policyBindingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyBindings_ = java.util.Collections.unmodifiableList(policyBindings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policyBindings_ = policyBindings_; + } else { + result.policyBindings_ = policyBindingsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @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.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse) { + return mergeFrom( + (com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse other) { + if (other + == com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + .getDefaultInstance()) return this; + if (policyBindingsBuilder_ == null) { + if (!other.policyBindings_.isEmpty()) { + if (policyBindings_.isEmpty()) { + policyBindings_ = other.policyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyBindingsIsMutable(); + policyBindings_.addAll(other.policyBindings_); + } + onChanged(); + } + } else { + if (!other.policyBindings_.isEmpty()) { + if (policyBindingsBuilder_.isEmpty()) { + policyBindingsBuilder_.dispose(); + policyBindingsBuilder_ = null; + policyBindings_ = other.policyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + policyBindingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPolicyBindingsFieldBuilder() + : null; + } else { + policyBindingsBuilder_.addAllMessages(other.policyBindings_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v3beta.PolicyBinding m = + input.readMessage( + com.google.iam.v3beta.PolicyBinding.parser(), extensionRegistry); + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(m); + } else { + policyBindingsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List policyBindings_ = + java.util.Collections.emptyList(); + + private void ensurePolicyBindingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyBindings_ = + new java.util.ArrayList(policyBindings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + policyBindingsBuilder_; + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public java.util.List getPolicyBindingsList() { + if (policyBindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyBindings_); + } else { + return policyBindingsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public int getPolicyBindingsCount() { + if (policyBindingsBuilder_ == null) { + return policyBindings_.size(); + } else { + return policyBindingsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding getPolicyBindings(int index) { + if (policyBindingsBuilder_ == null) { + return policyBindings_.get(index); + } else { + return policyBindingsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder setPolicyBindings(int index, com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.set(index, value); + onChanged(); + } else { + policyBindingsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder setPolicyBindings( + int index, com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.set(index, builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.add(value); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(int index, com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.add(index, value); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings( + int index, com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(index, builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addAllPolicyBindings( + java.lang.Iterable values) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyBindings_); + onChanged(); + } else { + policyBindingsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder clearPolicyBindings() { + if (policyBindingsBuilder_ == null) { + policyBindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policyBindingsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder removePolicyBindings(int index) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.remove(index); + onChanged(); + } else { + policyBindingsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding.Builder getPolicyBindingsBuilder(int index) { + return getPolicyBindingsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index) { + if (policyBindingsBuilder_ == null) { + return policyBindings_.get(index); + } else { + return policyBindingsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public java.util.List + getPolicyBindingsOrBuilderList() { + if (policyBindingsBuilder_ != null) { + return policyBindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyBindings_); + } + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding.Builder addPolicyBindingsBuilder() { + return getPolicyBindingsFieldBuilder() + .addBuilder(com.google.iam.v3beta.PolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding.Builder addPolicyBindingsBuilder(int index) { + return getPolicyBindingsFieldBuilder() + .addBuilder(index, com.google.iam.v3beta.PolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * The policy bindings that reference the specified policy.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public java.util.List + getPolicyBindingsBuilderList() { + return getPolicyBindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + getPolicyBindingsFieldBuilder() { + if (policyBindingsBuilder_ == null) { + policyBindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder>( + policyBindings_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + policyBindings_ = null; + } + return policyBindingsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000002; + 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.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse) + private static final com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse(); + } + + public static com.google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser< + SearchPrincipalAccessBoundaryPolicyBindingsResponse> + PARSER = + new com.google.protobuf.AbstractParser< + SearchPrincipalAccessBoundaryPolicyBindingsResponse>() { + @java.lang.Override + public SearchPrincipalAccessBoundaryPolicyBindingsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsResponseOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsResponseOrBuilder.java new file mode 100644 index 0000000000..f0a55656fe --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchPrincipalAccessBoundaryPolicyBindingsResponseOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policies_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface SearchPrincipalAccessBoundaryPolicyBindingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.SearchPrincipalAccessBoundaryPolicyBindingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + java.util.List getPolicyBindingsList(); + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + com.google.iam.v3beta.PolicyBinding getPolicyBindings(int index); + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + int getPolicyBindingsCount(); + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + java.util.List + getPolicyBindingsOrBuilderList(); + + /** + * + * + *
+   * The policy bindings that reference the specified policy.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsRequest.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsRequest.java new file mode 100644 index 0000000000..3ab85dbf17 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsRequest.java @@ -0,0 +1,1309 @@ +/* + * Copyright 2025 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/v3beta/policy_bindings_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for SearchTargetPolicyBindings method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.SearchTargetPolicyBindingsRequest} + */ +public final class SearchTargetPolicyBindingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.SearchTargetPolicyBindingsRequest) + SearchTargetPolicyBindingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use SearchTargetPolicyBindingsRequest.newBuilder() to construct. + private SearchTargetPolicyBindingsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchTargetPolicyBindingsRequest() { + target_ = ""; + pageToken_ = ""; + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchTargetPolicyBindingsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest.class, + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest.Builder.class); + } + + public static final int TARGET_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + + /** + * + * + *
+   * Required. The target resource, which is bound to the policy in the binding.
+   *
+   * Format:
+   *
+   * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+   * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+   * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+   * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+   * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+   * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+   * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + 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(); + target_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The target resource, which is bound to the policy in the binding.
+   *
+   * Format:
+   *
+   * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+   * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+   * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+   * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+   * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+   * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+   * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of policy bindings to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 50 policy bindings will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 PARENT_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource where this search will be performed. This
+   * should be the nearest Resource Manager resource (project, folder, or
+   * organization) to the target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource where this search will be performed. This
+   * should be the nearest Resource Manager resource (project, folder, or
+   * organization) to the target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, target_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, target_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_); + } + size += getUnknownFields().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.v3beta.SearchTargetPolicyBindingsRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest other = + (com.google.iam.v3beta.SearchTargetPolicyBindingsRequest) obj; + + if (!getTarget().equals(other.getTarget())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getParent().equals(other.getParent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest 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.v3beta.SearchTargetPolicyBindingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest 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.v3beta.SearchTargetPolicyBindingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest 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.v3beta.SearchTargetPolicyBindingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest 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.v3beta.SearchTargetPolicyBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest 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.v3beta.SearchTargetPolicyBindingsRequest 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; + } + + /** + * + * + *
+   * Request message for SearchTargetPolicyBindings method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.SearchTargetPolicyBindingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.SearchTargetPolicyBindingsRequest) + com.google.iam.v3beta.SearchTargetPolicyBindingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest.class, + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.SearchTargetPolicyBindingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + target_ = ""; + pageSize_ = 0; + pageToken_ = ""; + parent_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchTargetPolicyBindingsRequest getDefaultInstanceForType() { + return com.google.iam.v3beta.SearchTargetPolicyBindingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.SearchTargetPolicyBindingsRequest build() { + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchTargetPolicyBindingsRequest buildPartial() { + com.google.iam.v3beta.SearchTargetPolicyBindingsRequest result = + new com.google.iam.v3beta.SearchTargetPolicyBindingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.SearchTargetPolicyBindingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.parent_ = parent_; + } + } + + @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.v3beta.SearchTargetPolicyBindingsRequest) { + return mergeFrom((com.google.iam.v3beta.SearchTargetPolicyBindingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.SearchTargetPolicyBindingsRequest other) { + if (other == com.google.iam.v3beta.SearchTargetPolicyBindingsRequest.getDefaultInstance()) + return this; + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object target_ = ""; + + /** + * + * + *
+     * Required. The target resource, which is bound to the policy in the binding.
+     *
+     * Format:
+     *
+     * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+     * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+     * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+     * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+     * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+     * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The target resource, which is bound to the policy in the binding.
+     *
+     * Format:
+     *
+     * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+     * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+     * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+     * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+     * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+     * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The target resource, which is bound to the policy in the binding.
+     *
+     * Format:
+     *
+     * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+     * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+     * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+     * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+     * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+     * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The target resource, which is bound to the policy in the binding.
+     *
+     * Format:
+     *
+     * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+     * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+     * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+     * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+     * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+     * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The target resource, which is bound to the policy in the binding.
+     *
+     * Format:
+     *
+     * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+     * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+     * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+     * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+     * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+     * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+     * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of policy bindings to return. The service may
+     * return fewer than this value.
+     *
+     * If unspecified, at most 50 policy bindings will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+     * subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+     * page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource where this search will be performed. This
+     * should be the nearest Resource Manager resource (project, folder, or
+     * organization) to the target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this search will be performed. This
+     * should be the nearest Resource Manager resource (project, folder, or
+     * organization) to the target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource where this search will be performed. This
+     * should be the nearest Resource Manager resource (project, folder, or
+     * organization) to the target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this search will be performed. This
+     * should be the nearest Resource Manager resource (project, folder, or
+     * organization) to the target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource where this search will be performed. This
+     * should be the nearest Resource Manager resource (project, folder, or
+     * organization) to the target.
+     *
+     * Format:
+     *
+     * * `projects/{project_id}/locations/{location}`
+     * * `projects/{project_number}/locations/{location}`
+     * * `folders/{folder_id}/locations/{location}`
+     * * `organizations/{organization_id}/locations/{location}`
+     * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000008; + 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.v3beta.SearchTargetPolicyBindingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.SearchTargetPolicyBindingsRequest) + private static final com.google.iam.v3beta.SearchTargetPolicyBindingsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.SearchTargetPolicyBindingsRequest(); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchTargetPolicyBindingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.SearchTargetPolicyBindingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsRequestOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsRequestOrBuilder.java new file mode 100644 index 0000000000..84ba85722f --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsRequestOrBuilder.java @@ -0,0 +1,173 @@ +/* + * Copyright 2025 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/v3beta/policy_bindings_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface SearchTargetPolicyBindingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.SearchTargetPolicyBindingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The target resource, which is bound to the policy in the binding.
+   *
+   * Format:
+   *
+   * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+   * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+   * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+   * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+   * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+   * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+   * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The target. + */ + java.lang.String getTarget(); + + /** + * + * + *
+   * Required. The target resource, which is bound to the policy in the binding.
+   *
+   * Format:
+   *
+   * * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID`
+   * * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID`
+   * * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID`
+   * * `//cloudresourcemanager.googleapis.com/projects/{project_number}`
+   * * `//cloudresourcemanager.googleapis.com/folders/{folder_id}`
+   * * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}`
+   * 
+ * + * string target = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Optional. The maximum number of policy bindings to return. The service may
+   * return fewer than this value.
+   *
+   * If unspecified, at most 50 policy bindings will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the
+   * subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchTargetPolicyBindingsRequest` must match the call that provided the
+   * page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Required. The parent resource where this search will be performed. This
+   * should be the nearest Resource Manager resource (project, folder, or
+   * organization) to the target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource where this search will be performed. This
+   * should be the nearest Resource Manager resource (project, folder, or
+   * organization) to the target.
+   *
+   * Format:
+   *
+   * * `projects/{project_id}/locations/{location}`
+   * * `projects/{project_number}/locations/{location}`
+   * * `folders/{folder_id}/locations/{location}`
+   * * `organizations/{organization_id}/locations/{location}`
+   * 
+ * + * + * string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsResponse.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsResponse.java new file mode 100644 index 0000000000..41272ecab2 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsResponse.java @@ -0,0 +1,1162 @@ +/* + * Copyright 2025 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/v3beta/policy_bindings_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * Response message for SearchTargetPolicyBindings method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.SearchTargetPolicyBindingsResponse} + */ +public final class SearchTargetPolicyBindingsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.SearchTargetPolicyBindingsResponse) + SearchTargetPolicyBindingsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use SearchTargetPolicyBindingsResponse.newBuilder() to construct. + private SearchTargetPolicyBindingsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchTargetPolicyBindingsResponse() { + policyBindings_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchTargetPolicyBindingsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse.class, + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse.Builder.class); + } + + public static final int POLICY_BINDINGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List policyBindings_; + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public java.util.List getPolicyBindingsList() { + return policyBindings_; + } + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public java.util.List + getPolicyBindingsOrBuilderList() { + return policyBindings_; + } + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public int getPolicyBindingsCount() { + return policyBindings_.size(); + } + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding getPolicyBindings(int index) { + return policyBindings_.get(index); + } + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index) { + return policyBindings_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 < policyBindings_.size(); i++) { + output.writeMessage(1, policyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < policyBindings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().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.v3beta.SearchTargetPolicyBindingsResponse)) { + return super.equals(obj); + } + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse other = + (com.google.iam.v3beta.SearchTargetPolicyBindingsResponse) obj; + + if (!getPolicyBindingsList().equals(other.getPolicyBindingsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPolicyBindingsCount() > 0) { + hash = (37 * hash) + POLICY_BINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBindingsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse 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.v3beta.SearchTargetPolicyBindingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse 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.v3beta.SearchTargetPolicyBindingsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse 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.v3beta.SearchTargetPolicyBindingsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse 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.v3beta.SearchTargetPolicyBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse 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.v3beta.SearchTargetPolicyBindingsResponse 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 SearchTargetPolicyBindings method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.SearchTargetPolicyBindingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.SearchTargetPolicyBindingsResponse) + com.google.iam.v3beta.SearchTargetPolicyBindingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse.class, + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse.Builder.class); + } + + // Construct using com.google.iam.v3beta.SearchTargetPolicyBindingsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (policyBindingsBuilder_ == null) { + policyBindings_ = java.util.Collections.emptyList(); + } else { + policyBindings_ = null; + policyBindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_SearchTargetPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchTargetPolicyBindingsResponse getDefaultInstanceForType() { + return com.google.iam.v3beta.SearchTargetPolicyBindingsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.SearchTargetPolicyBindingsResponse build() { + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.SearchTargetPolicyBindingsResponse buildPartial() { + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse result = + new com.google.iam.v3beta.SearchTargetPolicyBindingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.iam.v3beta.SearchTargetPolicyBindingsResponse result) { + if (policyBindingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyBindings_ = java.util.Collections.unmodifiableList(policyBindings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policyBindings_ = policyBindings_; + } else { + result.policyBindings_ = policyBindingsBuilder_.build(); + } + } + + private void buildPartial0(com.google.iam.v3beta.SearchTargetPolicyBindingsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @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.v3beta.SearchTargetPolicyBindingsResponse) { + return mergeFrom((com.google.iam.v3beta.SearchTargetPolicyBindingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.SearchTargetPolicyBindingsResponse other) { + if (other == com.google.iam.v3beta.SearchTargetPolicyBindingsResponse.getDefaultInstance()) + return this; + if (policyBindingsBuilder_ == null) { + if (!other.policyBindings_.isEmpty()) { + if (policyBindings_.isEmpty()) { + policyBindings_ = other.policyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyBindingsIsMutable(); + policyBindings_.addAll(other.policyBindings_); + } + onChanged(); + } + } else { + if (!other.policyBindings_.isEmpty()) { + if (policyBindingsBuilder_.isEmpty()) { + policyBindingsBuilder_.dispose(); + policyBindingsBuilder_ = null; + policyBindings_ = other.policyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + policyBindingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPolicyBindingsFieldBuilder() + : null; + } else { + policyBindingsBuilder_.addAllMessages(other.policyBindings_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v3beta.PolicyBinding m = + input.readMessage( + com.google.iam.v3beta.PolicyBinding.parser(), extensionRegistry); + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(m); + } else { + policyBindingsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List policyBindings_ = + java.util.Collections.emptyList(); + + private void ensurePolicyBindingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyBindings_ = + new java.util.ArrayList(policyBindings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + policyBindingsBuilder_; + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public java.util.List getPolicyBindingsList() { + if (policyBindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyBindings_); + } else { + return policyBindingsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public int getPolicyBindingsCount() { + if (policyBindingsBuilder_ == null) { + return policyBindings_.size(); + } else { + return policyBindingsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding getPolicyBindings(int index) { + if (policyBindingsBuilder_ == null) { + return policyBindings_.get(index); + } else { + return policyBindingsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder setPolicyBindings(int index, com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.set(index, value); + onChanged(); + } else { + policyBindingsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder setPolicyBindings( + int index, com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.set(index, builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.add(value); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(int index, com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBindingsIsMutable(); + policyBindings_.add(index, value); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings(com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addPolicyBindings( + int index, com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.add(index, builderForValue.build()); + onChanged(); + } else { + policyBindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder addAllPolicyBindings( + java.lang.Iterable values) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyBindings_); + onChanged(); + } else { + policyBindingsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder clearPolicyBindings() { + if (policyBindingsBuilder_ == null) { + policyBindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policyBindingsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public Builder removePolicyBindings(int index) { + if (policyBindingsBuilder_ == null) { + ensurePolicyBindingsIsMutable(); + policyBindings_.remove(index); + onChanged(); + } else { + policyBindingsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding.Builder getPolicyBindingsBuilder(int index) { + return getPolicyBindingsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index) { + if (policyBindingsBuilder_ == null) { + return policyBindings_.get(index); + } else { + return policyBindingsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public java.util.List + getPolicyBindingsOrBuilderList() { + if (policyBindingsBuilder_ != null) { + return policyBindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyBindings_); + } + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding.Builder addPolicyBindingsBuilder() { + return getPolicyBindingsFieldBuilder() + .addBuilder(com.google.iam.v3beta.PolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public com.google.iam.v3beta.PolicyBinding.Builder addPolicyBindingsBuilder(int index) { + return getPolicyBindingsFieldBuilder() + .addBuilder(index, com.google.iam.v3beta.PolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * The policy bindings bound to the specified target.
+     * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + public java.util.List + getPolicyBindingsBuilderList() { + return getPolicyBindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + getPolicyBindingsFieldBuilder() { + if (policyBindingsBuilder_ == null) { + policyBindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder>( + policyBindings_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + policyBindings_ = null; + } + return policyBindingsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token, which can be sent as `page_token` to retrieve the next
+     * page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00000002; + 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.v3beta.SearchTargetPolicyBindingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.SearchTargetPolicyBindingsResponse) + private static final com.google.iam.v3beta.SearchTargetPolicyBindingsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.SearchTargetPolicyBindingsResponse(); + } + + public static com.google.iam.v3beta.SearchTargetPolicyBindingsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchTargetPolicyBindingsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.SearchTargetPolicyBindingsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsResponseOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsResponseOrBuilder.java new file mode 100644 index 0000000000..bd1d4f14a8 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/SearchTargetPolicyBindingsResponseOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2025 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/v3beta/policy_bindings_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface SearchTargetPolicyBindingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.SearchTargetPolicyBindingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + java.util.List getPolicyBindingsList(); + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + com.google.iam.v3beta.PolicyBinding getPolicyBindings(int index); + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + int getPolicyBindingsCount(); + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + java.util.List + getPolicyBindingsOrBuilderList(); + + /** + * + * + *
+   * The policy bindings bound to the specified target.
+   * 
+ * + * repeated .google.iam.v3beta.PolicyBinding policy_bindings = 1; + */ + com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingsOrBuilder(int index); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Optional. A token, which can be sent as `page_token` to retrieve the next
+   * page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/UpdatePolicyBindingRequest.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/UpdatePolicyBindingRequest.java new file mode 100644 index 0000000000..c6888bbb7f --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/UpdatePolicyBindingRequest.java @@ -0,0 +1,1185 @@ +/* + * Copyright 2025 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/v3beta/policy_bindings_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for UpdatePolicyBinding method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.UpdatePolicyBindingRequest} + */ +public final class UpdatePolicyBindingRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.UpdatePolicyBindingRequest) + UpdatePolicyBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdatePolicyBindingRequest.newBuilder() to construct. + private UpdatePolicyBindingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdatePolicyBindingRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdatePolicyBindingRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.UpdatePolicyBindingRequest.class, + com.google.iam.v3beta.UpdatePolicyBindingRequest.Builder.class); + } + + private int bitField0_; + public static final int POLICY_BINDING_FIELD_NUMBER = 1; + private com.google.iam.v3beta.PolicyBinding policyBinding_; + + /** + * + * + *
+   * Required. The policy binding to update.
+   *
+   * The policy binding's `name` field is used to identify the policy binding to
+   * update.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBinding field is set. + */ + @java.lang.Override + public boolean hasPolicyBinding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The policy binding to update.
+   *
+   * The policy binding's `name` field is used to identify the policy binding to
+   * update.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBinding. + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBinding getPolicyBinding() { + return policyBinding_ == null + ? com.google.iam.v3beta.PolicyBinding.getDefaultInstance() + : policyBinding_; + } + + /** + * + * + *
+   * Required. The policy binding to update.
+   *
+   * The policy binding's `name` field is used to identify the policy binding to
+   * update.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingOrBuilder() { + return policyBinding_ == null + ? com.google.iam.v3beta.PolicyBinding.getDefaultInstance() + : policyBinding_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 2; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request and preview the update, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPolicyBinding()); + } + if (validateOnly_ != false) { + output.writeBool(2, validateOnly_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicyBinding()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, validateOnly_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); + } + size += getUnknownFields().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.v3beta.UpdatePolicyBindingRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.UpdatePolicyBindingRequest other = + (com.google.iam.v3beta.UpdatePolicyBindingRequest) obj; + + if (hasPolicyBinding() != other.hasPolicyBinding()) return false; + if (hasPolicyBinding()) { + if (!getPolicyBinding().equals(other.getPolicyBinding())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) return false; + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPolicyBinding()) { + hash = (37 * hash) + POLICY_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBinding().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest 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.v3beta.UpdatePolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest 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.v3beta.UpdatePolicyBindingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest 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.v3beta.UpdatePolicyBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest 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.v3beta.UpdatePolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest 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.v3beta.UpdatePolicyBindingRequest 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; + } + + /** + * + * + *
+   * Request message for UpdatePolicyBinding method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.UpdatePolicyBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.UpdatePolicyBindingRequest) + com.google.iam.v3beta.UpdatePolicyBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.UpdatePolicyBindingRequest.class, + com.google.iam.v3beta.UpdatePolicyBindingRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.UpdatePolicyBindingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPolicyBindingFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + policyBinding_ = null; + if (policyBindingBuilder_ != null) { + policyBindingBuilder_.dispose(); + policyBindingBuilder_ = null; + } + validateOnly_ = false; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PolicyBindingsServiceProto + .internal_static_google_iam_v3beta_UpdatePolicyBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.UpdatePolicyBindingRequest getDefaultInstanceForType() { + return com.google.iam.v3beta.UpdatePolicyBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.UpdatePolicyBindingRequest build() { + com.google.iam.v3beta.UpdatePolicyBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.UpdatePolicyBindingRequest buildPartial() { + com.google.iam.v3beta.UpdatePolicyBindingRequest result = + new com.google.iam.v3beta.UpdatePolicyBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.iam.v3beta.UpdatePolicyBindingRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.policyBinding_ = + policyBindingBuilder_ == null ? policyBinding_ : policyBindingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3beta.UpdatePolicyBindingRequest) { + return mergeFrom((com.google.iam.v3beta.UpdatePolicyBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.iam.v3beta.UpdatePolicyBindingRequest other) { + if (other == com.google.iam.v3beta.UpdatePolicyBindingRequest.getDefaultInstance()) + return this; + if (other.hasPolicyBinding()) { + mergePolicyBinding(other.getPolicyBinding()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPolicyBindingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.iam.v3beta.PolicyBinding policyBinding_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + policyBindingBuilder_; + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBinding field is set. + */ + public boolean hasPolicyBinding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBinding. + */ + public com.google.iam.v3beta.PolicyBinding getPolicyBinding() { + if (policyBindingBuilder_ == null) { + return policyBinding_ == null + ? com.google.iam.v3beta.PolicyBinding.getDefaultInstance() + : policyBinding_; + } else { + return policyBindingBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPolicyBinding(com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policyBinding_ = value; + } else { + policyBindingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPolicyBinding(com.google.iam.v3beta.PolicyBinding.Builder builderForValue) { + if (policyBindingBuilder_ == null) { + policyBinding_ = builderForValue.build(); + } else { + policyBindingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePolicyBinding(com.google.iam.v3beta.PolicyBinding value) { + if (policyBindingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && policyBinding_ != null + && policyBinding_ != com.google.iam.v3beta.PolicyBinding.getDefaultInstance()) { + getPolicyBindingBuilder().mergeFrom(value); + } else { + policyBinding_ = value; + } + } else { + policyBindingBuilder_.mergeFrom(value); + } + if (policyBinding_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPolicyBinding() { + bitField0_ = (bitField0_ & ~0x00000001); + policyBinding_ = null; + if (policyBindingBuilder_ != null) { + policyBindingBuilder_.dispose(); + policyBindingBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PolicyBinding.Builder getPolicyBindingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPolicyBindingFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingOrBuilder() { + if (policyBindingBuilder_ != null) { + return policyBindingBuilder_.getMessageOrBuilder(); + } else { + return policyBinding_ == null + ? com.google.iam.v3beta.PolicyBinding.getDefaultInstance() + : policyBinding_; + } + } + + /** + * + * + *
+     * Required. The policy binding to update.
+     *
+     * The policy binding's `name` field is used to identify the policy binding to
+     * update.
+     * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder> + getPolicyBindingFieldBuilder() { + if (policyBindingBuilder_ == null) { + policyBindingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v3beta.PolicyBinding, + com.google.iam.v3beta.PolicyBinding.Builder, + com.google.iam.v3beta.PolicyBindingOrBuilder>( + getPolicyBinding(), getParentForChildren(), isClean()); + policyBinding_ = null; + } + return policyBindingBuilder_; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request and preview the update, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the update, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the update, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000002); + validateOnly_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000004); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @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.v3beta.UpdatePolicyBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.UpdatePolicyBindingRequest) + private static final com.google.iam.v3beta.UpdatePolicyBindingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.UpdatePolicyBindingRequest(); + } + + public static com.google.iam.v3beta.UpdatePolicyBindingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdatePolicyBindingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.UpdatePolicyBindingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/UpdatePolicyBindingRequestOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/UpdatePolicyBindingRequestOrBuilder.java new file mode 100644 index 0000000000..41c0453047 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/UpdatePolicyBindingRequestOrBuilder.java @@ -0,0 +1,132 @@ +/* + * Copyright 2025 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/v3beta/policy_bindings_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface UpdatePolicyBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.UpdatePolicyBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The policy binding to update.
+   *
+   * The policy binding's `name` field is used to identify the policy binding to
+   * update.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBinding field is set. + */ + boolean hasPolicyBinding(); + + /** + * + * + *
+   * Required. The policy binding to update.
+   *
+   * The policy binding's `name` field is used to identify the policy binding to
+   * update.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBinding. + */ + com.google.iam.v3beta.PolicyBinding getPolicyBinding(); + + /** + * + * + *
+   * Required. The policy binding to update.
+   *
+   * The policy binding's `name` field is used to identify the policy binding to
+   * update.
+   * 
+ * + * + * .google.iam.v3beta.PolicyBinding policy_binding = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3beta.PolicyBindingOrBuilder getPolicyBindingOrBuilder(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the update, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/UpdatePrincipalAccessBoundaryPolicyRequest.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/UpdatePrincipalAccessBoundaryPolicyRequest.java new file mode 100644 index 0000000000..d0fe0da71a --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/UpdatePrincipalAccessBoundaryPolicyRequest.java @@ -0,0 +1,1211 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policies_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +/** + * + * + *
+ * Request message for UpdatePrincipalAccessBoundaryPolicy method.
+ * 
+ * + * Protobuf type {@code google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest} + */ +public final class UpdatePrincipalAccessBoundaryPolicyRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest) + UpdatePrincipalAccessBoundaryPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder() to construct. + private UpdatePrincipalAccessBoundaryPolicyRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdatePrincipalAccessBoundaryPolicyRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdatePrincipalAccessBoundaryPolicyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + private int bitField0_; + public static final int PRINCIPAL_ACCESS_BOUNDARY_POLICY_FIELD_NUMBER = 1; + private com.google.iam.v3beta.PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy_; + + /** + * + * + *
+   * Required. The principal access boundary policy to update.
+   *
+   * The principal access boundary policy's `name` field is used to identify the
+   * policy to update.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the principalAccessBoundaryPolicy field is set. + */ + @java.lang.Override + public boolean hasPrincipalAccessBoundaryPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The principal access boundary policy to update.
+   *
+   * The principal access boundary policy's `name` field is used to identify the
+   * policy to update.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicy. + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy() { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } + + /** + * + * + *
+   * Required. The principal access boundary policy to update.
+   *
+   * The principal access boundary policy's `name` field is used to identify the
+   * policy to update.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPolicyOrBuilder() { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 2; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request and preview the update, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPrincipalAccessBoundaryPolicy()); + } + if (validateOnly_ != false) { + output.writeBool(2, validateOnly_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, getPrincipalAccessBoundaryPolicy()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, validateOnly_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); + } + size += getUnknownFields().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.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest)) { + return super.equals(obj); + } + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest other = + (com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest) obj; + + if (hasPrincipalAccessBoundaryPolicy() != other.hasPrincipalAccessBoundaryPolicy()) + return false; + if (hasPrincipalAccessBoundaryPolicy()) { + if (!getPrincipalAccessBoundaryPolicy().equals(other.getPrincipalAccessBoundaryPolicy())) + return false; + } + if (getValidateOnly() != other.getValidateOnly()) return false; + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPrincipalAccessBoundaryPolicy()) { + hash = (37 * hash) + PRINCIPAL_ACCESS_BOUNDARY_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalAccessBoundaryPolicy().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest 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.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest 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.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest 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.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest 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.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest 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.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest 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; + } + + /** + * + * + *
+   * Request message for UpdatePrincipalAccessBoundaryPolicy method.
+   * 
+ * + * Protobuf type {@code google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest) + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest.class, + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest.Builder.class); + } + + // Construct using com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPrincipalAccessBoundaryPolicyFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + principalAccessBoundaryPolicy_ = null; + if (principalAccessBoundaryPolicyBuilder_ != null) { + principalAccessBoundaryPolicyBuilder_.dispose(); + principalAccessBoundaryPolicyBuilder_ = null; + } + validateOnly_ = false; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.iam.v3beta.PrincipalAccessBoundaryPoliciesServiceProto + .internal_static_google_iam_v3beta_UpdatePrincipalAccessBoundaryPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest + getDefaultInstanceForType() { + return com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest build() { + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest buildPartial() { + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest result = + new com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.principalAccessBoundaryPolicy_ = + principalAccessBoundaryPolicyBuilder_ == null + ? principalAccessBoundaryPolicy_ + : principalAccessBoundaryPolicyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @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.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest) { + return mergeFrom((com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest other) { + if (other + == com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest.getDefaultInstance()) + return this; + if (other.hasPrincipalAccessBoundaryPolicy()) { + mergePrincipalAccessBoundaryPolicy(other.getPrincipalAccessBoundaryPolicy()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getPrincipalAccessBoundaryPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.iam.v3beta.PrincipalAccessBoundaryPolicy principalAccessBoundaryPolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder> + principalAccessBoundaryPolicyBuilder_; + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the principalAccessBoundaryPolicy field is set. + */ + public boolean hasPrincipalAccessBoundaryPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicy. + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy() { + if (principalAccessBoundaryPolicyBuilder_ == null) { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } else { + return principalAccessBoundaryPolicyBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + principalAccessBoundaryPolicy_ = value; + } else { + principalAccessBoundaryPolicyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder builderForValue) { + if (principalAccessBoundaryPolicyBuilder_ == null) { + principalAccessBoundaryPolicy_ = builderForValue.build(); + } else { + principalAccessBoundaryPolicyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePrincipalAccessBoundaryPolicy( + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy value) { + if (principalAccessBoundaryPolicyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && principalAccessBoundaryPolicy_ != null + && principalAccessBoundaryPolicy_ + != com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance()) { + getPrincipalAccessBoundaryPolicyBuilder().mergeFrom(value); + } else { + principalAccessBoundaryPolicy_ = value; + } + } else { + principalAccessBoundaryPolicyBuilder_.mergeFrom(value); + } + if (principalAccessBoundaryPolicy_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPrincipalAccessBoundaryPolicy() { + bitField0_ = (bitField0_ & ~0x00000001); + principalAccessBoundaryPolicy_ = null; + if (principalAccessBoundaryPolicyBuilder_ != null) { + principalAccessBoundaryPolicyBuilder_.dispose(); + principalAccessBoundaryPolicyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder + getPrincipalAccessBoundaryPolicyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPrincipalAccessBoundaryPolicyFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPolicyOrBuilder() { + if (principalAccessBoundaryPolicyBuilder_ != null) { + return principalAccessBoundaryPolicyBuilder_.getMessageOrBuilder(); + } else { + return principalAccessBoundaryPolicy_ == null + ? com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.getDefaultInstance() + : principalAccessBoundaryPolicy_; + } + } + + /** + * + * + *
+     * Required. The principal access boundary policy to update.
+     *
+     * The principal access boundary policy's `name` field is used to identify the
+     * policy to update.
+     * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder> + getPrincipalAccessBoundaryPolicyFieldBuilder() { + if (principalAccessBoundaryPolicyBuilder_ == null) { + principalAccessBoundaryPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy.Builder, + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder>( + getPrincipalAccessBoundaryPolicy(), getParentForChildren(), isClean()); + principalAccessBoundaryPolicy_ = null; + } + return principalAccessBoundaryPolicyBuilder_; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request and preview the update, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the update, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request and preview the update, but do not
+     * actually post it.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000002); + validateOnly_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000004); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. The list of fields to update
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @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.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest) + private static final com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest(); + } + + public static com.google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdatePrincipalAccessBoundaryPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + 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(); + } + }; + + 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.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/UpdatePrincipalAccessBoundaryPolicyRequestOrBuilder.java b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/UpdatePrincipalAccessBoundaryPolicyRequestOrBuilder.java new file mode 100644 index 0000000000..d4817cb0e5 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/java/com/google/iam/v3beta/UpdatePrincipalAccessBoundaryPolicyRequestOrBuilder.java @@ -0,0 +1,133 @@ +/* + * Copyright 2025 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/v3beta/principal_access_boundary_policies_service.proto + +// Protobuf Java Version: 3.25.5 +package com.google.iam.v3beta; + +public interface UpdatePrincipalAccessBoundaryPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.iam.v3beta.UpdatePrincipalAccessBoundaryPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The principal access boundary policy to update.
+   *
+   * The principal access boundary policy's `name` field is used to identify the
+   * policy to update.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the principalAccessBoundaryPolicy field is set. + */ + boolean hasPrincipalAccessBoundaryPolicy(); + + /** + * + * + *
+   * Required. The principal access boundary policy to update.
+   *
+   * The principal access boundary policy's `name` field is used to identify the
+   * policy to update.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The principalAccessBoundaryPolicy. + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicy getPrincipalAccessBoundaryPolicy(); + + /** + * + * + *
+   * Required. The principal access boundary policy to update.
+   *
+   * The principal access boundary policy's `name` field is used to identify the
+   * policy to update.
+   * 
+ * + * + * .google.iam.v3beta.PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.iam.v3beta.PrincipalAccessBoundaryPolicyOrBuilder + getPrincipalAccessBoundaryPolicyOrBuilder(); + + /** + * + * + *
+   * Optional. If set, validate the request and preview the update, but do not
+   * actually post it.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to update
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/proto/google/iam/v3beta/operation_metadata.proto b/java-iam/proto-google-iam-v3beta/src/main/proto/google/iam/v3beta/operation_metadata.proto new file mode 100644 index 0000000000..6c62252093 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/proto/google/iam/v3beta/operation_metadata.proto @@ -0,0 +1,57 @@ +// Copyright 2025 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 +// +// http://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. + +syntax = "proto3"; + +package google.iam.v3beta; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V3Beta"; +option go_package = "cloud.google.com/go/iam/apiv3beta/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "OperationMetadataProto"; +option java_package = "com.google.iam.v3beta"; +option php_namespace = "Google\\Cloud\\Iam\\V3beta"; + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/proto/google/iam/v3beta/policy_binding_resources.proto b/java-iam/proto-google-iam-v3beta/src/main/proto/google/iam/v3beta/policy_binding_resources.proto new file mode 100644 index 0000000000..1fed6cfcef --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/proto/google/iam/v3beta/policy_binding_resources.proto @@ -0,0 +1,185 @@ +// Copyright 2025 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 +// +// http://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. + +syntax = "proto3"; + +package google.iam.v3beta; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/expr.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V3Beta"; +option go_package = "cloud.google.com/go/iam/apiv3beta/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "PolicyBindingResourcesProto"; +option java_package = "com.google.iam.v3beta"; +option php_namespace = "Google\\Cloud\\Iam\\V3beta"; + +// IAM policy binding resource. +message PolicyBinding { + option (google.api.resource) = { + type: "iam.googleapis.com/PolicyBinding" + pattern: "organizations/{organization}/locations/{location}/policyBindings/{policy_binding}" + pattern: "folders/{folder}/locations/{location}/policyBindings/{policy_binding}" + pattern: "projects/{project}/locations/{location}/policyBindings/{policy_binding}" + plural: "policyBindings" + singular: "policyBinding" + }; + + // Target is the full resource name of the resource to which the policy will + // be bound. Immutable once set. + message Target { + // The different types of targets that can be bound to a policy. + oneof target { + // Immutable. Full Resource Name used for principal access boundary policy + // bindings. The principal set must be directly parented by the policy + // binding's parent or same as the parent if the target is a + // project/folder/organization. + // + // Examples: + // * For binding's parented by an organization: + // * Organization: + // `//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID` + // * Workforce Identity: + // `//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID` + // * Workspace Identity: + // `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + // * For binding's parented by a folder: + // * Folder: + // `//cloudresourcemanager.googleapis.com/folders/FOLDER_ID` + // * For binding's parented by a project: + // * Project: + // * `//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER` + // * `//cloudresourcemanager.googleapis.com/projects/PROJECT_ID` + // * Workload Identity Pool: + // `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID` + string principal_set = 1 [(google.api.field_behavior) = IMMUTABLE]; + } + } + + // Different policy kinds supported in this binding. + enum PolicyKind { + // Unspecified policy kind; Not a valid state + POLICY_KIND_UNSPECIFIED = 0; + + // Principal access boundary policy kind + PRINCIPAL_ACCESS_BOUNDARY = 1; + } + + // Identifier. The name of the policy binding, in the format + // `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`. + // The binding parent is the closest Resource Manager resource (project, + // folder, or organization) to the binding target. + // + // Format: + // + // * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + // * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + // * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + // * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The globally unique ID of the policy binding. Assigned when + // the policy binding is created. + string uid = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. The etag for the policy binding. + // If this is provided on update, it must match the server's etag. + string etag = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The description of the policy binding. Must be less than or equal + // to 63 characters. + string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined annotations. See + // https://google.aip.dev/148#annotations for more details such as format and + // size limitations + map annotations = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Immutable. Target is the full resource name of the resource to + // which the policy will be bound. Immutable once set. + Target target = 6 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Immutable. The kind of the policy to attach in this binding. This field + // must be one of the following: + // + // - Left empty (will be automatically set to the policy kind) + // - The input policy kind + PolicyKind policy_kind = 11 [(google.api.field_behavior) = IMMUTABLE]; + + // Required. Immutable. The resource name of the policy to be bound. The + // binding parent and policy must belong to the same organization. + string policy = 7 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Output only. The globally unique ID of the policy to be bound. + string policy_uid = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The condition to apply to the policy binding. When set, the + // `expression` field in the `Expr` must include from 1 to 10 subexpressions, + // joined by the + // "||"(Logical OR), "&&"(Logical AND) or "!"(Logical NOT) operators and + // cannot contain more than 250 characters. + // + // The condition is currently only supported when bound to policies of kind + // principal access boundary. + // + // When the bound policy is a principal access boundary policy, the only + // supported attributes in any subexpression are `principal.type` and + // `principal.subject`. An example expression is: "principal.type == + // 'iam.googleapis.com/ServiceAccount'" or "principal.subject == + // 'bob@example.com'". + // + // Allowed operations for `principal.subject`: + // + // - `principal.subject == ` + // - `principal.subject != ` + // - `principal.subject in []` + // - `principal.subject.startsWith()` + // - `principal.subject.endsWith()` + // + // Allowed operations for `principal.type`: + // + // - `principal.type == ` + // - `principal.type != ` + // - `principal.type in []` + // + // Supported principal types are Workspace, Workforce Pool, Workload Pool and + // Service Account. Allowed string must be one of: + // + // - iam.googleapis.com/WorkspaceIdentity + // - iam.googleapis.com/WorkforcePoolIdentity + // - iam.googleapis.com/WorkloadPoolIdentity + // - iam.googleapis.com/ServiceAccount + google.type.Expr condition = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the policy binding was created. + google.protobuf.Timestamp create_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the policy binding was most recently updated. + google.protobuf.Timestamp update_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/proto/google/iam/v3beta/policy_bindings_service.proto b/java-iam/proto-google-iam-v3beta/src/main/proto/google/iam/v3beta/policy_bindings_service.proto new file mode 100644 index 0000000000..e4f7c85447 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/proto/google/iam/v3beta/policy_bindings_service.proto @@ -0,0 +1,377 @@ +// Copyright 2025 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 +// +// http://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. + +syntax = "proto3"; + +package google.iam.v3beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/iam/v3beta/operation_metadata.proto"; +import "google/iam/v3beta/policy_binding_resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V3Beta"; +option go_package = "cloud.google.com/go/iam/apiv3beta/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "PolicyBindingsServiceProto"; +option java_package = "com.google.iam.v3beta"; +option php_namespace = "Google\\Cloud\\Iam\\V3beta"; +option (google.api.resource_definition) = { + type: "iam.googleapis.com/OrganizationLocation" + pattern: "organizations/{organization}/locations/{location}" +}; +option (google.api.resource_definition) = { + type: "iam.googleapis.com/FolderLocation" + pattern: "folders/{folder}/locations/{location}" +}; + +// An interface for managing Identity and Access Management (IAM) policy +// bindings. +service PolicyBindings { + option (google.api.default_host) = "iam.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a policy binding and returns a long-running operation. + // Callers will need the IAM permissions on both the policy and target. + // Once the binding is created, the policy is applied to the target. + rpc CreatePolicyBinding(CreatePolicyBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3beta/{parent=projects/*/locations/*}/policyBindings" + body: "policy_binding" + additional_bindings { + post: "/v3beta/{parent=folders/*/locations/*}/policyBindings" + body: "policy_binding" + } + additional_bindings { + post: "/v3beta/{parent=organizations/*/locations/*}/policyBindings" + body: "policy_binding" + } + }; + option (google.api.method_signature) = + "parent,policy_binding,policy_binding_id"; + option (google.longrunning.operation_info) = { + response_type: "PolicyBinding" + metadata_type: "OperationMetadata" + }; + } + + // Gets a policy binding. + rpc GetPolicyBinding(GetPolicyBindingRequest) returns (PolicyBinding) { + option (google.api.http) = { + get: "/v3beta/{name=projects/*/locations/*/policyBindings/*}" + additional_bindings { + get: "/v3beta/{name=folders/*/locations/*/policyBindings/*}" + } + additional_bindings { + get: "/v3beta/{name=organizations/*/locations/*/policyBindings/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Updates a policy binding and returns a long-running operation. + // Callers will need the IAM permissions on the policy and target in the + // binding to update, and the IAM permission to remove the existing policy + // from the binding. Target is immutable and cannot be updated. Once the + // binding is updated, the new policy is applied to the target. + rpc UpdatePolicyBinding(UpdatePolicyBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v3beta/{policy_binding.name=projects/*/locations/*/policyBindings/*}" + body: "policy_binding" + additional_bindings { + patch: "/v3beta/{policy_binding.name=folders/*/locations/*/policyBindings/*}" + body: "policy_binding" + } + additional_bindings { + patch: "/v3beta/{policy_binding.name=organizations/*/locations/*/policyBindings/*}" + body: "policy_binding" + } + }; + option (google.api.method_signature) = "policy_binding,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "PolicyBinding" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a policy binding and returns a long-running operation. + // Callers will need the IAM permissions on both the policy and target. + // Once the binding is deleted, the policy no longer applies to the target. + rpc DeletePolicyBinding(DeletePolicyBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v3beta/{name=projects/*/locations/*/policyBindings/*}" + additional_bindings { + delete: "/v3beta/{name=folders/*/locations/*/policyBindings/*}" + } + additional_bindings { + delete: "/v3beta/{name=organizations/*/locations/*/policyBindings/*}" + } + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists policy bindings. + rpc ListPolicyBindings(ListPolicyBindingsRequest) + returns (ListPolicyBindingsResponse) { + option (google.api.http) = { + get: "/v3beta/{parent=projects/*/locations/*}/policyBindings" + additional_bindings { + get: "/v3beta/{parent=folders/*/locations/*}/policyBindings" + } + additional_bindings { + get: "/v3beta/{parent=organizations/*/locations/*}/policyBindings" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Search policy bindings by target. Returns all policy binding objects bound + // directly to target. + rpc SearchTargetPolicyBindings(SearchTargetPolicyBindingsRequest) + returns (SearchTargetPolicyBindingsResponse) { + option (google.api.http) = { + get: "/v3beta/{parent=projects/*/locations/*}/policyBindings:searchTargetPolicyBindings" + additional_bindings { + get: "/v3beta/{parent=folders/*/locations/*}/policyBindings:searchTargetPolicyBindings" + } + additional_bindings { + get: "/v3beta/{parent=organizations/*/locations/*}/policyBindings:searchTargetPolicyBindings" + } + }; + option (google.api.method_signature) = "parent,target"; + } +} + +// Request message for CreatePolicyBinding method. +message CreatePolicyBindingRequest { + // Required. The parent resource where this policy binding will be created. + // The binding parent is the closest Resource Manager resource (project, + // folder or organization) to the binding target. + // + // Format: + // + // * `projects/{project_id}/locations/{location}` + // * `projects/{project_number}/locations/{location}` + // * `folders/{folder_id}/locations/{location}` + // * `organizations/{organization_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "iam.googleapis.com/PolicyBinding" + } + ]; + + // Required. The ID to use for the policy binding, which will become the final + // component of the policy binding's resource name. + // + // This value must start with a lowercase letter followed by up to 62 + // lowercase letters, numbers, hyphens, or dots. Pattern, + // /[a-z][a-z0-9-\.]{2,62}/. + string policy_binding_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The policy binding to create. + PolicyBinding policy_binding = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, validate the request and preview the creation, but do not + // actually post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for GetPolicyBinding method. +message GetPolicyBindingRequest { + // Required. The name of the policy binding to retrieve. + // + // Format: + // + // * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + // * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + // * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + // * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/PolicyBinding" + } + ]; +} + +// Request message for UpdatePolicyBinding method. +message UpdatePolicyBindingRequest { + // Required. The policy binding to update. + // + // The policy binding's `name` field is used to identify the policy binding to + // update. + PolicyBinding policy_binding = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, validate the request and preview the update, but do not + // actually post it. + bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of fields to update + google.protobuf.FieldMask update_mask = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for DeletePolicyBinding method. +message DeletePolicyBindingRequest { + // Required. The name of the policy binding to delete. + // + // Format: + // + // * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}` + // * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}` + // * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}` + // * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/PolicyBinding" + } + ]; + + // Optional. The etag of the policy binding. + // If this is provided, it must match the server's etag. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the deletion, but do not + // actually post it. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for ListPolicyBindings method. +message ListPolicyBindingsRequest { + // Required. The parent resource, which owns the collection of policy + // bindings. + // + // Format: + // + // * `projects/{project_id}/locations/{location}` + // * `projects/{project_number}/locations/{location}` + // * `folders/{folder_id}/locations/{location}` + // * `organizations/{organization_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "iam.googleapis.com/PolicyBinding" + } + ]; + + // Optional. The maximum number of policy bindings to return. The service may + // return fewer than this value. + // + // If unspecified, at most 50 policy bindings will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListPolicyBindings` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListPolicyBindings` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An expression for filtering the results of the request. Filter + // rules are case insensitive. Some eligible fields for filtering are: + // + // + `target` + // + `policy` + // + // Some examples of filter queries: + // + // * `target:ex*`: The binding target's name starts with "ex". + // * `target:example`: The binding target's name is `example`. + // * `policy:example`: The binding policy's name is `example`. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListPolicyBindings method. +message ListPolicyBindingsResponse { + // The policy bindings from the specified parent. + repeated PolicyBinding policy_bindings = 1; + + // Optional. A token, which can be sent as `page_token` to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for SearchTargetPolicyBindings method. +message SearchTargetPolicyBindingsRequest { + // Required. The target resource, which is bound to the policy in the binding. + // + // Format: + // + // * `//iam.googleapis.com/locations/global/workforcePools/POOL_ID` + // * `//iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID` + // * `//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID` + // * `//cloudresourcemanager.googleapis.com/projects/{project_number}` + // * `//cloudresourcemanager.googleapis.com/folders/{folder_id}` + // * `//cloudresourcemanager.googleapis.com/organizations/{organization_id}` + string target = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of policy bindings to return. The service may + // return fewer than this value. + // + // If unspecified, at most 50 policy bindings will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `SearchTargetPolicyBindingsRequest` call. Provide this to retrieve the + // subsequent page. + // + // When paginating, all other parameters provided to + // `SearchTargetPolicyBindingsRequest` must match the call that provided the + // page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The parent resource where this search will be performed. This + // should be the nearest Resource Manager resource (project, folder, or + // organization) to the target. + // + // Format: + // + // * `projects/{project_id}/locations/{location}` + // * `projects/{project_number}/locations/{location}` + // * `folders/{folder_id}/locations/{location}` + // * `organizations/{organization_id}/locations/{location}` + string parent = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "iam.googleapis.com/PolicyBinding" + } + ]; +} + +// Response message for SearchTargetPolicyBindings method. +message SearchTargetPolicyBindingsResponse { + // The policy bindings bound to the specified target. + repeated PolicyBinding policy_bindings = 1; + + // Optional. A token, which can be sent as `page_token` to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/proto/google/iam/v3beta/principal_access_boundary_policies_service.proto b/java-iam/proto-google-iam-v3beta/src/main/proto/google/iam/v3beta/principal_access_boundary_policies_service.proto new file mode 100644 index 0000000000..fd3817c338 --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/proto/google/iam/v3beta/principal_access_boundary_policies_service.proto @@ -0,0 +1,292 @@ +// Copyright 2025 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 +// +// http://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. + +syntax = "proto3"; + +package google.iam.v3beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/iam/v3beta/operation_metadata.proto"; +import "google/iam/v3beta/policy_binding_resources.proto"; +import "google/iam/v3beta/principal_access_boundary_policy_resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V3Beta"; +option go_package = "cloud.google.com/go/iam/apiv3beta/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "PrincipalAccessBoundaryPoliciesServiceProto"; +option java_package = "com.google.iam.v3beta"; +option php_namespace = "Google\\Cloud\\Iam\\V3beta"; + +// Manages Identity and Access Management (IAM) principal access boundary +// policies. +service PrincipalAccessBoundaryPolicies { + option (google.api.default_host) = "iam.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a principal access boundary policy, and returns a long running + // operation. + rpc CreatePrincipalAccessBoundaryPolicy( + CreatePrincipalAccessBoundaryPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3beta/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies" + body: "principal_access_boundary_policy" + }; + option (google.api.method_signature) = + "parent,principal_access_boundary_policy,principal_access_boundary_policy_id"; + option (google.longrunning.operation_info) = { + response_type: "PrincipalAccessBoundaryPolicy" + metadata_type: "OperationMetadata" + }; + } + + // Gets a principal access boundary policy. + rpc GetPrincipalAccessBoundaryPolicy(GetPrincipalAccessBoundaryPolicyRequest) + returns (PrincipalAccessBoundaryPolicy) { + option (google.api.http) = { + get: "/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a principal access boundary policy. + rpc UpdatePrincipalAccessBoundaryPolicy( + UpdatePrincipalAccessBoundaryPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v3beta/{principal_access_boundary_policy.name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}" + body: "principal_access_boundary_policy" + }; + option (google.api.method_signature) = + "principal_access_boundary_policy,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "PrincipalAccessBoundaryPolicy" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a principal access boundary policy. + rpc DeletePrincipalAccessBoundaryPolicy( + DeletePrincipalAccessBoundaryPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists principal access boundary policies. + rpc ListPrincipalAccessBoundaryPolicies( + ListPrincipalAccessBoundaryPoliciesRequest) + returns (ListPrincipalAccessBoundaryPoliciesResponse) { + option (google.api.http) = { + get: "/v3beta/{parent=organizations/*/locations/*}/principalAccessBoundaryPolicies" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns all policy bindings that bind a specific policy if a user has + // searchPolicyBindings permission on that policy. + rpc SearchPrincipalAccessBoundaryPolicyBindings( + SearchPrincipalAccessBoundaryPolicyBindingsRequest) + returns (SearchPrincipalAccessBoundaryPolicyBindingsResponse) { + option (google.api.http) = { + get: "/v3beta/{name=organizations/*/locations/*/principalAccessBoundaryPolicies/*}:searchPolicyBindings" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for CreatePrincipalAccessBoundaryPolicyRequest method. +message CreatePrincipalAccessBoundaryPolicyRequest { + // Required. The parent resource where this principal access boundary policy + // will be created. Only organizations are supported. + // + // Format: + // `organizations/{organization_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "iam.googleapis.com/PrincipalAccessBoundaryPolicy" + } + ]; + + // Required. The ID to use for the principal access boundary policy, which + // will become the final component of the principal access boundary policy's + // resource name. + // + // This value must start with a lowercase letter followed by up to 62 + // lowercase letters, numbers, hyphens, or dots. Pattern, + // /[a-z][a-z0-9-\.]{2,62}/. + string principal_access_boundary_policy_id = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The principal access boundary policy to create. + PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, validate the request and preview the creation, but do not + // actually post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for GetPrincipalAccessBoundaryPolicy method. +message GetPrincipalAccessBoundaryPolicyRequest { + // Required. The name of the principal access boundary policy to retrieve. + // + // Format: + // `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/PrincipalAccessBoundaryPolicy" + } + ]; +} + +// Request message for UpdatePrincipalAccessBoundaryPolicy method. +message UpdatePrincipalAccessBoundaryPolicyRequest { + // Required. The principal access boundary policy to update. + // + // The principal access boundary policy's `name` field is used to identify the + // policy to update. + PrincipalAccessBoundaryPolicy principal_access_boundary_policy = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, validate the request and preview the update, but do not + // actually post it. + bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of fields to update + google.protobuf.FieldMask update_mask = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for DeletePrincipalAccessBoundaryPolicy method. +message DeletePrincipalAccessBoundaryPolicyRequest { + // Required. The name of the principal access boundary policy to delete. + // + // Format: + // `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/PrincipalAccessBoundaryPolicy" + } + ]; + + // Optional. The etag of the principal access boundary policy. + // If this is provided, it must match the server's etag. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the deletion, but do not + // actually post it. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request will force the deletion of the policy + // even if the policy is referenced in policy bindings. + bool force = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for ListPrincipalAccessBoundaryPolicies method. +message ListPrincipalAccessBoundaryPoliciesRequest { + // Required. The parent resource, which owns the collection of principal + // access boundary policies. + // + // Format: + // `organizations/{organization_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "iam.googleapis.com/PrincipalAccessBoundaryPolicy" + } + ]; + + // Optional. The maximum number of principal access boundary policies to + // return. The service may return fewer than this value. + // + // If unspecified, at most 50 principal access boundary policies will be + // returned. The maximum value is 1000; values above 1000 will be coerced to + // 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListPrincipalAccessBoundaryPolicies` call. Provide this to retrieve the + // subsequent page. + // + // When paginating, all other parameters provided to + // `ListPrincipalAccessBoundaryPolicies` must match the call that provided the + // page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListPrincipalAccessBoundaryPolicies method. +message ListPrincipalAccessBoundaryPoliciesResponse { + // The principal access boundary policies from the specified parent. + repeated PrincipalAccessBoundaryPolicy principal_access_boundary_policies = 1; + + // Optional. A token, which can be sent as `page_token` to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for SearchPrincipalAccessBoundaryPolicyBindings rpc. +message SearchPrincipalAccessBoundaryPolicyBindingsRequest { + // Required. The name of the principal access boundary policy. + // Format: + // `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/PrincipalAccessBoundaryPolicy" + } + ]; + + // Optional. The maximum number of policy bindings to return. The service may + // return fewer than this value. + // + // If unspecified, at most 50 policy bindings will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `SearchPrincipalAccessBoundaryPolicyBindingsRequest` call. Provide this to + // retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `SearchPrincipalAccessBoundaryPolicyBindingsRequest` must match the call + // that provided the page token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for SearchPrincipalAccessBoundaryPolicyBindings rpc. +message SearchPrincipalAccessBoundaryPolicyBindingsResponse { + // The policy bindings that reference the specified policy. + repeated PolicyBinding policy_bindings = 1; + + // Optional. A token, which can be sent as `page_token` to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-iam/proto-google-iam-v3beta/src/main/proto/google/iam/v3beta/principal_access_boundary_policy_resources.proto b/java-iam/proto-google-iam-v3beta/src/main/proto/google/iam/v3beta/principal_access_boundary_policy_resources.proto new file mode 100644 index 0000000000..738e0cc05c --- /dev/null +++ b/java-iam/proto-google-iam-v3beta/src/main/proto/google/iam/v3beta/principal_access_boundary_policy_resources.proto @@ -0,0 +1,128 @@ +// Copyright 2025 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 +// +// http://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. + +syntax = "proto3"; + +package google.iam.v3beta; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Iam.V3Beta"; +option go_package = "cloud.google.com/go/iam/apiv3beta/iampb;iampb"; +option java_multiple_files = true; +option java_outer_classname = "PrincipalAccessBoundaryPolicyResourcesProto"; +option java_package = "com.google.iam.v3beta"; +option php_namespace = "Google\\Cloud\\Iam\\V3beta"; + +// An IAM principal access boundary policy resource. +message PrincipalAccessBoundaryPolicy { + option (google.api.resource) = { + type: "iam.googleapis.com/PrincipalAccessBoundaryPolicy" + pattern: "organizations/{organization}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy}" + plural: "principalAccessBoundaryPolicies" + singular: "principalAccessBoundaryPolicy" + }; + + // Identifier. The resource name of the principal access boundary policy. + // + // The following format is supported: + // `organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{policy_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The globally unique ID of the principal access boundary + // policy. + string uid = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. The etag for the principal access boundary. + // If this is provided on update, it must match the server's etag. + string etag = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The description of the principal access boundary policy. Must be + // less than or equal to 63 characters. + string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User defined annotations. See + // https://google.aip.dev/148#annotations for more details such as format and + // size limitations + map annotations = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the principal access boundary policy was + // created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the principal access boundary policy was most + // recently updated. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The details for the principal access boundary policy. + PrincipalAccessBoundaryPolicyDetails details = 8 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Principal access boundary policy details +message PrincipalAccessBoundaryPolicyDetails { + // Required. A list of principal access boundary policy rules. The number of + // rules in a policy is limited to 500. + repeated PrincipalAccessBoundaryPolicyRule rules = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. + // The version number (for example, `1` or `latest`) that indicates which + // permissions are able to be blocked by the policy. If empty, the PAB policy + // version will be set to the most recent version number at the time of the + // policy's creation. + string enforcement_version = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Principal access boundary policy rule that defines the resource boundary. +message PrincipalAccessBoundaryPolicyRule { + // An effect to describe the access relationship. + enum Effect { + // Effect unspecified. + EFFECT_UNSPECIFIED = 0; + + // Allows access to the resources in this rule. + ALLOW = 1; + } + + // Optional. The description of the principal access boundary policy rule. + // Must be less than or equal to 256 characters. + string description = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. A list of Resource Manager resources. If a resource is listed in + // the rule, then the rule applies for that resource and its descendants. The + // number of resources in a policy is limited to 500 across all rules in the + // policy. + // + // The following resource types are supported: + // + // * Organizations, such as + // `//cloudresourcemanager.googleapis.com/organizations/123`. + // * Folders, such as `//cloudresourcemanager.googleapis.com/folders/123`. + // * Projects, such as `//cloudresourcemanager.googleapis.com/projects/123` + // or `//cloudresourcemanager.googleapis.com/projects/my-project-id`. + repeated string resources = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The access relationship of principals to the resources in this + // rule. + Effect effect = 3 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/versions.txt b/versions.txt index b3ceef9c28..0ee7af279b 100644 --- a/versions.txt +++ b/versions.txt @@ -22,3 +22,5 @@ proto-gapic-showcase-v1beta1:0.2.3:0.2.4-SNAPSHOT grpc-gapic-showcase-v1beta1:0.2.3:0.2.4-SNAPSHOT proto-google-iam-v3:1.50.3:1.50.4-SNAPSHOT grpc-google-iam-v3:1.50.3:1.50.4-SNAPSHOT +proto-google-iam-v3beta:1.50.3:1.50.4-SNAPSHOT +grpc-google-iam-v3beta:1.50.3:1.50.4-SNAPSHOT