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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA definition for a calculated metric.static enumPossible types of representing the calculated metric's value.static enumLabels that mark the data in calculated metric used in conjunction with user roles that restrict access to cost and/or revenue metrics.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanOutput only.com.google.protobuf.ByteStringOutput only.static CalculatedMetricOptional.com.google.protobuf.ByteStringOptional.static final com.google.protobuf.Descriptors.DescriptorRequired.com.google.protobuf.ByteStringRequired.Required.com.google.protobuf.ByteStringRequired.booleanOutput only.Required.intRequired.getName()Identifier.com.google.protobuf.ByteStringIdentifier.com.google.protobuf.Parser<CalculatedMetric>getRestrictedMetricType(int index) Output only.intOutput only.Output only.intgetRestrictedMetricTypeValue(int index) Output only.Output only.intinthashCode()protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic CalculatedMetric.Builderstatic CalculatedMetric.BuildernewBuilder(CalculatedMetric prototype) protected CalculatedMetric.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static CalculatedMetricparseDelimitedFrom(InputStream input) static CalculatedMetricparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CalculatedMetricparseFrom(byte[] data) static CalculatedMetricparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CalculatedMetricparseFrom(com.google.protobuf.ByteString data) static CalculatedMetricparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CalculatedMetricparseFrom(com.google.protobuf.CodedInputStream input) static CalculatedMetricparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CalculatedMetricparseFrom(InputStream input) static CalculatedMetricparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CalculatedMetricparseFrom(ByteBuffer data) static CalculatedMetricparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<CalculatedMetric>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
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:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
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:
getNamein interfaceCalculatedMetricOrBuilder- 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:
getNameBytesin interfaceCalculatedMetricOrBuilder- Returns:
- The bytes for name.
-
getDescription
Optional. Description for this calculated metric. Max length of 4096 characters.
string description = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getDescriptionin interfaceCalculatedMetricOrBuilder- 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:
getDescriptionBytesin interfaceCalculatedMetricOrBuilder- Returns:
- The bytes for description.
-
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:
getDisplayNamein interfaceCalculatedMetricOrBuilder- 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:
getDisplayNameBytesin interfaceCalculatedMetricOrBuilder- Returns:
- The bytes for displayName.
-
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:
getCalculatedMetricIdin interfaceCalculatedMetricOrBuilder- 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:
getCalculatedMetricIdBytesin interfaceCalculatedMetricOrBuilder- 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:
getMetricUnitValuein interfaceCalculatedMetricOrBuilder- Returns:
- The enum numeric value on the wire for 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:
getMetricUnitin interfaceCalculatedMetricOrBuilder- Returns:
- The metricUnit.
-
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:
getRestrictedMetricTypeListin interfaceCalculatedMetricOrBuilder- 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:
getRestrictedMetricTypeCountin interfaceCalculatedMetricOrBuilder- Returns:
- The count of restrictedMetricType.
-
getRestrictedMetricType
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:
getRestrictedMetricTypein interfaceCalculatedMetricOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The restrictedMetricType at the given index.
-
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:
getRestrictedMetricTypeValueListin interfaceCalculatedMetricOrBuilder- 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:
getRestrictedMetricTypeValuein interfaceCalculatedMetricOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The enum numeric value on the wire of restrictedMetricType at the given index.
-
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:
getFormulain interfaceCalculatedMetricOrBuilder- 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:
getFormulaBytesin interfaceCalculatedMetricOrBuilder- 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:
getInvalidMetricReferencein interfaceCalculatedMetricOrBuilder- Returns:
- The invalidMetricReference.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.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
- Throws:
IOException
-
parseFrom
public static CalculatedMetric parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- 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
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected CalculatedMetric.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-