Class Pivot.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Pivot.Builder>
com.google.analytics.data.v1beta.Pivot.Builder
All Implemented Interfaces:
PivotOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Pivot

public static final class Pivot.Builder extends com.google.protobuf.GeneratedMessage.Builder<Pivot.Builder> implements PivotOrBuilder
 Describes the visible dimension columns and rows in the report response.
 
Protobuf type google.analytics.data.v1beta.Pivot
  • 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<Pivot.Builder>
    • clear

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

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

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

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

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

      public Pivot.Builder mergeFrom(Pivot other)
    • isInitialized

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

      public Pivot.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<Pivot.Builder>
      Throws:
      IOException
    • getFieldNamesList

      public com.google.protobuf.ProtocolStringList getFieldNamesList()
       Dimension names for visible columns in the report response. Including
       "dateRange" produces a date range column; for each row in the response,
       dimension values in the date range column will indicate the corresponding
       date range from the request.
       
      repeated string field_names = 1;
      Specified by:
      getFieldNamesList in interface PivotOrBuilder
      Returns:
      A list containing the fieldNames.
    • getFieldNamesCount

      public int getFieldNamesCount()
       Dimension names for visible columns in the report response. Including
       "dateRange" produces a date range column; for each row in the response,
       dimension values in the date range column will indicate the corresponding
       date range from the request.
       
      repeated string field_names = 1;
      Specified by:
      getFieldNamesCount in interface PivotOrBuilder
      Returns:
      The count of fieldNames.
    • getFieldNames

      public String getFieldNames(int index)
       Dimension names for visible columns in the report response. Including
       "dateRange" produces a date range column; for each row in the response,
       dimension values in the date range column will indicate the corresponding
       date range from the request.
       
      repeated string field_names = 1;
      Specified by:
      getFieldNames in interface PivotOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The fieldNames at the given index.
    • getFieldNamesBytes

      public com.google.protobuf.ByteString getFieldNamesBytes(int index)
       Dimension names for visible columns in the report response. Including
       "dateRange" produces a date range column; for each row in the response,
       dimension values in the date range column will indicate the corresponding
       date range from the request.
       
      repeated string field_names = 1;
      Specified by:
      getFieldNamesBytes in interface PivotOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the fieldNames at the given index.
    • setFieldNames

      public Pivot.Builder setFieldNames(int index, String value)
       Dimension names for visible columns in the report response. Including
       "dateRange" produces a date range column; for each row in the response,
       dimension values in the date range column will indicate the corresponding
       date range from the request.
       
      repeated string field_names = 1;
      Parameters:
      index - The index to set the value at.
      value - The fieldNames to set.
      Returns:
      This builder for chaining.
    • addFieldNames

      public Pivot.Builder addFieldNames(String value)
       Dimension names for visible columns in the report response. Including
       "dateRange" produces a date range column; for each row in the response,
       dimension values in the date range column will indicate the corresponding
       date range from the request.
       
      repeated string field_names = 1;
      Parameters:
      value - The fieldNames to add.
      Returns:
      This builder for chaining.
    • addAllFieldNames

      public Pivot.Builder addAllFieldNames(Iterable<String> values)
       Dimension names for visible columns in the report response. Including
       "dateRange" produces a date range column; for each row in the response,
       dimension values in the date range column will indicate the corresponding
       date range from the request.
       
      repeated string field_names = 1;
      Parameters:
      values - The fieldNames to add.
      Returns:
      This builder for chaining.
    • clearFieldNames

      public Pivot.Builder clearFieldNames()
       Dimension names for visible columns in the report response. Including
       "dateRange" produces a date range column; for each row in the response,
       dimension values in the date range column will indicate the corresponding
       date range from the request.
       
      repeated string field_names = 1;
      Returns:
      This builder for chaining.
    • addFieldNamesBytes

      public Pivot.Builder addFieldNamesBytes(com.google.protobuf.ByteString value)
       Dimension names for visible columns in the report response. Including
       "dateRange" produces a date range column; for each row in the response,
       dimension values in the date range column will indicate the corresponding
       date range from the request.
       
      repeated string field_names = 1;
      Parameters:
      value - The bytes of the fieldNames to add.
      Returns:
      This builder for chaining.
    • getOrderBysList

      public List<OrderBy> getOrderBysList()
       Specifies how dimensions are ordered in the pivot. In the first Pivot, the
       OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
       Pivots, the OrderBys determine only PivotDimensionHeader ordering.
       Dimensions specified in these OrderBys must be a subset of
       Pivot.field_names.
       
      repeated .google.analytics.data.v1beta.OrderBy order_bys = 2;
      Specified by:
      getOrderBysList in interface PivotOrBuilder
    • getOrderBysCount

      public int getOrderBysCount()
       Specifies how dimensions are ordered in the pivot. In the first Pivot, the
       OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
       Pivots, the OrderBys determine only PivotDimensionHeader ordering.
       Dimensions specified in these OrderBys must be a subset of
       Pivot.field_names.
       
      repeated .google.analytics.data.v1beta.OrderBy order_bys = 2;
      Specified by:
      getOrderBysCount in interface PivotOrBuilder
    • getOrderBys

      public OrderBy getOrderBys(int index)
       Specifies how dimensions are ordered in the pivot. In the first Pivot, the
       OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
       Pivots, the OrderBys determine only PivotDimensionHeader ordering.
       Dimensions specified in these OrderBys must be a subset of
       Pivot.field_names.
       
      repeated .google.analytics.data.v1beta.OrderBy order_bys = 2;
      Specified by:
      getOrderBys in interface PivotOrBuilder
    • setOrderBys

      public Pivot.Builder setOrderBys(int index, OrderBy value)
       Specifies how dimensions are ordered in the pivot. In the first Pivot, the
       OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
       Pivots, the OrderBys determine only PivotDimensionHeader ordering.
       Dimensions specified in these OrderBys must be a subset of
       Pivot.field_names.
       
      repeated .google.analytics.data.v1beta.OrderBy order_bys = 2;
    • setOrderBys

      public Pivot.Builder setOrderBys(int index, OrderBy.Builder builderForValue)
       Specifies how dimensions are ordered in the pivot. In the first Pivot, the
       OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
       Pivots, the OrderBys determine only PivotDimensionHeader ordering.
       Dimensions specified in these OrderBys must be a subset of
       Pivot.field_names.
       
      repeated .google.analytics.data.v1beta.OrderBy order_bys = 2;
    • addOrderBys

      public Pivot.Builder addOrderBys(OrderBy value)
       Specifies how dimensions are ordered in the pivot. In the first Pivot, the
       OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
       Pivots, the OrderBys determine only PivotDimensionHeader ordering.
       Dimensions specified in these OrderBys must be a subset of
       Pivot.field_names.
       
      repeated .google.analytics.data.v1beta.OrderBy order_bys = 2;
    • addOrderBys

      public Pivot.Builder addOrderBys(int index, OrderBy value)
       Specifies how dimensions are ordered in the pivot. In the first Pivot, the
       OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
       Pivots, the OrderBys determine only PivotDimensionHeader ordering.
       Dimensions specified in these OrderBys must be a subset of
       Pivot.field_names.
       
      repeated .google.analytics.data.v1beta.OrderBy order_bys = 2;
    • addOrderBys

      public Pivot.Builder addOrderBys(OrderBy.Builder builderForValue)
       Specifies how dimensions are ordered in the pivot. In the first Pivot, the
       OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
       Pivots, the OrderBys determine only PivotDimensionHeader ordering.
       Dimensions specified in these OrderBys must be a subset of
       Pivot.field_names.
       
      repeated .google.analytics.data.v1beta.OrderBy order_bys = 2;
    • addOrderBys

      public Pivot.Builder addOrderBys(int index, OrderBy.Builder builderForValue)
       Specifies how dimensions are ordered in the pivot. In the first Pivot, the
       OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
       Pivots, the OrderBys determine only PivotDimensionHeader ordering.
       Dimensions specified in these OrderBys must be a subset of
       Pivot.field_names.
       
      repeated .google.analytics.data.v1beta.OrderBy order_bys = 2;
    • addAllOrderBys

      public Pivot.Builder addAllOrderBys(Iterable<? extends OrderBy> values)
       Specifies how dimensions are ordered in the pivot. In the first Pivot, the
       OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
       Pivots, the OrderBys determine only PivotDimensionHeader ordering.
       Dimensions specified in these OrderBys must be a subset of
       Pivot.field_names.
       
      repeated .google.analytics.data.v1beta.OrderBy order_bys = 2;
    • clearOrderBys

      public Pivot.Builder clearOrderBys()
       Specifies how dimensions are ordered in the pivot. In the first Pivot, the
       OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
       Pivots, the OrderBys determine only PivotDimensionHeader ordering.
       Dimensions specified in these OrderBys must be a subset of
       Pivot.field_names.
       
      repeated .google.analytics.data.v1beta.OrderBy order_bys = 2;
    • removeOrderBys

      public Pivot.Builder removeOrderBys(int index)
       Specifies how dimensions are ordered in the pivot. In the first Pivot, the
       OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
       Pivots, the OrderBys determine only PivotDimensionHeader ordering.
       Dimensions specified in these OrderBys must be a subset of
       Pivot.field_names.
       
      repeated .google.analytics.data.v1beta.OrderBy order_bys = 2;
    • getOrderBysBuilder

      public OrderBy.Builder getOrderBysBuilder(int index)
       Specifies how dimensions are ordered in the pivot. In the first Pivot, the
       OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
       Pivots, the OrderBys determine only PivotDimensionHeader ordering.
       Dimensions specified in these OrderBys must be a subset of
       Pivot.field_names.
       
      repeated .google.analytics.data.v1beta.OrderBy order_bys = 2;
    • getOrderBysOrBuilder

      public OrderByOrBuilder getOrderBysOrBuilder(int index)
       Specifies how dimensions are ordered in the pivot. In the first Pivot, the
       OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
       Pivots, the OrderBys determine only PivotDimensionHeader ordering.
       Dimensions specified in these OrderBys must be a subset of
       Pivot.field_names.
       
      repeated .google.analytics.data.v1beta.OrderBy order_bys = 2;
      Specified by:
      getOrderBysOrBuilder in interface PivotOrBuilder
    • getOrderBysOrBuilderList

      public List<? extends OrderByOrBuilder> getOrderBysOrBuilderList()
       Specifies how dimensions are ordered in the pivot. In the first Pivot, the
       OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
       Pivots, the OrderBys determine only PivotDimensionHeader ordering.
       Dimensions specified in these OrderBys must be a subset of
       Pivot.field_names.
       
      repeated .google.analytics.data.v1beta.OrderBy order_bys = 2;
      Specified by:
      getOrderBysOrBuilderList in interface PivotOrBuilder
    • addOrderBysBuilder

      public OrderBy.Builder addOrderBysBuilder()
       Specifies how dimensions are ordered in the pivot. In the first Pivot, the
       OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
       Pivots, the OrderBys determine only PivotDimensionHeader ordering.
       Dimensions specified in these OrderBys must be a subset of
       Pivot.field_names.
       
      repeated .google.analytics.data.v1beta.OrderBy order_bys = 2;
    • addOrderBysBuilder

      public OrderBy.Builder addOrderBysBuilder(int index)
       Specifies how dimensions are ordered in the pivot. In the first Pivot, the
       OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
       Pivots, the OrderBys determine only PivotDimensionHeader ordering.
       Dimensions specified in these OrderBys must be a subset of
       Pivot.field_names.
       
      repeated .google.analytics.data.v1beta.OrderBy order_bys = 2;
    • getOrderBysBuilderList

      public List<OrderBy.Builder> getOrderBysBuilderList()
       Specifies how dimensions are ordered in the pivot. In the first Pivot, the
       OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
       Pivots, the OrderBys determine only PivotDimensionHeader ordering.
       Dimensions specified in these OrderBys must be a subset of
       Pivot.field_names.
       
      repeated .google.analytics.data.v1beta.OrderBy order_bys = 2;
    • getOffset

      public long getOffset()
       The row count of the start row. The first row is counted as row 0.
       
      int64 offset = 3;
      Specified by:
      getOffset in interface PivotOrBuilder
      Returns:
      The offset.
    • setOffset

      public Pivot.Builder setOffset(long value)
       The row count of the start row. The first row is counted as row 0.
       
      int64 offset = 3;
      Parameters:
      value - The offset to set.
      Returns:
      This builder for chaining.
    • clearOffset

      public Pivot.Builder clearOffset()
       The row count of the start row. The first row is counted as row 0.
       
      int64 offset = 3;
      Returns:
      This builder for chaining.
    • getLimit

      public long getLimit()
       The number of unique combinations of dimension values to return in this
       pivot. The `limit` parameter is required. A `limit` of 10,000 is common for
       single pivot requests.
      
       The product of the `limit` for each `pivot` in a `RunPivotReportRequest`
       must not exceed 250,000. For example, a two pivot request with `limit:
       1000` in each pivot will fail because the product is `1,000,000`.
       
      int64 limit = 4;
      Specified by:
      getLimit in interface PivotOrBuilder
      Returns:
      The limit.
    • setLimit

      public Pivot.Builder setLimit(long value)
       The number of unique combinations of dimension values to return in this
       pivot. The `limit` parameter is required. A `limit` of 10,000 is common for
       single pivot requests.
      
       The product of the `limit` for each `pivot` in a `RunPivotReportRequest`
       must not exceed 250,000. For example, a two pivot request with `limit:
       1000` in each pivot will fail because the product is `1,000,000`.
       
      int64 limit = 4;
      Parameters:
      value - The limit to set.
      Returns:
      This builder for chaining.
    • clearLimit

      public Pivot.Builder clearLimit()
       The number of unique combinations of dimension values to return in this
       pivot. The `limit` parameter is required. A `limit` of 10,000 is common for
       single pivot requests.
      
       The product of the `limit` for each `pivot` in a `RunPivotReportRequest`
       must not exceed 250,000. For example, a two pivot request with `limit:
       1000` in each pivot will fail because the product is `1,000,000`.
       
      int64 limit = 4;
      Returns:
      This builder for chaining.
    • getMetricAggregationsList

      public List<MetricAggregation> getMetricAggregationsList()
       Aggregate the metrics by dimensions in this pivot using the specified
       metric_aggregations.
       
      repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5;
      Specified by:
      getMetricAggregationsList in interface PivotOrBuilder
      Returns:
      A list containing the metricAggregations.
    • getMetricAggregationsCount

      public int getMetricAggregationsCount()
       Aggregate the metrics by dimensions in this pivot using the specified
       metric_aggregations.
       
      repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5;
      Specified by:
      getMetricAggregationsCount in interface PivotOrBuilder
      Returns:
      The count of metricAggregations.
    • getMetricAggregations

      public MetricAggregation getMetricAggregations(int index)
       Aggregate the metrics by dimensions in this pivot using the specified
       metric_aggregations.
       
      repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5;
      Specified by:
      getMetricAggregations in interface PivotOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The metricAggregations at the given index.
    • setMetricAggregations

      public Pivot.Builder setMetricAggregations(int index, MetricAggregation value)
       Aggregate the metrics by dimensions in this pivot using the specified
       metric_aggregations.
       
      repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5;
      Parameters:
      index - The index to set the value at.
      value - The metricAggregations to set.
      Returns:
      This builder for chaining.
    • addMetricAggregations

      public Pivot.Builder addMetricAggregations(MetricAggregation value)
       Aggregate the metrics by dimensions in this pivot using the specified
       metric_aggregations.
       
      repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5;
      Parameters:
      value - The metricAggregations to add.
      Returns:
      This builder for chaining.
    • addAllMetricAggregations

      public Pivot.Builder addAllMetricAggregations(Iterable<? extends MetricAggregation> values)
       Aggregate the metrics by dimensions in this pivot using the specified
       metric_aggregations.
       
      repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5;
      Parameters:
      values - The metricAggregations to add.
      Returns:
      This builder for chaining.
    • clearMetricAggregations

      public Pivot.Builder clearMetricAggregations()
       Aggregate the metrics by dimensions in this pivot using the specified
       metric_aggregations.
       
      repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5;
      Returns:
      This builder for chaining.
    • getMetricAggregationsValueList

      public List<Integer> getMetricAggregationsValueList()
       Aggregate the metrics by dimensions in this pivot using the specified
       metric_aggregations.
       
      repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5;
      Specified by:
      getMetricAggregationsValueList in interface PivotOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for metricAggregations.
    • getMetricAggregationsValue

      public int getMetricAggregationsValue(int index)
       Aggregate the metrics by dimensions in this pivot using the specified
       metric_aggregations.
       
      repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5;
      Specified by:
      getMetricAggregationsValue in interface PivotOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of metricAggregations at the given index.
    • setMetricAggregationsValue

      public Pivot.Builder setMetricAggregationsValue(int index, int value)
       Aggregate the metrics by dimensions in this pivot using the specified
       metric_aggregations.
       
      repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5;
      Parameters:
      index - The index to set the value at.
      value - The enum numeric value on the wire for metricAggregations to set.
      Returns:
      This builder for chaining.
    • addMetricAggregationsValue

      public Pivot.Builder addMetricAggregationsValue(int value)
       Aggregate the metrics by dimensions in this pivot using the specified
       metric_aggregations.
       
      repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5;
      Parameters:
      value - The enum numeric value on the wire for metricAggregations to add.
      Returns:
      This builder for chaining.
    • addAllMetricAggregationsValue

      public Pivot.Builder addAllMetricAggregationsValue(Iterable<Integer> values)
       Aggregate the metrics by dimensions in this pivot using the specified
       metric_aggregations.
       
      repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5;
      Parameters:
      values - The enum numeric values on the wire for metricAggregations to add.
      Returns:
      This builder for chaining.