Class PutMetadata (0.2.0)

public final class PutMetadata extends GeneratedMessageV3 implements PutMetadataOrBuilder

Describes options for object metadata update.

Protobuf type google.cloud.storagebatchoperations.v1.PutMetadata

Static Fields

CACHE_CONTROL_FIELD_NUMBER

public static final int CACHE_CONTROL_FIELD_NUMBER
Field Value
Type Description
int

CONTENT_DISPOSITION_FIELD_NUMBER

public static final int CONTENT_DISPOSITION_FIELD_NUMBER
Field Value
Type Description
int

CONTENT_ENCODING_FIELD_NUMBER

public static final int CONTENT_ENCODING_FIELD_NUMBER
Field Value
Type Description
int

CONTENT_LANGUAGE_FIELD_NUMBER

public static final int CONTENT_LANGUAGE_FIELD_NUMBER
Field Value
Type Description
int

CONTENT_TYPE_FIELD_NUMBER

public static final int CONTENT_TYPE_FIELD_NUMBER
Field Value
Type Description
int

CUSTOM_METADATA_FIELD_NUMBER

public static final int CUSTOM_METADATA_FIELD_NUMBER
Field Value
Type Description
int

CUSTOM_TIME_FIELD_NUMBER

public static final int CUSTOM_TIME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static PutMetadata getDefaultInstance()
Returns
Type Description
PutMetadata

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static PutMetadata.Builder newBuilder()
Returns
Type Description
PutMetadata.Builder

newBuilder(PutMetadata prototype)

public static PutMetadata.Builder newBuilder(PutMetadata prototype)
Parameter
Name Description
prototype PutMetadata
Returns
Type Description
PutMetadata.Builder

parseDelimitedFrom(InputStream input)

public static PutMetadata parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
PutMetadata
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PutMetadata parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PutMetadata
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static PutMetadata parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
PutMetadata
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static PutMetadata parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PutMetadata
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static PutMetadata parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
PutMetadata
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static PutMetadata parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PutMetadata
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static PutMetadata parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
PutMetadata
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static PutMetadata parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PutMetadata
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static PutMetadata parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
PutMetadata
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PutMetadata parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PutMetadata
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static PutMetadata parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
PutMetadata
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static PutMetadata parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PutMetadata
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<PutMetadata> parser()
Returns
Type Description
Parser<PutMetadata>

Methods

containsCustomMetadata(String key)

public boolean containsCustomMetadata(String key)

Optional. Updates objects custom metadata. Adds or sets individual custom metadata key value pairs on objects. Keys that are set with empty custom metadata values will have its value cleared. Existing custom metadata not specified with this flag is not changed. Refer to documentation in https://cloud.google.com/storage/docs/metadata#custom-metadata

map<string, string> custom_metadata = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCacheControl()

public String getCacheControl()

Optional. Updates objects Cache-Control fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Additionally, the value for Custom-Time cannot decrease. Refer to documentation in https://cloud.google.com/storage/docs/metadata#caching_data.

optional string cache_control = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The cacheControl.

getCacheControlBytes()

public ByteString getCacheControlBytes()

Optional. Updates objects Cache-Control fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Additionally, the value for Custom-Time cannot decrease. Refer to documentation in https://cloud.google.com/storage/docs/metadata#caching_data.

optional string cache_control = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for cacheControl.

getContentDisposition()

public String getContentDisposition()

Optional. Updates objects Content-Disposition fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer https://cloud.google.com/storage/docs/metadata#content-disposition for additional documentation.

optional string content_disposition = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The contentDisposition.

getContentDispositionBytes()

public ByteString getContentDispositionBytes()

Optional. Updates objects Content-Disposition fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer https://cloud.google.com/storage/docs/metadata#content-disposition for additional documentation.

optional string content_disposition = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for contentDisposition.

getContentEncoding()

public String getContentEncoding()

Optional. Updates objects Content-Encoding fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in https://cloud.google.com/storage/docs/metadata#content-encoding.

optional string content_encoding = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The contentEncoding.

getContentEncodingBytes()

public ByteString getContentEncodingBytes()

Optional. Updates objects Content-Encoding fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in https://cloud.google.com/storage/docs/metadata#content-encoding.

optional string content_encoding = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for contentEncoding.

getContentLanguage()

public String getContentLanguage()

Optional. Updates objects Content-Language fixed metadata. Refer to ISO 639-1 language codes for typical values of this metadata. Max length 100 characters. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in https://cloud.google.com/storage/docs/metadata#content-language.

optional string content_language = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The contentLanguage.

getContentLanguageBytes()

public ByteString getContentLanguageBytes()

Optional. Updates objects Content-Language fixed metadata. Refer to ISO 639-1 language codes for typical values of this metadata. Max length 100 characters. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in https://cloud.google.com/storage/docs/metadata#content-language.

optional string content_language = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for contentLanguage.

getContentType()

public String getContentType()

Optional. Updates objects Content-Type fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in https://cloud.google.com/storage/docs/metadata#content-type

optional string content_type = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The contentType.

getContentTypeBytes()

public ByteString getContentTypeBytes()

Optional. Updates objects Content-Type fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in https://cloud.google.com/storage/docs/metadata#content-type

optional string content_type = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for contentType.

getCustomMetadata() (deprecated)

public Map<String,String> getCustomMetadata()
Returns
Type Description
Map<String,String>

getCustomMetadataCount()

public int getCustomMetadataCount()

Optional. Updates objects custom metadata. Adds or sets individual custom metadata key value pairs on objects. Keys that are set with empty custom metadata values will have its value cleared. Existing custom metadata not specified with this flag is not changed. Refer to documentation in https://cloud.google.com/storage/docs/metadata#custom-metadata

map<string, string> custom_metadata = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getCustomMetadataMap()

public Map<String,String> getCustomMetadataMap()

Optional. Updates objects custom metadata. Adds or sets individual custom metadata key value pairs on objects. Keys that are set with empty custom metadata values will have its value cleared. Existing custom metadata not specified with this flag is not changed. Refer to documentation in https://cloud.google.com/storage/docs/metadata#custom-metadata

map<string, string> custom_metadata = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getCustomMetadataOrDefault(String key, String defaultValue)

public String getCustomMetadataOrDefault(String key, String defaultValue)

Optional. Updates objects custom metadata. Adds or sets individual custom metadata key value pairs on objects. Keys that are set with empty custom metadata values will have its value cleared. Existing custom metadata not specified with this flag is not changed. Refer to documentation in https://cloud.google.com/storage/docs/metadata#custom-metadata

map<string, string> custom_metadata = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getCustomMetadataOrThrow(String key)

public String getCustomMetadataOrThrow(String key)

Optional. Updates objects custom metadata. Adds or sets individual custom metadata key value pairs on objects. Keys that are set with empty custom metadata values will have its value cleared. Existing custom metadata not specified with this flag is not changed. Refer to documentation in https://cloud.google.com/storage/docs/metadata#custom-metadata

map<string, string> custom_metadata = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getCustomTime()

public String getCustomTime()

Optional. Updates objects Custom-Time fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in https://cloud.google.com/storage/docs/metadata#custom-time.

optional string custom_time = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The customTime.

getCustomTimeBytes()

public ByteString getCustomTimeBytes()

Optional. Updates objects Custom-Time fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in https://cloud.google.com/storage/docs/metadata#custom-time.

optional string custom_time = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for customTime.

getDefaultInstanceForType()

public PutMetadata getDefaultInstanceForType()
Returns
Type Description
PutMetadata

getParserForType()

public Parser<PutMetadata> getParserForType()
Returns
Type Description
Parser<PutMetadata>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasCacheControl()

public boolean hasCacheControl()

Optional. Updates objects Cache-Control fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Additionally, the value for Custom-Time cannot decrease. Refer to documentation in https://cloud.google.com/storage/docs/metadata#caching_data.

optional string cache_control = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the cacheControl field is set.

hasContentDisposition()

public boolean hasContentDisposition()

Optional. Updates objects Content-Disposition fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer https://cloud.google.com/storage/docs/metadata#content-disposition for additional documentation.

optional string content_disposition = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the contentDisposition field is set.

hasContentEncoding()

public boolean hasContentEncoding()

Optional. Updates objects Content-Encoding fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in https://cloud.google.com/storage/docs/metadata#content-encoding.

optional string content_encoding = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the contentEncoding field is set.

hasContentLanguage()

public boolean hasContentLanguage()

Optional. Updates objects Content-Language fixed metadata. Refer to ISO 639-1 language codes for typical values of this metadata. Max length 100 characters. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in https://cloud.google.com/storage/docs/metadata#content-language.

optional string content_language = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the contentLanguage field is set.

hasContentType()

public boolean hasContentType()

Optional. Updates objects Content-Type fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in https://cloud.google.com/storage/docs/metadata#content-type

optional string content_type = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the contentType field is set.

hasCustomTime()

public boolean hasCustomTime()

Optional. Updates objects Custom-Time fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in https://cloud.google.com/storage/docs/metadata#custom-time.

optional string custom_time = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the customTime field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public PutMetadata.Builder newBuilderForType()
Returns
Type Description
PutMetadata.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected PutMetadata.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
PutMetadata.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public PutMetadata.Builder toBuilder()
Returns
Type Description
PutMetadata.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException