Class CustomDimension.Builder (0.27.0)

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

A definition for a CustomDimension.

Protobuf type google.analytics.admin.v1alpha.CustomDimension

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CustomDimension build()
Returns
TypeDescription
CustomDimension

buildPartial()

public CustomDimension buildPartial()
Returns
TypeDescription
CustomDimension

clear()

public CustomDimension.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
CustomDimension.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public CustomDimension.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
CustomDimension.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public CustomDimension.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
CustomDimension.Builder

This builder for chaining.

clearScope()

public CustomDimension.Builder clearScope()

Required. Immutable. The scope of this dimension.

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

Returns
TypeDescription
CustomDimension.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public CustomDimension getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for parameterName.

getScope()

public CustomDimension.DimensionScope getScope()

Required. Immutable. The scope of this dimension.

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

Returns
TypeDescription
CustomDimension.DimensionScope

The scope.

getScopeValue()

public int getScopeValue()

Required. Immutable. The scope of this dimension.

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

Returns
TypeDescription
int

The enum numeric value on the wire for scope.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CustomDimension other)

public CustomDimension.Builder mergeFrom(CustomDimension other)
Parameter
NameDescription
otherCustomDimension
Returns
TypeDescription
CustomDimension.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CustomDimension.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The description to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The disallowAdsPersonalization to set.

Returns
TypeDescription
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
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
CustomDimension.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public CustomDimension.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
valueString

The parameterName to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for parameterName to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
CustomDimension.Builder
Overrides

setScope(CustomDimension.DimensionScope value)

public CustomDimension.Builder setScope(CustomDimension.DimensionScope value)

Required. Immutable. The scope of this dimension.

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

Parameter
NameDescription
valueCustomDimension.DimensionScope

The scope to set.

Returns
TypeDescription
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.v1alpha.CustomDimension.DimensionScope scope = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
valueint

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

Returns
TypeDescription
CustomDimension.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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