Class Metric.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Metric.Builder>
com.google.analytics.data.v1beta.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.GeneratedMessage.Builder<Metric.Builder> implements MetricOrBuilder
 The quantitative measurements of a report. For example, the metric
 `eventCount` is the total number of events. Requests are allowed up to 10
 metrics.
 
Protobuf type google.analytics.data.v1beta.Metric
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    A mathematical expression for derived metrics.
    Indicates if a metric is invisible in the report response.
    The name of the metric.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    A mathematical expression for derived metrics.
    com.google.protobuf.ByteString
    A mathematical expression for derived metrics.
    boolean
    Indicates if a metric is invisible in the report response.
    The name of the metric.
    com.google.protobuf.ByteString
    The name of the metric.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    A mathematical expression for derived metrics.
    setExpressionBytes(com.google.protobuf.ByteString value)
    A mathematical expression for derived metrics.
    setInvisible(boolean value)
    Indicates if a metric is invisible in the report response.
    setName(String value)
    The name of the metric.
    setNameBytes(com.google.protobuf.ByteString value)
    The name of the metric.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

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

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

      public String getName()
       The name of the metric. See the [API
       Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics)
       for the list of metric names supported by core reporting methods such
       as `runReport` and `batchRunReports`. See
       [Realtime
       Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics)
       for the list of metric names supported by the `runRealtimeReport`
       method. See
       [Funnel
       Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#metrics)
       for the list of metric names supported by the `runFunnelReport`
       method.
      
       If `expression` is specified, `name` can be any string that you would like
       within the allowed character set. For example if `expression` is
       `screenPageViews/sessions`, you could call that metric's name =
       `viewsPerSession`. Metric names that you choose must match the regular
       expression `^[a-zA-Z0-9_]$`.
      
       Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
       `expression`.
       
      string name = 1;
      Specified by:
      getName in interface MetricOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The name of the metric. See the [API
       Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics)
       for the list of metric names supported by core reporting methods such
       as `runReport` and `batchRunReports`. See
       [Realtime
       Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics)
       for the list of metric names supported by the `runRealtimeReport`
       method. See
       [Funnel
       Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#metrics)
       for the list of metric names supported by the `runFunnelReport`
       method.
      
       If `expression` is specified, `name` can be any string that you would like
       within the allowed character set. For example if `expression` is
       `screenPageViews/sessions`, you could call that metric's name =
       `viewsPerSession`. Metric names that you choose must match the regular
       expression `^[a-zA-Z0-9_]$`.
      
       Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
       `expression`.
       
      string name = 1;
      Specified by:
      getNameBytes in interface MetricOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Metric.Builder setName(String value)
       The name of the metric. See the [API
       Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics)
       for the list of metric names supported by core reporting methods such
       as `runReport` and `batchRunReports`. See
       [Realtime
       Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics)
       for the list of metric names supported by the `runRealtimeReport`
       method. See
       [Funnel
       Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#metrics)
       for the list of metric names supported by the `runFunnelReport`
       method.
      
       If `expression` is specified, `name` can be any string that you would like
       within the allowed character set. For example if `expression` is
       `screenPageViews/sessions`, you could call that metric's name =
       `viewsPerSession`. Metric names that you choose must match the regular
       expression `^[a-zA-Z0-9_]$`.
      
       Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
       `expression`.
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Metric.Builder clearName()
       The name of the metric. See the [API
       Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics)
       for the list of metric names supported by core reporting methods such
       as `runReport` and `batchRunReports`. See
       [Realtime
       Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics)
       for the list of metric names supported by the `runRealtimeReport`
       method. See
       [Funnel
       Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#metrics)
       for the list of metric names supported by the `runFunnelReport`
       method.
      
       If `expression` is specified, `name` can be any string that you would like
       within the allowed character set. For example if `expression` is
       `screenPageViews/sessions`, you could call that metric's name =
       `viewsPerSession`. Metric names that you choose must match the regular
       expression `^[a-zA-Z0-9_]$`.
      
       Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
       `expression`.
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public Metric.Builder setNameBytes(com.google.protobuf.ByteString value)
       The name of the metric. See the [API
       Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics)
       for the list of metric names supported by core reporting methods such
       as `runReport` and `batchRunReports`. See
       [Realtime
       Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics)
       for the list of metric names supported by the `runRealtimeReport`
       method. See
       [Funnel
       Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#metrics)
       for the list of metric names supported by the `runFunnelReport`
       method.
      
       If `expression` is specified, `name` can be any string that you would like
       within the allowed character set. For example if `expression` is
       `screenPageViews/sessions`, you could call that metric's name =
       `viewsPerSession`. Metric names that you choose must match the regular
       expression `^[a-zA-Z0-9_]$`.
      
       Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
       `expression`.
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getExpression

      public String getExpression()
       A mathematical expression for derived metrics. For example, the metric
       Event count per user is `eventCount/totalUsers`.
       
      string expression = 2;
      Specified by:
      getExpression in interface MetricOrBuilder
      Returns:
      The expression.
    • getExpressionBytes

      public com.google.protobuf.ByteString getExpressionBytes()
       A mathematical expression for derived metrics. For example, the metric
       Event count per user is `eventCount/totalUsers`.
       
      string expression = 2;
      Specified by:
      getExpressionBytes in interface MetricOrBuilder
      Returns:
      The bytes for expression.
    • setExpression

      public Metric.Builder setExpression(String value)
       A mathematical expression for derived metrics. For example, the metric
       Event count per user is `eventCount/totalUsers`.
       
      string expression = 2;
      Parameters:
      value - The expression to set.
      Returns:
      This builder for chaining.
    • clearExpression

      public Metric.Builder clearExpression()
       A mathematical expression for derived metrics. For example, the metric
       Event count per user is `eventCount/totalUsers`.
       
      string expression = 2;
      Returns:
      This builder for chaining.
    • setExpressionBytes

      public Metric.Builder setExpressionBytes(com.google.protobuf.ByteString value)
       A mathematical expression for derived metrics. For example, the metric
       Event count per user is `eventCount/totalUsers`.
       
      string expression = 2;
      Parameters:
      value - The bytes for expression to set.
      Returns:
      This builder for chaining.
    • getInvisible

      public boolean getInvisible()
       Indicates if a metric is invisible in the report response. If a metric is
       invisible, the metric will not produce a column in the response, but can be
       used in `metricFilter`, `orderBys`, or a metric `expression`.
       
      bool invisible = 3;
      Specified by:
      getInvisible in interface MetricOrBuilder
      Returns:
      The invisible.
    • setInvisible

      public Metric.Builder setInvisible(boolean value)
       Indicates if a metric is invisible in the report response. If a metric is
       invisible, the metric will not produce a column in the response, but can be
       used in `metricFilter`, `orderBys`, or a metric `expression`.
       
      bool invisible = 3;
      Parameters:
      value - The invisible to set.
      Returns:
      This builder for chaining.
    • clearInvisible

      public Metric.Builder clearInvisible()
       Indicates if a metric is invisible in the report response. If a metric is
       invisible, the metric will not produce a column in the response, but can be
       used in `metricFilter`, `orderBys`, or a metric `expression`.
       
      bool invisible = 3;
      Returns:
      This builder for chaining.