Class Pivot.Builder (0.47.0)

public static final class Pivot.Builder extends GeneratedMessageV3.Builder<Pivot.Builder> implements PivotOrBuilder

Describes the visible dimension columns and rows in the report response.

Protobuf type google.analytics.data.v1beta.Pivot

Implements

PivotOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllFieldNames(Iterable<String> values)

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;

Parameter
NameDescription
valuesIterable<String>

The fieldNames to add.

Returns
TypeDescription
Pivot.Builder

This builder for chaining.

addAllMetricAggregations(Iterable<? extends MetricAggregation> values)

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;

Parameter
NameDescription
valuesIterable<? extends com.google.analytics.data.v1beta.MetricAggregation>

The metricAggregations to add.

Returns
TypeDescription
Pivot.Builder

This builder for chaining.

addAllMetricAggregationsValue(Iterable<Integer> values)

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;

Parameter
NameDescription
valuesIterable<Integer>

The enum numeric values on the wire for metricAggregations to add.

Returns
TypeDescription
Pivot.Builder

This builder for chaining.

addAllOrderBys(Iterable<? extends OrderBy> values)

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;

Parameter
NameDescription
valuesIterable<? extends com.google.analytics.data.v1beta.OrderBy>
Returns
TypeDescription
Pivot.Builder

addFieldNames(String value)

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;

Parameter
NameDescription
valueString

The fieldNames to add.

Returns
TypeDescription
Pivot.Builder

This builder for chaining.

addFieldNamesBytes(ByteString value)

public Pivot.Builder addFieldNamesBytes(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;

Parameter
NameDescription
valueByteString

The bytes of the fieldNames to add.

Returns
TypeDescription
Pivot.Builder

This builder for chaining.

addMetricAggregations(MetricAggregation value)

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;

Parameter
NameDescription
valueMetricAggregation

The metricAggregations to add.

Returns
TypeDescription
Pivot.Builder

This builder for chaining.

addMetricAggregationsValue(int value)

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;

Parameter
NameDescription
valueint

The enum numeric value on the wire for metricAggregations to add.

Returns
TypeDescription
Pivot.Builder

This builder for chaining.

addOrderBys(OrderBy value)

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;

Parameter
NameDescription
valueOrderBy
Returns
TypeDescription
Pivot.Builder

addOrderBys(OrderBy.Builder builderForValue)

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;

Parameter
NameDescription
builderForValueOrderBy.Builder
Returns
TypeDescription
Pivot.Builder

addOrderBys(int index, OrderBy value)

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;

Parameters
NameDescription
indexint
valueOrderBy
Returns
TypeDescription
Pivot.Builder

addOrderBys(int index, OrderBy.Builder builderForValue)

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;

Parameters
NameDescription
indexint
builderForValueOrderBy.Builder
Returns
TypeDescription
Pivot.Builder

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;

Returns
TypeDescription
OrderBy.Builder

addOrderBysBuilder(int index)

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;

Parameter
NameDescription
indexint
Returns
TypeDescription
OrderBy.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Pivot.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Pivot.Builder
Overrides

build()

public Pivot build()
Returns
TypeDescription
Pivot

buildPartial()

public Pivot buildPartial()
Returns
TypeDescription
Pivot

clear()

public Pivot.Builder clear()
Returns
TypeDescription
Pivot.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Pivot.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Pivot.Builder
Overrides

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
TypeDescription
Pivot.Builder

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
TypeDescription
Pivot.Builder

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
TypeDescription
Pivot.Builder

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
TypeDescription
Pivot.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Pivot.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Pivot.Builder
Overrides

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;

Returns
TypeDescription
Pivot.Builder

clone()

public Pivot.Builder clone()
Returns
TypeDescription
Pivot.Builder
Overrides

getDefaultInstanceForType()

public Pivot getDefaultInstanceForType()
Returns
TypeDescription
Pivot

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFieldNames(int index)

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;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The fieldNames at the given index.

getFieldNamesBytes(int index)

public 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;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the fieldNames at the given index.

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;

Returns
TypeDescription
int

The count of fieldNames.

getFieldNamesList()

public 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;

Returns
TypeDescription
ProtocolStringList

A list containing the fieldNames.

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;

Returns
TypeDescription
long

The limit.

getMetricAggregations(int index)

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;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
MetricAggregation

The metricAggregations at the given index.

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;

Returns
TypeDescription
int

The count of metricAggregations.

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;

Returns
TypeDescription
List<MetricAggregation>

A list containing the metricAggregations.

getMetricAggregationsValue(int index)

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;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
int

The enum numeric value on the wire of metricAggregations at the given index.

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;

Returns
TypeDescription
List<Integer>

A list containing the enum numeric values on the wire for metricAggregations.

getOffset()

public long getOffset()

The row count of the start row. The first row is counted as row 0.

int64 offset = 3;

Returns
TypeDescription
long

The offset.

getOrderBys(int index)

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;

Parameter
NameDescription
indexint
Returns
TypeDescription
OrderBy

getOrderBysBuilder(int index)

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;

Parameter
NameDescription
indexint
Returns
TypeDescription
OrderBy.Builder

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;

Returns
TypeDescription
List<Builder>

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;

Returns
TypeDescription
int

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;

Returns
TypeDescription
List<OrderBy>

getOrderBysOrBuilder(int index)

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;

Parameter
NameDescription
indexint
Returns
TypeDescription
OrderByOrBuilder

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;

Returns
TypeDescription
List<? extends com.google.analytics.data.v1beta.OrderByOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Pivot other)

public Pivot.Builder mergeFrom(Pivot other)
Parameter
NameDescription
otherPivot
Returns
TypeDescription
Pivot.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Pivot.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Pivot.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Pivot.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Pivot.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Pivot.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Pivot.Builder
Overrides

removeOrderBys(int index)

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;

Parameter
NameDescription
indexint
Returns
TypeDescription
Pivot.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Pivot.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Pivot.Builder
Overrides

setFieldNames(int index, String value)

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
NameDescription
indexint

The index to set the value at.

valueString

The fieldNames to set.

Returns
TypeDescription
Pivot.Builder

This builder for chaining.

setLimit(long value)

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;

Parameter
NameDescription
valuelong

The limit to set.

Returns
TypeDescription
Pivot.Builder

This builder for chaining.

setMetricAggregations(int index, MetricAggregation value)

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
NameDescription
indexint

The index to set the value at.

valueMetricAggregation

The metricAggregations to set.

Returns
TypeDescription
Pivot.Builder

This builder for chaining.

setMetricAggregationsValue(int index, int value)

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
NameDescription
indexint

The index to set the value at.

valueint

The enum numeric value on the wire for metricAggregations to set.

Returns
TypeDescription
Pivot.Builder

This builder for chaining.

setOffset(long value)

public Pivot.Builder setOffset(long value)

The row count of the start row. The first row is counted as row 0.

int64 offset = 3;

Parameter
NameDescription
valuelong

The offset to set.

Returns
TypeDescription
Pivot.Builder

This builder for chaining.

setOrderBys(int index, OrderBy value)

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;

Parameters
NameDescription
indexint
valueOrderBy
Returns
TypeDescription
Pivot.Builder

setOrderBys(int index, OrderBy.Builder builderForValue)

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;

Parameters
NameDescription
indexint
builderForValueOrderBy.Builder
Returns
TypeDescription
Pivot.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Pivot.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Pivot.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Pivot.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Pivot.Builder
Overrides