Class CustomDimension.Builder (0.53.0)

public static final class CustomDimension.Builder extends GeneratedMessageV3.Builder<CustomDimension.Builder> implements CustomDimensionOrBuilder

A definition for a CustomDimension.

Protobuf type google.analytics.admin.v1beta.CustomDimension

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CustomDimension build()
Returns
Type Description
CustomDimension

buildPartial()

public CustomDimension buildPartial()
Returns
Type Description
CustomDimension

clear()

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

clearDescription()

public CustomDimension.Builder clearDescription()

Optional. Description for this custom dimension. Max length of 150 characters.

string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomDimension.Builder

This builder for chaining.

clearDisallowAdsPersonalization()

public CustomDimension.Builder clearDisallowAdsPersonalization()

Optional. If set to true, sets this dimension as NPA and excludes it from ads personalization.

This is currently only supported by user-scoped custom dimensions.

bool disallow_ads_personalization = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomDimension.Builder

This builder for chaining.

clearDisplayName()

public CustomDimension.Builder clearDisplayName()

Required. Display name for this custom dimension as shown in the Analytics UI. Max length of 82 characters, alphanumeric plus space and underscore starting with a letter. Legacy system-generated display names may contain square brackets, but updates to this field will never permit square brackets.

string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CustomDimension.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public CustomDimension.Builder clearName()

Output only. Resource name for this CustomDimension resource. Format: properties/{property}/customDimensions/{customDimension}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CustomDimension.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearParameterName()

public CustomDimension.Builder clearParameterName()

Required. Immutable. Tagging parameter name for this custom dimension.

If this is a user-scoped dimension, then this is the user property name. If this is an event-scoped dimension, then this is the event parameter name.

If this is an item-scoped dimension, then this is the parameter name found in the eCommerce items array.

May only contain alphanumeric and underscore characters, starting with a letter. Max length of 24 characters for user-scoped dimensions, 40 characters for event-scoped dimensions.

string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
CustomDimension.Builder

This builder for chaining.

clearScope()

public CustomDimension.Builder clearScope()

Required. Immutable. The scope of this dimension.

.google.analytics.admin.v1beta.CustomDimension.DimensionScope scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
CustomDimension.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public CustomDimension getDefaultInstanceForType()
Returns
Type Description
CustomDimension

getDescription()

public String getDescription()

Optional. Description for this custom dimension. Max length of 150 characters.

string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. Description for this custom dimension. Max length of 150 characters.

string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

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

getDisallowAdsPersonalization()

public boolean getDisallowAdsPersonalization()

Optional. If set to true, sets this dimension as NPA and excludes it from ads personalization.

This is currently only supported by user-scoped custom dimensions.

bool disallow_ads_personalization = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The disallowAdsPersonalization.

getDisplayName()

public String getDisplayName()

Required. Display name for this custom dimension as shown in the Analytics UI. Max length of 82 characters, alphanumeric plus space and underscore starting with a letter. Legacy system-generated display names may contain square brackets, but updates to this field will never permit square brackets.

string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. Display name for this custom dimension as shown in the Analytics UI. Max length of 82 characters, alphanumeric plus space and underscore starting with a letter. Legacy system-generated display names may contain square brackets, but updates to this field will never permit square brackets.

string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for displayName.

getName()

public String getName()

Output only. Resource name for this CustomDimension resource. Format: properties/{property}/customDimensions/{customDimension}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. Resource name for this CustomDimension resource. Format: properties/{property}/customDimensions/{customDimension}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for name.

getParameterName()

public String getParameterName()

Required. Immutable. Tagging parameter name for this custom dimension.

If this is a user-scoped dimension, then this is the user property name. If this is an event-scoped dimension, then this is the event parameter name.

If this is an item-scoped dimension, then this is the parameter name found in the eCommerce items array.

May only contain alphanumeric and underscore characters, starting with a letter. Max length of 24 characters for user-scoped dimensions, 40 characters for event-scoped dimensions.

string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The parameterName.

getParameterNameBytes()

public ByteString getParameterNameBytes()

Required. Immutable. Tagging parameter name for this custom dimension.

If this is a user-scoped dimension, then this is the user property name. If this is an event-scoped dimension, then this is the event parameter name.

If this is an item-scoped dimension, then this is the parameter name found in the eCommerce items array.

May only contain alphanumeric and underscore characters, starting with a letter. Max length of 24 characters for user-scoped dimensions, 40 characters for event-scoped dimensions.

string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for parameterName.

getScope()

public CustomDimension.DimensionScope getScope()

Required. Immutable. The scope of this dimension.

.google.analytics.admin.v1beta.CustomDimension.DimensionScope scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
CustomDimension.DimensionScope

The scope.

getScopeValue()

public int getScopeValue()

Required. Immutable. The scope of this dimension.

.google.analytics.admin.v1beta.CustomDimension.DimensionScope scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
int

The enum numeric value on the wire for scope.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CustomDimension other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setDescription(String value)

public CustomDimension.Builder setDescription(String value)

Optional. Description for this custom dimension. Max length of 150 characters.

string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
CustomDimension.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public CustomDimension.Builder setDescriptionBytes(ByteString value)

Optional. Description for this custom dimension. Max length of 150 characters.

string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
CustomDimension.Builder

This builder for chaining.

setDisallowAdsPersonalization(boolean value)

public CustomDimension.Builder setDisallowAdsPersonalization(boolean value)

Optional. If set to true, sets this dimension as NPA and excludes it from ads personalization.

This is currently only supported by user-scoped custom dimensions.

bool disallow_ads_personalization = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The disallowAdsPersonalization to set.

Returns
Type Description
CustomDimension.Builder

This builder for chaining.

setDisplayName(String value)

public CustomDimension.Builder setDisplayName(String value)

Required. Display name for this custom dimension as shown in the Analytics UI. Max length of 82 characters, alphanumeric plus space and underscore starting with a letter. Legacy system-generated display names may contain square brackets, but updates to this field will never permit square brackets.

string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
CustomDimension.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public CustomDimension.Builder setDisplayNameBytes(ByteString value)

Required. Display name for this custom dimension as shown in the Analytics UI. Max length of 82 characters, alphanumeric plus space and underscore starting with a letter. Legacy system-generated display names may contain square brackets, but updates to this field will never permit square brackets.

string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
CustomDimension.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public CustomDimension.Builder setName(String value)

Output only. Resource name for this CustomDimension resource. Format: properties/{property}/customDimensions/{customDimension}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
CustomDimension.Builder

This builder for chaining.

setNameBytes(ByteString value)

public CustomDimension.Builder setNameBytes(ByteString value)

Output only. Resource name for this CustomDimension resource. Format: properties/{property}/customDimensions/{customDimension}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
CustomDimension.Builder

This builder for chaining.

setParameterName(String value)

public CustomDimension.Builder setParameterName(String value)

Required. Immutable. Tagging parameter name for this custom dimension.

If this is a user-scoped dimension, then this is the user property name. If this is an event-scoped dimension, then this is the event parameter name.

If this is an item-scoped dimension, then this is the parameter name found in the eCommerce items array.

May only contain alphanumeric and underscore characters, starting with a letter. Max length of 24 characters for user-scoped dimensions, 40 characters for event-scoped dimensions.

string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The parameterName to set.

Returns
Type Description
CustomDimension.Builder

This builder for chaining.

setParameterNameBytes(ByteString value)

public CustomDimension.Builder setParameterNameBytes(ByteString value)

Required. Immutable. Tagging parameter name for this custom dimension.

If this is a user-scoped dimension, then this is the user property name. If this is an event-scoped dimension, then this is the event parameter name.

If this is an item-scoped dimension, then this is the parameter name found in the eCommerce items array.

May only contain alphanumeric and underscore characters, starting with a letter. Max length of 24 characters for user-scoped dimensions, 40 characters for event-scoped dimensions.

string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for parameterName to set.

Returns
Type Description
CustomDimension.Builder

This builder for chaining.

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

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

setScope(CustomDimension.DimensionScope value)

public CustomDimension.Builder setScope(CustomDimension.DimensionScope value)

Required. Immutable. The scope of this dimension.

.google.analytics.admin.v1beta.CustomDimension.DimensionScope scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value CustomDimension.DimensionScope

The scope to set.

Returns
Type Description
CustomDimension.Builder

This builder for chaining.

setScopeValue(int value)

public CustomDimension.Builder setScopeValue(int value)

Required. Immutable. The scope of this dimension.

.google.analytics.admin.v1beta.CustomDimension.DimensionScope scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value int

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

Returns
Type Description
CustomDimension.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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