All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.MethodPolicy Maven / Gradle / Ivy

/*
 * Copyright 2024 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/api/policy.proto

// Protobuf Java Version: 3.25.3
package com.google.api;

/**
 *
 *
 * 
 * Defines policies applying to an RPC method.
 * 
* * Protobuf type {@code google.api.MethodPolicy} */ public final class MethodPolicy extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.api.MethodPolicy) MethodPolicyOrBuilder { private static final long serialVersionUID = 0L; // Use MethodPolicy.newBuilder() to construct. private MethodPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MethodPolicy() { selector_ = ""; requestPolicies_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new MethodPolicy(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.PolicyProto.internal_static_google_api_MethodPolicy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.PolicyProto.internal_static_google_api_MethodPolicy_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.MethodPolicy.class, com.google.api.MethodPolicy.Builder.class); } public static final int SELECTOR_FIELD_NUMBER = 9; @SuppressWarnings("serial") private volatile java.lang.Object selector_ = ""; /** * * *
   * Selects a method to which these policies should be enforced, for example,
   * "google.pubsub.v1.Subscriber.CreateSubscription".
   *
   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
   * details.
   *
   * NOTE: This field must not be set in the proto annotation. It will be
   * automatically filled by the service config compiler .
   * 
* * string selector = 9; * * @return The selector. */ @java.lang.Override public java.lang.String getSelector() { java.lang.Object ref = selector_; 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(); selector_ = s; return s; } } /** * * *
   * Selects a method to which these policies should be enforced, for example,
   * "google.pubsub.v1.Subscriber.CreateSubscription".
   *
   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
   * details.
   *
   * NOTE: This field must not be set in the proto annotation. It will be
   * automatically filled by the service config compiler .
   * 
* * string selector = 9; * * @return The bytes for selector. */ @java.lang.Override public com.google.protobuf.ByteString getSelectorBytes() { java.lang.Object ref = selector_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); selector_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int REQUEST_POLICIES_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List requestPolicies_; /** * * *
   * Policies that are applicable to the request message.
   * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ @java.lang.Override public java.util.List getRequestPoliciesList() { return requestPolicies_; } /** * * *
   * Policies that are applicable to the request message.
   * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ @java.lang.Override public java.util.List getRequestPoliciesOrBuilderList() { return requestPolicies_; } /** * * *
   * Policies that are applicable to the request message.
   * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ @java.lang.Override public int getRequestPoliciesCount() { return requestPolicies_.size(); } /** * * *
   * Policies that are applicable to the request message.
   * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ @java.lang.Override public com.google.api.FieldPolicy getRequestPolicies(int index) { return requestPolicies_.get(index); } /** * * *
   * Policies that are applicable to the request message.
   * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ @java.lang.Override public com.google.api.FieldPolicyOrBuilder getRequestPoliciesOrBuilder(int index) { return requestPolicies_.get(index); } 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 < requestPolicies_.size(); i++) { output.writeMessage(2, requestPolicies_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selector_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, selector_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < requestPolicies_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, requestPolicies_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selector_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, selector_); } 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.api.MethodPolicy)) { return super.equals(obj); } com.google.api.MethodPolicy other = (com.google.api.MethodPolicy) obj; if (!getSelector().equals(other.getSelector())) return false; if (!getRequestPoliciesList().equals(other.getRequestPoliciesList())) 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) + SELECTOR_FIELD_NUMBER; hash = (53 * hash) + getSelector().hashCode(); if (getRequestPoliciesCount() > 0) { hash = (37 * hash) + REQUEST_POLICIES_FIELD_NUMBER; hash = (53 * hash) + getRequestPoliciesList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.api.MethodPolicy parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.MethodPolicy parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.api.MethodPolicy parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.MethodPolicy 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.api.MethodPolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.MethodPolicy parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.api.MethodPolicy parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.api.MethodPolicy 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.api.MethodPolicy parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.api.MethodPolicy 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.api.MethodPolicy parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.api.MethodPolicy 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.api.MethodPolicy 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; } /** * * *
   * Defines policies applying to an RPC method.
   * 
* * Protobuf type {@code google.api.MethodPolicy} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.api.MethodPolicy) com.google.api.MethodPolicyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.PolicyProto.internal_static_google_api_MethodPolicy_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.PolicyProto.internal_static_google_api_MethodPolicy_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.MethodPolicy.class, com.google.api.MethodPolicy.Builder.class); } // Construct using com.google.api.MethodPolicy.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; selector_ = ""; if (requestPoliciesBuilder_ == null) { requestPolicies_ = java.util.Collections.emptyList(); } else { requestPolicies_ = null; requestPoliciesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.api.PolicyProto.internal_static_google_api_MethodPolicy_descriptor; } @java.lang.Override public com.google.api.MethodPolicy getDefaultInstanceForType() { return com.google.api.MethodPolicy.getDefaultInstance(); } @java.lang.Override public com.google.api.MethodPolicy build() { com.google.api.MethodPolicy result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.api.MethodPolicy buildPartial() { com.google.api.MethodPolicy result = new com.google.api.MethodPolicy(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.google.api.MethodPolicy result) { if (requestPoliciesBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { requestPolicies_ = java.util.Collections.unmodifiableList(requestPolicies_); bitField0_ = (bitField0_ & ~0x00000002); } result.requestPolicies_ = requestPolicies_; } else { result.requestPolicies_ = requestPoliciesBuilder_.build(); } } private void buildPartial0(com.google.api.MethodPolicy result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.selector_ = selector_; } } @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.api.MethodPolicy) { return mergeFrom((com.google.api.MethodPolicy) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.api.MethodPolicy other) { if (other == com.google.api.MethodPolicy.getDefaultInstance()) return this; if (!other.getSelector().isEmpty()) { selector_ = other.selector_; bitField0_ |= 0x00000001; onChanged(); } if (requestPoliciesBuilder_ == null) { if (!other.requestPolicies_.isEmpty()) { if (requestPolicies_.isEmpty()) { requestPolicies_ = other.requestPolicies_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureRequestPoliciesIsMutable(); requestPolicies_.addAll(other.requestPolicies_); } onChanged(); } } else { if (!other.requestPolicies_.isEmpty()) { if (requestPoliciesBuilder_.isEmpty()) { requestPoliciesBuilder_.dispose(); requestPoliciesBuilder_ = null; requestPolicies_ = other.requestPolicies_; bitField0_ = (bitField0_ & ~0x00000002); requestPoliciesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getRequestPoliciesFieldBuilder() : null; } else { requestPoliciesBuilder_.addAllMessages(other.requestPolicies_); } } } 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 18: { com.google.api.FieldPolicy m = input.readMessage(com.google.api.FieldPolicy.parser(), extensionRegistry); if (requestPoliciesBuilder_ == null) { ensureRequestPoliciesIsMutable(); requestPolicies_.add(m); } else { requestPoliciesBuilder_.addMessage(m); } break; } // case 18 case 74: { selector_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 74 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 selector_ = ""; /** * * *
     * Selects a method to which these policies should be enforced, for example,
     * "google.pubsub.v1.Subscriber.CreateSubscription".
     *
     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
     * details.
     *
     * NOTE: This field must not be set in the proto annotation. It will be
     * automatically filled by the service config compiler .
     * 
* * string selector = 9; * * @return The selector. */ public java.lang.String getSelector() { java.lang.Object ref = selector_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); selector_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Selects a method to which these policies should be enforced, for example,
     * "google.pubsub.v1.Subscriber.CreateSubscription".
     *
     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
     * details.
     *
     * NOTE: This field must not be set in the proto annotation. It will be
     * automatically filled by the service config compiler .
     * 
