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

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

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/api/backend.proto

package com.google.api;

/**
 * 
 * A backend rule provides configuration for an individual API element.
 * 
* * Protobuf type {@code google.api.BackendRule} */ public final class BackendRule extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.api.BackendRule) BackendRuleOrBuilder { private static final long serialVersionUID = 0L; // Use BackendRule.newBuilder() to construct. private BackendRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private BackendRule() { selector_ = ""; address_ = ""; pathTranslation_ = 0; } @Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private BackendRule( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { String s = input.readStringRequireUtf8(); selector_ = s; break; } case 18: { String s = input.readStringRequireUtf8(); address_ = s; break; } case 25: { deadline_ = input.readDouble(); break; } case 33: { minDeadline_ = input.readDouble(); break; } case 41: { operationDeadline_ = input.readDouble(); break; } case 48: { int rawValue = input.readEnum(); pathTranslation_ = rawValue; break; } case 58: { String s = input.readStringRequireUtf8(); authenticationCase_ = 7; authentication_ = s; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.BackendProto.internal_static_google_api_BackendRule_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.BackendProto.internal_static_google_api_BackendRule_fieldAccessorTable .ensureFieldAccessorsInitialized( BackendRule.class, Builder.class); } /** *
   * Path Translation specifies how to combine the backend address with the
   * request path in order to produce the appropriate forwarding URL for the
   * request.
   * Path Translation is applicable only to HTTP-based backends. Backends which
   * do not accept requests over HTTP/HTTPS should leave `path_translation`
   * unspecified.
   * 
* * Protobuf enum {@code google.api.BackendRule.PathTranslation} */ public enum PathTranslation implements com.google.protobuf.ProtocolMessageEnum { /** * PATH_TRANSLATION_UNSPECIFIED = 0; */ PATH_TRANSLATION_UNSPECIFIED(0), /** *
     * Use the backend address as-is, with no modification to the path. If the
     * URL pattern contains variables, the variable names and values will be
     * appended to the query string. If a query string parameter and a URL
     * pattern variable have the same name, this may result in duplicate keys in
     * the query string.
     * # Examples
     * Given the following operation config:
     *     Method path:        /api/company/{cid}/user/{uid}
     *     Backend address:    https://example.cloudfunctions.net/getUser
     * Requests to the following request paths will call the backend at the
     * translated path:
     *     Request path: /api/company/widgetworks/user/johndoe
     *     Translated:
     *     https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe
     *     Request path: /api/company/widgetworks/user/johndoe?timezone=EST
     *     Translated:
     *     https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe
     * 
* * CONSTANT_ADDRESS = 1; */ CONSTANT_ADDRESS(1), /** *
     * The request path will be appended to the backend address.
     * # Examples
     * Given the following operation config:
     *     Method path:        /api/company/{cid}/user/{uid}
     *     Backend address:    https://example.appspot.com
     * Requests to the following request paths will call the backend at the
     * translated path:
     *     Request path: /api/company/widgetworks/user/johndoe
     *     Translated:
     *     https://example.appspot.com/api/company/widgetworks/user/johndoe
     *     Request path: /api/company/widgetworks/user/johndoe?timezone=EST
     *     Translated:
     *     https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST
     * 
* * APPEND_PATH_TO_ADDRESS = 2; */ APPEND_PATH_TO_ADDRESS(2), UNRECOGNIZED(-1), ; /** * PATH_TRANSLATION_UNSPECIFIED = 0; */ public static final int PATH_TRANSLATION_UNSPECIFIED_VALUE = 0; /** *
     * Use the backend address as-is, with no modification to the path. If the
     * URL pattern contains variables, the variable names and values will be
     * appended to the query string. If a query string parameter and a URL
     * pattern variable have the same name, this may result in duplicate keys in
     * the query string.
     * # Examples
     * Given the following operation config:
     *     Method path:        /api/company/{cid}/user/{uid}
     *     Backend address:    https://example.cloudfunctions.net/getUser
     * Requests to the following request paths will call the backend at the
     * translated path:
     *     Request path: /api/company/widgetworks/user/johndoe
     *     Translated:
     *     https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe
     *     Request path: /api/company/widgetworks/user/johndoe?timezone=EST
     *     Translated:
     *     https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe
     * 
* * CONSTANT_ADDRESS = 1; */ public static final int CONSTANT_ADDRESS_VALUE = 1; /** *
     * The request path will be appended to the backend address.
     * # Examples
     * Given the following operation config:
     *     Method path:        /api/company/{cid}/user/{uid}
     *     Backend address:    https://example.appspot.com
     * Requests to the following request paths will call the backend at the
     * translated path:
     *     Request path: /api/company/widgetworks/user/johndoe
     *     Translated:
     *     https://example.appspot.com/api/company/widgetworks/user/johndoe
     *     Request path: /api/company/widgetworks/user/johndoe?timezone=EST
     *     Translated:
     *     https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST
     * 
* * APPEND_PATH_TO_ADDRESS = 2; */ public static final int APPEND_PATH_TO_ADDRESS_VALUE = 2; public final int getNumber() { if (this == UNRECOGNIZED) { throw new IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @Deprecated public static PathTranslation valueOf(int value) { return forNumber(value); } public static PathTranslation forNumber(int value) { switch (value) { case 0: return PATH_TRANSLATION_UNSPECIFIED; case 1: return CONSTANT_ADDRESS; case 2: return APPEND_PATH_TO_ADDRESS; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< PathTranslation> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public PathTranslation findValueByNumber(int number) { return PathTranslation.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 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 BackendRule.getDescriptor().getEnumTypes().get(0); } private static final PathTranslation[] VALUES = values(); public static PathTranslation valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private PathTranslation(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.api.BackendRule.PathTranslation) } private int authenticationCase_ = 0; private Object authentication_; public enum AuthenticationCase implements com.google.protobuf.Internal.EnumLite { JWT_AUDIENCE(7), AUTHENTICATION_NOT_SET(0); private final int value; private AuthenticationCase(int value) { this.value = value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @Deprecated public static AuthenticationCase valueOf(int value) { return forNumber(value); } public static AuthenticationCase forNumber(int value) { switch (value) { case 7: return JWT_AUDIENCE; case 0: return AUTHENTICATION_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public AuthenticationCase getAuthenticationCase() { return AuthenticationCase.forNumber( authenticationCase_); } public static final int SELECTOR_FIELD_NUMBER = 1; private volatile Object selector_; /** *
   * Selects the methods to which this rule applies.
   * Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
   * 
* * string selector = 1; */ public String getSelector() { Object ref = selector_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); selector_ = s; return s; } } /** *
   * Selects the methods to which this rule applies.
   * Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
   * 
* * string selector = 1; */ public com.google.protobuf.ByteString getSelectorBytes() { Object ref = selector_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); selector_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ADDRESS_FIELD_NUMBER = 2; private volatile Object address_; /** *
   * The address of the API backend.
   * 
* * string address = 2; */ public String getAddress() { Object ref = address_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); address_ = s; return s; } } /** *
   * The address of the API backend.
   * 
* * string address = 2; */ public com.google.protobuf.ByteString getAddressBytes() { Object ref = address_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); address_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DEADLINE_FIELD_NUMBER = 3; private double deadline_; /** *
   * The number of seconds to wait for a response from a request.  The default
   * deadline for gRPC is infinite (no deadline) and HTTP requests is 5 seconds.
   * 
* * double deadline = 3; */ public double getDeadline() { return deadline_; } public static final int MIN_DEADLINE_FIELD_NUMBER = 4; private double minDeadline_; /** *
   * Minimum deadline in seconds needed for this method. Calls having deadline
   * value lower than this will be rejected.
   * 
* * double min_deadline = 4; */ public double getMinDeadline() { return minDeadline_; } public static final int OPERATION_DEADLINE_FIELD_NUMBER = 5; private double operationDeadline_; /** *
   * The number of seconds to wait for the completion of a long running
   * operation. The default is no deadline.
   * 
* * double operation_deadline = 5; */ public double getOperationDeadline() { return operationDeadline_; } public static final int PATH_TRANSLATION_FIELD_NUMBER = 6; private int pathTranslation_; /** * .google.api.BackendRule.PathTranslation path_translation = 6; */ public int getPathTranslationValue() { return pathTranslation_; } /** * .google.api.BackendRule.PathTranslation path_translation = 6; */ public PathTranslation getPathTranslation() { @SuppressWarnings("deprecation") PathTranslation result = PathTranslation.valueOf(pathTranslation_); return result == null ? PathTranslation.UNRECOGNIZED : result; } public static final int JWT_AUDIENCE_FIELD_NUMBER = 7; /** *
   * The JWT audience is used when generating a JWT id token for the backend.
   * 
* * string jwt_audience = 7; */ public String getJwtAudience() { Object ref = ""; if (authenticationCase_ == 7) { ref = authentication_; } if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (authenticationCase_ == 7) { authentication_ = s; } return s; } } /** *
   * The JWT audience is used when generating a JWT id token for the backend.
   * 
* * string jwt_audience = 7; */ public com.google.protobuf.ByteString getJwtAudienceBytes() { Object ref = ""; if (authenticationCase_ == 7) { ref = authentication_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); if (authenticationCase_ == 7) { authentication_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getSelectorBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, selector_); } if (!getAddressBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, address_); } if (deadline_ != 0D) { output.writeDouble(3, deadline_); } if (minDeadline_ != 0D) { output.writeDouble(4, minDeadline_); } if (operationDeadline_ != 0D) { output.writeDouble(5, operationDeadline_); } if (pathTranslation_ != PathTranslation.PATH_TRANSLATION_UNSPECIFIED.getNumber()) { output.writeEnum(6, pathTranslation_); } if (authenticationCase_ == 7) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, authentication_); } unknownFields.writeTo(output); } @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getSelectorBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, selector_); } if (!getAddressBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, address_); } if (deadline_ != 0D) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(3, deadline_); } if (minDeadline_ != 0D) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(4, minDeadline_); } if (operationDeadline_ != 0D) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(5, operationDeadline_); } if (pathTranslation_ != PathTranslation.PATH_TRANSLATION_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(6, pathTranslation_); } if (authenticationCase_ == 7) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, authentication_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof BackendRule)) { return super.equals(obj); } BackendRule other = (BackendRule) obj; if (!getSelector() .equals(other.getSelector())) return false; if (!getAddress() .equals(other.getAddress())) return false; if (Double.doubleToLongBits(getDeadline()) != Double.doubleToLongBits( other.getDeadline())) return false; if (Double.doubleToLongBits(getMinDeadline()) != Double.doubleToLongBits( other.getMinDeadline())) return false; if (Double.doubleToLongBits(getOperationDeadline()) != Double.doubleToLongBits( other.getOperationDeadline())) return false; if (pathTranslation_ != other.pathTranslation_) return false; if (!getAuthenticationCase().equals(other.getAuthenticationCase())) return false; switch (authenticationCase_) { case 7: if (!getJwtAudience() .equals(other.getJwtAudience())) return false; break; case 0: default: } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @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(); hash = (37 * hash) + ADDRESS_FIELD_NUMBER; hash = (53 * hash) + getAddress().hashCode(); hash = (37 * hash) + DEADLINE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( Double.doubleToLongBits(getDeadline())); hash = (37 * hash) + MIN_DEADLINE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( Double.doubleToLongBits(getMinDeadline())); hash = (37 * hash) + OPERATION_DEADLINE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( Double.doubleToLongBits(getOperationDeadline())); hash = (37 * hash) + PATH_TRANSLATION_FIELD_NUMBER; hash = (53 * hash) + pathTranslation_; switch (authenticationCase_) { case 7: hash = (37 * hash) + JWT_AUDIENCE_FIELD_NUMBER; hash = (53 * hash) + getJwtAudience().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static BackendRule parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static BackendRule parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static BackendRule parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static BackendRule parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static BackendRule parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static BackendRule parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static BackendRule parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static BackendRule 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 BackendRule parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static BackendRule 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 BackendRule parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static BackendRule parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(BackendRule prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @Override protected Builder newBuilderForType( BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * A backend rule provides configuration for an individual API element.
   * 
* * Protobuf type {@code google.api.BackendRule} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.api.BackendRule) com.google.api.BackendRuleOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.BackendProto.internal_static_google_api_BackendRule_descriptor; } @Override protected FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.BackendProto.internal_static_google_api_BackendRule_fieldAccessorTable .ensureFieldAccessorsInitialized( BackendRule.class, Builder.class); } // Construct using com.google.api.BackendRule.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @Override public Builder clear() { super.clear(); selector_ = ""; address_ = ""; deadline_ = 0D; minDeadline_ = 0D; operationDeadline_ = 0D; pathTranslation_ = 0; authenticationCase_ = 0; authentication_ = null; return this; } @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.api.BackendProto.internal_static_google_api_BackendRule_descriptor; } @Override public BackendRule getDefaultInstanceForType() { return BackendRule.getDefaultInstance(); } @Override public BackendRule build() { BackendRule result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @Override public BackendRule buildPartial() { BackendRule result = new BackendRule(this); result.selector_ = selector_; result.address_ = address_; result.deadline_ = deadline_; result.minDeadline_ = minDeadline_; result.operationDeadline_ = operationDeadline_; result.pathTranslation_ = pathTranslation_; if (authenticationCase_ == 7) { result.authentication_ = authentication_; } result.authenticationCase_ = authenticationCase_; onBuilt(); return result; } @Override public Builder clone() { return super.clone(); } @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.setField(field, value); } @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return super.setRepeatedField(field, index, value); } @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return super.addRepeatedField(field, value); } @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof BackendRule) { return mergeFrom((BackendRule)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(BackendRule other) { if (other == BackendRule.getDefaultInstance()) return this; if (!other.getSelector().isEmpty()) { selector_ = other.selector_; onChanged(); } if (!other.getAddress().isEmpty()) { address_ = other.address_; onChanged(); } if (other.getDeadline() != 0D) { setDeadline(other.getDeadline()); } if (other.getMinDeadline() != 0D) { setMinDeadline(other.getMinDeadline()); } if (other.getOperationDeadline() != 0D) { setOperationDeadline(other.getOperationDeadline()); } if (other.pathTranslation_ != 0) { setPathTranslationValue(other.getPathTranslationValue()); } switch (other.getAuthenticationCase()) { case JWT_AUDIENCE: { authenticationCase_ = 7; authentication_ = other.authentication_; onChanged(); break; } case AUTHENTICATION_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @Override public final boolean isInitialized() { return true; } @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { BackendRule parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (BackendRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int authenticationCase_ = 0; private Object authentication_; public AuthenticationCase getAuthenticationCase() { return AuthenticationCase.forNumber( authenticationCase_); } public Builder clearAuthentication() { authenticationCase_ = 0; authentication_ = null; onChanged(); return this; } private Object selector_ = ""; /** *
     * Selects the methods to which this rule applies.
     * Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
     * 
* * string selector = 1; */ public String getSelector() { Object ref = selector_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); selector_ = s; return s; } else { return (String) ref; } } /** *
     * Selects the methods to which this rule applies.
     * Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
     * 
* * string selector = 1; */ public com.google.protobuf.ByteString getSelectorBytes() { Object ref = selector_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); selector_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Selects the methods to which this rule applies.
     * Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
     * 
* * string selector = 1; */ public Builder setSelector( String value) { if (value == null) { throw new NullPointerException(); } selector_ = value; onChanged(); return this; } /** *
     * Selects the methods to which this rule applies.
     * Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
     * 
* * string selector = 1; */ public Builder clearSelector() { selector_ = getDefaultInstance().getSelector(); onChanged(); return this; } /** *
     * Selects the methods to which this rule applies.
     * Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
     * 
* * string selector = 1; */ public Builder setSelectorBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); selector_ = value; onChanged(); return this; } private Object address_ = ""; /** *
     * The address of the API backend.
     * 
* * string address = 2; */ public String getAddress() { Object ref = address_; if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); address_ = s; return s; } else { return (String) ref; } } /** *
     * The address of the API backend.
     * 
* * string address = 2; */ public com.google.protobuf.ByteString getAddressBytes() { Object ref = address_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); address_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * The address of the API backend.
     * 
