Class IngestionDefaults.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<IngestionDefaults.Builder>
com.google.protobuf.GeneratedMessage.Builder<IngestionDefaults.Builder>
dev.restate.ingestion.v1.IngestionDefaults.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, IngestionDefaultsOrBuilder, Cloneable
Enclosing class:
IngestionDefaults

public static final class IngestionDefaults.Builder extends com.google.protobuf.GeneratedMessage.Builder<IngestionDefaults.Builder> implements IngestionDefaultsOrBuilder
An IngestionDefaults message defines the default values applied to all
subsequent records in the stream.
Each IngestionDefaults message must specify every field it wants to set.
Each IngestionDefaults message overwrites the values set by previous IngestionDefaults messages.
Leaving an optional field unset clears any previously established
default, so later records must supply the value explicitly if needed.

It's okay to send IngestionDefaults more than once to tweak and change the defaults
during the life time of the stream.

Every field here has a matching field on `Invocation`. For those fields the
per-record value wins: if the `Invocation` sets the field, its value is used
and the default from `IngestionDefaults` is ignored; if it leaves the field unset, the
current default from `IngestionDefaults` is used instead. If neither is set, the field
is treated as absent, which may be an error for fields that are required for
the given target (e.g. `key` for virtual objects and workflows).

`headers` are extended with the Invocation's `additional_headers`
overriding existing keys.

Note: Keep the field tags uniform with the Invocation message
This allows parsing IngestionInvocation message as IngestionDefaults.
Protobuf type dev.restate.ingress.ingestion.v1.IngestionDefaults
  • 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.GeneratedMessage.Builder<IngestionDefaults.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<IngestionDefaults.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<IngestionDefaults.Builder>
    • clear

      public IngestionDefaults.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.GeneratedMessage.Builder<IngestionDefaults.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.GeneratedMessage.Builder<IngestionDefaults.Builder>
    • getDefaultInstanceForType

      public IngestionDefaults getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public IngestionDefaults build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public IngestionDefaults buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public IngestionDefaults.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<IngestionDefaults.Builder>
    • mergeFrom

      public IngestionDefaults.Builder mergeFrom(IngestionDefaults other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<IngestionDefaults.Builder>
    • mergeFrom

      public IngestionDefaults.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<IngestionDefaults.Builder>
      Throws:
      IOException
    • hasScope

      public boolean hasScope()
      scope is limited to 36 bytes.
      
      optional string scope = 2;
      Specified by:
      hasScope in interface IngestionDefaultsOrBuilder
      Returns:
      Whether the scope field is set.
    • getScope

      public String getScope()
      scope is limited to 36 bytes.
      
      optional string scope = 2;
      Specified by:
      getScope in interface IngestionDefaultsOrBuilder
      Returns:
      The scope.
    • getScopeBytes

      public com.google.protobuf.ByteString getScopeBytes()
      scope is limited to 36 bytes.
      
      optional string scope = 2;
      Specified by:
      getScopeBytes in interface IngestionDefaultsOrBuilder
      Returns:
      The bytes for scope.
    • setScope

      public IngestionDefaults.Builder setScope(String value)
      scope is limited to 36 bytes.
      
      optional string scope = 2;
      Parameters:
      value - The scope to set.
      Returns:
      This builder for chaining.
    • clearScope

      public IngestionDefaults.Builder clearScope()
      scope is limited to 36 bytes.
      
      optional string scope = 2;
      Returns:
      This builder for chaining.
    • setScopeBytes

      public IngestionDefaults.Builder setScopeBytes(com.google.protobuf.ByteString value)
      scope is limited to 36 bytes.
      
      optional string scope = 2;
      Parameters:
      value - The bytes for scope to set.
      Returns:
      This builder for chaining.
    • hasLimitKey

      public boolean hasLimitKey()
      optional string limit_key = 3;
      Specified by:
      hasLimitKey in interface IngestionDefaultsOrBuilder
      Returns:
      Whether the limitKey field is set.
    • getLimitKey

      public String getLimitKey()
      optional string limit_key = 3;
      Specified by:
      getLimitKey in interface IngestionDefaultsOrBuilder
      Returns:
      The limitKey.
    • getLimitKeyBytes

      public com.google.protobuf.ByteString getLimitKeyBytes()
      optional string limit_key = 3;
      Specified by:
      getLimitKeyBytes in interface IngestionDefaultsOrBuilder
      Returns:
      The bytes for limitKey.
    • setLimitKey

      public IngestionDefaults.Builder setLimitKey(String value)
      optional string limit_key = 3;
      Parameters:
      value - The limitKey to set.
      Returns:
      This builder for chaining.
    • clearLimitKey

      public IngestionDefaults.Builder clearLimitKey()
      optional string limit_key = 3;
      Returns:
      This builder for chaining.
    • setLimitKeyBytes

      public IngestionDefaults.Builder setLimitKeyBytes(com.google.protobuf.ByteString value)
      optional string limit_key = 3;
      Parameters:
      value - The bytes for limitKey to set.
      Returns:
      This builder for chaining.
    • hasService

      public boolean hasService()
      optional string service = 4;
      Specified by:
      hasService in interface IngestionDefaultsOrBuilder
      Returns:
      Whether the service field is set.
    • getService

      public String getService()
      optional string service = 4;
      Specified by:
      getService in interface IngestionDefaultsOrBuilder
      Returns:
      The service.
    • getServiceBytes

      public com.google.protobuf.ByteString getServiceBytes()
      optional string service = 4;
      Specified by:
      getServiceBytes in interface IngestionDefaultsOrBuilder
      Returns:
      The bytes for service.
    • setService

      public IngestionDefaults.Builder setService(String value)
      optional string service = 4;
      Parameters:
      value - The service to set.
      Returns:
      This builder for chaining.
    • clearService

      public IngestionDefaults.Builder clearService()
      optional string service = 4;
      Returns:
      This builder for chaining.
    • setServiceBytes

      public IngestionDefaults.Builder setServiceBytes(com.google.protobuf.ByteString value)
      optional string service = 4;
      Parameters:
      value - The bytes for service to set.
      Returns:
      This builder for chaining.
    • hasHandler

      public boolean hasHandler()
      optional string handler = 5;
      Specified by:
      hasHandler in interface IngestionDefaultsOrBuilder
      Returns:
      Whether the handler field is set.
    • getHandler

      public String getHandler()
      optional string handler = 5;
      Specified by:
      getHandler in interface IngestionDefaultsOrBuilder
      Returns:
      The handler.
    • getHandlerBytes

      public com.google.protobuf.ByteString getHandlerBytes()
      optional string handler = 5;
      Specified by:
      getHandlerBytes in interface IngestionDefaultsOrBuilder
      Returns:
      The bytes for handler.
    • setHandler

      public IngestionDefaults.Builder setHandler(String value)
      optional string handler = 5;
      Parameters:
      value - The handler to set.
      Returns:
      This builder for chaining.
    • clearHandler

      public IngestionDefaults.Builder clearHandler()
      optional string handler = 5;
      Returns:
      This builder for chaining.
    • setHandlerBytes

      public IngestionDefaults.Builder setHandlerBytes(com.google.protobuf.ByteString value)
      optional string handler = 5;
      Parameters:
      value - The bytes for handler to set.
      Returns:
      This builder for chaining.
    • hasKey

      public boolean hasKey()
      optional string key = 6;
      Specified by:
      hasKey in interface IngestionDefaultsOrBuilder
      Returns:
      Whether the key field is set.
    • getKey

      public String getKey()
      optional string key = 6;
      Specified by:
      getKey in interface IngestionDefaultsOrBuilder
      Returns:
      The key.
    • getKeyBytes

      public com.google.protobuf.ByteString getKeyBytes()
      optional string key = 6;
      Specified by:
      getKeyBytes in interface IngestionDefaultsOrBuilder
      Returns:
      The bytes for key.
    • setKey

      public IngestionDefaults.Builder setKey(String value)
      optional string key = 6;
      Parameters:
      value - The key to set.
      Returns:
      This builder for chaining.
    • clearKey

      public IngestionDefaults.Builder clearKey()
      optional string key = 6;
      Returns:
      This builder for chaining.
    • setKeyBytes

      public IngestionDefaults.Builder setKeyBytes(com.google.protobuf.ByteString value)
      optional string key = 6;
      Parameters:
      value - The bytes for key to set.
      Returns:
      This builder for chaining.
    • getHeadersCount

      public int getHeadersCount()
      Description copied from interface: IngestionDefaultsOrBuilder
      Total headers size should not exceed a max of 2KiB (keys + values)
      
      map<string, string> headers = 8;
      Specified by:
      getHeadersCount in interface IngestionDefaultsOrBuilder
    • containsHeaders

      public boolean containsHeaders(String key)
      Total headers size should not exceed a max of 2KiB (keys + values)
      
      map<string, string> headers = 8;
      Specified by:
      containsHeaders in interface IngestionDefaultsOrBuilder
    • getHeaders

      @Deprecated public Map<String,String> getHeaders()
      Deprecated.
      Use getHeadersMap() instead.
      Specified by:
      getHeaders in interface IngestionDefaultsOrBuilder
    • getHeadersMap

      public Map<String,String> getHeadersMap()
      Total headers size should not exceed a max of 2KiB (keys + values)
      
      map<string, string> headers = 8;
      Specified by:
      getHeadersMap in interface IngestionDefaultsOrBuilder
    • getHeadersOrDefault

      public String getHeadersOrDefault(String key, String defaultValue)
      Total headers size should not exceed a max of 2KiB (keys + values)
      
      map<string, string> headers = 8;
      Specified by:
      getHeadersOrDefault in interface IngestionDefaultsOrBuilder
    • getHeadersOrThrow

      public String getHeadersOrThrow(String key)
      Total headers size should not exceed a max of 2KiB (keys + values)
      
      map<string, string> headers = 8;
      Specified by:
      getHeadersOrThrow in interface IngestionDefaultsOrBuilder
    • clearHeaders

      public IngestionDefaults.Builder clearHeaders()
    • removeHeaders

      public IngestionDefaults.Builder removeHeaders(String key)
      Total headers size should not exceed a max of 2KiB (keys + values)
      
      map<string, string> headers = 8;
    • getMutableHeaders

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

      public IngestionDefaults.Builder putHeaders(String key, String value)
      Total headers size should not exceed a max of 2KiB (keys + values)
      
      map<string, string> headers = 8;
    • putAllHeaders

      public IngestionDefaults.Builder putAllHeaders(Map<String,String> values)
      Total headers size should not exceed a max of 2KiB (keys + values)
      
      map<string, string> headers = 8;