Class ReportTask.ReportDefinition (0.55.0)

public static final class ReportTask.ReportDefinition extends GeneratedMessageV3 implements ReportTask.ReportDefinitionOrBuilder

The definition of how a report should be run.

Protobuf type google.analytics.data.v1alpha.ReportTask.ReportDefinition

Static Fields

COHORT_SPEC_FIELD_NUMBER

public static final int COHORT_SPEC_FIELD_NUMBER
Field Value
Type Description
int

CURRENCY_CODE_FIELD_NUMBER

public static final int CURRENCY_CODE_FIELD_NUMBER
Field Value
Type Description
int

DATE_RANGES_FIELD_NUMBER

public static final int DATE_RANGES_FIELD_NUMBER
Field Value
Type Description
int

DIMENSIONS_FIELD_NUMBER

public static final int DIMENSIONS_FIELD_NUMBER
Field Value
Type Description
int

DIMENSION_FILTER_FIELD_NUMBER

public static final int DIMENSION_FILTER_FIELD_NUMBER
Field Value
Type Description
int

KEEP_EMPTY_ROWS_FIELD_NUMBER

public static final int KEEP_EMPTY_ROWS_FIELD_NUMBER
Field Value
Type Description
int

LIMIT_FIELD_NUMBER

public static final int LIMIT_FIELD_NUMBER
Field Value
Type Description
int

METRICS_FIELD_NUMBER

public static final int METRICS_FIELD_NUMBER
Field Value
Type Description
int

METRIC_AGGREGATIONS_FIELD_NUMBER

public static final int METRIC_AGGREGATIONS_FIELD_NUMBER
Field Value
Type Description
int

METRIC_FILTER_FIELD_NUMBER

public static final int METRIC_FILTER_FIELD_NUMBER
Field Value
Type Description
int

OFFSET_FIELD_NUMBER

public static final int OFFSET_FIELD_NUMBER
Field Value
Type Description
int

ORDER_BYS_FIELD_NUMBER

public static final int ORDER_BYS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static ReportTask.ReportDefinition getDefaultInstance()
Returns
Type Description
ReportTask.ReportDefinition

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static ReportTask.ReportDefinition.Builder newBuilder()
Returns
Type Description
ReportTask.ReportDefinition.Builder

newBuilder(ReportTask.ReportDefinition prototype)

public static ReportTask.ReportDefinition.Builder newBuilder(ReportTask.ReportDefinition prototype)
Parameter
Name Description
prototype ReportTask.ReportDefinition
Returns
Type Description
ReportTask.ReportDefinition.Builder

parseDelimitedFrom(InputStream input)

public static ReportTask.ReportDefinition parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ReportTask.ReportDefinition
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ReportTask.ReportDefinition parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReportTask.ReportDefinition
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static ReportTask.ReportDefinition parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
ReportTask.ReportDefinition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ReportTask.ReportDefinition parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReportTask.ReportDefinition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ReportTask.ReportDefinition parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
ReportTask.ReportDefinition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ReportTask.ReportDefinition parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReportTask.ReportDefinition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ReportTask.ReportDefinition parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ReportTask.ReportDefinition
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ReportTask.ReportDefinition parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReportTask.ReportDefinition
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static ReportTask.ReportDefinition parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ReportTask.ReportDefinition
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ReportTask.ReportDefinition parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReportTask.ReportDefinition
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static ReportTask.ReportDefinition parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ReportTask.ReportDefinition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ReportTask.ReportDefinition parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReportTask.ReportDefinition
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<ReportTask.ReportDefinition> parser()
Returns
Type Description
Parser<ReportDefinition>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCohortSpec()

public CohortSpec getCohortSpec()

Optional. Cohort group associated with this request. If there is a cohort group in the request the 'cohort' dimension must be present.

.google.analytics.data.v1alpha.CohortSpec cohort_spec = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CohortSpec

The cohortSpec.

getCohortSpecOrBuilder()

public CohortSpecOrBuilder getCohortSpecOrBuilder()

Optional. Cohort group associated with this request. If there is a cohort group in the request the 'cohort' dimension must be present.

.google.analytics.data.v1alpha.CohortSpec cohort_spec = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CohortSpecOrBuilder

getCurrencyCode()

public String getCurrencyCode()

Optional. A currency code in ISO4217 format, such as "AED", "USD", "JPY". If the field is empty, the report uses the property's default currency.

string currency_code = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The currencyCode.

getCurrencyCodeBytes()

public ByteString getCurrencyCodeBytes()

Optional. A currency code in ISO4217 format, such as "AED", "USD", "JPY". If the field is empty, the report uses the property's default currency.

string currency_code = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for currencyCode.

getDateRanges(int index)

public DateRange getDateRanges(int index)

Optional. Date ranges of data to read. If multiple date ranges are requested, each response row will contain a zero based date range index. If two date ranges overlap, the event data for the overlapping days is included in the response rows for both date ranges. In a cohort request, this dateRanges must be unspecified.

repeated .google.analytics.data.v1alpha.DateRange date_ranges = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
DateRange

getDateRangesCount()

public int getDateRangesCount()

Optional. Date ranges of data to read. If multiple date ranges are requested, each response row will contain a zero based date range index. If two date ranges overlap, the event data for the overlapping days is included in the response rows for both date ranges. In a cohort request, this dateRanges must be unspecified.

repeated .google.analytics.data.v1alpha.DateRange date_ranges = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getDateRangesList()

public List<DateRange> getDateRangesList()

Optional. Date ranges of data to read. If multiple date ranges are requested, each response row will contain a zero based date range index. If two date ranges overlap, the event data for the overlapping days is included in the response rows for both date ranges. In a cohort request, this dateRanges must be unspecified.

repeated .google.analytics.data.v1alpha.DateRange date_ranges = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<DateRange>

getDateRangesOrBuilder(int index)

public DateRangeOrBuilder getDateRangesOrBuilder(int index)

Optional. Date ranges of data to read. If multiple date ranges are requested, each response row will contain a zero based date range index. If two date ranges overlap, the event data for the overlapping days is included in the response rows for both date ranges. In a cohort request, this dateRanges must be unspecified.

repeated .google.analytics.data.v1alpha.DateRange date_ranges = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
DateRangeOrBuilder

getDateRangesOrBuilderList()

public List<? extends DateRangeOrBuilder> getDateRangesOrBuilderList()

Optional. Date ranges of data to read. If multiple date ranges are requested, each response row will contain a zero based date range index. If two date ranges overlap, the event data for the overlapping days is included in the response rows for both date ranges. In a cohort request, this dateRanges must be unspecified.

repeated .google.analytics.data.v1alpha.DateRange date_ranges = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.analytics.data.v1alpha.DateRangeOrBuilder>

getDefaultInstanceForType()

public ReportTask.ReportDefinition getDefaultInstanceForType()
Returns
Type Description
ReportTask.ReportDefinition

getDimensionFilter()

public FilterExpression getDimensionFilter()

Optional. Dimension filters let you ask for only specific dimension values in the report. To learn more, see Fundamentals of Dimension Filters for examples. Metrics cannot be used in this filter.

.google.analytics.data.v1alpha.FilterExpression dimension_filter = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FilterExpression

The dimensionFilter.

getDimensionFilterOrBuilder()

public FilterExpressionOrBuilder getDimensionFilterOrBuilder()

Optional. Dimension filters let you ask for only specific dimension values in the report. To learn more, see Fundamentals of Dimension Filters for examples. Metrics cannot be used in this filter.

.google.analytics.data.v1alpha.FilterExpression dimension_filter = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FilterExpressionOrBuilder

getDimensions(int index)

public Dimension getDimensions(int index)

Optional. The dimensions requested and displayed.

repeated .google.analytics.data.v1alpha.Dimension dimensions = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Dimension

getDimensionsCount()

public int getDimensionsCount()

Optional. The dimensions requested and displayed.

repeated .google.analytics.data.v1alpha.Dimension dimensions = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getDimensionsList()

public List<Dimension> getDimensionsList()

Optional. The dimensions requested and displayed.

repeated .google.analytics.data.v1alpha.Dimension dimensions = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Dimension>

getDimensionsOrBuilder(int index)

public DimensionOrBuilder getDimensionsOrBuilder(int index)

Optional. The dimensions requested and displayed.

repeated .google.analytics.data.v1alpha.Dimension dimensions = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
DimensionOrBuilder

getDimensionsOrBuilderList()

public List<? extends DimensionOrBuilder> getDimensionsOrBuilderList()

Optional. The dimensions requested and displayed.

repeated .google.analytics.data.v1alpha.Dimension dimensions = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.analytics.data.v1alpha.DimensionOrBuilder>

getKeepEmptyRows()

public boolean getKeepEmptyRows()

Optional. If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter.

Regardless of this keep_empty_rows setting, only data recorded by the Google Analytics (GA4) property can be displayed in a report.

For example if a property never logs a purchase event, then a query for the eventName dimension and eventCount metric will not have a row containing eventName: "purchase" and eventCount: 0.

bool keep_empty_rows = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The keepEmptyRows.

getLimit()

public long getLimit()

Optional. The number of rows to return in the Report. If unspecified, 10,000 rows are returned. The API returns a maximum of 250,000 rows per request, no matter how many you ask for. limit must be positive.

The API can also return fewer rows than the requested limit, if there aren't as many dimension values as the limit. For instance, there are fewer than 300 possible values for the dimension country, so when reporting on only country, you can't get more than 300 rows, even if you set limit to a higher value.

int64 limit = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
long

The limit.

getMetricAggregations(int index)

public MetricAggregation getMetricAggregations(int index)

Optional. Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to "RESERVED_(MetricAggregation)".

repeated .google.analytics.data.v1alpha.MetricAggregation metric_aggregations = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
MetricAggregation

The metricAggregations at the given index.

getMetricAggregationsCount()

public int getMetricAggregationsCount()

Optional. Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to "RESERVED_(MetricAggregation)".

repeated .google.analytics.data.v1alpha.MetricAggregation metric_aggregations = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of metricAggregations.

getMetricAggregationsList()

public List<MetricAggregation> getMetricAggregationsList()

Optional. Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to "RESERVED_(MetricAggregation)".

repeated .google.analytics.data.v1alpha.MetricAggregation metric_aggregations = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<MetricAggregation>

A list containing the metricAggregations.

getMetricAggregationsValue(int index)

public int getMetricAggregationsValue(int index)

Optional. Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to "RESERVED_(MetricAggregation)".

repeated .google.analytics.data.v1alpha.MetricAggregation metric_aggregations = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

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

getMetricAggregationsValueList()

public List<Integer> getMetricAggregationsValueList()

Optional. Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to "RESERVED_(MetricAggregation)".

repeated .google.analytics.data.v1alpha.MetricAggregation metric_aggregations = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Integer>

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

getMetricFilter()

public FilterExpression getMetricFilter()

Optional. The filter clause of metrics. Applied after aggregating the report's rows, similar to SQL having-clause. Dimensions cannot be used in this filter.

.google.analytics.data.v1alpha.FilterExpression metric_filter = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FilterExpression

The metricFilter.

getMetricFilterOrBuilder()

public FilterExpressionOrBuilder getMetricFilterOrBuilder()

Optional. The filter clause of metrics. Applied after aggregating the report's rows, similar to SQL having-clause. Dimensions cannot be used in this filter.

.google.analytics.data.v1alpha.FilterExpression metric_filter = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FilterExpressionOrBuilder

getMetrics(int index)

public Metric getMetrics(int index)

Optional. The metrics requested and displayed.

repeated .google.analytics.data.v1alpha.Metric metrics = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Metric

