Class CustomMetric

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.analytics.admin.v1alpha.CustomMetric
All Implemented Interfaces:
CustomMetricOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class CustomMetric extends com.google.protobuf.GeneratedMessage implements CustomMetricOrBuilder
 A definition for a custom metric.
 
Protobuf type google.analytics.admin.v1alpha.CustomMetric
See Also:
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • PARAMETER_NAME_FIELD_NUMBER

      public static final int PARAMETER_NAME_FIELD_NUMBER
      See Also:
    • DISPLAY_NAME_FIELD_NUMBER

      public static final int DISPLAY_NAME_FIELD_NUMBER
      See Also:
    • DESCRIPTION_FIELD_NUMBER

      public static final int DESCRIPTION_FIELD_NUMBER
      See Also:
    • MEASUREMENT_UNIT_FIELD_NUMBER

      public static final int MEASUREMENT_UNIT_FIELD_NUMBER
      See Also:
    • SCOPE_FIELD_NUMBER

      public static final int SCOPE_FIELD_NUMBER
      See Also:
    • RESTRICTED_METRIC_TYPE_FIELD_NUMBER

      public static final int RESTRICTED_METRIC_TYPE_FIELD_NUMBER
      See Also:
  • 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
    • getName

      public String getName()
       Identifier. Resource name for this CustomMetric resource.
       Format: properties/{property}/customMetrics/{customMetric}
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface CustomMetricOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Identifier. Resource name for this CustomMetric resource.
       Format: properties/{property}/customMetrics/{customMetric}
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface CustomMetricOrBuilder
      Returns:
      The bytes for name.
    • getParameterName

      public String getParameterName()
       Required. Immutable. Tagging name for this custom metric.
      
       If this is an event-scoped metric, then this is the event parameter
       name.
      
       May only contain alphanumeric and underscore charactes, starting with a
       letter. Max length of 40 characters for event-scoped metrics.
       
      string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getParameterName in interface CustomMetricOrBuilder
      Returns:
      The parameterName.
    • getParameterNameBytes

      public com.google.protobuf.ByteString getParameterNameBytes()
       Required. Immutable. Tagging name for this custom metric.
      
       If this is an event-scoped metric, then this is the event parameter
       name.
      
       May only contain alphanumeric and underscore charactes, starting with a
       letter. Max length of 40 characters for event-scoped metrics.
       
      string parameter_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getParameterNameBytes in interface CustomMetricOrBuilder
      Returns:
      The bytes for parameterName.
    • getDisplayName

      public String getDisplayName()
       Required. Display name for this custom metric 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 CustomMetricOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Required. Display name for this custom metric 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 CustomMetricOrBuilder
      Returns:
      The bytes for displayName.
    • 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 CustomMetricOrBuilder
      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 CustomMetricOrBuilder
      Returns:
      The bytes for description.
    • getMeasurementUnitValue

      public int getMeasurementUnitValue()
       Required. The type for the custom metric's value.
       
      .google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit measurement_unit = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getMeasurementUnitValue in interface CustomMetricOrBuilder
      Returns:
      The enum numeric value on the wire for measurementUnit.
    • getMeasurementUnit

      public CustomMetric.MeasurementUnit getMeasurementUnit()
       Required. The type for the custom metric's value.
       
      .google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit measurement_unit = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getMeasurementUnit in interface CustomMetricOrBuilder
      Returns:
      The measurementUnit.
    • getScopeValue

      public int getScopeValue()
       Required. Immutable. The scope of this custom metric.
       
      .google.analytics.admin.v1alpha.CustomMetric.MetricScope scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getScopeValue in interface CustomMetricOrBuilder
      Returns:
      The enum numeric value on the wire for scope.
    • getScope

      public CustomMetric.MetricScope getScope()
       Required. Immutable. The scope of this custom metric.
       
      .google.analytics.admin.v1alpha.CustomMetric.MetricScope scope = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getScope in interface CustomMetricOrBuilder
      Returns:
      The scope.
    • getRestrictedMetricTypeList

      public List<CustomMetric.RestrictedMetricType> getRestrictedMetricTypeList()
       Optional. Types of restricted data that this metric may contain. Required
       for metrics with CURRENCY measurement unit. Must be empty for metrics with
       a non-CURRENCY measurement unit.
       
      repeated .google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRestrictedMetricTypeList in interface CustomMetricOrBuilder
      Returns:
      A list containing the restrictedMetricType.
    • getRestrictedMetricTypeCount

      public int getRestrictedMetricTypeCount()
       Optional. Types of restricted data that this metric may contain. Required
       for metrics with CURRENCY measurement unit. Must be empty for metrics with
       a non-CURRENCY measurement unit.
       
      repeated .google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRestrictedMetricTypeCount in interface CustomMetricOrBuilder
      Returns:
      The count of restrictedMetricType.
    • getRestrictedMetricType

      public CustomMetric.RestrictedMetricType getRestrictedMetricType(int index)
       Optional. Types of restricted data that this metric may contain. Required
       for metrics with CURRENCY measurement unit. Must be empty for metrics with
       a non-CURRENCY measurement unit.
       
      repeated .google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRestrictedMetricType in interface CustomMetricOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The restrictedMetricType at the given index.
    • getRestrictedMetricTypeValueList

      public List<Integer> getRestrictedMetricTypeValueList()
       Optional. Types of restricted data that this metric may contain. Required
       for metrics with CURRENCY measurement unit. Must be empty for metrics with
       a non-CURRENCY measurement unit.
       
      repeated .google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRestrictedMetricTypeValueList in interface CustomMetricOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for restrictedMetricType.
    • getRestrictedMetricTypeValue

      public int getRestrictedMetricTypeValue(int index)
       Optional. Types of restricted data that this metric may contain. Required
       for metrics with CURRENCY measurement unit. Must be empty for metrics with
       a non-CURRENCY measurement unit.
       
      repeated .google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRestrictedMetricTypeValue in interface CustomMetricOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of restrictedMetricType at the given index.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static CustomMetric parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CustomMetric parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CustomMetric parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CustomMetric parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CustomMetric parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CustomMetric parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CustomMetric parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CustomMetric parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static CustomMetric parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static CustomMetric parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CustomMetric parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CustomMetric parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public CustomMetric.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static CustomMetric.Builder newBuilder()
    • newBuilder

      public static CustomMetric.Builder newBuilder(CustomMetric prototype)
    • toBuilder

      public CustomMetric.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected CustomMetric.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static CustomMetric getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<CustomMetric> parser()
    • getParserForType

      public com.google.protobuf.Parser<CustomMetric> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public CustomMetric getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder