Class CalculatedMetric

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

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

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • DESCRIPTION_FIELD_NUMBER

      public static final int DESCRIPTION_FIELD_NUMBER
      See Also:
    • DISPLAY_NAME_FIELD_NUMBER

      public static final int DISPLAY_NAME_FIELD_NUMBER
      See Also:
    • CALCULATED_METRIC_ID_FIELD_NUMBER

      public static final int CALCULATED_METRIC_ID_FIELD_NUMBER
      See Also:
    • METRIC_UNIT_FIELD_NUMBER

      public static final int METRIC_UNIT_FIELD_NUMBER
      See Also:
    • RESTRICTED_METRIC_TYPE_FIELD_NUMBER

      public static final int RESTRICTED_METRIC_TYPE_FIELD_NUMBER
      See Also:
    • FORMULA_FIELD_NUMBER

      public static final int FORMULA_FIELD_NUMBER
      See Also:
    • INVALID_METRIC_REFERENCE_FIELD_NUMBER

      public static final int INVALID_METRIC_REFERENCE_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 CalculatedMetric.
       Format: 'properties/{property_id}/calculatedMetrics/{calculated_metric_id}'
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface CalculatedMetricOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Identifier. Resource name for this CalculatedMetric.
       Format: 'properties/{property_id}/calculatedMetrics/{calculated_metric_id}'
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface CalculatedMetricOrBuilder
      Returns:
      The bytes for name.
    • getDescription

      public String getDescription()
       Optional. Description for this calculated metric.
       Max length of 4096 characters.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescription in interface CalculatedMetricOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       Optional. Description for this calculated metric.
       Max length of 4096 characters.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescriptionBytes in interface CalculatedMetricOrBuilder
      Returns:
      The bytes for description.
    • getDisplayName

      public String getDisplayName()
       Required. Display name for this calculated metric as shown in the
       Google Analytics UI. Max length 82 characters.
       
      string display_name = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDisplayName in interface CalculatedMetricOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Required. Display name for this calculated metric as shown in the
       Google Analytics UI. Max length 82 characters.
       
      string display_name = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDisplayNameBytes in interface CalculatedMetricOrBuilder
      Returns:
      The bytes for displayName.
    • getCalculatedMetricId

      public String getCalculatedMetricId()
       Output only. The ID to use for the calculated metric. In the UI, this is
       referred to as the "API name."
      
       The calculated_metric_id is used when referencing this calculated metric
       from external APIs. For example, "calcMetric:{calculated_metric_id}".
       
      string calculated_metric_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCalculatedMetricId in interface CalculatedMetricOrBuilder
      Returns:
      The calculatedMetricId.
    • getCalculatedMetricIdBytes

      public com.google.protobuf.ByteString getCalculatedMetricIdBytes()
       Output only. The ID to use for the calculated metric. In the UI, this is
       referred to as the "API name."
      
       The calculated_metric_id is used when referencing this calculated metric
       from external APIs. For example, "calcMetric:{calculated_metric_id}".
       
      string calculated_metric_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCalculatedMetricIdBytes in interface CalculatedMetricOrBuilder
      Returns:
      The bytes for calculatedMetricId.
    • getMetricUnitValue

      public int getMetricUnitValue()
       Required. The type for the calculated metric's value.
       
      .google.analytics.admin.v1alpha.CalculatedMetric.MetricUnit metric_unit = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getMetricUnitValue in interface CalculatedMetricOrBuilder
      Returns:
      The enum numeric value on the wire for metricUnit.
    • getMetricUnit

      public CalculatedMetric.MetricUnit getMetricUnit()
       Required. The type for the calculated metric's value.
       
      .google.analytics.admin.v1alpha.CalculatedMetric.MetricUnit metric_unit = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getMetricUnit in interface CalculatedMetricOrBuilder
      Returns:
      The metricUnit.
    • getRestrictedMetricTypeList

      public List<CalculatedMetric.RestrictedMetricType> getRestrictedMetricTypeList()
       Output only. Types of restricted data that this metric contains.
       
      repeated .google.analytics.admin.v1alpha.CalculatedMetric.RestrictedMetricType restricted_metric_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getRestrictedMetricTypeList in interface CalculatedMetricOrBuilder
      Returns:
      A list containing the restrictedMetricType.
    • getRestrictedMetricTypeCount

      public int getRestrictedMetricTypeCount()
       Output only. Types of restricted data that this metric contains.
       
      repeated .google.analytics.admin.v1alpha.CalculatedMetric.RestrictedMetricType restricted_metric_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getRestrictedMetricTypeCount in interface CalculatedMetricOrBuilder
      Returns:
      The count of restrictedMetricType.
    • getRestrictedMetricType

      public CalculatedMetric.RestrictedMetricType getRestrictedMetricType(int index)
       Output only. Types of restricted data that this metric contains.
       
      repeated .google.analytics.admin.v1alpha.CalculatedMetric.RestrictedMetricType restricted_metric_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getRestrictedMetricType in interface CalculatedMetricOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The restrictedMetricType at the given index.
    • getRestrictedMetricTypeValueList

      public List<Integer> getRestrictedMetricTypeValueList()
       Output only. Types of restricted data that this metric contains.
       
      repeated .google.analytics.admin.v1alpha.CalculatedMetric.RestrictedMetricType restricted_metric_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getRestrictedMetricTypeValueList in interface CalculatedMetricOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for restrictedMetricType.
    • getRestrictedMetricTypeValue

      public int getRestrictedMetricTypeValue(int index)
       Output only. Types of restricted data that this metric contains.
       
      repeated .google.analytics.admin.v1alpha.CalculatedMetric.RestrictedMetricType restricted_metric_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getRestrictedMetricTypeValue in interface CalculatedMetricOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of restrictedMetricType at the given index.
    • getFormula

      public String getFormula()
       Required. The calculated metric's definition. Maximum number of unique
       referenced custom metrics is 5. Formulas supports the following operations:
       + (addition),  - (subtraction), - (negative),  * (multiplication), /
       (division), () (parenthesis). Any valid real numbers are acceptable that
       fit in a Long (64bit integer) or a Double (64 bit floating point number).
       Example formula:
       "( customEvent:parameter_name + cartPurchaseQuantity ) / 2.0"
       
      string formula = 7 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getFormula in interface CalculatedMetricOrBuilder
      Returns:
      The formula.
    • getFormulaBytes

      public com.google.protobuf.ByteString getFormulaBytes()
       Required. The calculated metric's definition. Maximum number of unique
       referenced custom metrics is 5. Formulas supports the following operations:
       + (addition),  - (subtraction), - (negative),  * (multiplication), /
       (division), () (parenthesis). Any valid real numbers are acceptable that
       fit in a Long (64bit integer) or a Double (64 bit floating point number).
       Example formula:
       "( customEvent:parameter_name + cartPurchaseQuantity ) / 2.0"
       
      string formula = 7 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getFormulaBytes in interface CalculatedMetricOrBuilder
      Returns:
      The bytes for formula.
    • getInvalidMetricReference

      public boolean getInvalidMetricReference()
       Output only. If true, this calculated metric has a invalid metric
       reference. Anything using a calculated metric with invalid_metric_reference
       set to true may fail, produce warnings, or produce unexpected results.
       
      bool invalid_metric_reference = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getInvalidMetricReference in interface CalculatedMetricOrBuilder
      Returns:
      The invalidMetricReference.
    • 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 CalculatedMetric parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static CalculatedMetric.Builder newBuilder()
    • newBuilder

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

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

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

      public static CalculatedMetric getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<CalculatedMetric> 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 CalculatedMetric getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder