Class 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.GeneratedMessageV3.Builder<MetricStructuredName.Builder>
    implements MetricStructuredNameOrBuilder
     Identifies a metric, by describing the source which generated the
     metric.
     
    Protobuf type google.dataflow.v1beta3.MetricStructuredName
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<MetricStructuredName.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<MetricStructuredName.Builder>
      • internalGetFieldAccessorTable

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

        public 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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

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

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

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

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

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

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

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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.
      • 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
      • 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
      • 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;
      • setUnknownFields

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

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