Class Gateway.Builder

  • All Implemented Interfaces:
    GatewayOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Gateway

    public static final class Gateway.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Gateway.Builder>
    implements GatewayOrBuilder
     A Gateway is an API-aware HTTP proxy. It performs API-Method and/or
     API-Consumer specific actions based on an API Config such as authentication,
     policy enforcement, and backend selection.
     
    Protobuf type google.cloud.apigateway.v1.Gateway
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Gateway.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Gateway.Builder>
      • internalGetFieldAccessorTable

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

        public Gateway.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<Gateway.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<Gateway.Builder>
      • getDefaultInstanceForType

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

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

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

        public Gateway.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<Gateway.Builder>
      • setField

        public Gateway.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<Gateway.Builder>
      • clearField

        public Gateway.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<Gateway.Builder>
      • clearOneof

        public Gateway.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<Gateway.Builder>
      • setRepeatedField

        public Gateway.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<Gateway.Builder>
      • addRepeatedField

        public Gateway.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<Gateway.Builder>
      • mergeFrom

        public Gateway.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<Gateway.Builder>
      • isInitialized

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

        public Gateway.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<Gateway.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         Output only. Resource name of the Gateway.
         Format: projects/{project}/locations/{location}/gateways/{gateway}
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getName in interface GatewayOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Output only. Resource name of the Gateway.
         Format: projects/{project}/locations/{location}/gateways/{gateway}
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getNameBytes in interface GatewayOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Gateway.Builder setName​(String value)
         Output only. Resource name of the Gateway.
         Format: projects/{project}/locations/{location}/gateways/{gateway}
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Gateway.Builder clearName()
         Output only. Resource name of the Gateway.
         Format: projects/{project}/locations/{location}/gateways/{gateway}
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setNameBytes

        public Gateway.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Output only. Resource name of the Gateway.
         Format: projects/{project}/locations/{location}/gateways/{gateway}
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • hasCreateTime

        public boolean hasCreateTime()
         Output only. Created time.
         
        .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasCreateTime in interface GatewayOrBuilder
        Returns:
        Whether the createTime field is set.
      • getCreateTime

        public com.google.protobuf.Timestamp getCreateTime()
         Output only. Created time.
         
        .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTime in interface GatewayOrBuilder
        Returns:
        The createTime.
      • setCreateTime

        public Gateway.Builder setCreateTime​(com.google.protobuf.Timestamp value)
         Output only. Created time.
         
        .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setCreateTime

        public Gateway.Builder setCreateTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. Created time.
         
        .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeCreateTime

        public Gateway.Builder mergeCreateTime​(com.google.protobuf.Timestamp value)
         Output only. Created time.
         
        .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearCreateTime

        public Gateway.Builder clearCreateTime()
         Output only. Created time.
         
        .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeBuilder

        public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
         Output only. Created time.
         
        .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
         Output only. Created time.
         
        .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTimeOrBuilder in interface GatewayOrBuilder
      • hasUpdateTime

        public boolean hasUpdateTime()
         Output only. Updated time.
         
        .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasUpdateTime in interface GatewayOrBuilder
        Returns:
        Whether the updateTime field is set.
      • getUpdateTime

        public com.google.protobuf.Timestamp getUpdateTime()
         Output only. Updated time.
         
        .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUpdateTime in interface GatewayOrBuilder
        Returns:
        The updateTime.
      • setUpdateTime

        public Gateway.Builder setUpdateTime​(com.google.protobuf.Timestamp value)
         Output only. Updated time.
         
        .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setUpdateTime

        public Gateway.Builder setUpdateTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. Updated time.
         
        .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeUpdateTime

        public Gateway.Builder mergeUpdateTime​(com.google.protobuf.Timestamp value)
         Output only. Updated time.
         
        .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearUpdateTime

        public Gateway.Builder clearUpdateTime()
         Output only. Updated time.
         
        .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getUpdateTimeBuilder

        public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()
         Output only. Updated time.
         
        .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getUpdateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
         Output only. Updated time.
         
        .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUpdateTimeOrBuilder in interface GatewayOrBuilder
      • getLabelsCount

        public int getLabelsCount()
        Description copied from interface: GatewayOrBuilder
         Optional. Resource labels to represent user-provided metadata.
         Refer to cloud documentation on labels for more details.
         https://cloud.google.com/compute/docs/labeling-resources
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsCount in interface GatewayOrBuilder
      • containsLabels

        public boolean containsLabels​(String key)
         Optional. Resource labels to represent user-provided metadata.
         Refer to cloud documentation on labels for more details.
         https://cloud.google.com/compute/docs/labeling-resources
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        containsLabels in interface GatewayOrBuilder
      • getLabelsMap

        public Map<String,​String> getLabelsMap()
         Optional. Resource labels to represent user-provided metadata.
         Refer to cloud documentation on labels for more details.
         https://cloud.google.com/compute/docs/labeling-resources
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsMap in interface GatewayOrBuilder
      • getLabelsOrDefault

        public String getLabelsOrDefault​(String key,
                                         String defaultValue)
         Optional. Resource labels to represent user-provided metadata.
         Refer to cloud documentation on labels for more details.
         https://cloud.google.com/compute/docs/labeling-resources
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsOrDefault in interface GatewayOrBuilder
      • getLabelsOrThrow

        public String getLabelsOrThrow​(String key)
         Optional. Resource labels to represent user-provided metadata.
         Refer to cloud documentation on labels for more details.
         https://cloud.google.com/compute/docs/labeling-resources
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsOrThrow in interface GatewayOrBuilder
      • removeLabels

        public Gateway.Builder removeLabels​(String key)
         Optional. Resource labels to represent user-provided metadata.
         Refer to cloud documentation on labels for more details.
         https://cloud.google.com/compute/docs/labeling-resources
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
      • getMutableLabels

        @Deprecated
        public Map<String,​String> getMutableLabels()
        Deprecated.
        Use alternate mutation accessors instead.
      • putLabels

        public Gateway.Builder putLabels​(String key,
                                         String value)
         Optional. Resource labels to represent user-provided metadata.
         Refer to cloud documentation on labels for more details.
         https://cloud.google.com/compute/docs/labeling-resources
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
      • putAllLabels

        public Gateway.Builder putAllLabels​(Map<String,​String> values)
         Optional. Resource labels to represent user-provided metadata.
         Refer to cloud documentation on labels for more details.
         https://cloud.google.com/compute/docs/labeling-resources
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
      • getDisplayName

        public String getDisplayName()
         Optional. Display name.
         
        string display_name = 5 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDisplayName in interface GatewayOrBuilder
        Returns:
        The displayName.
      • getDisplayNameBytes

        public com.google.protobuf.ByteString getDisplayNameBytes()
         Optional. Display name.
         
        string display_name = 5 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDisplayNameBytes in interface GatewayOrBuilder
        Returns:
        The bytes for displayName.
      • setDisplayName

        public Gateway.Builder setDisplayName​(String value)
         Optional. Display name.
         
        string display_name = 5 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The displayName to set.
        Returns:
        This builder for chaining.
      • clearDisplayName

        public Gateway.Builder clearDisplayName()
         Optional. Display name.
         
        string display_name = 5 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • setDisplayNameBytes

        public Gateway.Builder setDisplayNameBytes​(com.google.protobuf.ByteString value)
         Optional. Display name.
         
        string display_name = 5 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The bytes for displayName to set.
        Returns:
        This builder for chaining.
      • getApiConfig

        public String getApiConfig()
         Required. Resource name of the API Config for this Gateway.
         Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}
         
        string api_config = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
        Specified by:
        getApiConfig in interface GatewayOrBuilder
        Returns:
        The apiConfig.
      • getApiConfigBytes

        public com.google.protobuf.ByteString getApiConfigBytes()
         Required. Resource name of the API Config for this Gateway.
         Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}
         
        string api_config = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
        Specified by:
        getApiConfigBytes in interface GatewayOrBuilder
        Returns:
        The bytes for apiConfig.
      • setApiConfig

        public Gateway.Builder setApiConfig​(String value)
         Required. Resource name of the API Config for this Gateway.
         Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}
         
        string api_config = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
        Parameters:
        value - The apiConfig to set.
        Returns:
        This builder for chaining.
      • clearApiConfig

        public Gateway.Builder clearApiConfig()
         Required. Resource name of the API Config for this Gateway.
         Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}
         
        string api_config = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
        Returns:
        This builder for chaining.
      • setApiConfigBytes

        public Gateway.Builder setApiConfigBytes​(com.google.protobuf.ByteString value)
         Required. Resource name of the API Config for this Gateway.
         Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}
         
        string api_config = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
        Parameters:
        value - The bytes for apiConfig to set.
        Returns:
        This builder for chaining.
      • getStateValue

        public int getStateValue()
         Output only. The current state of the Gateway.
         
        .google.cloud.apigateway.v1.Gateway.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getStateValue in interface GatewayOrBuilder
        Returns:
        The enum numeric value on the wire for state.
      • setStateValue

        public Gateway.Builder setStateValue​(int value)
         Output only. The current state of the Gateway.
         
        .google.cloud.apigateway.v1.Gateway.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The enum numeric value on the wire for state to set.
        Returns:
        This builder for chaining.
      • getState

        public Gateway.State getState()
         Output only. The current state of the Gateway.
         
        .google.cloud.apigateway.v1.Gateway.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getState in interface GatewayOrBuilder
        Returns:
        The state.
      • setState

        public Gateway.Builder setState​(Gateway.State value)
         Output only. The current state of the Gateway.
         
        .google.cloud.apigateway.v1.Gateway.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The state to set.
        Returns:
        This builder for chaining.
      • clearState

        public Gateway.Builder clearState()
         Output only. The current state of the Gateway.
         
        .google.cloud.apigateway.v1.Gateway.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • getDefaultHostname

        public String getDefaultHostname()
         Output only. The default API Gateway host name of the form
         `{gateway_id}-{hash}.{region_code}.gateway.dev`.
         
        string default_hostname = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getDefaultHostname in interface GatewayOrBuilder
        Returns:
        The defaultHostname.
      • getDefaultHostnameBytes

        public com.google.protobuf.ByteString getDefaultHostnameBytes()
         Output only. The default API Gateway host name of the form
         `{gateway_id}-{hash}.{region_code}.gateway.dev`.
         
        string default_hostname = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getDefaultHostnameBytes in interface GatewayOrBuilder
        Returns:
        The bytes for defaultHostname.
      • setDefaultHostname

        public Gateway.Builder setDefaultHostname​(String value)
         Output only. The default API Gateway host name of the form
         `{gateway_id}-{hash}.{region_code}.gateway.dev`.
         
        string default_hostname = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The defaultHostname to set.
        Returns:
        This builder for chaining.
      • clearDefaultHostname

        public Gateway.Builder clearDefaultHostname()
         Output only. The default API Gateway host name of the form
         `{gateway_id}-{hash}.{region_code}.gateway.dev`.
         
        string default_hostname = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setDefaultHostnameBytes

        public Gateway.Builder setDefaultHostnameBytes​(com.google.protobuf.ByteString value)
         Output only. The default API Gateway host name of the form
         `{gateway_id}-{hash}.{region_code}.gateway.dev`.
         
        string default_hostname = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The bytes for defaultHostname to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Gateway.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<Gateway.Builder>
      • mergeUnknownFields

        public final Gateway.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<Gateway.Builder>