Class CustomContextUpdates.Builder (0.27.0)

public static final class CustomContextUpdates.Builder extends GeneratedMessage.Builder<CustomContextUpdates.Builder> implements CustomContextUpdatesOrBuilder

Describes a collection of updates to apply to custom contexts identified by key.

Protobuf type google.cloud.storagebatchoperations.v1.CustomContextUpdates

Static Methods

getDescriptor()

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

Methods

addAllKeysToClear(Iterable<String> values)

public CustomContextUpdates.Builder addAllKeysToClear(Iterable<String> values)

Optional. Custom contexts to clear by key. A key cannot be present in both updates and keys_to_clear.

repeated string keys_to_clear = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The keysToClear to add.

Returns
Type Description
CustomContextUpdates.Builder

This builder for chaining.

addKeysToClear(String value)

public CustomContextUpdates.Builder addKeysToClear(String value)

Optional. Custom contexts to clear by key. A key cannot be present in both updates and keys_to_clear.

repeated string keys_to_clear = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The keysToClear to add.

Returns
Type Description
CustomContextUpdates.Builder

This builder for chaining.

addKeysToClearBytes(ByteString value)

public CustomContextUpdates.Builder addKeysToClearBytes(ByteString value)

Optional. Custom contexts to clear by key. A key cannot be present in both updates and keys_to_clear.

repeated string keys_to_clear = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the keysToClear to add.

Returns
Type Description
CustomContextUpdates.Builder

This builder for chaining.

build()

public CustomContextUpdates build()
Returns
Type Description
CustomContextUpdates

buildPartial()

public CustomContextUpdates buildPartial()
Returns
Type Description
CustomContextUpdates

clear()

public CustomContextUpdates.Builder clear()
Returns
Type Description
CustomContextUpdates.Builder
Overrides

clearKeysToClear()

public CustomContextUpdates.Builder clearKeysToClear()

Optional. Custom contexts to clear by key. A key cannot be present in both updates and keys_to_clear.

repeated string keys_to_clear = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomContextUpdates.Builder

This builder for chaining.

clearUpdates()

public CustomContextUpdates.Builder clearUpdates()
Returns
Type Description
CustomContextUpdates.Builder

containsUpdates(String key)

public boolean containsUpdates(String key)

Optional. Insert or update the existing custom contexts.

map<string, .google.cloud.storagebatchoperations.v1.ObjectCustomContextPayload> updates = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getDefaultInstanceForType()

public CustomContextUpdates getDefaultInstanceForType()
Returns
Type Description
CustomContextUpdates

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getKeysToClear(int index)

public String getKeysToClear(int index)

Optional. Custom contexts to clear by key. A key cannot be present in both updates and keys_to_clear.

repeated string keys_to_clear = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The keysToClear at the given index.

getKeysToClearBytes(int index)

public ByteString getKeysToClearBytes(int index)

Optional. Custom contexts to clear by key. A key cannot be present in both updates and keys_to_clear.

repeated string keys_to_clear = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the keysToClear at the given index.

getKeysToClearCount()

public int getKeysToClearCount()

Optional. Custom contexts to clear by key. A key cannot be present in both updates and keys_to_clear.

repeated string keys_to_clear = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of keysToClear.

getKeysToClearList()

public ProtocolStringList getKeysToClearList()

Optional. Custom contexts to clear by key. A key cannot be present in both updates and keys_to_clear.

repeated string keys_to_clear = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the keysToClear.

getMutableUpdates() (deprecated)

public Map<String,ObjectCustomContextPayload> getMutableUpdates()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,ObjectCustomContextPayload>

getUpdates() (deprecated)

public Map<String,ObjectCustomContextPayload> getUpdates()

Use #getUpdatesMap() instead.

Returns
Type Description
Map<String,ObjectCustomContextPayload>

getUpdatesCount()

public int getUpdatesCount()

Optional. Insert or update the existing custom contexts.

map<string, .google.cloud.storagebatchoperations.v1.ObjectCustomContextPayload> updates = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getUpdatesMap()

public Map<String,ObjectCustomContextPayload> getUpdatesMap()

Optional. Insert or update the existing custom contexts.

map<string, .google.cloud.storagebatchoperations.v1.ObjectCustomContextPayload> updates = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,ObjectCustomContextPayload>

getUpdatesOrDefault(String key, ObjectCustomContextPayload defaultValue)

public ObjectCustomContextPayload getUpdatesOrDefault(String key, ObjectCustomContextPayload defaultValue)

Optional. Insert or update the existing custom contexts.

map<string, .google.cloud.storagebatchoperations.v1.ObjectCustomContextPayload> updates = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue ObjectCustomContextPayload
Returns
Type Description
ObjectCustomContextPayload

getUpdatesOrThrow(String key)

public ObjectCustomContextPayload getUpdatesOrThrow(String key)

Optional. Insert or update the existing custom contexts.

map<string, .google.cloud.storagebatchoperations.v1.ObjectCustomContextPayload> updates = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
ObjectCustomContextPayload

internalGetFieldAccessorTable()

protected GeneratedMessage.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.GeneratedMessage.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessage.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CustomContextUpdates other)

public CustomContextUpdates.Builder mergeFrom(CustomContextUpdates other)
Parameter
Name Description
other CustomContextUpdates
Returns
Type Description
CustomContextUpdates.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CustomContextUpdates.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CustomContextUpdates.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CustomContextUpdates.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CustomContextUpdates.Builder
Overrides

putAllUpdates(Map<String,ObjectCustomContextPayload> values)

public CustomContextUpdates.Builder putAllUpdates(Map<String,ObjectCustomContextPayload> values)

Optional. Insert or update the existing custom contexts.

map<string, .google.cloud.storagebatchoperations.v1.ObjectCustomContextPayload> updates = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,ObjectCustomContextPayload>
Returns
Type Description
CustomContextUpdates.Builder

putUpdates(String key, ObjectCustomContextPayload value)

public CustomContextUpdates.Builder putUpdates(String key, ObjectCustomContextPayload value)

Optional. Insert or update the existing custom contexts.

map<string, .google.cloud.storagebatchoperations.v1.ObjectCustomContextPayload> updates = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value ObjectCustomContextPayload
Returns
Type Description
CustomContextUpdates.Builder

putUpdatesBuilderIfAbsent(String key)

public ObjectCustomContextPayload.Builder putUpdatesBuilderIfAbsent(String key)

Optional. Insert or update the existing custom contexts.

map<string, .google.cloud.storagebatchoperations.v1.ObjectCustomContextPayload> updates = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
ObjectCustomContextPayload.Builder

removeUpdates(String key)

public CustomContextUpdates.Builder removeUpdates(String key)

Optional. Insert or update the existing custom contexts.

map<string, .google.cloud.storagebatchoperations.v1.ObjectCustomContextPayload> updates = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
CustomContextUpdates.Builder

setKeysToClear(int index, String value)

public CustomContextUpdates.Builder setKeysToClear(int index, String value)

Optional. Custom contexts to clear by key. A key cannot be present in both updates and keys_to_clear.

repeated string keys_to_clear = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The keysToClear to set.

Returns
Type Description
CustomContextUpdates.Builder

This builder for chaining.