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

com.amazonaws.services.computeoptimizer.model.LambdaFunctionUtilizationMetric Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Compute Optimizer module holds the client classes that are used for communicating with AWS Compute Optimizer 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.computeoptimizer.model;

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

/**
 * 

* Describes a utilization metric of an Lambda function. *

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

* The name of the utilization metric. *

*

* The following utilization metrics are available: *

*
    *
  • *

    * Duration - The amount of time that your function code spends processing an event. *

    *
  • *
  • *

    * Memory - The amount of memory used per invocation. *

    *
  • *
*/ private String name; /** *

* The statistic of the utilization metric. *

*

* The Compute Optimizer API, Command Line Interface (CLI), and SDKs return utilization metrics using only the * Maximum statistic, which is the highest value observed during the specified period. *

*

* The Compute Optimizer console displays graphs for some utilization metrics using the Average * statistic, which is the value of Sum / SampleCount during the specified period. For * more information, see Viewing resource * recommendations in the Compute Optimizer User Guide. You can also get averaged utilization metric data * for your resources using Amazon CloudWatch. For more information, see the Amazon CloudWatch * User Guide. *

*/ private String statistic; /** *

* The value of the utilization metric. *

*/ private Double value; /** *

* The name of the utilization metric. *

*

* The following utilization metrics are available: *

*
    *
  • *

    * Duration - The amount of time that your function code spends processing an event. *

    *
  • *
  • *

    * Memory - The amount of memory used per invocation. *

    *
  • *
* * @param name * The name of the utilization metric.

*

* The following utilization metrics are available: *

*
    *
  • *

    * Duration - The amount of time that your function code spends processing an event. *

    *
  • *
  • *

    * Memory - The amount of memory used per invocation. *

    *
  • * @see LambdaFunctionMetricName */ public void setName(String name) { this.name = name; } /** *

    * The name of the utilization metric. *

    *

    * The following utilization metrics are available: *

    *
      *
    • *

      * Duration - The amount of time that your function code spends processing an event. *

      *
    • *
    • *

      * Memory - The amount of memory used per invocation. *

      *
    • *
    * * @return The name of the utilization metric.

    *

    * The following utilization metrics are available: *

    *
      *
    • *

      * Duration - The amount of time that your function code spends processing an event. *

      *
    • *
    • *

      * Memory - The amount of memory used per invocation. *

      *
    • * @see LambdaFunctionMetricName */ public String getName() { return this.name; } /** *

      * The name of the utilization metric. *

      *

      * The following utilization metrics are available: *

      *
        *
      • *

        * Duration - The amount of time that your function code spends processing an event. *

        *
      • *
      • *

        * Memory - The amount of memory used per invocation. *

        *
      • *
      * * @param name * The name of the utilization metric.

      *

      * The following utilization metrics are available: *

      *
        *
      • *

        * Duration - The amount of time that your function code spends processing an event. *

        *
      • *
      • *

        * Memory - The amount of memory used per invocation. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see LambdaFunctionMetricName */ public LambdaFunctionUtilizationMetric withName(String name) { setName(name); return this; } /** *

        * The name of the utilization metric. *

        *

        * The following utilization metrics are available: *

        *
          *
        • *

          * Duration - The amount of time that your function code spends processing an event. *

          *
        • *
        • *

          * Memory - The amount of memory used per invocation. *

          *
        • *
        * * @param name * The name of the utilization metric.

        *

        * The following utilization metrics are available: *

        *
          *
        • *

          * Duration - The amount of time that your function code spends processing an event. *

          *
        • *
        • *

          * Memory - The amount of memory used per invocation. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see LambdaFunctionMetricName */ public LambdaFunctionUtilizationMetric withName(LambdaFunctionMetricName name) { this.name = name.toString(); return this; } /** *

          * The statistic of the utilization metric. *

          *

          * The Compute Optimizer API, Command Line Interface (CLI), and SDKs return utilization metrics using only the * Maximum statistic, which is the highest value observed during the specified period. *

          *

          * The Compute Optimizer console displays graphs for some utilization metrics using the Average * statistic, which is the value of Sum / SampleCount during the specified period. For * more information, see Viewing resource * recommendations in the Compute Optimizer User Guide. You can also get averaged utilization metric data * for your resources using Amazon CloudWatch. For more information, see the Amazon CloudWatch * User Guide. *

          * * @param statistic * The statistic of the utilization metric.

          *

          * The Compute Optimizer API, Command Line Interface (CLI), and SDKs return utilization metrics using only * the Maximum statistic, which is the highest value observed during the specified period. *

          *

          * The Compute Optimizer console displays graphs for some utilization metrics using the Average * statistic, which is the value of Sum / SampleCount during the specified period. * For more information, see Viewing * resource recommendations in the Compute Optimizer User Guide. You can also get averaged * utilization metric data for your resources using Amazon CloudWatch. For more information, see the Amazon * CloudWatch User Guide. * @see LambdaFunctionMetricStatistic */ public void setStatistic(String statistic) { this.statistic = statistic; } /** *

          * The statistic of the utilization metric. *

          *

          * The Compute Optimizer API, Command Line Interface (CLI), and SDKs return utilization metrics using only the * Maximum statistic, which is the highest value observed during the specified period. *

          *

          * The Compute Optimizer console displays graphs for some utilization metrics using the Average * statistic, which is the value of Sum / SampleCount during the specified period. For * more information, see Viewing resource * recommendations in the Compute Optimizer User Guide. You can also get averaged utilization metric data * for your resources using Amazon CloudWatch. For more information, see the Amazon CloudWatch * User Guide. *

          * * @return The statistic of the utilization metric.

          *

          * The Compute Optimizer API, Command Line Interface (CLI), and SDKs return utilization metrics using only * the Maximum statistic, which is the highest value observed during the specified period. *

          *

          * The Compute Optimizer console displays graphs for some utilization metrics using the Average * statistic, which is the value of Sum / SampleCount during the specified period. * For more information, see Viewing * resource recommendations in the Compute Optimizer User Guide. You can also get averaged * utilization metric data for your resources using Amazon CloudWatch. For more information, see the Amazon * CloudWatch User Guide. * @see LambdaFunctionMetricStatistic */ public String getStatistic() { return this.statistic; } /** *

          * The statistic of the utilization metric. *

          *

          * The Compute Optimizer API, Command Line Interface (CLI), and SDKs return utilization metrics using only the * Maximum statistic, which is the highest value observed during the specified period. *

          *

          * The Compute Optimizer console displays graphs for some utilization metrics using the Average * statistic, which is the value of Sum / SampleCount during the specified period. For * more information, see Viewing resource * recommendations in the Compute Optimizer User Guide. You can also get averaged utilization metric data * for your resources using Amazon CloudWatch. For more information, see the Amazon CloudWatch * User Guide. *

          * * @param statistic * The statistic of the utilization metric.

          *

          * The Compute Optimizer API, Command Line Interface (CLI), and SDKs return utilization metrics using only * the Maximum statistic, which is the highest value observed during the specified period. *

          *

          * The Compute Optimizer console displays graphs for some utilization metrics using the Average * statistic, which is the value of Sum / SampleCount during the specified period. * For more information, see Viewing * resource recommendations in the Compute Optimizer User Guide. You can also get averaged * utilization metric data for your resources using Amazon CloudWatch. For more information, see the Amazon * CloudWatch User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see LambdaFunctionMetricStatistic */ public LambdaFunctionUtilizationMetric withStatistic(String statistic) { setStatistic(statistic); return this; } /** *

          * The statistic of the utilization metric. *

          *

          * The Compute Optimizer API, Command Line Interface (CLI), and SDKs return utilization metrics using only the * Maximum statistic, which is the highest value observed during the specified period. *

          *

          * The Compute Optimizer console displays graphs for some utilization metrics using the Average * statistic, which is the value of Sum / SampleCount during the specified period. For * more information, see Viewing resource * recommendations in the Compute Optimizer User Guide. You can also get averaged utilization metric data * for your resources using Amazon CloudWatch. For more information, see the Amazon CloudWatch * User Guide. *

          * * @param statistic * The statistic of the utilization metric.

          *

          * The Compute Optimizer API, Command Line Interface (CLI), and SDKs return utilization metrics using only * the Maximum statistic, which is the highest value observed during the specified period. *

          *

          * The Compute Optimizer console displays graphs for some utilization metrics using the Average * statistic, which is the value of Sum / SampleCount during the specified period. * For more information, see Viewing * resource recommendations in the Compute Optimizer User Guide. You can also get averaged * utilization metric data for your resources using Amazon CloudWatch. For more information, see the Amazon * CloudWatch User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see LambdaFunctionMetricStatistic */ public LambdaFunctionUtilizationMetric withStatistic(LambdaFunctionMetricStatistic statistic) { this.statistic = statistic.toString(); return this; } /** *

          * The value of the utilization metric. *

          * * @param value * The value of the utilization metric. */ public void setValue(Double value) { this.value = value; } /** *

          * The value of the utilization metric. *

          * * @return The value of the utilization metric. */ public Double getValue() { return this.value; } /** *

          * The value of the utilization metric. *

          * * @param value * The value of the utilization metric. * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaFunctionUtilizationMetric withValue(Double value) { setValue(value); 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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getStatistic() != null) sb.append("Statistic: ").append(getStatistic()).append(","); if (getValue() != null) sb.append("Value: ").append(getValue()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof LambdaFunctionUtilizationMetric == false) return false; LambdaFunctionUtilizationMetric other = (LambdaFunctionUtilizationMetric) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getStatistic() == null ^ this.getStatistic() == null) return false; if (other.getStatistic() != null && other.getStatistic().equals(this.getStatistic()) == false) return false; if (other.getValue() == null ^ this.getValue() == null) return false; if (other.getValue() != null && other.getValue().equals(this.getValue()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getStatistic() == null) ? 0 : getStatistic().hashCode()); hashCode = prime * hashCode + ((getValue() == null) ? 0 : getValue().hashCode()); return hashCode; } @Override public LambdaFunctionUtilizationMetric clone() { try { return (LambdaFunctionUtilizationMetric) 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.computeoptimizer.model.transform.LambdaFunctionUtilizationMetricMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy