Class Api.Builder

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

    public static final class Api.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Api.Builder>
    implements ApiOrBuilder
     An API that can be served by one or more Gateways.
     
    Protobuf type google.cloud.apigateway.v1.Api
    • 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<Api.Builder>
      • internalGetMutableMapField

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public Api.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Output only. Resource name of the API.
         Format: projects/{project}/locations/global/apis/{api}
         
        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 ApiOrBuilder
        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 ApiOrBuilder
        Returns:
        The createTime.
      • setCreateTime

        public Api.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 Api.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 Api.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 Api.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 ApiOrBuilder
      • 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 ApiOrBuilder
        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 ApiOrBuilder
        Returns:
        The updateTime.
      • setUpdateTime

        public Api.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 Api.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 Api.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 Api.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 ApiOrBuilder
      • getLabelsCount

        public int getLabelsCount()
        Description copied from interface: ApiOrBuilder
         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 ApiOrBuilder
      • 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 ApiOrBuilder
      • 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 ApiOrBuilder
      • 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 ApiOrBuilder
      • 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 ApiOrBuilder
      • removeLabels

        public Api.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 Api.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 Api.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 ApiOrBuilder
        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 ApiOrBuilder
        Returns:
        The bytes for displayName.
      • setDisplayName

        public Api.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 Api.Builder clearDisplayName()
         Optional. Display name.
         
        string display_name = 5 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • setDisplayNameBytes

        public Api.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.
      • getManagedService

        public String getManagedService()
         Optional. Immutable. The name of a Google Managed Service (
         https://cloud.google.com/service-infrastructure/docs/glossary#managed). If
         not specified, a new Service will automatically be created in the same
         project as this API.
         
        string managed_service = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
        Specified by:
        getManagedService in interface ApiOrBuilder
        Returns:
        The managedService.
      • getManagedServiceBytes

        public com.google.protobuf.ByteString getManagedServiceBytes()
         Optional. Immutable. The name of a Google Managed Service (
         https://cloud.google.com/service-infrastructure/docs/glossary#managed). If
         not specified, a new Service will automatically be created in the same
         project as this API.
         
        string managed_service = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
        Specified by:
        getManagedServiceBytes in interface ApiOrBuilder
        Returns:
        The bytes for managedService.
      • setManagedService

        public Api.Builder setManagedService​(String value)
         Optional. Immutable. The name of a Google Managed Service (
         https://cloud.google.com/service-infrastructure/docs/glossary#managed). If
         not specified, a new Service will automatically be created in the same
         project as this API.
         
        string managed_service = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
        Parameters:
        value - The managedService to set.
        Returns:
        This builder for chaining.
      • clearManagedService

        public Api.Builder clearManagedService()
         Optional. Immutable. The name of a Google Managed Service (
         https://cloud.google.com/service-infrastructure/docs/glossary#managed). If
         not specified, a new Service will automatically be created in the same
         project as this API.
         
        string managed_service = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
        Returns:
        This builder for chaining.
      • setManagedServiceBytes

        public Api.Builder setManagedServiceBytes​(com.google.protobuf.ByteString value)
         Optional. Immutable. The name of a Google Managed Service (
         https://cloud.google.com/service-infrastructure/docs/glossary#managed). If
         not specified, a new Service will automatically be created in the same
         project as this API.
         
        string managed_service = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
        Parameters:
        value - The bytes for managedService to set.
        Returns:
        This builder for chaining.
      • getStateValue

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

        public Api.Builder setStateValue​(int value)
         Output only. State of the API.
         
        .google.cloud.apigateway.v1.Api.State state = 12 [(.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 Api.State getState()
         Output only. State of the API.
         
        .google.cloud.apigateway.v1.Api.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getState in interface ApiOrBuilder
        Returns:
        The state.
      • setState

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

        public Api.Builder clearState()
         Output only. State of the API.
         
        .google.cloud.apigateway.v1.Api.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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