Class Location.Builder

  • All Implemented Interfaces:
    LocationOrBuilder, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.lang.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 Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      Location.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)  
      Location build()  
      Location buildPartial()  
      Location.Builder clear()  
      Location.Builder clearDisplayName()
      The friendly name for this location, typically a nearby city name.
      Location.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)  
      Location.Builder clearLabels()  
      Location.Builder clearLocationId()
      The canonical id for this location.
      Location.Builder clearMetadata()
      Service-specific metadata.
      Location.Builder clearName()
      Resource name for the location, which may vary between implementations.
      Location.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)  
      Location.Builder clone()  
      boolean containsLabels​(java.lang.String key)
      Cross-service attributes for the location.
      Location getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      com.google.protobuf.Descriptors.Descriptor getDescriptorForType()  
      java.lang.String getDisplayName()
      The friendly name for this location, typically a nearby city name.
      com.google.protobuf.ByteString getDisplayNameBytes()
      The friendly name for this location, typically a nearby city name.
      java.util.Map<java.lang.String,​java.lang.String> getLabels()
      Deprecated.
      int getLabelsCount()
      Cross-service attributes for the location.
      java.util.Map<java.lang.String,​java.lang.String> getLabelsMap()
      Cross-service attributes for the location.
      java.lang.String getLabelsOrDefault​(java.lang.String key, java.lang.String defaultValue)
      Cross-service attributes for the location.
      java.lang.String getLabelsOrThrow​(java.lang.String key)
      Cross-service attributes for the location.
      java.lang.String getLocationId()
      The canonical id for this location.
      com.google.protobuf.ByteString getLocationIdBytes()
      The canonical id for this location.
      com.google.protobuf.Any getMetadata()
      Service-specific metadata.
      com.google.protobuf.Any.Builder getMetadataBuilder()
      Service-specific metadata.
      com.google.protobuf.AnyOrBuilder getMetadataOrBuilder()
      Service-specific metadata.
      java.util.Map<java.lang.String,​java.lang.String> getMutableLabels()
      Deprecated.
      java.lang.String getName()
      Resource name for the location, which may vary between implementations.
      com.google.protobuf.ByteString getNameBytes()
      Resource name for the location, which may vary between implementations.
      boolean hasMetadata()
      Service-specific metadata.
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()  
      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection​(int number)  
      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection​(int number)  
      boolean isInitialized()  
      Location.Builder mergeFrom​(Location other)  
      Location.Builder mergeFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      Location.Builder mergeFrom​(com.google.protobuf.Message other)  
      Location.Builder mergeMetadata​(com.google.protobuf.Any value)
      Service-specific metadata.
      Location.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)  
      Location.Builder putAllLabels​(java.util.Map<java.lang.String,​java.lang.String> values)
      Cross-service attributes for the location.
      Location.Builder putLabels​(java.lang.String key, java.lang.String value)
      Cross-service attributes for the location.
      Location.Builder removeLabels​(java.lang.String key)
      Cross-service attributes for the location.
      Location.Builder setDisplayName​(java.lang.String value)
      The friendly name for this location, typically a nearby city name.
      Location.Builder setDisplayNameBytes​(com.google.protobuf.ByteString value)
      The friendly name for this location, typically a nearby city name.
      Location.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)  
      Location.Builder setLocationId​(java.lang.String value)
      The canonical id for this location.
      Location.Builder setLocationIdBytes​(com.google.protobuf.ByteString value)
      The canonical id for this location.
      Location.Builder setMetadata​(com.google.protobuf.Any value)
      Service-specific metadata.
      Location.Builder setMetadata​(com.google.protobuf.Any.Builder builderForValue)
      Service-specific metadata.
      Location.Builder setName​(java.lang.String value)
      Resource name for the location, which may vary between implementations.
      Location.Builder setNameBytes​(com.google.protobuf.ByteString value)
      Resource name for the location, which may vary between implementations.
      Location.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)  
      Location.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)  
      • Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder

        getParentForChildren
      • Methods inherited from class com.google.protobuf.GeneratedMessage.ExtendableBuilder

        addExtension, clearExtension, extensionsAreInitialized, getAllFields, getExtension, getExtension, getExtensionCount, getField, getFieldBuilder, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, hasExtension, hasField, mergeExtensionFields, newBuilderForField, parseUnknownField, setExtension, setExtension
      • Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

        getOneofFieldDescriptor, getUnknownFields, getUnknownFieldSetBuilder, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, onBuilt, onChanged, setUnknownFieldSetBuilder, setUnknownFieldsProto3
      • Methods inherited from class com.google.protobuf.AbstractMessage.Builder

        findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
      • Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

        addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.google.protobuf.Message.Builder

        mergeDelimitedFrom, mergeDelimitedFrom
      • Methods inherited from interface com.google.protobuf.MessageLite.Builder

        mergeFrom
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection​(int number)
        Overrides:
        internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<Location.Builder>
      • internalGetMutableMapFieldReflection

        protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection​(int number)
        Overrides:
        internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<Location.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Overrides:
        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.GeneratedMessage.Builder<Location.Builder>
      • getDefaultInstanceForType

        public Location getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
        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,
                                         java.lang.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,
                                                 java.lang.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,
                                                 java.lang.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.GeneratedMessage.ExtendableBuilder<com.google.protobuf.GeneratedMessageV3,​Location.Builder>
      • mergeFrom

        public Location.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws java.io.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:
        java.io.IOException
      • getName

        public java.lang.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​(java.lang.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 java.lang.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​(java.lang.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 java.lang.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​(java.lang.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​(java.lang.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 java.util.Map<java.lang.String,​java.lang.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 java.lang.String getLabelsOrDefault​(java.lang.String key,
                                                   java.lang.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 java.lang.String getLabelsOrThrow​(java.lang.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​(java.lang.String key)
         Cross-service attributes for the location. For example
        
             {"cloud.googleapis.com/region": "us-east1"}
         
        map<string, string> labels = 2;
      • getMutableLabels

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

        public Location.Builder putLabels​(java.lang.String key,
                                          java.lang.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​(java.util.Map<java.lang.String,​java.lang.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>