* * string address = 2; */ public Builder setAddress( String value) { if (value == null) { throw new NullPointerException(); } address_ = value; onChanged(); return this; } /** *
     * The address of the API backend.
     * 
* * string address = 2; */ public Builder clearAddress() { address_ = getDefaultInstance().getAddress(); onChanged(); return this; } /** *
     * The address of the API backend.
     * 
* * string address = 2; */ public Builder setAddressBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); address_ = value; onChanged(); return this; } private double deadline_ ; /** *
     * The number of seconds to wait for a response from a request.  The default
     * deadline for gRPC is infinite (no deadline) and HTTP requests is 5 seconds.
     * 
* * double deadline = 3; */ public double getDeadline() { return deadline_; } /** *
     * The number of seconds to wait for a response from a request.  The default
     * deadline for gRPC is infinite (no deadline) and HTTP requests is 5 seconds.
     * 
* * double deadline = 3; */ public Builder setDeadline(double value) { deadline_ = value; onChanged(); return this; } /** *
     * The number of seconds to wait for a response from a request.  The default
     * deadline for gRPC is infinite (no deadline) and HTTP requests is 5 seconds.
     * 
* * double deadline = 3; */ public Builder clearDeadline() { deadline_ = 0D; onChanged(); return this; } private double minDeadline_ ; /** *
     * Minimum deadline in seconds needed for this method. Calls having deadline
     * value lower than this will be rejected.
     * 
* * double min_deadline = 4; */ public double getMinDeadline() { return minDeadline_; } /** *
     * Minimum deadline in seconds needed for this method. Calls having deadline
     * value lower than this will be rejected.
     * 
* * double min_deadline = 4; */ public Builder setMinDeadline(double value) { minDeadline_ = value; onChanged(); return this; } /** *
     * Minimum deadline in seconds needed for this method. Calls having deadline
     * value lower than this will be rejected.
     * 
* * double min_deadline = 4; */ public Builder clearMinDeadline() { minDeadline_ = 0D; onChanged(); return this; } private double operationDeadline_ ; /** *
     * The number of seconds to wait for the completion of a long running
     * operation. The default is no deadline.
     * 
* * double operation_deadline = 5; */ public double getOperationDeadline() { return operationDeadline_; } /** *
     * The number of seconds to wait for the completion of a long running
     * operation. The default is no deadline.
     * 
* * double operation_deadline = 5; */ public Builder setOperationDeadline(double value) { operationDeadline_ = value; onChanged(); return this; } /** *
     * The number of seconds to wait for the completion of a long running
     * operation. The default is no deadline.
     * 
* * double operation_deadline = 5; */ public Builder clearOperationDeadline() { operationDeadline_ = 0D; onChanged(); return this; } private int pathTranslation_ = 0; /** * .google.api.BackendRule.PathTranslation path_translation = 6; */ public int getPathTranslationValue() { return pathTranslation_; } /** * .google.api.BackendRule.PathTranslation path_translation = 6; */ public Builder setPathTranslationValue(int value) { pathTranslation_ = value; onChanged(); return this; } /** * .google.api.BackendRule.PathTranslation path_translation = 6; */ public PathTranslation getPathTranslation() { @SuppressWarnings("deprecation") PathTranslation result = PathTranslation.valueOf(pathTranslation_); return result == null ? PathTranslation.UNRECOGNIZED : result; } /** * .google.api.BackendRule.PathTranslation path_translation = 6; */ public Builder setPathTranslation(PathTranslation value) { if (value == null) { throw new NullPointerException(); } pathTranslation_ = value.getNumber(); onChanged(); return this; } /** * .google.api.BackendRule.PathTranslation path_translation = 6; */ public Builder clearPathTranslation() { pathTranslation_ = 0; onChanged(); return this; } /** *
     * The JWT audience is used when generating a JWT id token for the backend.
     * 
* * string jwt_audience = 7; */ public String getJwtAudience() { Object ref = ""; if (authenticationCase_ == 7) { ref = authentication_; } if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (authenticationCase_ == 7) { authentication_ = s; } return s; } else { return (String) ref; } } /** *
     * The JWT audience is used when generating a JWT id token for the backend.
     * 
* * string jwt_audience = 7; */ public com.google.protobuf.ByteString getJwtAudienceBytes() { Object ref = ""; if (authenticationCase_ == 7) { ref = authentication_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (String) ref); if (authenticationCase_ == 7) { authentication_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * The JWT audience is used when generating a JWT id token for the backend.
     * 
* * string jwt_audience = 7; */ public Builder setJwtAudience( String value) { if (value == null) { throw new NullPointerException(); } authenticationCase_ = 7; authentication_ = value; onChanged(); return this; } /** *
     * The JWT audience is used when generating a JWT id token for the backend.
     * 
* * string jwt_audience = 7; */ public Builder clearJwtAudience() { if (authenticationCase_ == 7) { authenticationCase_ = 0; authentication_ = null; onChanged(); } return this; } /** *
     * The JWT audience is used when generating a JWT id token for the backend.
     * 
* * string jwt_audience = 7; */ public Builder setJwtAudienceBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); authenticationCase_ = 7; authentication_ = value; onChanged(); return this; } @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.api.BackendRule) } // @@protoc_insertion_point(class_scope:google.api.BackendRule) private static final BackendRule DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new BackendRule(); } public static BackendRule getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @Override public BackendRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new BackendRule(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @Override public BackendRule getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy