Class Constant.Builder

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

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

 Named 'Constant' here for backwards compatibility.

 This is similar as 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.v1alpha1.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.v1alpha1.Constant
  • Method Details

    • getConstantKindCase

      public Constant.ConstantKindCase getConstantKindCase()
      Specified by:
      getConstantKindCase in interface ConstantOrBuilder
    • clearConstantKind

      public Constant.Builder clearConstantKind()
    • hasNullValue

      public boolean hasNullValue()
       null value.
       
      .google.protobuf.NullValue null_value = 1 [json_name = "nullValue"];
      Specified by:
      hasNullValue in interface ConstantOrBuilder
      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 ConstantOrBuilder
      Returns:
      The enum numeric value on the wire for nullValue.
    • setNullValueValue

      public Constant.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 ConstantOrBuilder
      Returns:
      The nullValue.
    • setNullValue

      public Constant.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 Constant.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 ConstantOrBuilder
      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 ConstantOrBuilder
      Returns:
      The boolValue.
    • setBoolValue

      public Constant.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 Constant.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 ConstantOrBuilder
      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 ConstantOrBuilder
      Returns:
      The int64Value.
    • setInt64Value

      public Constant.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 Constant.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 ConstantOrBuilder
      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 ConstantOrBuilder
      Returns:
      The uint64Value.
    • setUint64Value

      public Constant.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 Constant.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 ConstantOrBuilder
      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 ConstantOrBuilder
      Returns:
      The doubleValue.
    • setDoubleValue

      public Constant.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 Constant.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 ConstantOrBuilder
      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 ConstantOrBuilder
      Returns:
      The stringValue.
    • getStringValueBytes

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

      public Constant.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 Constant.Builder clearStringValue()
       string value.
       
      string string_value = 6 [json_name = "stringValue"];
      Returns:
      This builder for chaining.
    • setStringValueBytes

      public Constant.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 ConstantOrBuilder
      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 ConstantOrBuilder
      Returns:
      The bytesValue.
    • setBytesValue

      public Constant.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 Constant.Builder clearBytesValue()
       bytes value.
       
      bytes bytes_value = 7 [json_name = "bytesValue"];
      Returns:
      This builder for chaining.
    • hasDurationValue

      @Deprecated public boolean hasDurationValue()
      Deprecated.
       protobuf.Duration value.
      
       Deprecated: duration is no longer considered a builtin cel type.
       
      .google.protobuf.Duration duration_value = 8 [json_name = "durationValue", deprecated = true];
      Specified by:
      hasDurationValue in interface ConstantOrBuilder
      Returns:
      Whether the durationValue field is set.
    • getDurationValue

      @Deprecated public com.google.protobuf.Duration getDurationValue()
      Deprecated.
       protobuf.Duration value.
      
       Deprecated: duration is no longer considered a builtin cel type.
       
      .google.protobuf.Duration duration_value = 8 [json_name = "durationValue", deprecated = true];
      Specified by:
      getDurationValue in interface ConstantOrBuilder
      Returns:
      The durationValue.
    • setDurationValue

      @Deprecated public Constant.Builder setDurationValue(com.google.protobuf.Duration value)
      Deprecated.
       protobuf.Duration value.
      
       Deprecated: duration is no longer considered a builtin cel type.
       
      .google.protobuf.Duration duration_value = 8 [json_name = "durationValue", deprecated = true];
    • setDurationValue

      @Deprecated public Constant.Builder setDurationValue(com.google.protobuf.Duration.Builder builderForValue)
      Deprecated.
       protobuf.Duration value.
      
       Deprecated: duration is no longer considered a builtin cel type.
       
      .google.protobuf.Duration duration_value = 8 [json_name = "durationValue", deprecated = true];
    • mergeDurationValue

      @Deprecated public Constant.Builder mergeDurationValue(com.google.protobuf.Duration value)
      Deprecated.
       protobuf.Duration value.
      
       Deprecated: duration is no longer considered a builtin cel type.
       
      .google.protobuf.Duration duration_value = 8 [json_name = "durationValue", deprecated = true];
    • clearDurationValue

      @Deprecated public Constant.Builder clearDurationValue()
      Deprecated.
       protobuf.Duration value.
      
       Deprecated: duration is no longer considered a builtin cel type.
       
      .google.protobuf.Duration duration_value = 8 [json_name = "durationValue", deprecated = true];
    • hasTimestampValue

      @Deprecated public boolean hasTimestampValue()
      Deprecated.
       protobuf.Timestamp value.
      
       Deprecated: timestamp is no longer considered a builtin cel type.
       
      .google.protobuf.Timestamp timestamp_value = 9 [json_name = "timestampValue", deprecated = true];
      Specified by:
      hasTimestampValue in interface ConstantOrBuilder
      Returns:
      Whether the timestampValue field is set.
    • getTimestampValue

      @Deprecated public com.google.protobuf.Timestamp getTimestampValue()
      Deprecated.
       protobuf.Timestamp value.
      
       Deprecated: timestamp is no longer considered a builtin cel type.
       
      .google.protobuf.Timestamp timestamp_value = 9 [json_name = "timestampValue", deprecated = true];
      Specified by:
      getTimestampValue in interface ConstantOrBuilder
      Returns:
      The timestampValue.
    • setTimestampValue

      @Deprecated public Constant.Builder setTimestampValue(com.google.protobuf.Timestamp value)
      Deprecated.
       protobuf.Timestamp value.
      
       Deprecated: timestamp is no longer considered a builtin cel type.
       
      .google.protobuf.Timestamp timestamp_value = 9 [json_name = "timestampValue", deprecated = true];
    • setTimestampValue

      @Deprecated public Constant.Builder setTimestampValue(com.google.protobuf.Timestamp.Builder builderForValue)
      Deprecated.
       protobuf.Timestamp value.
      
       Deprecated: timestamp is no longer considered a builtin cel type.
       
      .google.protobuf.Timestamp timestamp_value = 9 [json_name = "timestampValue", deprecated = true];
    • mergeTimestampValue

      @Deprecated public Constant.Builder mergeTimestampValue(com.google.protobuf.Timestamp value)
      Deprecated.
       protobuf.Timestamp value.
      
       Deprecated: timestamp is no longer considered a builtin cel type.
       
      .google.protobuf.Timestamp timestamp_value = 9 [json_name = "timestampValue", deprecated = true];
    • clearTimestampValue

      @Deprecated public Constant.Builder clearTimestampValue()
      Deprecated.
       protobuf.Timestamp value.
      
       Deprecated: timestamp is no longer considered a builtin cel type.
       
      .google.protobuf.Timestamp timestamp_value = 9 [json_name = "timestampValue", deprecated = true];