Package io.dapr.v1

# Class CommonProtos.StateItem.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<CommonProtos.StateItem.Builder>
io.dapr.v1.CommonProtos.StateItem.Builder

All Implemented Interfaces:
  `com.google.protobuf.Message.Builder`, `com.google.protobuf.MessageLite.Builder`, `com.google.protobuf.MessageLiteOrBuilder`, `com.google.protobuf.MessageOrBuilder`, `CommonProtos.StateItemOrBuilder`, `Cloneable`

Enclosing class:
  CommonProtos.StateItem

public static final class CommonProtos.StateItem.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<CommonProtos.StateItem.Builder> implements CommonProtos.StateItemOrBuilder

     StateItem represents state key, value, and additional options to save state.

Protobuf type `dapr.proto.common.v1.StateItem`

## Method Summary

Modifier and Type
Method
Description
`CommonProtos.StateItem.Builder`
`addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)`
`CommonProtos.StateItem`
`build()`
`CommonProtos.StateItem`
`buildPartial()`
`CommonProtos.StateItem.Builder`
`clear()`
`CommonProtos.StateItem.Builder`
`clearEtag()`
The entity tag which represents the specific version of data.
`CommonProtos.StateItem.Builder`
`clearField(com.google.protobuf.Descriptors.FieldDescriptor field)`
`CommonProtos.StateItem.Builder`
`clearKey()`
Required.
`CommonProtos.StateItem.Builder`
`clearMetadata()`
`CommonProtos.StateItem.Builder`
`clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)`
`CommonProtos.StateItem.Builder`
`clearOptions()`
Options for concurrency and consistency to save the state.
`CommonProtos.StateItem.Builder`
`clearValue()`
Required.
`CommonProtos.StateItem.Builder`
`clone()`
`boolean`
`containsMetadata(String key)`
The metadata which will be passed to state store component.
`CommonProtos.StateItem`
`getDefaultInstanceForType()`
`static final com.google.protobuf.Descriptors.Descriptor`
`getDescriptor()`
`com.google.protobuf.Descriptors.Descriptor`
`getDescriptorForType()`
`CommonProtos.Etag`
`getEtag()`
The entity tag which represents the specific version of data.
`CommonProtos.Etag.Builder`
`getEtagBuilder()`
The entity tag which represents the specific version of data.
`CommonProtos.EtagOrBuilder`
`getEtagOrBuilder()`
The entity tag which represents the specific version of data.
`String`
`getKey()`
Required.
`com.google.protobuf.ByteString`
`getKeyBytes()`
Required.
`Map<String,String>`
`getMetadata()`
Deprecated.
`int`
`getMetadataCount()`
The metadata which will be passed to state store component.
`Map<String,String>`
`getMetadataMap()`
The metadata which will be passed to state store component.
`String`
`getMetadataOrDefault(String key, String defaultValue)`
The metadata which will be passed to state store component.
`String`
`getMetadataOrThrow(String key)`
The metadata which will be passed to state store component.
`Map<String,String>`
`getMutableMetadata()`
Deprecated.
`CommonProtos.StateOptions`
`getOptions()`
Options for concurrency and consistency to save the state.
`CommonProtos.StateOptions.Builder`
`getOptionsBuilder()`
Options for concurrency and consistency to save the state.
`CommonProtos.StateOptionsOrBuilder`
`getOptionsOrBuilder()`
Options for concurrency and consistency to save the state.
`com.google.protobuf.ByteString`
`getValue()`
Required.
`boolean`
`hasEtag()`
The entity tag which represents the specific version of data.
`boolean`
`hasOptions()`
Options for concurrency and consistency to save the state.
`protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable`
`internalGetFieldAccessorTable()`
`protected com.google.protobuf.MapFieldReflectionAccessor`
`internalGetMapFieldReflection(int number)`
`protected com.google.protobuf.MapFieldReflectionAccessor`
`internalGetMutableMapFieldReflection(int number)`
`final boolean`
`isInitialized()`
`CommonProtos.StateItem.Builder`
`mergeEtag(CommonProtos.Etag value)`
The entity tag which represents the specific version of data.
`CommonProtos.StateItem.Builder`
`mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)`
`CommonProtos.StateItem.Builder`
`mergeFrom(com.google.protobuf.Message other)`
`CommonProtos.StateItem.Builder`
`mergeFrom(CommonProtos.StateItem other)`
`CommonProtos.StateItem.Builder`
`mergeOptions(CommonProtos.StateOptions value)`
Options for concurrency and consistency to save the state.
`final CommonProtos.StateItem.Builder`
`mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)`
`CommonProtos.StateItem.Builder`
`putAllMetadata(Map<String,String> values)`
The metadata which will be passed to state store component.
`CommonProtos.StateItem.Builder`
`putMetadata(String key, String value)`
The metadata which will be passed to state store component.
`CommonProtos.StateItem.Builder`
`removeMetadata(String key)`
The metadata which will be passed to state store component.
`CommonProtos.StateItem.Builder`
`setEtag(CommonProtos.Etag value)`
The entity tag which represents the specific version of data.
`CommonProtos.StateItem.Builder`
`setEtag(CommonProtos.Etag.Builder builderForValue)`
The entity tag which represents the specific version of data.
`CommonProtos.StateItem.Builder`
`setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)`
`CommonProtos.StateItem.Builder`
`setKey(String value)`
Required.
`CommonProtos.StateItem.Builder`
`setKeyBytes(com.google.protobuf.ByteString value)`
Required.
`CommonProtos.StateItem.Builder`
`setOptions(CommonProtos.StateOptions value)`
Options for concurrency and consistency to save the state.
`CommonProtos.StateItem.Builder`
`setOptions(CommonProtos.StateOptions.Builder builderForValue)`
Options for concurrency and consistency to save the state.
`CommonProtos.StateItem.Builder`
`setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)`
`final CommonProtos.StateItem.Builder`
`setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)`
`CommonProtos.StateItem.Builder`
`setValue(com.google.protobuf.ByteString value)`
Required.

### Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder

`getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, 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 Details

### 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.GeneratedMessageV3.Builder<CommonProtos.StateItem.Builder>`

### internalGetMutableMapFieldReflection

protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)

Overrides:
  `internalGetMutableMapFieldReflection` in class `com.google.protobuf.GeneratedMessageV3.Builder<CommonProtos.StateItem.Builder>`

### internalGetFieldAccessorTable

protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()

Specified by:
  `internalGetFieldAccessorTable` in class `com.google.protobuf.GeneratedMessageV3.Builder<CommonProtos.StateItem.Builder>`

### clear

public CommonProtos.StateItem.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<CommonProtos.StateItem.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.GeneratedMessageV3.Builder<CommonProtos.StateItem.Builder>`

### getDefaultInstanceForType

public CommonProtos.StateItem getDefaultInstanceForType()

Specified by:
  `getDefaultInstanceForType` in interface `com.google.protobuf.MessageLiteOrBuilder`
Specified by:
  `getDefaultInstanceForType` in interface `com.google.protobuf.MessageOrBuilder`

### build

public CommonProtos.StateItem build()

Specified by:
  `build` in interface `com.google.protobuf.Message.Builder`
Specified by:
  `build` in interface `com.google.protobuf.MessageLite.Builder`

### buildPartial

public CommonProtos.StateItem buildPartial()

Specified by:
  `buildPartial` in interface `com.google.protobuf.Message.Builder`
Specified by:
  `buildPartial` in interface `com.google.protobuf.MessageLite.Builder`

### clone

public CommonProtos.StateItem.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<CommonProtos.StateItem.Builder>`

### setField

public CommonProtos.StateItem.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)

Specified by:
  `setField` in interface `com.google.protobuf.Message.Builder`
Overrides:
  `setField` in class `com.google.protobuf.GeneratedMessageV3.Builder<CommonProtos.StateItem.Builder>`

### clearField

public CommonProtos.StateItem.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<CommonProtos.StateItem.Builder>`

### clearOneof

public CommonProtos.StateItem.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<CommonProtos.StateItem.Builder>`

### setRepeatedField

public CommonProtos.StateItem.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)

Specified by:
  `setRepeatedField` in interface `com.google.protobuf.Message.Builder`
Overrides:
  `setRepeatedField` in class `com.google.protobuf.GeneratedMessageV3.Builder<CommonProtos.StateItem.Builder>`

### addRepeatedField

public CommonProtos.StateItem.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)

Specified by:
  `addRepeatedField` in interface `com.google.protobuf.Message.Builder`
Overrides:
  `addRepeatedField` in class `com.google.protobuf.GeneratedMessageV3.Builder<CommonProtos.StateItem.Builder>`

### mergeFrom

