Class BackendRule.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<BackendRule.Builder>
com.google.api.BackendRule.Builder
All Implemented Interfaces:
BackendRuleOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
BackendRule

public static final class BackendRule.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<BackendRule.Builder> implements BackendRuleOrBuilder
 A backend rule provides configuration for an individual API element.
 
Protobuf type google.api.BackendRule
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<BackendRule.Builder>
    • clear

      public BackendRule.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<BackendRule.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<BackendRule.Builder>
    • getDefaultInstanceForType

      public BackendRule getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public BackendRule build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public BackendRule buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public BackendRule.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<BackendRule.Builder>
    • setField

      public BackendRule.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<BackendRule.Builder>
    • clearField

      public BackendRule.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<BackendRule.Builder>
    • clearOneof

      public BackendRule.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<BackendRule.Builder>
    • setRepeatedField

      public BackendRule.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<BackendRule.Builder>
    • addRepeatedField

      public BackendRule.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<BackendRule.Builder>
    • mergeFrom

      public BackendRule.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<BackendRule.Builder>
    • mergeFrom

      public BackendRule.Builder mergeFrom(BackendRule other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<BackendRule.Builder>
    • mergeFrom

      public BackendRule.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<BackendRule.Builder>
      Throws:
      IOException
    • getAuthenticationCase

      public BackendRule.AuthenticationCase getAuthenticationCase()
      Specified by:
      getAuthenticationCase in interface BackendRuleOrBuilder
    • clearAuthentication

      public BackendRule.Builder clearAuthentication()
    • getSelector

      public String getSelector()
       Selects the methods to which this rule applies.
       Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
       
      string selector = 1;
      Specified by:
      getSelector in interface BackendRuleOrBuilder
      Returns:
      The selector.
    • getSelectorBytes

      public com.google.protobuf.ByteString getSelectorBytes()
       Selects the methods to which this rule applies.
       Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
       
      string selector = 1;
      Specified by:
      getSelectorBytes in interface BackendRuleOrBuilder
      Returns:
      The bytes for selector.
    • setSelector

      public BackendRule.Builder setSelector(String value)
       Selects the methods to which this rule applies.
       Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
       
      string selector = 1;
      Parameters:
      value - The selector to set.
      Returns:
      This builder for chaining.
    • clearSelector

      public BackendRule.Builder clearSelector()
       Selects the methods to which this rule applies.
       Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
       
      string selector = 1;
      Returns:
      This builder for chaining.
    • setSelectorBytes

      public BackendRule.Builder setSelectorBytes(com.google.protobuf.ByteString value)
       Selects the methods to which this rule applies.
       Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
       
      string selector = 1;
      Parameters:
      value - The bytes for selector to set.
      Returns:
      This builder for chaining.
    • getAddress

      public String getAddress()
       The address of the API backend.
       The scheme is used to determine the backend protocol and security.
       The following schemes are accepted:
          SCHEME        PROTOCOL    SECURITY
          http://       HTTP        None
          https://      HTTP        TLS
          grpc://       gRPC        None
          grpcs://      gRPC        TLS
       It is recommended to explicitly include a scheme. Leaving out the scheme
       may cause constrasting behaviors across platforms.
       If the port is unspecified, the default is:
       - 80 for schemes without TLS
       - 443 for schemes with TLS
       For HTTP backends, use [protocol][google.api.BackendRule.protocol]
       to specify the protocol version.
       
      string address = 2;
      Specified by:
      getAddress in interface BackendRuleOrBuilder
      Returns:
      The address.
    • getAddressBytes

      public com.google.protobuf.ByteString getAddressBytes()
       The address of the API backend.
       The scheme is used to determine the backend protocol and security.
       The following schemes are accepted:
          SCHEME        PROTOCOL    SECURITY
          http://       HTTP        None
          https://      HTTP        TLS
          grpc://       gRPC        None
          grpcs://      gRPC        TLS
       It is recommended to explicitly include a scheme. Leaving out the scheme
       may cause constrasting behaviors across platforms.
       If the port is unspecified, the default is:
       - 80 for schemes without TLS
       - 443 for schemes with TLS
       For HTTP backends, use [protocol][google.api.BackendRule.protocol]
       to specify the protocol version.
       
      string address = 2;
      Specified by:
      getAddressBytes in interface BackendRuleOrBuilder
      Returns:
      The bytes for address.
    • setAddress

      public BackendRule.Builder setAddress(String value)
       The address of the API backend.
       The scheme is used to determine the backend protocol and security.
       The following schemes are accepted:
          SCHEME        PROTOCOL    SECURITY
          http://       HTTP        None
          https://      HTTP        TLS
          grpc://       gRPC        None
          grpcs://      gRPC        TLS
       It is recommended to explicitly include a scheme. Leaving out the scheme
       may cause constrasting behaviors across platforms.
       If the port is unspecified, the default is:
       - 80 for schemes without TLS
       - 443 for schemes with TLS
       For HTTP backends, use [protocol][google.api.BackendRule.protocol]
       to specify the protocol version.
       
      string address = 2;
      Parameters:
      value - The address to set.
      Returns:
      This builder for chaining.
    • clearAddress

      public BackendRule.Builder clearAddress()
       The address of the API backend.
       The scheme is used to determine the backend protocol and security.
       The following schemes are accepted:
          SCHEME        PROTOCOL    SECURITY
          http://       HTTP        None
          https://      HTTP        TLS
          grpc://       gRPC        None
          grpcs://      gRPC        TLS
       It is recommended to explicitly include a scheme. Leaving out the scheme
       may cause constrasting behaviors across platforms.
       If the port is unspecified, the default is:
       - 80 for schemes without TLS
       - 443 for schemes with TLS
       For HTTP backends, use [protocol][google.api.BackendRule.protocol]
       to specify the protocol version.
       
      string address = 2;
      Returns:
      This builder for chaining.
    • setAddressBytes

      public BackendRule.Builder setAddressBytes(com.google.protobuf.ByteString value)
       The address of the API backend.
       The scheme is used to determine the backend protocol and security.
       The following schemes are accepted:
          SCHEME        PROTOCOL    SECURITY
          http://       HTTP        None
          https://      HTTP        TLS
          grpc://       gRPC        None
          grpcs://      gRPC        TLS
       It is recommended to explicitly include a scheme. Leaving out the scheme
       may cause constrasting behaviors across platforms.
       If the port is unspecified, the default is:
       - 80 for schemes without TLS
       - 443 for schemes with TLS
       For HTTP backends, use [protocol][google.api.BackendRule.protocol]
       to specify the protocol version.
       
      string address = 2;
      Parameters:
      value - The bytes for address to set.
      Returns:
      This builder for chaining.
    • getDeadline

      public double getDeadline()
       The number of seconds to wait for a response from a request. The default
       varies based on the request protocol and deployment environment.
       
      double deadline = 3;
      Specified by:
      getDeadline in interface BackendRuleOrBuilder
      Returns:
      The deadline.
    • setDeadline

      public BackendRule.Builder setDeadline(double value)
       The number of seconds to wait for a response from a request. The default
       varies based on the request protocol and deployment environment.
       
      double deadline = 3;
      Parameters:
      value - The deadline to set.
      Returns:
      This builder for chaining.
    • clearDeadline

      public BackendRule.Builder clearDeadline()
       The number of seconds to wait for a response from a request. The default
       varies based on the request protocol and deployment environment.
       
      double deadline = 3;
      Returns:
      This builder for chaining.
    • getMinDeadline

      public double getMinDeadline()
       Minimum deadline in seconds needed for this method. Calls having deadline
       value lower than this will be rejected.
       
      double min_deadline = 4;
      Specified by:
      getMinDeadline in interface BackendRuleOrBuilder
      Returns:
      The minDeadline.
    • setMinDeadline

      public BackendRule.Builder setMinDeadline(double value)
       Minimum deadline in seconds needed for this method. Calls having deadline
       value lower than this will be rejected.
       
      double min_deadline = 4;
      Parameters:
      value - The minDeadline to set.
      Returns:
      This builder for chaining.
    • clearMinDeadline

      public BackendRule.Builder clearMinDeadline()
       Minimum deadline in seconds needed for this method. Calls having deadline
       value lower than this will be rejected.
       
      double min_deadline = 4;
      Returns:
      This builder for chaining.
    • getOperationDeadline

      public double getOperationDeadline()
       The number of seconds to wait for the completion of a long running
       operation. The default is no deadline.
       
      double operation_deadline = 5;
      Specified by:
      getOperationDeadline in interface BackendRuleOrBuilder
      Returns:
      The operationDeadline.
    • setOperationDeadline

      public BackendRule.Builder setOperationDeadline(double value)
       The number of seconds to wait for the completion of a long running
       operation. The default is no deadline.
       
      double operation_deadline = 5;
      Parameters:
      value - The operationDeadline to set.
      Returns:
      This builder for chaining.
    • clearOperationDeadline

      public BackendRule.Builder clearOperationDeadline()
       The number of seconds to wait for the completion of a long running
       operation. The default is no deadline.
       
      double operation_deadline = 5;
      Returns:
      This builder for chaining.
    • getPathTranslationValue

      public int getPathTranslationValue()
      .google.api.BackendRule.PathTranslation path_translation = 6;
      Specified by:
      getPathTranslationValue in interface BackendRuleOrBuilder
      Returns:
      The enum numeric value on the wire for pathTranslation.
    • setPathTranslationValue

      public BackendRule.Builder setPathTranslationValue(int value)
      .google.api.BackendRule.PathTranslation path_translation = 6;
      Parameters:
      value - The enum numeric value on the wire for pathTranslation to set.
      Returns:
      This builder for chaining.
    • getPathTranslation

      public BackendRule.PathTranslation getPathTranslation()
      .google.api.BackendRule.PathTranslation path_translation = 6;
      Specified by:
      getPathTranslation in interface BackendRuleOrBuilder
      Returns:
      The pathTranslation.
    • setPathTranslation

      public BackendRule.Builder setPathTranslation(BackendRule.PathTranslation value)
      .google.api.BackendRule.PathTranslation path_translation = 6;
      Parameters:
      value - The pathTranslation to set.
      Returns:
      This builder for chaining.
    • clearPathTranslation

      public BackendRule.Builder clearPathTranslation()
      .google.api.BackendRule.PathTranslation path_translation = 6;
      Returns:
      This builder for chaining.
    • hasJwtAudience

      public boolean hasJwtAudience()
       The JWT audience is used when generating a JWT ID token for the backend.
       This ID token will be added in the HTTP "authorization" header, and sent
       to the backend.
       
      string jwt_audience = 7;
      Specified by:
      hasJwtAudience in interface BackendRuleOrBuilder
      Returns:
      Whether the jwtAudience field is set.
    • getJwtAudience

      public String getJwtAudience()
       The JWT audience is used when generating a JWT ID token for the backend.
       This ID token will be added in the HTTP "authorization" header, and sent
       to the backend.
       
      string jwt_audience = 7;
      Specified by:
      getJwtAudience in interface BackendRuleOrBuilder
      Returns:
      The jwtAudience.
    • getJwtAudienceBytes

      public com.google.protobuf.ByteString getJwtAudienceBytes()
       The JWT audience is used when generating a JWT ID token for the backend.
       This ID token will be added in the HTTP "authorization" header, and sent
       to the backend.
       
      string jwt_audience = 7;
      Specified by:
      getJwtAudienceBytes in interface BackendRuleOrBuilder
      Returns:
      The bytes for jwtAudience.
    • setJwtAudience

      public BackendRule.Builder setJwtAudience(String value)
       The JWT audience is used when generating a JWT ID token for the backend.
       This ID token will be added in the HTTP "authorization" header, and sent
       to the backend.
       
      string jwt_audience = 7;
      Parameters:
      value - The jwtAudience to set.
      Returns:
      This builder for chaining.
    • clearJwtAudience

      public BackendRule.Builder clearJwtAudience()
       The JWT audience is used when generating a JWT ID token for the backend.
       This ID token will be added in the HTTP "authorization" header, and sent
       to the backend.
       
      string jwt_audience = 7;
      Returns:
      This builder for chaining.
    • setJwtAudienceBytes

      public BackendRule.Builder setJwtAudienceBytes(com.google.protobuf.ByteString value)
       The JWT audience is used when generating a JWT ID token for the backend.
       This ID token will be added in the HTTP "authorization" header, and sent
       to the backend.
       
      string jwt_audience = 7;
      Parameters:
      value - The bytes for jwtAudience to set.
      Returns:
      This builder for chaining.
    • hasDisableAuth

      public boolean hasDisableAuth()
       When disable_auth is true, a JWT ID token won't be generated and the
       original "Authorization" HTTP header will be preserved. If the header is
       used to carry the original token and is expected by the backend, this
       field must be set to true to preserve the header.
       
      bool disable_auth = 8;
      Specified by:
      hasDisableAuth in interface BackendRuleOrBuilder
      Returns:
      Whether the disableAuth field is set.
    • getDisableAuth

      public boolean getDisableAuth()
       When disable_auth is true, a JWT ID token won't be generated and the
       original "Authorization" HTTP header will be preserved. If the header is
       used to carry the original token and is expected by the backend, this
       field must be set to true to preserve the header.
       
      bool disable_auth = 8;
      Specified by:
      getDisableAuth in interface BackendRuleOrBuilder
      Returns:
      The disableAuth.
    • setDisableAuth

      public BackendRule.Builder setDisableAuth(boolean value)
       When disable_auth is true, a JWT ID token won't be generated and the
       original "Authorization" HTTP header will be preserved. If the header is
       used to carry the original token and is expected by the backend, this
       field must be set to true to preserve the header.
       
      bool disable_auth = 8;
      Parameters:
      value - The disableAuth to set.
      Returns:
      This builder for chaining.
    • clearDisableAuth

      public BackendRule.Builder clearDisableAuth()
       When disable_auth is true, a JWT ID token won't be generated and the
       original "Authorization" HTTP header will be preserved. If the header is
       used to carry the original token and is expected by the backend, this
       field must be set to true to preserve the header.
       
      bool disable_auth = 8;
      Returns:
      This builder for chaining.
    • getProtocol

      public String getProtocol()
       The protocol used for sending a request to the backend.
       The supported values are "http/1.1" and "h2".
       The default value is inferred from the scheme in the
       [address][google.api.BackendRule.address] field:
          SCHEME        PROTOCOL
          http://       http/1.1
          https://      http/1.1
          grpc://       h2
          grpcs://      h2
       For secure HTTP backends (https://) that support HTTP/2, set this field
       to "h2" for improved performance.
       Configuring this field to non-default values is only supported for secure
       HTTP backends. This field will be ignored for all other backends.
       See
       https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
       for more details on the supported values.
       
      string protocol = 9;
      Specified by:
      getProtocol in interface BackendRuleOrBuilder
      Returns:
      The protocol.
    • getProtocolBytes

      public com.google.protobuf.ByteString getProtocolBytes()
       The protocol used for sending a request to the backend.
       The supported values are "http/1.1" and "h2".
       The default value is inferred from the scheme in the
       [address][google.api.BackendRule.address] field:
          SCHEME        PROTOCOL
          http://       http/1.1
          https://      http/1.1
          grpc://       h2
          grpcs://      h2
       For secure HTTP backends (https://) that support HTTP/2, set this field
       to "h2" for improved performance.
       Configuring this field to non-default values is only supported for secure
       HTTP backends. This field will be ignored for all other backends.
       See
       https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
       for more details on the supported values.
       
      string protocol = 9;
      Specified by:
      getProtocolBytes in interface BackendRuleOrBuilder
      Returns:
      The bytes for protocol.
    • setProtocol

      public BackendRule.Builder setProtocol(String value)
       The protocol used for sending a request to the backend.
       The supported values are "http/1.1" and "h2".
       The default value is inferred from the scheme in the
       [address][google.api.BackendRule.address] field:
          SCHEME        PROTOCOL
          http://       http/1.1
          https://      http/1.1
          grpc://       h2
          grpcs://      h2
       For secure HTTP backends (https://) that support HTTP/2, set this field
       to "h2" for improved performance.
       Configuring this field to non-default values is only supported for secure
       HTTP backends. This field will be ignored for all other backends.
       See
       https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
       for more details on the supported values.
       
      string protocol = 9;
      Parameters:
      value - The protocol to set.
      Returns:
      This builder for chaining.
    • clearProtocol

      public BackendRule.Builder clearProtocol()
       The protocol used for sending a request to the backend.
       The supported values are "http/1.1" and "h2".
       The default value is inferred from the scheme in the
       [address][google.api.BackendRule.address] field:
          SCHEME        PROTOCOL
          http://       http/1.1
          https://      http/1.1
          grpc://       h2
          grpcs://      h2
       For secure HTTP backends (https://) that support HTTP/2, set this field
       to "h2" for improved performance.
       Configuring this field to non-default values is only supported for secure
       HTTP backends. This field will be ignored for all other backends.
       See
       https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
       for more details on the supported values.
       
      string protocol = 9;
      Returns:
      This builder for chaining.
    • setProtocolBytes

      public BackendRule.Builder setProtocolBytes(com.google.protobuf.ByteString value)
       The protocol used for sending a request to the backend.
       The supported values are "http/1.1" and "h2".
       The default value is inferred from the scheme in the
       [address][google.api.BackendRule.address] field:
          SCHEME        PROTOCOL
          http://       http/1.1
          https://      http/1.1
          grpc://       h2
          grpcs://      h2
       For secure HTTP backends (https://) that support HTTP/2, set this field
       to "h2" for improved performance.
       Configuring this field to non-default values is only supported for secure
       HTTP backends. This field will be ignored for all other backends.
       See
       https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
       for more details on the supported values.
       
      string protocol = 9;
      Parameters:
      value - The bytes for protocol to set.
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final BackendRule.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<BackendRule.Builder>
    • mergeUnknownFields

      public final BackendRule.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<BackendRule.Builder>