getMetricsCount()

public int getMetricsCount()

Optional. The metrics requested and displayed.

repeated .google.analytics.data.v1alpha.Metric metrics = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getMetricsList()

public List<Metric> getMetricsList()

Optional. The metrics requested and displayed.

repeated .google.analytics.data.v1alpha.Metric metrics = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Metric>

getMetricsOrBuilder(int index)

public MetricOrBuilder getMetricsOrBuilder(int index)

Optional. The metrics requested and displayed.

repeated .google.analytics.data.v1alpha.Metric metrics = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
MetricOrBuilder

getMetricsOrBuilderList()

public List<? extends MetricOrBuilder> getMetricsOrBuilderList()

Optional. The metrics requested and displayed.

repeated .google.analytics.data.v1alpha.Metric metrics = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.analytics.data.v1alpha.MetricOrBuilder>

getOffset()

public long getOffset()

Optional. The row count of the start row from Google Analytics Storage. The first row is counted as row 0.

When creating a report task, the offset and limit parameters define the subset of data rows from Google Analytics storage to be included in the generated report. For example, if there are a total of 300,000 rows in Google Analytics storage, the initial report task may have the first 10,000 rows with a limit of 10,000 and an offset of 0. Subsequently, another report task could cover the next 10,000 rows with a limit of 10,000 and an offset of 10,000.

int64 offset = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
long

The offset.

getOrderBys(int index)

public OrderBy getOrderBys(int index)

Optional. Specifies how rows are ordered in the response.

repeated .google.analytics.data.v1alpha.OrderBy order_bys = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
OrderBy

getOrderBysCount()

public int getOrderBysCount()

Optional. Specifies how rows are ordered in the response.

repeated .google.analytics.data.v1alpha.OrderBy order_bys = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getOrderBysList()

public List<OrderBy> getOrderBysList()

Optional. Specifies how rows are ordered in the response.

repeated .google.analytics.data.v1alpha.OrderBy order_bys = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<OrderBy>

getOrderBysOrBuilder(int index)

public OrderByOrBuilder getOrderBysOrBuilder(int index)

Optional. Specifies how rows are ordered in the response.

repeated .google.analytics.data.v1alpha.OrderBy order_bys = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
OrderByOrBuilder

getOrderBysOrBuilderList()

public List<? extends OrderByOrBuilder> getOrderBysOrBuilderList()

Optional. Specifies how rows are ordered in the response.

repeated .google.analytics.data.v1alpha.OrderBy order_bys = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.analytics.data.v1alpha.OrderByOrBuilder>

getParserForType()

public Parser<ReportTask.ReportDefinition> getParserForType()
Returns
Type Description
Parser<ReportDefinition>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasCohortSpec()

public boolean hasCohortSpec()

Optional. Cohort group associated with this request. If there is a cohort group in the request the 'cohort' dimension must be present.

.google.analytics.data.v1alpha.CohortSpec cohort_spec = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the cohortSpec field is set.

hasDimensionFilter()

public boolean hasDimensionFilter()

Optional. Dimension filters let you ask for only specific dimension values in the report. To learn more, see Fundamentals of Dimension Filters for examples. Metrics cannot be used in this filter.

.google.analytics.data.v1alpha.FilterExpression dimension_filter = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the dimensionFilter field is set.

hasMetricFilter()

public boolean hasMetricFilter()

Optional. The filter clause of metrics. Applied after aggregating the report's rows, similar to SQL having-clause. Dimensions cannot be used in this filter.

.google.analytics.data.v1alpha.FilterExpression metric_filter = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the metricFilter field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public ReportTask.ReportDefinition.Builder newBuilderForType()
Returns
Type Description
ReportTask.ReportDefinition.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ReportTask.ReportDefinition.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ReportTask.ReportDefinition.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public ReportTask.ReportDefinition.Builder toBuilder()
Returns
Type Description
ReportTask.ReportDefinition.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException