Class Literal.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<Literal,Literal.Builder>
com.google.api.expr.v1beta1.Literal.Builder
All Implemented Interfaces:
LiteralOrBuilder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, Cloneable
Enclosing class:
Literal

public static final class Literal.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<Literal,Literal.Builder> implements LiteralOrBuilder
 Represents a primitive literal.

 This is similar to the primitives supported in the well-known type
 `google.protobuf.Value`, but richer so it can represent CEL's full range of
 primitives.

 Lists and structs are not included as constants as these aggregate types may
 contain [Expr][google.api.expr.v1beta1.Expr] elements which require evaluation and are thus not constant.

 Examples of literals include: `"hello"`, `b'bytes'`, `1u`, `4.2`, `-2`,
 `true`, `null`.
 
Protobuf type google.api.expr.v1beta1.Literal
  • Method Details

    • getConstantKindCase

      public Literal.ConstantKindCase getConstantKindCase()
      Specified by:
      getConstantKindCase in interface LiteralOrBuilder
    • clearConstantKind

      public Literal.Builder clearConstantKind()
    • hasNullValue

      public boolean hasNullValue()
       null value.
       
      .google.protobuf.NullValue null_value = 1 [json_name = "nullValue"];
      Specified by:
      hasNullValue in interface LiteralOrBuilder
      Returns:
      Whether the nullValue field is set.
    • getNullValueValue

      public int getNullValueValue()
       null value.
       
      .google.protobuf.NullValue null_value = 1 [json_name = "nullValue"];
      Specified by:
      getNullValueValue in interface LiteralOrBuilder
      Returns:
      The enum numeric value on the wire for nullValue.
    • setNullValueValue

      public Literal.Builder setNullValueValue(int value)
       null value.
       
      .google.protobuf.NullValue null_value = 1 [json_name = "nullValue"];
      Parameters:
      value - The enum numeric value on the wire for nullValue to set.
      Returns:
      This builder for chaining.
    • getNullValue

      public com.google.protobuf.NullValue getNullValue()
       null value.
       
      .google.protobuf.NullValue null_value = 1 [json_name = "nullValue"];
      Specified by:
      getNullValue in interface LiteralOrBuilder
      Returns:
      The nullValue.
    • setNullValue

      public Literal.Builder setNullValue(com.google.protobuf.NullValue value)
       null value.
       
      .google.protobuf.NullValue null_value = 1 [json_name = "nullValue"];
      Parameters:
      value - The nullValue to set.
      Returns:
      This builder for chaining.
    • clearNullValue

      public Literal.Builder clearNullValue()
       null value.
       
      .google.protobuf.NullValue null_value = 1 [json_name = "nullValue"];
      Returns:
      This builder for chaining.
    • hasBoolValue

      public boolean hasBoolValue()
       boolean value.
       
      bool bool_value = 2 [json_name = "boolValue"];
      Specified by:
      hasBoolValue in interface LiteralOrBuilder
      Returns:
      Whether the boolValue field is set.
    • getBoolValue

      public boolean getBoolValue()
       boolean value.
       
      bool bool_value = 2 [json_name = "boolValue"];
      Specified by:
      getBoolValue in interface LiteralOrBuilder
      Returns:
      The boolValue.
    • setBoolValue

      public Literal.Builder setBoolValue(boolean value)
       boolean value.
       
      bool bool_value = 2 [json_name = "boolValue"];
      Parameters:
      value - The boolValue to set.
      Returns:
      This builder for chaining.
    • clearBoolValue

      public Literal.Builder clearBoolValue()
       boolean value.
       
      bool bool_value = 2 [json_name = "boolValue"];
      Returns:
      This builder for chaining.
    • hasInt64Value

      public boolean hasInt64Value()
       int64 value.
       
      int64 int64_value = 3 [json_name = "int64Value"];
      Specified by:
      hasInt64Value in interface LiteralOrBuilder
      Returns:
      Whether the int64Value field is set.
    • getInt64Value

      public long getInt64Value()
       int64 value.
       
      int64 int64_value = 3 [json_name = "int64Value"];
      Specified by:
      getInt64Value in interface LiteralOrBuilder
      Returns:
      The int64Value.
    • setInt64Value

      public Literal.Builder setInt64Value(long value)
       int64 value.
       
      int64 int64_value = 3 [json_name = "int64Value"];
      Parameters:
      value - The int64Value to set.
      Returns:
      This builder for chaining.
    • clearInt64Value

      public Literal.Builder clearInt64Value()
       int64 value.
       
      int64 int64_value = 3 [json_name = "int64Value"];
      Returns:
      This builder for chaining.
    • hasUint64Value

      public boolean hasUint64Value()
       uint64 value.
       
      uint64 uint64_value = 4 [json_name = "uint64Value"];
      Specified by:
      hasUint64Value in interface LiteralOrBuilder
      Returns:
      Whether the uint64Value field is set.
    • getUint64Value

      public long getUint64Value()
       uint64 value.
       
      uint64 uint64_value = 4 [json_name = "uint64Value"];
      Specified by:
      getUint64Value in interface LiteralOrBuilder
      Returns:
      The uint64Value.
    • setUint64Value

      public Literal.Builder setUint64Value(long value)
       uint64 value.
       
      uint64 uint64_value = 4 [json_name = "uint64Value"];
      Parameters:
      value - The uint64Value to set.
      Returns:
      This builder for chaining.
    • clearUint64Value

      public Literal.Builder clearUint64Value()
       uint64 value.
       
      uint64 uint64_value = 4 [json_name = "uint64Value"];
      Returns:
      This builder for chaining.
    • hasDoubleValue

      public boolean hasDoubleValue()
       double value.
       
      double double_value = 5 [json_name = "doubleValue"];
      Specified by:
      hasDoubleValue in interface LiteralOrBuilder
      Returns:
      Whether the doubleValue field is set.
    • getDoubleValue

      public double getDoubleValue()
       double value.
       
      double double_value = 5 [json_name = "doubleValue"];
      Specified by:
      getDoubleValue in interface LiteralOrBuilder
      Returns:
      The doubleValue.
    • setDoubleValue

      public Literal.Builder setDoubleValue(double value)
       double value.
       
      double double_value = 5 [json_name = "doubleValue"];
      Parameters:
      value - The doubleValue to set.
      Returns:
      This builder for chaining.
    • clearDoubleValue

      public Literal.Builder clearDoubleValue()
       double value.
       
      double double_value = 5 [json_name = "doubleValue"];
      Returns:
      This builder for chaining.
    • hasStringValue

      public boolean hasStringValue()
       string value.
       
      string string_value = 6 [json_name = "stringValue"];
      Specified by:
      hasStringValue in interface LiteralOrBuilder
      Returns:
      Whether the stringValue field is set.
    • getStringValue

      public String getStringValue()
       string value.
       
      string string_value = 6 [json_name = "stringValue"];
      Specified by:
      getStringValue in interface LiteralOrBuilder
      Returns:
      The stringValue.
    • getStringValueBytes

      public com.google.protobuf.ByteString getStringValueBytes()
       string value.
       
      string string_value = 6 [json_name = "stringValue"];
      Specified by:
      getStringValueBytes in interface LiteralOrBuilder
      Returns:
      The bytes for stringValue.
    • setStringValue

      public Literal.Builder setStringValue(String value)
       string value.
       
      string string_value = 6 [json_name = "stringValue"];
      Parameters:
      value - The stringValue to set.
      Returns:
      This builder for chaining.
    • clearStringValue

      public Literal.Builder clearStringValue()
       string value.
       
      string string_value = 6 [json_name = "stringValue"];
      Returns:
      This builder for chaining.
    • setStringValueBytes

      public Literal.Builder setStringValueBytes(com.google.protobuf.ByteString value)
       string value.
       
      string string_value = 6 [json_name = "stringValue"];
      Parameters:
      value - The bytes for stringValue to set.
      Returns:
      This builder for chaining.
    • hasBytesValue

      public boolean hasBytesValue()
       bytes value.
       
      bytes bytes_value = 7 [json_name = "bytesValue"];
      Specified by:
      hasBytesValue in interface LiteralOrBuilder
      Returns:
      Whether the bytesValue field is set.
    • getBytesValue

      public com.google.protobuf.ByteString getBytesValue()
       bytes value.
       
      bytes bytes_value = 7 [json_name = "bytesValue"];
      Specified by:
      getBytesValue in interface LiteralOrBuilder
      Returns:
      The bytesValue.
    • setBytesValue

      public Literal.Builder setBytesValue(com.google.protobuf.ByteString value)
       bytes value.
       
      bytes bytes_value = 7 [json_name = "bytesValue"];
      Parameters:
      value - The bytesValue to set.
      Returns:
      This builder for chaining.
    • clearBytesValue

      public Literal.Builder clearBytesValue()
       bytes value.
       
      bytes bytes_value = 7 [json_name = "bytesValue"];
      Returns:
      This builder for chaining.