Class Function.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Function.Builder>
com.google.firestore.v1.Function.Builder
All Implemented Interfaces:
FunctionOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Function

public static final class Function.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Function.Builder> implements FunctionOrBuilder
 Represents an unevaluated scalar expression.

 For example, the expression `like(user_name, "%alice%")` is represented as:

 ```
 name: "like"
 args { field_reference: "user_name" }
 args { string_value: "%alice%" }
 ```
 
Protobuf type google.firestore.v1.Function
  • 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<Function.Builder>
    • internalGetMutableMapFieldReflection

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

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

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

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

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

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

      public Function.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<Function.Builder>
    • setField

      public Function.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<Function.Builder>
    • clearField

      public Function.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<Function.Builder>
    • clearOneof

      public Function.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<Function.Builder>
    • setRepeatedField

      public Function.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<Function.Builder>
    • addRepeatedField

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

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

      public Function.Builder mergeFrom(Function other)
    • isInitialized

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

      public Function.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<Function.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Required. The name of the function to evaluate.
      
       **Requires:**
      
       * must be in snake case (lower case with underscore separator).
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getName in interface FunctionOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Required. The name of the function to evaluate.
      
       **Requires:**
      
       * must be in snake case (lower case with underscore separator).
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getNameBytes in interface FunctionOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Function.Builder setName(String value)
       Required. The name of the function to evaluate.
      
       **Requires:**
      
       * must be in snake case (lower case with underscore separator).
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Function.Builder clearName()
       Required. The name of the function to evaluate.
      
       **Requires:**
      
       * must be in snake case (lower case with underscore separator).
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setNameBytes

      public Function.Builder setNameBytes(com.google.protobuf.ByteString value)
       Required. The name of the function to evaluate.
      
       **Requires:**
      
       * must be in snake case (lower case with underscore separator).
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getArgsList

      public List<Value> getArgsList()
       Optional. Ordered list of arguments the given function expects.
       
      repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getArgsList in interface FunctionOrBuilder
    • getArgsCount

      public int getArgsCount()
       Optional. Ordered list of arguments the given function expects.
       
      repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getArgsCount in interface FunctionOrBuilder
    • getArgs

      public Value getArgs(int index)
       Optional. Ordered list of arguments the given function expects.
       
      repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getArgs in interface FunctionOrBuilder
    • setArgs

      public Function.Builder setArgs(int index, Value value)
       Optional. Ordered list of arguments the given function expects.
       
      repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL];
    • setArgs

      public Function.Builder setArgs(int index, Value.Builder builderForValue)
       Optional. Ordered list of arguments the given function expects.
       
      repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL];
    • addArgs

      public Function.Builder addArgs(Value value)
       Optional. Ordered list of arguments the given function expects.
       
      repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL];
    • addArgs

      public Function.Builder addArgs(int index, Value value)
       Optional. Ordered list of arguments the given function expects.
       
      repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL];
    • addArgs

      public Function.Builder addArgs(Value.Builder builderForValue)
       Optional. Ordered list of arguments the given function expects.
       
      repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL];
    • addArgs

      public Function.Builder addArgs(int index, Value.Builder builderForValue)
       Optional. Ordered list of arguments the given function expects.
       
      repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL];
    • addAllArgs

      public Function.Builder addAllArgs(Iterable<? extends Value> values)
       Optional. Ordered list of arguments the given function expects.
       
      repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL];
    • clearArgs

      public Function.Builder clearArgs()
       Optional. Ordered list of arguments the given function expects.
       
      repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL];
    • removeArgs

      public Function.Builder removeArgs(int index)
       Optional. Ordered list of arguments the given function expects.
       
      repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL];
    • getArgsBuilder

      public Value.Builder getArgsBuilder(int index)
       Optional. Ordered list of arguments the given function expects.
       
      repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL];
    • getArgsOrBuilder

      public ValueOrBuilder getArgsOrBuilder(int index)
       Optional. Ordered list of arguments the given function expects.
       
      repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getArgsOrBuilder in interface FunctionOrBuilder
    • getArgsOrBuilderList

      public List<? extends ValueOrBuilder> getArgsOrBuilderList()
       Optional. Ordered list of arguments the given function expects.
       
      repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getArgsOrBuilderList in interface FunctionOrBuilder
    • addArgsBuilder

      public Value.Builder addArgsBuilder()
       Optional. Ordered list of arguments the given function expects.
       
      repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL];
    • addArgsBuilder

      public Value.Builder addArgsBuilder(int index)
       Optional. Ordered list of arguments the given function expects.
       
      repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL];
    • getArgsBuilderList

      public List<Value.Builder> getArgsBuilderList()
       Optional. Ordered list of arguments the given function expects.
       
      repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL];
    • getOptionsCount

      public int getOptionsCount()
      Description copied from interface: FunctionOrBuilder
       Optional. Optional named arguments that certain functions may support.
       
      map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getOptionsCount in interface FunctionOrBuilder
    • containsOptions

      public boolean containsOptions(String key)
       Optional. Optional named arguments that certain functions may support.
       
      map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      containsOptions in interface FunctionOrBuilder
    • getOptions

      @Deprecated public Map<String,Value> getOptions()
      Deprecated.
      Use getOptionsMap() instead.
      Specified by:
      getOptions in interface FunctionOrBuilder
    • getOptionsMap

      public Map<String,Value> getOptionsMap()
       Optional. Optional named arguments that certain functions may support.
       
      map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getOptionsMap in interface FunctionOrBuilder
    • getOptionsOrDefault

      public Value getOptionsOrDefault(String key, Value defaultValue)
       Optional. Optional named arguments that certain functions may support.
       
      map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getOptionsOrDefault in interface FunctionOrBuilder
    • getOptionsOrThrow

      public Value getOptionsOrThrow(String key)
       Optional. Optional named arguments that certain functions may support.
       
      map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getOptionsOrThrow in interface FunctionOrBuilder
    • clearOptions

      public Function.Builder clearOptions()
    • removeOptions

      public Function.Builder removeOptions(String key)
       Optional. Optional named arguments that certain functions may support.
       
      map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getMutableOptions

      @Deprecated public Map<String,Value> getMutableOptions()
      Deprecated.
      Use alternate mutation accessors instead.
    • putOptions

      public Function.Builder putOptions(String key, Value value)
       Optional. Optional named arguments that certain functions may support.
       
      map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL];
    • putAllOptions

      public Function.Builder putAllOptions(Map<String,Value> values)
       Optional. Optional named arguments that certain functions may support.
       
      map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL];
    • putOptionsBuilderIfAbsent

      public Value.Builder putOptionsBuilderIfAbsent(String key)
       Optional. Optional named arguments that certain functions may support.
       
      map<string, .google.firestore.v1.Value> options = 3 [(.google.api.field_behavior) = OPTIONAL];
    • setUnknownFields

      public final Function.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<Function.Builder>
    • mergeUnknownFields

      public final Function.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<Function.Builder>