Class MetricDefinition

java.lang.Object
software.amazon.awssdk.services.connect.model.MetricDefinition
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<MetricDefinition.Builder,MetricDefinition>

@Generated("software.amazon.awssdk:codegen") public final class MetricDefinition extends Object implements SdkPojo, Serializable, ToCopyableBuilder<MetricDefinition.Builder,MetricDefinition>

Contains the full definition of a metric, including its calculation, unit, status, and trend indicator.

See Also:
  • Method Details

    • arn

      public final String arn()

      The Amazon Resource Name (ARN) of the metric. May be qualified with $SAVED or $LATEST.

      Returns:
      The Amazon Resource Name (ARN) of the metric. May be qualified with $SAVED or $LATEST.
    • id

      public final String id()

      The identifier of the metric.

      Returns:
      The identifier of the metric.
    • name

      public final String name()

      The name of the metric.

      Returns:
      The name of the metric.
    • description

      public final String description()

      The description of the metric.

      Returns:
      The description of the metric.
    • metricCalculation

      public final MetricCalculation metricCalculation()

      The calculation definition for the metric.

      Returns:
      The calculation definition for the metric.
    • creationMethod

      public final MetricCreationMethod creationMethod()

      The method used to create the metric. Valid values: SERVICE_LEVEL_BUILDER (created with the guided service-level experience) | METRIC_BUILDER (created with the free-form metric builder).

      If the service returns an enum value that is not available in the current SDK version, creationMethod will return MetricCreationMethod.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from creationMethodAsString().

      Returns:
      The method used to create the metric. Valid values: SERVICE_LEVEL_BUILDER (created with the guided service-level experience) | METRIC_BUILDER (created with the free-form metric builder).
      See Also:
    • creationMethodAsString

      public final String creationMethodAsString()

      The method used to create the metric. Valid values: SERVICE_LEVEL_BUILDER (created with the guided service-level experience) | METRIC_BUILDER (created with the free-form metric builder).

      If the service returns an enum value that is not available in the current SDK version, creationMethod will return MetricCreationMethod.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from creationMethodAsString().

      Returns:
      The method used to create the metric. Valid values: SERVICE_LEVEL_BUILDER (created with the guided service-level experience) | METRIC_BUILDER (created with the free-form metric builder).
      See Also:
    • status

      public final MetricStatus status()

      The publish status of the metric. Valid values: PUBLISHED | SAVED.

      If the service returns an enum value that is not available in the current SDK version, status will return MetricStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      Returns:
      The publish status of the metric. Valid values: PUBLISHED | SAVED.
      See Also:
    • statusAsString

      public final String statusAsString()

      The publish status of the metric. Valid values: PUBLISHED | SAVED.

      If the service returns an enum value that is not available in the current SDK version, status will return MetricStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      Returns:
      The publish status of the metric. Valid values: PUBLISHED | SAVED.
      See Also:
    • type

      public final MetricType type()

      The type of the metric. Valid values: AWS_MANAGED | CUSTOMER_MANAGED.

      If the service returns an enum value that is not available in the current SDK version, type will return MetricType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from typeAsString().

      Returns:
      The type of the metric. Valid values: AWS_MANAGED | CUSTOMER_MANAGED.
      See Also:
    • typeAsString

      public final String typeAsString()

      The type of the metric. Valid values: AWS_MANAGED | CUSTOMER_MANAGED.

      If the service returns an enum value that is not available in the current SDK version, type will return MetricType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from typeAsString().

      Returns:
      The type of the metric. Valid values: AWS_MANAGED | CUSTOMER_MANAGED.
      See Also:
    • unit

      public final MetricUnit unit()

      The display unit for the metric's data.

      If the service returns an enum value that is not available in the current SDK version, unit will return MetricUnit.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from unitAsString().

      Returns:
      The display unit for the metric's data.
      See Also:
    • unitAsString

      public final String unitAsString()

      The display unit for the metric's data.

      If the service returns an enum value that is not available in the current SDK version, unit will return MetricUnit.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from unitAsString().

      Returns:
      The display unit for the metric's data.
      See Also:
    • positiveTrendIndicator

      public final TrendIndicator positiveTrendIndicator()

      How an increase in the metric value should be interpreted. Valid values: POSITIVE, NEUTRAL, NEGATIVE.

      If the service returns an enum value that is not available in the current SDK version, positiveTrendIndicator will return TrendIndicator.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from positiveTrendIndicatorAsString().

      Returns:
      How an increase in the metric value should be interpreted. Valid values: POSITIVE, NEUTRAL, NEGATIVE.
      See Also:
    • positiveTrendIndicatorAsString

      public final String positiveTrendIndicatorAsString()

      How an increase in the metric value should be interpreted. Valid values: POSITIVE, NEUTRAL, NEGATIVE.

      If the service returns an enum value that is not available in the current SDK version, positiveTrendIndicator will return TrendIndicator.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from positiveTrendIndicatorAsString().

      Returns:
      How an increase in the metric value should be interpreted. Valid values: POSITIVE, NEUTRAL, NEGATIVE.
      See Also:
    • hasGroupings

      public final boolean hasGroupings()
      For responses, this returns true if the service returned a value for the Groupings property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • groupings

      public final List<String> groupings()

      The groupings available for this metric.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasGroupings() method.

      Returns:
      The groupings available for this metric.
    • hasFilters

      public final boolean hasFilters()
      For responses, this returns true if the service returned a value for the Filters property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • filters

      public final List<AvailableFilter> filters()

      The filters applied to the metric.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasFilters() method.

      Returns:
      The filters applied to the metric.
    • effectiveTime

      public final Instant effectiveTime()

      The earliest time that can be queried for this metric.

      Returns:
      The earliest time that can be queried for this metric.
    • refreshRate

      public final Long refreshRate()

      The minimum interval, in seconds, between data refreshes for this metric.

      Returns:
      The minimum interval, in seconds, between data refreshes for this metric.
    • category

      public final String category()

      The category of the metric.

      Returns:
      The category of the metric.
    • hasSupportedStats

      public final boolean hasSupportedStats()
      For responses, this returns true if the service returned a value for the SupportedStats property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • supportedStats

      public final List<String> supportedStats()

      The stat aggregations available for this metric.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasSupportedStats() method.

      Returns:
      The stat aggregations available for this metric.
    • defaultStat

      public final String defaultStat()

      The default stat aggregation for the metric.

      Returns:
      The default stat aggregation for the metric.
    • supportsPreaggregateCalculation

      public final Boolean supportsPreaggregateCalculation()

      Specifies whether the metric can be used inside aggregating statistical functions (SUM, AVG, etc.) in custom metric calculations.

      Returns:
      Specifies whether the metric can be used inside aggregating statistical functions (SUM, AVG, etc.) in custom metric calculations.
    • supportsCustomCalculation

      public final Boolean supportsCustomCalculation()

      Specifies whether the metric can be used as a component of custom metrics.

      Returns:
      Specifies whether the metric can be used as a component of custom metrics.
    • primaryEventSource

      public final String primaryEventSource()

      The primary event source for the metric data.

      Returns:
      The primary event source for the metric data.
    • primaryEventSourceEffectiveTimestampType

      public final String primaryEventSourceEffectiveTimestampType()

      The timestamp type that determines where the metric appears on a time series.

      Returns:
      The timestamp type that determines where the metric appears on a time series.
    • createdTime

      public final Instant createdTime()

      The timestamp of when the metric was created.

      Returns:
      The timestamp of when the metric was created.
    • createdUser

      public final CreatedByInfo createdUser()

      The user that created the metric. The creator for metrics created through the CreateMetric API will be Amazon Connect API.

      Returns:
      The user that created the metric. The creator for metrics created through the CreateMetric API will be Amazon Connect API.
    • lastModifiedRegion

      public final String lastModifiedRegion()

      The region where the metric was last modified.

      Returns:
      The region where the metric was last modified.
    • lastModifiedTime

      public final Instant lastModifiedTime()

      The timestamp of when the metric was last modified.

      Returns:
      The timestamp of when the metric was last modified.
    • lastModifiedUser

      public final CreatedByInfo lastModifiedUser()

      The user that last modified the metric. For modifications made through the API, this will be Amazon Connect API.

      Returns:
      The user that last modified the metric. For modifications made through the API, this will be Amazon Connect API.
    • hasTags

      public final boolean hasTags()
      For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • tags

      public final Map<String,String> tags()

      The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasTags() method.

      Returns:
      The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.
    • toBuilder

      public MetricDefinition.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<MetricDefinition.Builder,MetricDefinition>
      Returns:
      a builder for type T
    • builder

      public static MetricDefinition.Builder builder()
    • serializableBuilderClass

      public static Class<? extends MetricDefinition.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.