Class Dimension.Builder (0.59.0)

public static final class Dimension.Builder extends GeneratedMessageV3.Builder<Dimension.Builder> implements DimensionOrBuilder

Dimensions are attributes of your data. For example, the dimension city indicates the city from which an event originates. Dimension values in report responses are strings; for example, the city could be "Paris" or "New York". Requests are allowed up to 9 dimensions.

Protobuf type google.analytics.data.v1beta.Dimension

Implements

DimensionOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Dimension.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Dimension.Builder
Overrides

build()

public Dimension build()
Returns
Type Description
Dimension

buildPartial()

public Dimension buildPartial()
Returns
Type Description
Dimension

clear()

public Dimension.Builder clear()
Returns
Type Description
Dimension.Builder
Overrides

clearDimensionExpression()

public Dimension.Builder clearDimensionExpression()

One dimension can be the result of an expression of multiple dimensions. For example, dimension "country, city": concatenate(country, ", ", city).

.google.analytics.data.v1beta.DimensionExpression dimension_expression = 2;

Returns
Type Description
Dimension.Builder

clearField(Descriptors.FieldDescriptor field)

public Dimension.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Dimension.Builder
Overrides

clearName()

public Dimension.Builder clearName()

The name of the dimension. See the API Dimensions for the list of dimension names supported by core reporting methods such as runReport and batchRunReports. See Realtime Dimensions for the list of dimension names supported by the runRealtimeReport method. See Funnel Dimensions for the list of dimension names supported by the runFunnelReport method.

If dimensionExpression is specified, name can be any string that you would like within the allowed character set. For example if a dimensionExpression concatenates country and city, you could call that dimension countryAndCity. Dimension names that you choose must match the regular expression ^[a-zA-Z0-9_]$.

Dimensions are referenced by name in dimensionFilter, orderBys, dimensionExpression, and pivots.

string name = 1;

Returns
Type Description
Dimension.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Dimension.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Dimension.Builder
Overrides

clone()

public Dimension.Builder clone()
Returns
Type Description
Dimension.Builder
Overrides

getDefaultInstanceForType()

public Dimension getDefaultInstanceForType()
Returns
Type Description
Dimension

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDimensionExpression()

public DimensionExpression getDimensionExpression()

One dimension can be the result of an expression of multiple dimensions. For example, dimension "country, city": concatenate(country, ", ", city).

.google.analytics.data.v1beta.DimensionExpression dimension_expression = 2;

Returns
Type Description
DimensionExpression

The dimensionExpression.

getDimensionExpressionBuilder()

public DimensionExpression.Builder getDimensionExpressionBuilder()

One dimension can be the result of an expression of multiple dimensions. For example, dimension "country, city": concatenate(country, ", ", city).

.google.analytics.data.v1beta.DimensionExpression dimension_expression = 2;

Returns
Type Description
DimensionExpression.Builder

getDimensionExpressionOrBuilder()

public DimensionExpressionOrBuilder getDimensionExpressionOrBuilder()

One dimension can be the result of an expression of multiple dimensions. For example, dimension "country, city": concatenate(country, ", ", city).

.google.analytics.data.v1beta.DimensionExpression dimension_expression = 2;

Returns
Type Description
DimensionExpressionOrBuilder

getName()

public String getName()

The name of the dimension. See the API Dimensions for the list of dimension names supported by core reporting methods such as runReport and batchRunReports. See Realtime Dimensions for the list of dimension names supported by the runRealtimeReport method. See Funnel Dimensions for the list of dimension names supported by the runFunnelReport method.

If dimensionExpression is specified, name can be any string that you would like within the allowed character set. For example if a dimensionExpression concatenates country and city, you could call that dimension countryAndCity. Dimension names that you choose must match the regular expression ^[a-zA-Z0-9_]$.

Dimensions are referenced by name in dimensionFilter, orderBys, dimensionExpression, and pivots.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of the dimension. See the API Dimensions for the list of dimension names supported by core reporting methods such as runReport and batchRunReports. See Realtime Dimensions for the list of dimension names supported by the runRealtimeReport method. See Funnel Dimensions for the list of dimension names supported by the runFunnelReport method.

If dimensionExpression is specified, name can be any string that you would like within the allowed character set. For example if a dimensionExpression concatenates country and city, you could call that dimension countryAndCity. Dimension names that you choose must match the regular expression ^[a-zA-Z0-9_]$.

Dimensions are referenced by name in dimensionFilter, orderBys, dimensionExpression, and pivots.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

hasDimensionExpression()

public boolean hasDimensionExpression()

One dimension can be the result of an expression of multiple dimensions. For example, dimension "country, city": concatenate(country, ", ", city).

.google.analytics.data.v1beta.DimensionExpression dimension_expression = 2;

Returns
Type Description
boolean

Whether the dimensionExpression field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeDimensionExpression(DimensionExpression value)

public Dimension.Builder mergeDimensionExpression(DimensionExpression value)

One dimension can be the result of an expression of multiple dimensions. For example, dimension "country, city": concatenate(country, ", ", city).

.google.analytics.data.v1beta.DimensionExpression dimension_expression = 2;

Parameter
Name Description
value DimensionExpression
Returns
Type Description
Dimension.Builder

mergeFrom(Dimension other)

public Dimension.Builder mergeFrom(Dimension other)
Parameter
Name Description
other Dimension
Returns
Type Description
Dimension.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Dimension.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Dimension.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Dimension.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Dimension.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Dimension.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Dimension.Builder
Overrides

setDimensionExpression(DimensionExpression value)

public Dimension.Builder setDimensionExpression(DimensionExpression value)

One dimension can be the result of an expression of multiple dimensions. For example, dimension "country, city": concatenate(country, ", ", city).

.google.analytics.data.v1beta.DimensionExpression dimension_expression = 2;

Parameter
Name Description
value DimensionExpression
Returns
Type Description
Dimension.Builder

setDimensionExpression(DimensionExpression.Builder builderForValue)

public Dimension.Builder setDimensionExpression(DimensionExpression.Builder builderForValue)

One dimension can be the result of an expression of multiple dimensions. For example, dimension "country, city": concatenate(country, ", ", city).

.google.analytics.data.v1beta.DimensionExpression dimension_expression = 2;

Parameter
Name Description
builderForValue DimensionExpression.Builder
Returns
Type Description
Dimension.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Dimension.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Dimension.Builder
Overrides

setName(String value)

public Dimension.Builder setName(String value)

The name of the dimension. See the API Dimensions for the list of dimension names supported by core reporting methods such as runReport and batchRunReports. See Realtime Dimensions for the list of dimension names supported by the runRealtimeReport method. See Funnel Dimensions for the list of dimension names supported by the runFunnelReport method.

If dimensionExpression is specified, name can be any string that you would like within the allowed character set. For example if a dimensionExpression concatenates country and city, you could call that dimension countryAndCity. Dimension names that you choose must match the regular expression ^[a-zA-Z0-9_]$.

Dimensions are referenced by name in dimensionFilter, orderBys, dimensionExpression, and pivots.

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Dimension.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Dimension.Builder setNameBytes(ByteString value)

The name of the dimension. See the API Dimensions for the list of dimension names supported by core reporting methods such as runReport and batchRunReports. See Realtime Dimensions for the list of dimension names supported by the runRealtimeReport method. See Funnel Dimensions for the list of dimension names supported by the runFunnelReport method.

If dimensionExpression is specified, name can be any string that you would like within the allowed character set. For example if a dimensionExpression concatenates country and city, you could call that dimension countryAndCity. Dimension names that you choose must match the regular expression ^[a-zA-Z0-9_]$.

Dimensions are referenced by name in dimensionFilter, orderBys, dimensionExpression, and pivots.

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Dimension.Builder

This builder for chaining.

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

public Dimension.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Dimension.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Dimension.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Dimension.Builder
Overrides