Class Metric.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Metric.Builder>
ai.chalk.protos.chalk.metrics.v4.Metric.Builder
All Implemented Interfaces:
MetricOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Metric

public static final class Metric.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Metric.Builder> implements MetricOrBuilder
Protobuf type chalk.metrics.v4.Metric
  • 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<Metric.Builder>
    • internalGetMutableMapFieldReflection

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

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

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

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

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

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

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

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

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

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

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

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

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

      public Metric.Builder mergeFrom(Metric other)
    • isInitialized

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

      public Metric.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<Metric.Builder>
      Throws:
      IOException
    • getValueCase

      public Metric.ValueCase getValueCase()
      Specified by:
      getValueCase in interface MetricOrBuilder
    • clearValue

      public Metric.Builder clearValue()
    • hasId

      public boolean hasId()
       optional because we may not have an id when we're doing the initial publish
       
      optional int64 id = 1 [json_name = "id"];
      Specified by:
      hasId in interface MetricOrBuilder
      Returns:
      Whether the id field is set.
    • getId

      public long getId()
       optional because we may not have an id when we're doing the initial publish
       
      optional int64 id = 1 [json_name = "id"];
      Specified by:
      getId in interface MetricOrBuilder
      Returns:
      The id.
    • setId

      public Metric.Builder setId(long value)
       optional because we may not have an id when we're doing the initial publish
       
      optional int64 id = 1 [json_name = "id"];
      Parameters:
      value - The id to set.
      Returns:
      This builder for chaining.
    • clearId

      public Metric.Builder clearId()
       optional because we may not have an id when we're doing the initial publish
       
      optional int64 id = 1 [json_name = "id"];
      Returns:
      This builder for chaining.
    • getEnvironmentId

      public String getEnvironmentId()
      string environment_id = 2 [json_name = "environmentId"];
      Specified by:
      getEnvironmentId in interface MetricOrBuilder
      Returns:
      The environmentId.
    • getEnvironmentIdBytes

      public com.google.protobuf.ByteString getEnvironmentIdBytes()
      string environment_id = 2 [json_name = "environmentId"];
      Specified by:
      getEnvironmentIdBytes in interface MetricOrBuilder
      Returns:
      The bytes for environmentId.
    • setEnvironmentId

      public Metric.Builder setEnvironmentId(String value)
      string environment_id = 2 [json_name = "environmentId"];
      Parameters:
      value - The environmentId to set.
      Returns:
      This builder for chaining.
    • clearEnvironmentId

      public Metric.Builder clearEnvironmentId()
      string environment_id = 2 [json_name = "environmentId"];
      Returns:
      This builder for chaining.
    • setEnvironmentIdBytes

      public Metric.Builder setEnvironmentIdBytes(com.google.protobuf.ByteString value)
      string environment_id = 2 [json_name = "environmentId"];
      Parameters:
      value - The bytes for environmentId to set.
      Returns:
      This builder for chaining.
    • getNamespaceValue

      public int getNamespaceValue()
      .chalk.metrics.v4.MetricNamespace namespace = 3 [json_name = "namespace"];
      Specified by:
      getNamespaceValue in interface MetricOrBuilder
      Returns:
      The enum numeric value on the wire for namespace.
    • setNamespaceValue

      public Metric.Builder setNamespaceValue(int value)
      .chalk.metrics.v4.MetricNamespace namespace = 3 [json_name = "namespace"];
      Parameters:
      value - The enum numeric value on the wire for namespace to set.
      Returns:
      This builder for chaining.
    • getNamespace

      public MetricNamespace getNamespace()
      .chalk.metrics.v4.MetricNamespace namespace = 3 [json_name = "namespace"];
      Specified by:
      getNamespace in interface MetricOrBuilder
      Returns:
      The namespace.
    • setNamespace

      public Metric.Builder setNamespace(MetricNamespace value)
      .chalk.metrics.v4.MetricNamespace namespace = 3 [json_name = "namespace"];
      Parameters:
      value - The namespace to set.
      Returns:
      This builder for chaining.
    • clearNamespace

      public Metric.Builder clearNamespace()
      .chalk.metrics.v4.MetricNamespace namespace = 3 [json_name = "namespace"];
      Returns:
      This builder for chaining.
    • getSource

      public String getSource()
      string source = 4 [json_name = "source"];
      Specified by:
      getSource in interface MetricOrBuilder
      Returns:
      The source.
    • getSourceBytes

      public com.google.protobuf.ByteString getSourceBytes()
      string source = 4 [json_name = "source"];
      Specified by:
      getSourceBytes in interface MetricOrBuilder
      Returns:
      The bytes for source.
    • setSource

      public Metric.Builder setSource(String value)
      string source = 4 [json_name = "source"];
      Parameters:
      value - The source to set.
      Returns:
      This builder for chaining.
    • clearSource

      public Metric.Builder clearSource()
      string source = 4 [json_name = "source"];
      Returns:
      This builder for chaining.
    • setSourceBytes

      public Metric.Builder setSourceBytes(com.google.protobuf.ByteString value)
      string source = 4 [json_name = "source"];
      Parameters:
      value - The bytes for source to set.
      Returns:
      This builder for chaining.
    • getNameValue

      public int getNameValue()
      .chalk.metrics.v4.MetricName name = 5 [json_name = "name"];
      Specified by:
      getNameValue in interface MetricOrBuilder
      Returns:
      The enum numeric value on the wire for name.
    • setNameValue

      public Metric.Builder setNameValue(int value)
      .chalk.metrics.v4.MetricName name = 5 [json_name = "name"];
      Parameters:
      value - The enum numeric value on the wire for name to set.
      Returns:
      This builder for chaining.
    • getName

      public MetricName getName()
      .chalk.metrics.v4.MetricName name = 5 [json_name = "name"];
      Specified by:
      getName in interface MetricOrBuilder
      Returns:
      The name.
    • setName

      public Metric.Builder setName(MetricName value)
      .chalk.metrics.v4.MetricName name = 5 [json_name = "name"];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Metric.Builder clearName()
      .chalk.metrics.v4.MetricName name = 5 [json_name = "name"];
      Returns:
      This builder for chaining.
    • getTypeValue

      public int getTypeValue()
      .chalk.metrics.v4.MetricType type = 6 [json_name = "type"];
      Specified by:
      getTypeValue in interface MetricOrBuilder
      Returns:
      The enum numeric value on the wire for type.
    • setTypeValue

      public Metric.Builder setTypeValue(int value)
      .chalk.metrics.v4.MetricType type = 6 [json_name = "type"];
      Parameters:
      value - The enum numeric value on the wire for type to set.
      Returns:
      This builder for chaining.
    • getType

      public MetricType getType()
      .chalk.metrics.v4.MetricType type = 6 [json_name = "type"];
      Specified by:
      getType in interface MetricOrBuilder
      Returns:
      The type.
    • setType

      public Metric.Builder setType(MetricType value)
      .chalk.metrics.v4.MetricType type = 6 [json_name = "type"];
      Parameters:
      value - The type to set.
      Returns:
      This builder for chaining.
    • clearType

      public Metric.Builder clearType()
      .chalk.metrics.v4.MetricType type = 6 [json_name = "type"];
      Returns:
      This builder for chaining.
    • getDeploymentId

      public String getDeploymentId()
      string deployment_id = 7 [json_name = "deploymentId"];
      Specified by:
      getDeploymentId in interface MetricOrBuilder
      Returns:
      The deploymentId.
    • getDeploymentIdBytes

      public com.google.protobuf.ByteString getDeploymentIdBytes()
      string deployment_id = 7 [json_name = "deploymentId"];
      Specified by:
      getDeploymentIdBytes in interface MetricOrBuilder
      Returns:
      The bytes for deploymentId.
    • setDeploymentId

      public Metric.Builder setDeploymentId(String value)
      string deployment_id = 7 [json_name = "deploymentId"];
      Parameters:
      value - The deploymentId to set.
      Returns:
      This builder for chaining.
    • clearDeploymentId

      public Metric.Builder clearDeploymentId()
      string deployment_id = 7 [json_name = "deploymentId"];
      Returns:
      This builder for chaining.
    • setDeploymentIdBytes

      public Metric.Builder setDeploymentIdBytes(com.google.protobuf.ByteString value)
      string deployment_id = 7 [json_name = "deploymentId"];
      Parameters:
      value - The bytes for deploymentId to set.
      Returns:
      This builder for chaining.
    • hasSketch

      public boolean hasSketch()
      string sketch = 10 [json_name = "sketch"];
      Specified by:
      hasSketch in interface MetricOrBuilder
      Returns:
      Whether the sketch field is set.
    • getSketch

      public String getSketch()
      string sketch = 10 [json_name = "sketch"];
      Specified by:
      getSketch in interface MetricOrBuilder
      Returns:
      The sketch.
    • getSketchBytes

      public com.google.protobuf.ByteString getSketchBytes()
      string sketch = 10 [json_name = "sketch"];
      Specified by:
      getSketchBytes in interface MetricOrBuilder
      Returns:
      The bytes for sketch.
    • setSketch

      public Metric.Builder setSketch(String value)
      string sketch = 10 [json_name = "sketch"];
      Parameters:
      value - The sketch to set.
      Returns:
      This builder for chaining.
    • clearSketch

      public Metric.Builder clearSketch()
      string sketch = 10 [json_name = "sketch"];
      Returns:
      This builder for chaining.
    • setSketchBytes

      public Metric.Builder setSketchBytes(com.google.protobuf.ByteString value)
      string sketch = 10 [json_name = "sketch"];
      Parameters:
      value - The bytes for sketch to set.
      Returns:
      This builder for chaining.
    • hasNumeric

      public boolean hasNumeric()
      double numeric = 11 [json_name = "numeric"];
      Specified by:
      hasNumeric in interface MetricOrBuilder
      Returns:
      Whether the numeric field is set.
    • getNumeric

      public double getNumeric()
      double numeric = 11 [json_name = "numeric"];
      Specified by:
      getNumeric in interface MetricOrBuilder
      Returns:
      The numeric.
    • setNumeric

      public Metric.Builder setNumeric(double value)
      double numeric = 11 [json_name = "numeric"];
      Parameters:
      value - The numeric to set.
      Returns:
      This builder for chaining.
    • clearNumeric

      public Metric.Builder clearNumeric()
      double numeric = 11 [json_name = "numeric"];
      Returns:
      This builder for chaining.
    • hasStatistics

      public boolean hasStatistics()
      optional .chalk.metrics.v4.MetricStatistics statistics = 12 [json_name = "statistics"];
      Specified by:
      hasStatistics in interface MetricOrBuilder
      Returns:
      Whether the statistics field is set.
    • getStatistics

      public MetricStatistics getStatistics()
      optional .chalk.metrics.v4.MetricStatistics statistics = 12 [json_name = "statistics"];
      Specified by:
      getStatistics in interface MetricOrBuilder
      Returns:
      The statistics.
    • setStatistics

      public Metric.Builder setStatistics(MetricStatistics value)
      optional .chalk.metrics.v4.MetricStatistics statistics = 12 [json_name = "statistics"];
    • setStatistics

      public Metric.Builder setStatistics(MetricStatistics.Builder builderForValue)
      optional .chalk.metrics.v4.MetricStatistics statistics = 12 [json_name = "statistics"];
    • mergeStatistics

      public Metric.Builder mergeStatistics(MetricStatistics value)
      optional .chalk.metrics.v4.MetricStatistics statistics = 12 [json_name = "statistics"];
    • clearStatistics

      public Metric.Builder clearStatistics()
      optional .chalk.metrics.v4.MetricStatistics statistics = 12 [json_name = "statistics"];
    • getStatisticsBuilder

      public MetricStatistics.Builder getStatisticsBuilder()
      optional .chalk.metrics.v4.MetricStatistics statistics = 12 [json_name = "statistics"];
    • getStatisticsOrBuilder

      public MetricStatisticsOrBuilder getStatisticsOrBuilder()
      optional .chalk.metrics.v4.MetricStatistics statistics = 12 [json_name = "statistics"];
      Specified by:
      getStatisticsOrBuilder in interface MetricOrBuilder
    • hasObservedAt

      public boolean hasObservedAt()
      optional .google.protobuf.Timestamp observed_at = 20 [json_name = "observedAt"];
      Specified by:
      hasObservedAt in interface MetricOrBuilder
      Returns:
      Whether the observedAt field is set.
    • getObservedAt

      public com.google.protobuf.Timestamp getObservedAt()
      optional .google.protobuf.Timestamp observed_at = 20 [json_name = "observedAt"];
      Specified by:
      getObservedAt in interface MetricOrBuilder
      Returns:
      The observedAt.
    • setObservedAt

      public Metric.Builder setObservedAt(com.google.protobuf.Timestamp value)
      optional .google.protobuf.Timestamp observed_at = 20 [json_name = "observedAt"];
    • setObservedAt

      public Metric.Builder setObservedAt(com.google.protobuf.Timestamp.Builder builderForValue)
      optional .google.protobuf.Timestamp observed_at = 20 [json_name = "observedAt"];
    • mergeObservedAt

      public Metric.Builder mergeObservedAt(com.google.protobuf.Timestamp value)
      optional .google.protobuf.Timestamp observed_at = 20 [json_name = "observedAt"];
    • clearObservedAt

      public Metric.Builder clearObservedAt()
      optional .google.protobuf.Timestamp observed_at = 20 [json_name = "observedAt"];
    • getObservedAtBuilder

      public com.google.protobuf.Timestamp.Builder getObservedAtBuilder()
      optional .google.protobuf.Timestamp observed_at = 20 [json_name = "observedAt"];
    • getObservedAtOrBuilder

      public com.google.protobuf.TimestampOrBuilder getObservedAtOrBuilder()
      optional .google.protobuf.Timestamp observed_at = 20 [json_name = "observedAt"];
      Specified by:
      getObservedAtOrBuilder in interface MetricOrBuilder
    • getAdditionalTagsCount

      public int getAdditionalTagsCount()
      Description copied from interface: MetricOrBuilder
      map<string, string> additional_tags = 30 [json_name = "additionalTags"];
      Specified by:
      getAdditionalTagsCount in interface MetricOrBuilder
    • containsAdditionalTags

      public boolean containsAdditionalTags(String key)
      map<string, string> additional_tags = 30 [json_name = "additionalTags"];
      Specified by:
      containsAdditionalTags in interface MetricOrBuilder
    • getAdditionalTags

      @Deprecated public Map<String,String> getAdditionalTags()
      Deprecated.
      Specified by:
      getAdditionalTags in interface MetricOrBuilder
    • getAdditionalTagsMap

      public Map<String,String> getAdditionalTagsMap()
      map<string, string> additional_tags = 30 [json_name = "additionalTags"];
      Specified by:
      getAdditionalTagsMap in interface MetricOrBuilder
    • getAdditionalTagsOrDefault

      public String getAdditionalTagsOrDefault(String key, String defaultValue)
      map<string, string> additional_tags = 30 [json_name = "additionalTags"];
      Specified by:
      getAdditionalTagsOrDefault in interface MetricOrBuilder
    • getAdditionalTagsOrThrow

      public String getAdditionalTagsOrThrow(String key)
      map<string, string> additional_tags = 30 [json_name = "additionalTags"];
      Specified by:
      getAdditionalTagsOrThrow in interface MetricOrBuilder
    • clearAdditionalTags

      public Metric.Builder clearAdditionalTags()
    • removeAdditionalTags

      public Metric.Builder removeAdditionalTags(String key)
      map<string, string> additional_tags = 30 [json_name = "additionalTags"];
    • getMutableAdditionalTags

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

      public Metric.Builder putAdditionalTags(String key, String value)
      map<string, string> additional_tags = 30 [json_name = "additionalTags"];
    • putAllAdditionalTags

      public Metric.Builder putAllAdditionalTags(Map<String,String> values)
      map<string, string> additional_tags = 30 [json_name = "additionalTags"];
    • setUnknownFields

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

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