Class MetricStructuredName.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<MetricStructuredName.Builder>
com.google.dataflow.v1beta3.MetricStructuredName.Builder
All Implemented Interfaces:
MetricStructuredNameOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
MetricStructuredName

public static final class MetricStructuredName.Builder extends com.google.protobuf.GeneratedMessage.Builder<MetricStructuredName.Builder> implements MetricStructuredNameOrBuilder
 Identifies a metric, by describing the source which generated the
 metric.
 
Protobuf type google.dataflow.v1beta3.MetricStructuredName
  • 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<MetricStructuredName.Builder>
    • internalGetMutableMapFieldReflection

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<MetricStructuredName.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<MetricStructuredName.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<MetricStructuredName.Builder>
    • getDefaultInstanceForType

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

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

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

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

    • isInitialized

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

      public MetricStructuredName.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<MetricStructuredName.Builder>
      Throws:
      IOException
    • getOrigin

      public String getOrigin()
       Origin (namespace) of metric name. May be blank for user-define metrics;
       will be "dataflow" for metrics defined by the Dataflow service or SDK.
       
      string origin = 1;
      Specified by:
      getOrigin in interface MetricStructuredNameOrBuilder
      Returns:
      The origin.
    • getOriginBytes

      public com.google.protobuf.ByteString getOriginBytes()
       Origin (namespace) of metric name. May be blank for user-define metrics;
       will be "dataflow" for metrics defined by the Dataflow service or SDK.
       
      string origin = 1;
      Specified by:
      getOriginBytes in interface MetricStructuredNameOrBuilder
      Returns:
      The bytes for origin.
    • setOrigin

      public MetricStructuredName.Builder setOrigin(String value)
       Origin (namespace) of metric name. May be blank for user-define metrics;
       will be "dataflow" for metrics defined by the Dataflow service or SDK.
       
      string origin = 1;
      Parameters:
      value - The origin to set.
      Returns:
      This builder for chaining.
    • clearOrigin

      public MetricStructuredName.Builder clearOrigin()
       Origin (namespace) of metric name. May be blank for user-define metrics;
       will be "dataflow" for metrics defined by the Dataflow service or SDK.
       
      string origin = 1;
      Returns:
      This builder for chaining.
    • setOriginBytes

      public MetricStructuredName.Builder setOriginBytes(com.google.protobuf.ByteString value)
       Origin (namespace) of metric name. May be blank for user-define metrics;
       will be "dataflow" for metrics defined by the Dataflow service or SDK.
       
      string origin = 1;
      Parameters:
      value - The bytes for origin to set.
      Returns:
      This builder for chaining.
    • getName

      public String getName()
       Worker-defined metric name.
       
      string name = 2;
      Specified by:
      getName in interface MetricStructuredNameOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Worker-defined metric name.
       
      string name = 2;
      Specified by:
      getNameBytes in interface MetricStructuredNameOrBuilder
      Returns:
      The bytes for name.
    • setName

      public MetricStructuredName.Builder setName(String value)
       Worker-defined metric name.
       
      string name = 2;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public MetricStructuredName.Builder clearName()
       Worker-defined metric name.
       
      string name = 2;
      Returns:
      This builder for chaining.
    • setNameBytes

      public MetricStructuredName.Builder setNameBytes(com.google.protobuf.ByteString value)
       Worker-defined metric name.
       
      string name = 2;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getContextCount

      public int getContextCount()
      Description copied from interface: MetricStructuredNameOrBuilder
       Zero or more labeled fields which identify the part of the job this
       metric is associated with, such as the name of a step or collection.
      
       For example, built-in counters associated with steps will have
       context['step'] = <step-name>. Counters associated with PCollections
       in the SDK will have context['pcollection'] = <pcollection-name>.
       
      map<string, string> context = 3;
      Specified by:
      getContextCount in interface MetricStructuredNameOrBuilder
    • containsContext

      public boolean containsContext(String key)
       Zero or more labeled fields which identify the part of the job this
       metric is associated with, such as the name of a step or collection.
      
       For example, built-in counters associated with steps will have
       context['step'] = <step-name>. Counters associated with PCollections
       in the SDK will have context['pcollection'] = <pcollection-name>.
       
      map<string, string> context = 3;
      Specified by:
      containsContext in interface MetricStructuredNameOrBuilder
    • getContext

      @Deprecated public Map<String,String> getContext()
      Deprecated.
      Use getContextMap() instead.
      Specified by:
      getContext in interface MetricStructuredNameOrBuilder
    • getContextMap

      public Map<String,String> getContextMap()
       Zero or more labeled fields which identify the part of the job this
       metric is associated with, such as the name of a step or collection.
      
       For example, built-in counters associated with steps will have
       context['step'] = <step-name>. Counters associated with PCollections
       in the SDK will have context['pcollection'] = <pcollection-name>.
       
      map<string, string> context = 3;
      Specified by:
      getContextMap in interface MetricStructuredNameOrBuilder
    • getContextOrDefault

      public String getContextOrDefault(String key, String defaultValue)
       Zero or more labeled fields which identify the part of the job this
       metric is associated with, such as the name of a step or collection.
      
       For example, built-in counters associated with steps will have
       context['step'] = <step-name>. Counters associated with PCollections
       in the SDK will have context['pcollection'] = <pcollection-name>.
       
      map<string, string> context = 3;
      Specified by:
      getContextOrDefault in interface MetricStructuredNameOrBuilder
    • getContextOrThrow

      public String getContextOrThrow(String key)
       Zero or more labeled fields which identify the part of the job this
       metric is associated with, such as the name of a step or collection.
      
       For example, built-in counters associated with steps will have
       context['step'] = <step-name>. Counters associated with PCollections
       in the SDK will have context['pcollection'] = <pcollection-name>.
       
      map<string, string> context = 3;
      Specified by:
      getContextOrThrow in interface MetricStructuredNameOrBuilder
    • clearContext

      public MetricStructuredName.Builder clearContext()
    • removeContext

      public MetricStructuredName.Builder removeContext(String key)
       Zero or more labeled fields which identify the part of the job this
       metric is associated with, such as the name of a step or collection.
      
       For example, built-in counters associated with steps will have
       context['step'] = <step-name>. Counters associated with PCollections
       in the SDK will have context['pcollection'] = <pcollection-name>.
       
      map<string, string> context = 3;
    • getMutableContext

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

      public MetricStructuredName.Builder putContext(String key, String value)
       Zero or more labeled fields which identify the part of the job this
       metric is associated with, such as the name of a step or collection.
      
       For example, built-in counters associated with steps will have
       context['step'] = <step-name>. Counters associated with PCollections
       in the SDK will have context['pcollection'] = <pcollection-name>.
       
      map<string, string> context = 3;
    • putAllContext

      public MetricStructuredName.Builder putAllContext(Map<String,String> values)
       Zero or more labeled fields which identify the part of the job this
       metric is associated with, such as the name of a step or collection.
      
       For example, built-in counters associated with steps will have
       context['step'] = <step-name>. Counters associated with PCollections
       in the SDK will have context['pcollection'] = <pcollection-name>.
       
      map<string, string> context = 3;