* * string selector = 9; * * @return The bytes for selector. */ public com.google.protobuf.ByteString getSelectorBytes() { java.lang.Object ref = selector_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); selector_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Selects a method to which these policies should be enforced, for example,
     * "google.pubsub.v1.Subscriber.CreateSubscription".
     *
     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
     * details.
     *
     * NOTE: This field must not be set in the proto annotation. It will be
     * automatically filled by the service config compiler .
     * 
* * string selector = 9; * * @param value The selector to set. * @return This builder for chaining. */ public Builder setSelector(java.lang.String value) { if (value == null) { throw new NullPointerException(); } selector_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Selects a method to which these policies should be enforced, for example,
     * "google.pubsub.v1.Subscriber.CreateSubscription".
     *
     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
     * details.
     *
     * NOTE: This field must not be set in the proto annotation. It will be
     * automatically filled by the service config compiler .
     * 
* * string selector = 9; * * @return This builder for chaining. */ public Builder clearSelector() { selector_ = getDefaultInstance().getSelector(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * Selects a method to which these policies should be enforced, for example,
     * "google.pubsub.v1.Subscriber.CreateSubscription".
     *
     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
     * details.
     *
     * NOTE: This field must not be set in the proto annotation. It will be
     * automatically filled by the service config compiler .
     * 
* * string selector = 9; * * @param value The bytes for selector to set. * @return This builder for chaining. */ public Builder setSelectorBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); selector_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.util.List requestPolicies_ = java.util.Collections.emptyList(); private void ensureRequestPoliciesIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { requestPolicies_ = new java.util.ArrayList(requestPolicies_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.api.FieldPolicy, com.google.api.FieldPolicy.Builder, com.google.api.FieldPolicyOrBuilder> requestPoliciesBuilder_; /** * * *
     * Policies that are applicable to the request message.
     * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ public java.util.List getRequestPoliciesList() { if (requestPoliciesBuilder_ == null) { return java.util.Collections.unmodifiableList(requestPolicies_); } else { return requestPoliciesBuilder_.getMessageList(); } } /** * * *
     * Policies that are applicable to the request message.
     * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ public int getRequestPoliciesCount() { if (requestPoliciesBuilder_ == null) { return requestPolicies_.size(); } else { return requestPoliciesBuilder_.getCount(); } } /** * * *
     * Policies that are applicable to the request message.
     * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ public com.google.api.FieldPolicy getRequestPolicies(int index) { if (requestPoliciesBuilder_ == null) { return requestPolicies_.get(index); } else { return requestPoliciesBuilder_.getMessage(index); } } /** * * *
     * Policies that are applicable to the request message.
     * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ public Builder setRequestPolicies(int index, com.google.api.FieldPolicy value) { if (requestPoliciesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRequestPoliciesIsMutable(); requestPolicies_.set(index, value); onChanged(); } else { requestPoliciesBuilder_.setMessage(index, value); } return this; } /** * * *
     * Policies that are applicable to the request message.
     * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ public Builder setRequestPolicies( int index, com.google.api.FieldPolicy.Builder builderForValue) { if (requestPoliciesBuilder_ == null) { ensureRequestPoliciesIsMutable(); requestPolicies_.set(index, builderForValue.build()); onChanged(); } else { requestPoliciesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Policies that are applicable to the request message.
     * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ public Builder addRequestPolicies(com.google.api.FieldPolicy value) { if (requestPoliciesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRequestPoliciesIsMutable(); requestPolicies_.add(value); onChanged(); } else { requestPoliciesBuilder_.addMessage(value); } return this; } /** * * *
     * Policies that are applicable to the request message.
     * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ public Builder addRequestPolicies(int index, com.google.api.FieldPolicy value) { if (requestPoliciesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureRequestPoliciesIsMutable(); requestPolicies_.add(index, value); onChanged(); } else { requestPoliciesBuilder_.addMessage(index, value); } return this; } /** * * *
     * Policies that are applicable to the request message.
     * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ public Builder addRequestPolicies(com.google.api.FieldPolicy.Builder builderForValue) { if (requestPoliciesBuilder_ == null) { ensureRequestPoliciesIsMutable(); requestPolicies_.add(builderForValue.build()); onChanged(); } else { requestPoliciesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Policies that are applicable to the request message.
     * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ public Builder addRequestPolicies( int index, com.google.api.FieldPolicy.Builder builderForValue) { if (requestPoliciesBuilder_ == null) { ensureRequestPoliciesIsMutable(); requestPolicies_.add(index, builderForValue.build()); onChanged(); } else { requestPoliciesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Policies that are applicable to the request message.
     * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ public Builder addAllRequestPolicies( java.lang.Iterable values) { if (requestPoliciesBuilder_ == null) { ensureRequestPoliciesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requestPolicies_); onChanged(); } else { requestPoliciesBuilder_.addAllMessages(values); } return this; } /** * * *
     * Policies that are applicable to the request message.
     * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ public Builder clearRequestPolicies() { if (requestPoliciesBuilder_ == null) { requestPolicies_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { requestPoliciesBuilder_.clear(); } return this; } /** * * *
     * Policies that are applicable to the request message.
     * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ public Builder removeRequestPolicies(int index) { if (requestPoliciesBuilder_ == null) { ensureRequestPoliciesIsMutable(); requestPolicies_.remove(index); onChanged(); } else { requestPoliciesBuilder_.remove(index); } return this; } /** * * *
     * Policies that are applicable to the request message.
     * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ public com.google.api.FieldPolicy.Builder getRequestPoliciesBuilder(int index) { return getRequestPoliciesFieldBuilder().getBuilder(index); } /** * * *
     * Policies that are applicable to the request message.
     * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ public com.google.api.FieldPolicyOrBuilder getRequestPoliciesOrBuilder(int index) { if (requestPoliciesBuilder_ == null) { return requestPolicies_.get(index); } else { return requestPoliciesBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Policies that are applicable to the request message.
     * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ public java.util.List getRequestPoliciesOrBuilderList() { if (requestPoliciesBuilder_ != null) { return requestPoliciesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(requestPolicies_); } } /** * * *
     * Policies that are applicable to the request message.
     * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ public com.google.api.FieldPolicy.Builder addRequestPoliciesBuilder() { return getRequestPoliciesFieldBuilder() .addBuilder(com.google.api.FieldPolicy.getDefaultInstance()); } /** * * *
     * Policies that are applicable to the request message.
     * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ public com.google.api.FieldPolicy.Builder addRequestPoliciesBuilder(int index) { return getRequestPoliciesFieldBuilder() .addBuilder(index, com.google.api.FieldPolicy.getDefaultInstance()); } /** * * *
     * Policies that are applicable to the request message.
     * 
* * repeated .google.api.FieldPolicy request_policies = 2; */ public java.util.List getRequestPoliciesBuilderList() { return getRequestPoliciesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.api.FieldPolicy, com.google.api.FieldPolicy.Builder, com.google.api.FieldPolicyOrBuilder> getRequestPoliciesFieldBuilder() { if (requestPoliciesBuilder_ == null) { requestPoliciesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.api.FieldPolicy, com.google.api.FieldPolicy.Builder, com.google.api.FieldPolicyOrBuilder>( requestPolicies_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); requestPolicies_ = null; } return requestPoliciesBuilder_; } @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.api.MethodPolicy) } // @@protoc_insertion_point(class_scope:google.api.MethodPolicy) private static final com.google.api.MethodPolicy DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.api.MethodPolicy(); } public static com.google.api.MethodPolicy getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public MethodPolicy 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.api.MethodPolicy getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy