Class KeyValuePair (0.58.0)

public final class KeyValuePair extends GeneratedMessage implements KeyValuePairOrBuilder

KeyValuePair defines a key-value pair for matching resource labels.

Protobuf type google.cloud.backupdr.v1beta.KeyValuePair

Static Fields

KEY_FIELD_NUMBER

public static final int KEY_FIELD_NUMBER
Field Value
Type Description
int

VALUES_FIELD_NUMBER

public static final int VALUES_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static KeyValuePair getDefaultInstance()
Returns
Type Description
KeyValuePair

getDescriptor()

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

newBuilder()

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

newBuilder(KeyValuePair prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public KeyValuePair getDefaultInstanceForType()
Returns
Type Description
KeyValuePair

getKey()

public String getKey()

Required. The key of the label to match. This must be in the format {label_key}. The key must match the regex Format:\p{Ll}\p{Lo}{0,62}.

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

Returns
Type Description
String

The key.

getKeyBytes()

public ByteString getKeyBytes()

Required. The key of the label to match. This must be in the format {label_key}. The key must match the regex Format:\p{Ll}\p{Lo}{0,62}.

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

Returns
Type Description
ByteString

The bytes for key.

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getValues(int index)

public String getValues(int index)

Required. The values of the label to match. There will be explicit “OR” between values of array. Each value must be in the format {label_value}. The value must match the regex Format: [\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}.

repeated string values = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The values at the given index.

getValuesBytes(int index)

public ByteString getValuesBytes(int index)

Required. The values of the label to match. There will be explicit “OR” between values of array. Each value must be in the format {label_value}. The value must match the regex Format: [\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}.

repeated string values = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the values at the given index.

getValuesCount()

public int getValuesCount()

Required. The values of the label to match. There will be explicit “OR” between values of array. Each value must be in the format {label_value}. The value must match the regex Format: [\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}.

repeated string values = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The count of values.

getValuesList()

public ProtocolStringList getValuesList()

Required. The values of the label to match. There will be explicit “OR” between values of array. Each value must be in the format {label_value}. The value must match the regex Format: [\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}.

repeated string values = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProtocolStringList

A list containing the values.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(AbstractMessage.BuilderParent parent)

protected KeyValuePair.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
KeyValuePair.Builder
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

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