Class Entry.Builder (0.42.0)

public static final class Entry.Builder extends GeneratedMessage.Builder<Entry.Builder> implements EntryOrBuilder

A key/value pair to be used for storing metadata.

Protobuf type google.cloud.backupdr.v1.Entry

Implements

EntryOrBuilder

Static Methods

getDescriptor()

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

Methods

build()

public Entry build()
Returns
Type Description
Entry

buildPartial()

public Entry buildPartial()
Returns
Type Description
Entry

clear()

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

clearKey()

public Entry.Builder clearKey()

Optional. Key for the metadata entry.

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

Returns
Type Description
Entry.Builder

This builder for chaining.

clearValue()

public Entry.Builder clearValue()

Optional. Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).

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

Returns
Type Description
Entry.Builder

This builder for chaining.

getDefaultInstanceForType()

public Entry getDefaultInstanceForType()
Returns
Type Description
Entry

getDescriptorForType()

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

getKey()

public String getKey()

Optional. Key for the metadata entry.

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

Returns
Type Description
String

The key.

getKeyBytes()

public ByteString getKeyBytes()

Optional. Key for the metadata entry.

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

Returns
Type Description
ByteString

The bytes for key.

getValue()

public String getValue()

Optional. Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).

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

Returns
Type Description
String

The value.

getValueBytes()

public ByteString getValueBytes()

Optional. Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).

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

Returns
Type Description
ByteString

The bytes for value.

hasKey()

public boolean hasKey()

Optional. Key for the metadata entry.

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

Returns
Type Description
boolean

Whether the key field is set.

hasValue()

public boolean hasValue()

Optional. Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).

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

Returns
Type Description
boolean

Whether the value field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Entry other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setKey(String value)

public Entry.Builder setKey(String value)

Optional. Key for the metadata entry.

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

Parameter
Name Description
value String

The key to set.

Returns
Type Description
Entry.Builder

This builder for chaining.

setKeyBytes(ByteString value)

public Entry.Builder setKeyBytes(ByteString value)

Optional. Key for the metadata entry.

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

Parameter
Name Description
value ByteString

The bytes for key to set.

Returns
Type Description
Entry.Builder

This builder for chaining.

setValue(String value)

public Entry.Builder setValue(String value)

Optional. Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).

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

Parameter
Name Description
value String

The value to set.

Returns
Type Description
Entry.Builder

This builder for chaining.

setValueBytes(ByteString value)

public Entry.Builder setValueBytes(ByteString value)

Optional. Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).

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

Parameter
Name Description
value ByteString

The bytes for value to set.

Returns
Type Description
Entry.Builder

This builder for chaining.