Class Location.Builder

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

    public static final class Location.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Location.Builder>
    implements LocationOrBuilder
     A resource that represents Google Cloud Platform location.
     
    Protobuf type google.cloud.location.Location
    • 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<Location.Builder>
      • internalGetMutableMapField

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public String getName()
         Resource name for the location, which may vary between implementations.
         For example: `"projects/example-project/locations/us-east1"`
         
        string name = 1;
        Specified by:
        getName in interface LocationOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Resource name for the location, which may vary between implementations.
         For example: `"projects/example-project/locations/us-east1"`
         
        string name = 1;
        Specified by:
        getNameBytes in interface LocationOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Location.Builder setName​(String value)
         Resource name for the location, which may vary between implementations.
         For example: `"projects/example-project/locations/us-east1"`
         
        string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Location.Builder clearName()
         Resource name for the location, which may vary between implementations.
         For example: `"projects/example-project/locations/us-east1"`
         
        string name = 1;
        Returns:
        This builder for chaining.
      • setNameBytes

        public Location.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Resource name for the location, which may vary between implementations.
         For example: `"projects/example-project/locations/us-east1"`
         
        string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getLocationId

        public String getLocationId()
         The canonical id for this location. For example: `"us-east1"`.
         
        string location_id = 4;
        Specified by:
        getLocationId in interface LocationOrBuilder
        Returns:
        The locationId.
      • getLocationIdBytes

        public com.google.protobuf.ByteString getLocationIdBytes()
         The canonical id for this location. For example: `"us-east1"`.
         
        string location_id = 4;
        Specified by:
        getLocationIdBytes in interface LocationOrBuilder
        Returns:
        The bytes for locationId.
      • setLocationId

        public Location.Builder setLocationId​(String value)
         The canonical id for this location. For example: `"us-east1"`.
         
        string location_id = 4;
        Parameters:
        value - The locationId to set.
        Returns:
        This builder for chaining.
      • clearLocationId

        public Location.Builder clearLocationId()
         The canonical id for this location. For example: `"us-east1"`.
         
        string location_id = 4;
        Returns:
        This builder for chaining.
      • setLocationIdBytes

        public Location.Builder setLocationIdBytes​(com.google.protobuf.ByteString value)
         The canonical id for this location. For example: `"us-east1"`.
         
        string location_id = 4;
        Parameters:
        value - The bytes for locationId to set.
        Returns:
        This builder for chaining.
      • getDisplayName

        public String getDisplayName()
         The friendly name for this location, typically a nearby city name.
         For example, "Tokyo".
         
        string display_name = 5;
        Specified by:
        getDisplayName in interface LocationOrBuilder
        Returns:
        The displayName.
      • getDisplayNameBytes

        public com.google.protobuf.ByteString getDisplayNameBytes()
         The friendly name for this location, typically a nearby city name.
         For example, "Tokyo".
         
        string display_name = 5;
        Specified by:
        getDisplayNameBytes in interface LocationOrBuilder
        Returns:
        The bytes for displayName.
      • setDisplayName

        public Location.Builder setDisplayName​(String value)
         The friendly name for this location, typically a nearby city name.
         For example, "Tokyo".
         
        string display_name = 5;
        Parameters:
        value - The displayName to set.
        Returns:
        This builder for chaining.
      • clearDisplayName

        public Location.Builder clearDisplayName()
         The friendly name for this location, typically a nearby city name.
         For example, "Tokyo".
         
        string display_name = 5;
        Returns:
        This builder for chaining.
      • setDisplayNameBytes

        public Location.Builder setDisplayNameBytes​(com.google.protobuf.ByteString value)
         The friendly name for this location, typically a nearby city name.
         For example, "Tokyo".
         
        string display_name = 5;
        Parameters:
        value - The bytes for displayName to set.
        Returns:
        This builder for chaining.
      • getLabelsCount

        public int getLabelsCount()
        Description copied from interface: LocationOrBuilder
         Cross-service attributes for the location. For example
             {"cloud.googleapis.com/region": "us-east1"}
         
        map<string, string> labels = 2;
        Specified by:
        getLabelsCount in interface LocationOrBuilder
      • containsLabels

        public boolean containsLabels​(String key)
         Cross-service attributes for the location. For example
             {"cloud.googleapis.com/region": "us-east1"}
         
        map<string, string> labels = 2;
        Specified by:
        containsLabels in interface LocationOrBuilder
      • getLabelsMap

        public Map<String,​String> getLabelsMap()
         Cross-service attributes for the location. For example
             {"cloud.googleapis.com/region": "us-east1"}
         
        map<string, string> labels = 2;
        Specified by:
        getLabelsMap in interface LocationOrBuilder
      • getLabelsOrDefault

        public String getLabelsOrDefault​(String key,
                                         String defaultValue)
         Cross-service attributes for the location. For example
             {"cloud.googleapis.com/region": "us-east1"}
         
        map<string, string> labels = 2;
        Specified by:
        getLabelsOrDefault in interface LocationOrBuilder
      • getLabelsOrThrow

        public String getLabelsOrThrow​(String key)
         Cross-service attributes for the location. For example
             {"cloud.googleapis.com/region": "us-east1"}
         
        map<string, string> labels = 2;
        Specified by:
        getLabelsOrThrow in interface LocationOrBuilder
      • removeLabels

        public Location.Builder removeLabels​(String key)
         Cross-service attributes for the location. For example
             {"cloud.googleapis.com/region": "us-east1"}
         
        map<string, string> labels = 2;
      • getMutableLabels

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

        public Location.Builder putLabels​(String key,
                                          String value)
         Cross-service attributes for the location. For example
             {"cloud.googleapis.com/region": "us-east1"}
         
        map<string, string> labels = 2;
      • putAllLabels

        public Location.Builder putAllLabels​(Map<String,​String> values)
         Cross-service attributes for the location. For example
             {"cloud.googleapis.com/region": "us-east1"}
         
        map<string, string> labels = 2;
      • hasMetadata

        public boolean hasMetadata()
         Service-specific metadata. For example the available capacity at the given
         location.
         
        .google.protobuf.Any metadata = 3;
        Specified by:
        hasMetadata in interface LocationOrBuilder
        Returns:
        Whether the metadata field is set.
      • getMetadata

        public com.google.protobuf.Any getMetadata()
         Service-specific metadata. For example the available capacity at the given
         location.
         
        .google.protobuf.Any metadata = 3;
        Specified by:
        getMetadata in interface LocationOrBuilder
        Returns:
        The metadata.
      • setMetadata

        public Location.Builder setMetadata​(com.google.protobuf.Any value)
         Service-specific metadata. For example the available capacity at the given
         location.
         
        .google.protobuf.Any metadata = 3;
      • setMetadata

        public Location.Builder setMetadata​(com.google.protobuf.Any.Builder builderForValue)
         Service-specific metadata. For example the available capacity at the given
         location.
         
        .google.protobuf.Any metadata = 3;
      • mergeMetadata

        public Location.Builder mergeMetadata​(com.google.protobuf.Any value)
         Service-specific metadata. For example the available capacity at the given
         location.
         
        .google.protobuf.Any metadata = 3;
      • clearMetadata

        public Location.Builder clearMetadata()
         Service-specific metadata. For example the available capacity at the given
         location.
         
        .google.protobuf.Any metadata = 3;
      • getMetadataBuilder

        public com.google.protobuf.Any.Builder getMetadataBuilder()
         Service-specific metadata. For example the available capacity at the given
         location.
         
        .google.protobuf.Any metadata = 3;
      • getMetadataOrBuilder

        public com.google.protobuf.AnyOrBuilder getMetadataOrBuilder()
         Service-specific metadata. For example the available capacity at the given
         location.
         
        .google.protobuf.Any metadata = 3;
        Specified by:
        getMetadataOrBuilder in interface LocationOrBuilder
      • setUnknownFields

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

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