Package io.dapr.v1

# Class CommonProtos.StateItem.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
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`, `java.lang.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, java.lang.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​(java.lang.String key)` | The metadata which will be passed to state store component.
  `CommonProtos.StateItem` | `getDefaultInstanceForType()` |
  `static com.google.protobuf.Descriptors.Descriptor` | `getDescriptor()` |
  `com.google.protobuf.Descriptors.Descriptor` | `getDescriptorForType()` |
  `java.lang.String` | `getEtag()` | The entity tag which represents the specific version of data.
  `com.google.protobuf.ByteString` | `getEtagBytes()` | The entity tag which represents the specific version of data.
  `java.lang.String` | `getKey()` | Required.
  `com.google.protobuf.ByteString` | `getKeyBytes()` | Required.
  `java.util.Map<java.lang.String,​java.lang.String>` | `getMetadata()` | Deprecated.
  `int` | `getMetadataCount()` | The metadata which will be passed to state store component.
  `java.util.Map<java.lang.String,​java.lang.String>` | `getMetadataMap()` | The metadata which will be passed to state store component.
  `java.lang.String` | `getMetadataOrDefault​(java.lang.String key, java.lang.String defaultValue)` | The metadata which will be passed to state store component.
  `java.lang.String` | `getMetadataOrThrow​(java.lang.String key)` | The metadata which will be passed to state store component.
  `java.util.Map<java.lang.String,​java.lang.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` | `hasOptions()` | Options for concurrency and consistency to save the state.
  `protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable` | `internalGetFieldAccessorTable()` |
  `protected com.google.protobuf.MapField` | `internalGetMapField​(int number)` |
  `protected com.google.protobuf.MapField` | `internalGetMutableMapField​(int number)` |
  `boolean` | `isInitialized()` |
  `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.
  `CommonProtos.StateItem.Builder` | `mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)` |
  `CommonProtos.StateItem.Builder` | `putAllMetadata​(java.util.Map<java.lang.String,​java.lang.String> values)` | The metadata which will be passed to state store component.
  `CommonProtos.StateItem.Builder` | `putMetadata​(java.lang.String key, java.lang.String value)` | The metadata which will be passed to state store component.
  `CommonProtos.StateItem.Builder` | `removeMetadata​(java.lang.String key)` | The metadata which will be passed to state store component.
  `CommonProtos.StateItem.Builder` | `setEtag​(java.lang.String value)` | The entity tag which represents the specific version of data.
  `CommonProtos.StateItem.Builder` | `setEtagBytes​(com.google.protobuf.ByteString value)` | The entity tag which represents the specific version of data.
  `CommonProtos.StateItem.Builder` | `setField​(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)` |
  `CommonProtos.StateItem.Builder` | `setKey​(java.lang.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, java.lang.Object value)` |
  `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, hasField, hasOneof, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3`

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

  `findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString`

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

  `addAll, addAll, 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.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()

  - ### internalGetMapField

    protected com.google.protobuf.MapField internalGetMapField​(int number)
    Overrides:
      `internalGetMapField` in class `com.google.protobuf.GeneratedMessageV3.Builder<CommonProtos.StateItem.Builder>`

  - ### internalGetMutableMapField

    protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
    Overrides:
      `internalGetMutableMapField` 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, java.lang.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, java.lang.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, java.lang.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 java.io.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:
      `java.io.IOException`

  - ### getKey

    public java.lang.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​(java.lang.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.

  - ### getEtag

    public java.lang.String getEtag()

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

    `string etag = 3;`
    Specified by:
      `getEtag` in interface `CommonProtos.StateItemOrBuilder`
    Returns:
      The etag.

  - ### getEtagBytes

    public com.google.protobuf.ByteString getEtagBytes()

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

    `string etag = 3;`
    Specified by:
      `getEtagBytes` in interface `CommonProtos.StateItemOrBuilder`
    Returns:
      The bytes for etag.

  - ### setEtag

    public CommonProtos.StateItem.Builder setEtag​(java.lang.String value)

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

    `string etag = 3;`
    Parameters:
      `value` - The etag to set.
    Returns:
      This builder for chaining.

  - ### 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.

    `string etag = 3;`
    Returns:
      This builder for chaining.

  - ### setEtagBytes

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

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

    `string etag = 3;`
    Parameters:
      `value` - The bytes for etag to set.
    Returns:
      This builder for chaining.

  - ### 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​(java.lang.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 java.util.Map<java.lang.String,​java.lang.String> getMetadata()
    Deprecated.
    Use `getMetadataMap()` instead.
    Specified by:
      `getMetadata` in interface `CommonProtos.StateItemOrBuilder`

  - ### getMetadataMap

    public java.util.Map<java.lang.String,​java.lang.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 java.lang.String getMetadataOrDefault​(java.lang.String key, java.lang.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 java.lang.String getMetadataOrThrow​(java.lang.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​(java.lang.String key)

         The metadata which will be passed to state store component.

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

  - ### getMutableMetadata

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

  - ### putMetadata

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

         The metadata which will be passed to state store component.

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

  - ### putAllMetadata

    public CommonProtos.StateItem.Builder putAllMetadata​(java.util.Map<java.lang.String,​java.lang.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>`