public CommonProtos.StateItem.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<CommonProtos.StateItem.Builder>`

### mergeFrom

public CommonProtos.StateItem.Builder mergeFrom(CommonProtos.StateItem other)

### isInitialized

public final boolean isInitialized()

Specified by:
  `isInitialized` in interface `com.google.protobuf.MessageLiteOrBuilder`
Overrides:
  `isInitialized` in class `com.google.protobuf.GeneratedMessageV3.Builder<CommonProtos.StateItem.Builder>`

### mergeFrom

public CommonProtos.StateItem.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws 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<CommonProtos.StateItem.Builder>`
Throws:
  `IOException`

### getKey

public String getKey()

     Required. The state key

`string key = 1;`

Specified by:
  `getKey` in interface `CommonProtos.StateItemOrBuilder`
Returns:
  The key.

### getKeyBytes

public com.google.protobuf.ByteString getKeyBytes()

     Required. The state key

`string key = 1;`

Specified by:
  `getKeyBytes` in interface `CommonProtos.StateItemOrBuilder`
Returns:
  The bytes for key.

### setKey

public CommonProtos.StateItem.Builder setKey(String value)

     Required. The state key

`string key = 1;`

Parameters:
  `value` - The key to set.
Returns:
  This builder for chaining.

### clearKey

public CommonProtos.StateItem.Builder clearKey()

     Required. The state key

`string key = 1;`

Returns:
  This builder for chaining.

### setKeyBytes

public CommonProtos.StateItem.Builder setKeyBytes(com.google.protobuf.ByteString value)

     Required. The state key

`string key = 1;`

Parameters:
  `value` - The bytes for key to set.
Returns:
  This builder for chaining.

### getValue

public com.google.protobuf.ByteString getValue()

     Required. The state data for key

`bytes value = 2;`

Specified by:
  `getValue` in interface `CommonProtos.StateItemOrBuilder`
Returns:
  The value.

### setValue

public CommonProtos.StateItem.Builder setValue(com.google.protobuf.ByteString value)

     Required. The state data for key

`bytes value = 2;`

Parameters:
  `value` - The value to set.
Returns:
  This builder for chaining.

### clearValue

public CommonProtos.StateItem.Builder clearValue()

     Required. The state data for key

`bytes value = 2;`

Returns:
  This builder for chaining.

### hasEtag

public boolean hasEtag()

     The entity tag which represents the specific version of data.
     The exact ETag format is defined by the corresponding data store.

`.dapr.proto.common.v1.Etag etag = 3;`

Specified by:
  `hasEtag` in interface `CommonProtos.StateItemOrBuilder`
Returns:
  Whether the etag field is set.

### getEtag

public CommonProtos.Etag getEtag()

     The entity tag which represents the specific version of data.
     The exact ETag format is defined by the corresponding data store.

`.dapr.proto.common.v1.Etag etag = 3;`

Specified by:
  `getEtag` in interface `CommonProtos.StateItemOrBuilder`
Returns:
  The etag.

### setEtag

public CommonProtos.StateItem.Builder setEtag(CommonProtos.Etag value)

     The entity tag which represents the specific version of data.
     The exact ETag format is defined by the corresponding data store.

`.dapr.proto.common.v1.Etag etag = 3;`

### setEtag

public CommonProtos.StateItem.Builder setEtag(CommonProtos.Etag.Builder builderForValue)

     The entity tag which represents the specific version of data.
     The exact ETag format is defined by the corresponding data store.

`.dapr.proto.common.v1.Etag etag = 3;`

### mergeEtag

public CommonProtos.StateItem.Builder mergeEtag(CommonProtos.Etag value)

     The entity tag which represents the specific version of data.
     The exact ETag format is defined by the corresponding data store.

`.dapr.proto.common.v1.Etag etag = 3;`

### clearEtag

public CommonProtos.StateItem.Builder clearEtag()

     The entity tag which represents the specific version of data.
     The exact ETag format is defined by the corresponding data store.

`.dapr.proto.common.v1.Etag etag = 3;`

### getEtagBuilder

public CommonProtos.Etag.Builder getEtagBuilder()

     The entity tag which represents the specific version of data.
     The exact ETag format is defined by the corresponding data store.

`.dapr.proto.common.v1.Etag etag = 3;`

### getEtagOrBuilder

public CommonProtos.EtagOrBuilder getEtagOrBuilder()

     The entity tag which represents the specific version of data.
     The exact ETag format is defined by the corresponding data store.

`.dapr.proto.common.v1.Etag etag = 3;`

Specified by:
  `getEtagOrBuilder` in interface `CommonProtos.StateItemOrBuilder`

### getMetadataCount

public int getMetadataCount()
Description copied from interface: `CommonProtos.StateItemOrBuilder`

     The metadata which will be passed to state store component.

`map<string, string> metadata = 4;`

Specified by:
  `getMetadataCount` in interface `CommonProtos.StateItemOrBuilder`

### containsMetadata

public boolean containsMetadata(String key)

     The metadata which will be passed to state store component.

`map<string, string> metadata = 4;`

Specified by:
  `containsMetadata` in interface `CommonProtos.StateItemOrBuilder`

### getMetadata

@Deprecated public Map<String,String> getMetadata()
Deprecated.
Use `getMetadataMap()` instead.

Specified by:
  `getMetadata` in interface `CommonProtos.StateItemOrBuilder`

### getMetadataMap

public Map<String,String> getMetadataMap()

     The metadata which will be passed to state store component.

`map<string, string> metadata = 4;`

Specified by:
  `getMetadataMap` in interface `CommonProtos.StateItemOrBuilder`

### getMetadataOrDefault

public String getMetadataOrDefault(String key, String defaultValue)

     The metadata which will be passed to state store component.

`map<string, string> metadata = 4;`

Specified by:
  `getMetadataOrDefault` in interface `CommonProtos.StateItemOrBuilder`

### getMetadataOrThrow

public String getMetadataOrThrow(String key)

     The metadata which will be passed to state store component.

`map<string, string> metadata = 4;`

Specified by:
  `getMetadataOrThrow` in interface `CommonProtos.StateItemOrBuilder`

### clearMetadata

public CommonProtos.StateItem.Builder clearMetadata()

### removeMetadata

public CommonProtos.StateItem.Builder removeMetadata(String key)

     The metadata which will be passed to state store component.

`map<string, string> metadata = 4;`

### getMutableMetadata

@Deprecated public Map<String,String> getMutableMetadata()
Deprecated.
Use alternate mutation accessors instead.

### putMetadata

public CommonProtos.StateItem.Builder putMetadata(String key, String value)

     The metadata which will be passed to state store component.

`map<string, string> metadata = 4;`

### putAllMetadata

public CommonProtos.StateItem.Builder putAllMetadata(Map<String,String> values)

     The metadata which will be passed to state store component.

`map<string, string> metadata = 4;`

### hasOptions

public boolean hasOptions()

     Options for concurrency and consistency to save the state.

`.dapr.proto.common.v1.StateOptions options = 5;`

Specified by:
  `hasOptions` in interface `CommonProtos.StateItemOrBuilder`
Returns:
  Whether the options field is set.

### getOptions

public CommonProtos.StateOptions getOptions()

     Options for concurrency and consistency to save the state.

`.dapr.proto.common.v1.StateOptions options = 5;`

Specified by:
  `getOptions` in interface `CommonProtos.StateItemOrBuilder`
Returns:
  The options.

### setOptions

public CommonProtos.StateItem.Builder setOptions(CommonProtos.StateOptions value)

     Options for concurrency and consistency to save the state.

`.dapr.proto.common.v1.StateOptions options = 5;`

### setOptions

public CommonProtos.StateItem.Builder setOptions(CommonProtos.StateOptions.Builder builderForValue)

     Options for concurrency and consistency to save the state.

`.dapr.proto.common.v1.StateOptions options = 5;`

### mergeOptions

public CommonProtos.StateItem.Builder mergeOptions(CommonProtos.StateOptions value)

     Options for concurrency and consistency to save the state.

`.dapr.proto.common.v1.StateOptions options = 5;`

### clearOptions

public CommonProtos.StateItem.Builder clearOptions()

     Options for concurrency and consistency to save the state.

`.dapr.proto.common.v1.StateOptions options = 5;`

### getOptionsBuilder

public CommonProtos.StateOptions.Builder getOptionsBuilder()

     Options for concurrency and consistency to save the state.

`.dapr.proto.common.v1.StateOptions options = 5;`

### getOptionsOrBuilder

public CommonProtos.StateOptionsOrBuilder getOptionsOrBuilder()

     Options for concurrency and consistency to save the state.

`.dapr.proto.common.v1.StateOptions options = 5;`

Specified by:
  `getOptionsOrBuilder` in interface `CommonProtos.StateItemOrBuilder`

### setUnknownFields

public final CommonProtos.StateItem.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<CommonProtos.StateItem.Builder>`

### mergeUnknownFields

public final CommonProtos.StateItem.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<CommonProtos.StateItem.Builder>`