Class CustomDimension.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CustomDimension.Builder>
com.google.analytics.admin.v1beta.CustomDimension.Builder
All Implemented Interfaces:
CustomDimensionOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
CustomDimension

public static final class CustomDimension.Builder extends com.google.protobuf.GeneratedMessage.Builder<CustomDimension.Builder> implements CustomDimensionOrBuilder
 A definition for a CustomDimension.
 
Protobuf type google.analytics.admin.v1beta.CustomDimension
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<CustomDimension.Builder>
    • clear

      public CustomDimension.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<CustomDimension.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<CustomDimension.Builder>
    • getDefaultInstanceForType

      public CustomDimension getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public CustomDimension build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public CustomDimension buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public CustomDimension.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<CustomDimension.Builder>
    • mergeFrom

      public CustomDimension.Builder mergeFrom(CustomDimension other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<CustomDimension.Builder>
    • mergeFrom

      public CustomDimension.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<CustomDimension.Builder>
      Throws:
      IOException
    • 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];
      Specified by:
      getName in interface CustomDimensionOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Output only. Resource name for this CustomDimension resource.
       Format: properties/{property}/customDimensions/{customDimension}
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getNameBytes in interface CustomDimensionOrBuilder
      Returns:
      The bytes for name.
    • setName

      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];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setNameBytes

      public CustomDimension.Builder setNameBytes(com.google.protobuf.ByteString value)
       Output only. Resource name for this CustomDimension resource.
       Format: properties/{property}/customDimensions/{customDimension}
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getParameterName in interface CustomDimensionOrBuilder
      Returns:
      The parameterName.
    • getParameterNameBytes

      public com.google.protobuf.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];
      Specified by:
      getParameterNameBytes in interface CustomDimensionOrBuilder
      Returns:
      The bytes for parameterName.
    • setParameterName

      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];
      Parameters:
      value - The parameterName to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setParameterNameBytes

      public CustomDimension.Builder setParameterNameBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for parameterName to set.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getDisplayName in interface CustomDimensionOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.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];
      Specified by:
      getDisplayNameBytes in interface CustomDimensionOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      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];
      Parameters:
      value - The displayName to set.
      Returns:
      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:
      This builder for chaining.
    • setDisplayNameBytes

      public CustomDimension.Builder setDisplayNameBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.
    • getDescription

      public String getDescription()
       Optional. Description for this custom dimension. Max length of 150
       characters.
       
      string description = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescription in interface CustomDimensionOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       Optional. Description for this custom dimension. Max length of 150
       characters.
       
      string description = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescriptionBytes in interface CustomDimensionOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      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];
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setDescriptionBytes

      public CustomDimension.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       Optional. Description for this custom dimension. Max length of 150
       characters.
       
      string description = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getScopeValue in interface CustomDimensionOrBuilder
      Returns:
      The enum numeric value on the wire for scope.
    • setScopeValue

      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];
      Parameters:
      value - The enum numeric value on the wire for scope to set.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getScope in interface CustomDimensionOrBuilder
      Returns:
      The scope.
    • setScope

       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];
      Parameters:
      value - The scope to set.
      Returns:
      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:
      This builder for chaining.
    • 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];
      Specified by:
      getDisallowAdsPersonalization in interface CustomDimensionOrBuilder
      Returns:
      The disallowAdsPersonalization.
    • setDisallowAdsPersonalization

      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];
      Parameters:
      value - The disallowAdsPersonalization to set.
      Returns:
      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:
      This builder for chaining.