All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.applicationsignals.model.ServiceLevelIndicatorMetric Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon CloudWatch Application Signals module holds the client classes that are used for communicating with Amazon CloudWatch Application Signals Service

The newest version!
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.applicationsignals.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* This structure contains the information about the metric that is used for the SLO. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ServiceLevelIndicatorMetric implements Serializable, Cloneable, StructuredPojo { /** *

* This is a string-to-string map that contains information about the type of object that this SLO is related to. It * can include the following fields. *

*
    *
  • *

    * Type designates the type of object that this SLO is related to. *

    *
  • *
  • *

    * ResourceType specifies the type of the resource. This field is used only when the value of the * Type field is Resource or AWS::Resource. *

    *
  • *
  • *

    * Name specifies the name of the object. This is used only if the value of the Type field * is Service, RemoteService, or AWS::Service. *

    *
  • *
  • *

    * Identifier identifies the resource objects of this resource. This is used only if the value of the * Type field is Resource or AWS::Resource. *

    *
  • *
  • *

    * Environment specifies the location where this object is hosted, or what it belongs to. *

    *
  • *
*/ private java.util.Map keyAttributes; /** *

* If the SLO monitors a specific operation of the service, this field displays that operation name. *

*/ private String operationName; /** *

* If the SLO monitors either the LATENCY or AVAILABILITY metric that Application Signals * collects, this field displays which of those metrics is used. *

*/ private String metricType; /** *

* If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, this structure * includes the information about that metric or expression. *

*/ private java.util.List metricDataQueries; /** *

* This is a string-to-string map that contains information about the type of object that this SLO is related to. It * can include the following fields. *

*
    *
  • *

    * Type designates the type of object that this SLO is related to. *

    *
  • *
  • *

    * ResourceType specifies the type of the resource. This field is used only when the value of the * Type field is Resource or AWS::Resource. *

    *
  • *
  • *

    * Name specifies the name of the object. This is used only if the value of the Type field * is Service, RemoteService, or AWS::Service. *

    *
  • *
  • *

    * Identifier identifies the resource objects of this resource. This is used only if the value of the * Type field is Resource or AWS::Resource. *

    *
  • *
  • *

    * Environment specifies the location where this object is hosted, or what it belongs to. *

    *
  • *
* * @return This is a string-to-string map that contains information about the type of object that this SLO is * related to. It can include the following fields.

*
    *
  • *

    * Type designates the type of object that this SLO is related to. *

    *
  • *
  • *

    * ResourceType specifies the type of the resource. This field is used only when the value of * the Type field is Resource or AWS::Resource. *

    *
  • *
  • *

    * Name specifies the name of the object. This is used only if the value of the * Type field is Service, RemoteService, or AWS::Service * . *

    *
  • *
  • *

    * Identifier identifies the resource objects of this resource. This is used only if the value * of the Type field is Resource or AWS::Resource. *

    *
  • *
  • *

    * Environment specifies the location where this object is hosted, or what it belongs to. *

    *
  • */ public java.util.Map getKeyAttributes() { return keyAttributes; } /** *

    * This is a string-to-string map that contains information about the type of object that this SLO is related to. It * can include the following fields. *

    *
      *
    • *

      * Type designates the type of object that this SLO is related to. *

      *
    • *
    • *

      * ResourceType specifies the type of the resource. This field is used only when the value of the * Type field is Resource or AWS::Resource. *

      *
    • *
    • *

      * Name specifies the name of the object. This is used only if the value of the Type field * is Service, RemoteService, or AWS::Service. *

      *
    • *
    • *

      * Identifier identifies the resource objects of this resource. This is used only if the value of the * Type field is Resource or AWS::Resource. *

      *
    • *
    • *

      * Environment specifies the location where this object is hosted, or what it belongs to. *

      *
    • *
    * * @param keyAttributes * This is a string-to-string map that contains information about the type of object that this SLO is related * to. It can include the following fields.

    *
      *
    • *

      * Type designates the type of object that this SLO is related to. *

      *
    • *
    • *

      * ResourceType specifies the type of the resource. This field is used only when the value of * the Type field is Resource or AWS::Resource. *

      *
    • *
    • *

      * Name specifies the name of the object. This is used only if the value of the * Type field is Service, RemoteService, or AWS::Service. *

      *
    • *
    • *

      * Identifier identifies the resource objects of this resource. This is used only if the value * of the Type field is Resource or AWS::Resource. *

      *
    • *
    • *

      * Environment specifies the location where this object is hosted, or what it belongs to. *

      *
    • */ public void setKeyAttributes(java.util.Map keyAttributes) { this.keyAttributes = keyAttributes; } /** *

      * This is a string-to-string map that contains information about the type of object that this SLO is related to. It * can include the following fields. *

      *
        *
      • *

        * Type designates the type of object that this SLO is related to. *

        *
      • *
      • *

        * ResourceType specifies the type of the resource. This field is used only when the value of the * Type field is Resource or AWS::Resource. *

        *
      • *
      • *

        * Name specifies the name of the object. This is used only if the value of the Type field * is Service, RemoteService, or AWS::Service. *

        *
      • *
      • *

        * Identifier identifies the resource objects of this resource. This is used only if the value of the * Type field is Resource or AWS::Resource. *

        *
      • *
      • *

        * Environment specifies the location where this object is hosted, or what it belongs to. *

        *
      • *
      * * @param keyAttributes * This is a string-to-string map that contains information about the type of object that this SLO is related * to. It can include the following fields.

      *
        *
      • *

        * Type designates the type of object that this SLO is related to. *

        *
      • *
      • *

        * ResourceType specifies the type of the resource. This field is used only when the value of * the Type field is Resource or AWS::Resource. *

        *
      • *
      • *

        * Name specifies the name of the object. This is used only if the value of the * Type field is Service, RemoteService, or AWS::Service. *

        *
      • *
      • *

        * Identifier identifies the resource objects of this resource. This is used only if the value * of the Type field is Resource or AWS::Resource. *

        *
      • *
      • *

        * Environment specifies the location where this object is hosted, or what it belongs to. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceLevelIndicatorMetric withKeyAttributes(java.util.Map keyAttributes) { setKeyAttributes(keyAttributes); return this; } /** * Add a single KeyAttributes entry * * @see ServiceLevelIndicatorMetric#withKeyAttributes * @returns a reference to this object so that method calls can be chained together. */ public ServiceLevelIndicatorMetric addKeyAttributesEntry(String key, String value) { if (null == this.keyAttributes) { this.keyAttributes = new java.util.HashMap(); } if (this.keyAttributes.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.keyAttributes.put(key, value); return this; } /** * Removes all the entries added into KeyAttributes. * * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceLevelIndicatorMetric clearKeyAttributesEntries() { this.keyAttributes = null; return this; } /** *

        * If the SLO monitors a specific operation of the service, this field displays that operation name. *

        * * @param operationName * If the SLO monitors a specific operation of the service, this field displays that operation name. */ public void setOperationName(String operationName) { this.operationName = operationName; } /** *

        * If the SLO monitors a specific operation of the service, this field displays that operation name. *

        * * @return If the SLO monitors a specific operation of the service, this field displays that operation name. */ public String getOperationName() { return this.operationName; } /** *

        * If the SLO monitors a specific operation of the service, this field displays that operation name. *

        * * @param operationName * If the SLO monitors a specific operation of the service, this field displays that operation name. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceLevelIndicatorMetric withOperationName(String operationName) { setOperationName(operationName); return this; } /** *

        * If the SLO monitors either the LATENCY or AVAILABILITY metric that Application Signals * collects, this field displays which of those metrics is used. *

        * * @param metricType * If the SLO monitors either the LATENCY or AVAILABILITY metric that Application * Signals collects, this field displays which of those metrics is used. * @see ServiceLevelIndicatorMetricType */ public void setMetricType(String metricType) { this.metricType = metricType; } /** *

        * If the SLO monitors either the LATENCY or AVAILABILITY metric that Application Signals * collects, this field displays which of those metrics is used. *

        * * @return If the SLO monitors either the LATENCY or AVAILABILITY metric that Application * Signals collects, this field displays which of those metrics is used. * @see ServiceLevelIndicatorMetricType */ public String getMetricType() { return this.metricType; } /** *

        * If the SLO monitors either the LATENCY or AVAILABILITY metric that Application Signals * collects, this field displays which of those metrics is used. *

        * * @param metricType * If the SLO monitors either the LATENCY or AVAILABILITY metric that Application * Signals collects, this field displays which of those metrics is used. * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceLevelIndicatorMetricType */ public ServiceLevelIndicatorMetric withMetricType(String metricType) { setMetricType(metricType); return this; } /** *

        * If the SLO monitors either the LATENCY or AVAILABILITY metric that Application Signals * collects, this field displays which of those metrics is used. *

        * * @param metricType * If the SLO monitors either the LATENCY or AVAILABILITY metric that Application * Signals collects, this field displays which of those metrics is used. * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceLevelIndicatorMetricType */ public ServiceLevelIndicatorMetric withMetricType(ServiceLevelIndicatorMetricType metricType) { this.metricType = metricType.toString(); return this; } /** *

        * If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, this structure * includes the information about that metric or expression. *

        * * @return If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, this * structure includes the information about that metric or expression. */ public java.util.List getMetricDataQueries() { return metricDataQueries; } /** *

        * If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, this structure * includes the information about that metric or expression. *

        * * @param metricDataQueries * If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, this * structure includes the information about that metric or expression. */ public void setMetricDataQueries(java.util.Collection metricDataQueries) { if (metricDataQueries == null) { this.metricDataQueries = null; return; } this.metricDataQueries = new java.util.ArrayList(metricDataQueries); } /** *

        * If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, this structure * includes the information about that metric or expression. *

        *

        * NOTE: This method appends the values to the existing list (if any). Use * {@link #setMetricDataQueries(java.util.Collection)} or {@link #withMetricDataQueries(java.util.Collection)} if * you want to override the existing values. *

        * * @param metricDataQueries * If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, this * structure includes the information about that metric or expression. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceLevelIndicatorMetric withMetricDataQueries(MetricDataQuery... metricDataQueries) { if (this.metricDataQueries == null) { setMetricDataQueries(new java.util.ArrayList(metricDataQueries.length)); } for (MetricDataQuery ele : metricDataQueries) { this.metricDataQueries.add(ele); } return this; } /** *

        * If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, this structure * includes the information about that metric or expression. *

        * * @param metricDataQueries * If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, this * structure includes the information about that metric or expression. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceLevelIndicatorMetric withMetricDataQueries(java.util.Collection metricDataQueries) { setMetricDataQueries(metricDataQueries); return this; } /** * 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getKeyAttributes() != null) sb.append("KeyAttributes: ").append(getKeyAttributes()).append(","); if (getOperationName() != null) sb.append("OperationName: ").append(getOperationName()).append(","); if (getMetricType() != null) sb.append("MetricType: ").append(getMetricType()).append(","); if (getMetricDataQueries() != null) sb.append("MetricDataQueries: ").append(getMetricDataQueries()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ServiceLevelIndicatorMetric == false) return false; ServiceLevelIndicatorMetric other = (ServiceLevelIndicatorMetric) obj; if (other.getKeyAttributes() == null ^ this.getKeyAttributes() == null) return false; if (other.getKeyAttributes() != null && other.getKeyAttributes().equals(this.getKeyAttributes()) == false) return false; if (other.getOperationName() == null ^ this.getOperationName() == null) return false; if (other.getOperationName() != null && other.getOperationName().equals(this.getOperationName()) == false) return false; if (other.getMetricType() == null ^ this.getMetricType() == null) return false; if (other.getMetricType() != null && other.getMetricType().equals(this.getMetricType()) == false) return false; if (other.getMetricDataQueries() == null ^ this.getMetricDataQueries() == null) return false; if (other.getMetricDataQueries() != null && other.getMetricDataQueries().equals(this.getMetricDataQueries()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getKeyAttributes() == null) ? 0 : getKeyAttributes().hashCode()); hashCode = prime * hashCode + ((getOperationName() == null) ? 0 : getOperationName().hashCode()); hashCode = prime * hashCode + ((getMetricType() == null) ? 0 : getMetricType().hashCode()); hashCode = prime * hashCode + ((getMetricDataQueries() == null) ? 0 : getMetricDataQueries().hashCode()); return hashCode; } @Override public ServiceLevelIndicatorMetric clone() { try { return (ServiceLevelIndicatorMetric) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.applicationsignals.model.transform.ServiceLevelIndicatorMetricMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy