Class BackendRule

  • All Implemented Interfaces:
    BackendRuleOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class BackendRule
    extends com.google.protobuf.GeneratedMessageV3
    implements BackendRuleOrBuilder
     A backend rule provides configuration for an individual API element.
     
    Protobuf type google.api.BackendRule
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  BackendRule.AuthenticationCase  
      static class  BackendRule.Builder
      A backend rule provides configuration for an individual API element.
      static class  BackendRule.PathTranslation
      Path Translation specifies how to combine the backend address with the request path in order to produce the appropriate forwarding URL for the request.
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,​BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,​BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • 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
      • 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.
      • 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.
      • 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.
      • getMinDeadline

        @Deprecated
        public double getMinDeadline()
        Deprecated.
        google.api.BackendRule.min_deadline is deprecated. See google/api/backend.proto;l=123
         Deprecated, do not use.
         
        double min_deadline = 4 [deprecated = true];
        Specified by:
        getMinDeadline in interface BackendRuleOrBuilder
        Returns:
        The minDeadline.
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static BackendRule parseFrom​(ByteBuffer data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BackendRule parseFrom​(ByteBuffer data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BackendRule parseFrom​(com.google.protobuf.ByteString data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BackendRule parseFrom​(com.google.protobuf.ByteString data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BackendRule parseFrom​(byte[] data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BackendRule parseFrom​(byte[] data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BackendRule parseFrom​(com.google.protobuf.CodedInputStream input,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws IOException
        Throws:
        IOException
      • newBuilderForType

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

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

        protected BackendRule.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static BackendRule getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<BackendRule> parser()
      • getParserForType

        public com.google.protobuf.Parser<BackendRule> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

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