/* * Copyright 2018-2023 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 an Lambda function recommendation. *

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

* The Amazon Resource Name (ARN) of the current function. *

*/ private String functionArn; /** *

* The version number of the current function. *

*/ private String functionVersion; /** *

* The Amazon Web Services account ID of the function. *

*/ private String accountId; /** *

* The amount of memory, in MB, that's allocated to the current function. *

*/ private Integer currentMemorySize; /** *

* The number of times your function code was applied during the look-back period. *

*/ private Long numberOfInvocations; /** *

* An array of objects that describe the utilization metrics of the function. *

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

* The number of days for which utilization metrics were analyzed for the function. *

*/ private Double lookbackPeriodInDays; /** *

* The timestamp of when the function recommendation was last generated. *

*/ private java.util.Date lastRefreshTimestamp; /** *

* The finding classification of the function. *

*

* Findings for functions include: *

* */ private String finding; /** *

* The reason for the finding classification of the function. *

* *

* Functions that have a finding classification of Optimized don't have a finding reason code. *

*
*

* Finding reason codes for functions include: *

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

* An array of objects that describe the memory configuration recommendation options for the function. *

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

* The risk of the current Lambda function not meeting the performance needs of its workloads. The higher the risk, * the more likely the current Lambda function requires more memory. *

*/ private String currentPerformanceRisk; /** *

* A list of tags assigned to your Lambda function recommendations. *

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

* The Amazon Resource Name (ARN) of the current function. *

* * @param functionArn * The Amazon Resource Name (ARN) of the current function. */ public void setFunctionArn(String functionArn) { this.functionArn = functionArn; } /** *

* The Amazon Resource Name (ARN) of the current function. *

* * @return The Amazon Resource Name (ARN) of the current function. */ public String getFunctionArn() { return this.functionArn; } /** *

* The Amazon Resource Name (ARN) of the current function. *

* * @param functionArn * The Amazon Resource Name (ARN) of the current function. * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaFunctionRecommendation withFunctionArn(String functionArn) { setFunctionArn(functionArn); return this; } /** *

* The version number of the current function. *

* * @param functionVersion * The version number of the current function. */ public void setFunctionVersion(String functionVersion) { this.functionVersion = functionVersion; } /** *

* The version number of the current function. *

* * @return The version number of the current function. */ public String getFunctionVersion() { return this.functionVersion; } /** *

* The version number of the current function. *

* * @param functionVersion * The version number of the current function. * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaFunctionRecommendation withFunctionVersion(String functionVersion) { setFunctionVersion(functionVersion); return this; } /** *

* The Amazon Web Services account ID of the function. *

* * @param accountId * The Amazon Web Services account ID of the function. */ public void setAccountId(String accountId) { this.accountId = accountId; } /** *

* The Amazon Web Services account ID of the function. *

* * @return The Amazon Web Services account ID of the function. */ public String getAccountId() { return this.accountId; } /** *

* The Amazon Web Services account ID of the function. *

* * @param accountId * The Amazon Web Services account ID of the function. * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaFunctionRecommendation withAccountId(String accountId) { setAccountId(accountId); return this; } /** *

* The amount of memory, in MB, that's allocated to the current function. *

* * @param currentMemorySize * The amount of memory, in MB, that's allocated to the current function. */ public void setCurrentMemorySize(Integer currentMemorySize) { this.currentMemorySize = currentMemorySize; } /** *

* The amount of memory, in MB, that's allocated to the current function. *

* * @return The amount of memory, in MB, that's allocated to the current function. */ public Integer getCurrentMemorySize() { return this.currentMemorySize; } /** *

* The amount of memory, in MB, that's allocated to the current function. *

* * @param currentMemorySize * The amount of memory, in MB, that's allocated to the current function. * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaFunctionRecommendation withCurrentMemorySize(Integer currentMemorySize) { setCurrentMemorySize(currentMemorySize); return this; } /** *

* The number of times your function code was applied during the look-back period. *

* * @param numberOfInvocations * The number of times your function code was applied during the look-back period. */ public void setNumberOfInvocations(Long numberOfInvocations) { this.numberOfInvocations = numberOfInvocations; } /** *

* The number of times your function code was applied during the look-back period. *

* * @return The number of times your function code was applied during the look-back period. */ public Long getNumberOfInvocations() { return this.numberOfInvocations; } /** *

* The number of times your function code was applied during the look-back period. *

* * @param numberOfInvocations * The number of times your function code was applied during the look-back period. * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaFunctionRecommendation withNumberOfInvocations(Long numberOfInvocations) { setNumberOfInvocations(numberOfInvocations); return this; } /** *

* An array of objects that describe the utilization metrics of the function. *

* * @return An array of objects that describe the utilization metrics of the function. */ public java.util.List getUtilizationMetrics() { return utilizationMetrics; } /** *

* An array of objects that describe the utilization metrics of the function. *

* * @param utilizationMetrics * An array of objects that describe the utilization metrics of the function. */ public void setUtilizationMetrics(java.util.Collection utilizationMetrics) { if (utilizationMetrics == null) { this.utilizationMetrics = null; return; } this.utilizationMetrics = new java.util.ArrayList(utilizationMetrics); } /** *

* An array of objects that describe the utilization metrics of the function. *

*

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

* * @param utilizationMetrics * An array of objects that describe the utilization metrics of the function. * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaFunctionRecommendation withUtilizationMetrics(LambdaFunctionUtilizationMetric... utilizationMetrics) { if (this.utilizationMetrics == null) { setUtilizationMetrics(new java.util.ArrayList(utilizationMetrics.length)); } for (LambdaFunctionUtilizationMetric ele : utilizationMetrics) { this.utilizationMetrics.add(ele); } return this; } /** *

* An array of objects that describe the utilization metrics of the function. *

* * @param utilizationMetrics * An array of objects that describe the utilization metrics of the function. * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaFunctionRecommendation withUtilizationMetrics(java.util.Collection utilizationMetrics) { setUtilizationMetrics(utilizationMetrics); return this; } /** *

* The number of days for which utilization metrics were analyzed for the function. *

* * @param lookbackPeriodInDays * The number of days for which utilization metrics were analyzed for the function. */ public void setLookbackPeriodInDays(Double lookbackPeriodInDays) { this.lookbackPeriodInDays = lookbackPeriodInDays; } /** *

* The number of days for which utilization metrics were analyzed for the function. *

* * @return The number of days for which utilization metrics were analyzed for the function. */ public Double getLookbackPeriodInDays() { return this.lookbackPeriodInDays; } /** *

* The number of days for which utilization metrics were analyzed for the function. *

* * @param lookbackPeriodInDays * The number of days for which utilization metrics were analyzed for the function. * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaFunctionRecommendation withLookbackPeriodInDays(Double lookbackPeriodInDays) { setLookbackPeriodInDays(lookbackPeriodInDays); return this; } /** *

* The timestamp of when the function recommendation was last generated. *

* * @param lastRefreshTimestamp * The timestamp of when the function recommendation was last generated. */ public void setLastRefreshTimestamp(java.util.Date lastRefreshTimestamp) { this.lastRefreshTimestamp = lastRefreshTimestamp; } /** *

* The timestamp of when the function recommendation was last generated. *

* * @return The timestamp of when the function recommendation was last generated. */ public java.util.Date getLastRefreshTimestamp() { return this.lastRefreshTimestamp; } /** *

* The timestamp of when the function recommendation was last generated. *

* * @param lastRefreshTimestamp * The timestamp of when the function recommendation was last generated. * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaFunctionRecommendation withLastRefreshTimestamp(java.util.Date lastRefreshTimestamp) { setLastRefreshTimestamp(lastRefreshTimestamp); return this; } /** *

* The finding classification of the function. *

*

* Findings for functions include: *

*
    *
  • *

    * Optimized — The function is correctly provisioned to run your workload based on its current * configuration and its utilization history. This finding classification does not include finding reason codes. *

    *
  • *
  • *

    * NotOptimized — The function is performing at a higher level (over-provisioned) or at a * lower level (under-provisioned) than required for your workload because its current configuration is not optimal. * Over-provisioned resources might lead to unnecessary infrastructure cost, and under-provisioned resources might * lead to poor application performance. This finding classification can include the * MemoryUnderprovisioned and MemoryUnderprovisioned finding reason codes. *

    *
  • *
  • *

    * Unavailable — Compute Optimizer was unable to generate a recommendation for the function. * This could be because the function has not accumulated sufficient metric data, or the function does not qualify * for a recommendation. This finding classification can include the InsufficientData and * Inconclusive finding reason codes. *

    * *

    * Functions with a finding of unavailable are not returned unless you specify the filter parameter * with a value of Unavailable in your GetLambdaFunctionRecommendations request. *

    *
  • *
* * @param finding * The finding classification of the function.

*

* Findings for functions include: *

*
    *
  • *

    * Optimized — The function is correctly provisioned to run your workload based on its * current configuration and its utilization history. This finding classification does not include finding * reason codes. *

    *
  • *
  • *

    * NotOptimized — The function is performing at a higher level (over-provisioned) or at * a lower level (under-provisioned) than required for your workload because its current configuration is not * optimal. Over-provisioned resources might lead to unnecessary infrastructure cost, and under-provisioned * resources might lead to poor application performance. This finding classification can include the * MemoryUnderprovisioned and MemoryUnderprovisioned finding reason codes. *

    *
  • *
  • *

    * Unavailable — Compute Optimizer was unable to generate a recommendation for the * function. This could be because the function has not accumulated sufficient metric data, or the function * does not qualify for a recommendation. This finding classification can include the * InsufficientData and Inconclusive finding reason codes. *

    * *

    * Functions with a finding of unavailable are not returned unless you specify the filter * parameter with a value of Unavailable in your GetLambdaFunctionRecommendations * request. *

    *
  • * @see LambdaFunctionRecommendationFinding */ public void setFinding(String finding) { this.finding = finding; } /** *

    * The finding classification of the function. *

    *

    * Findings for functions include: *

    *
      *
    • *

      * Optimized — The function is correctly provisioned to run your workload based on its current * configuration and its utilization history. This finding classification does not include finding reason codes. *

      *
    • *
    • *

      * NotOptimized — The function is performing at a higher level (over-provisioned) or at a * lower level (under-provisioned) than required for your workload because its current configuration is not optimal. * Over-provisioned resources might lead to unnecessary infrastructure cost, and under-provisioned resources might * lead to poor application performance. This finding classification can include the * MemoryUnderprovisioned and MemoryUnderprovisioned finding reason codes. *

      *
    • *
    • *

      * Unavailable — Compute Optimizer was unable to generate a recommendation for the function. * This could be because the function has not accumulated sufficient metric data, or the function does not qualify * for a recommendation. This finding classification can include the InsufficientData and * Inconclusive finding reason codes. *

      * *

      * Functions with a finding of unavailable are not returned unless you specify the filter parameter * with a value of Unavailable in your GetLambdaFunctionRecommendations request. *

      *
    • *
    * * @return The finding classification of the function.

    *

    * Findings for functions include: *

    *
      *
    • *

      * Optimized — The function is correctly provisioned to run your workload based on its * current configuration and its utilization history. This finding classification does not include finding * reason codes. *

      *
    • *
    • *

      * NotOptimized — The function is performing at a higher level (over-provisioned) or * at a lower level (under-provisioned) than required for your workload because its current configuration is * not optimal. Over-provisioned resources might lead to unnecessary infrastructure cost, and * under-provisioned resources might lead to poor application performance. This finding classification can * include the MemoryUnderprovisioned and MemoryUnderprovisioned finding reason * codes. *

      *
    • *
    • *

      * Unavailable — Compute Optimizer was unable to generate a recommendation for the * function. This could be because the function has not accumulated sufficient metric data, or the function * does not qualify for a recommendation. This finding classification can include the * InsufficientData and Inconclusive finding reason codes. *

      * *

      * Functions with a finding of unavailable are not returned unless you specify the filter * parameter with a value of Unavailable in your GetLambdaFunctionRecommendations * request. *

      *
    • * @see LambdaFunctionRecommendationFinding */ public String getFinding() { return this.finding; } /** *

      * The finding classification of the function. *

      *

      * Findings for functions include: *

      *
        *
      • *

        * Optimized — The function is correctly provisioned to run your workload based on its current * configuration and its utilization history. This finding classification does not include finding reason codes. *

        *
      • *
      • *

        * NotOptimized — The function is performing at a higher level (over-provisioned) or at a * lower level (under-provisioned) than required for your workload because its current configuration is not optimal. * Over-provisioned resources might lead to unnecessary infrastructure cost, and under-provisioned resources might * lead to poor application performance. This finding classification can include the * MemoryUnderprovisioned and MemoryUnderprovisioned finding reason codes. *

        *
      • *
      • *

        * Unavailable — Compute Optimizer was unable to generate a recommendation for the function. * This could be because the function has not accumulated sufficient metric data, or the function does not qualify * for a recommendation. This finding classification can include the InsufficientData and * Inconclusive finding reason codes. *

        * *

        * Functions with a finding of unavailable are not returned unless you specify the filter parameter * with a value of Unavailable in your GetLambdaFunctionRecommendations request. *

        *
      • *
      * * @param finding * The finding classification of the function.

      *

      * Findings for functions include: *

      *
        *
      • *

        * Optimized — The function is correctly provisioned to run your workload based on its * current configuration and its utilization history. This finding classification does not include finding * reason codes. *

        *
      • *
      • *

        * NotOptimized — The function is performing at a higher level (over-provisioned) or at * a lower level (under-provisioned) than required for your workload because its current configuration is not * optimal. Over-provisioned resources might lead to unnecessary infrastructure cost, and under-provisioned * resources might lead to poor application performance. This finding classification can include the * MemoryUnderprovisioned and MemoryUnderprovisioned finding reason codes. *

        *
      • *
      • *

        * Unavailable — Compute Optimizer was unable to generate a recommendation for the * function. This could be because the function has not accumulated sufficient metric data, or the function * does not qualify for a recommendation. This finding classification can include the * InsufficientData and Inconclusive finding reason codes. *

        * *

        * Functions with a finding of unavailable are not returned unless you specify the filter * parameter with a value of Unavailable in your GetLambdaFunctionRecommendations * request. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see LambdaFunctionRecommendationFinding */ public LambdaFunctionRecommendation withFinding(String finding) { setFinding(finding); return this; } /** *

        * The finding classification of the function. *

        *

        * Findings for functions include: *

        *
          *
        • *

          * Optimized — The function is correctly provisioned to run your workload based on its current * configuration and its utilization history. This finding classification does not include finding reason codes. *

          *
        • *
        • *

          * NotOptimized — The function is performing at a higher level (over-provisioned) or at a * lower level (under-provisioned) than required for your workload because its current configuration is not optimal. * Over-provisioned resources might lead to unnecessary infrastructure cost, and under-provisioned resources might * lead to poor application performance. This finding classification can include the * MemoryUnderprovisioned and MemoryUnderprovisioned finding reason codes. *

          *
        • *
        • *

          * Unavailable — Compute Optimizer was unable to generate a recommendation for the function. * This could be because the function has not accumulated sufficient metric data, or the function does not qualify * for a recommendation. This finding classification can include the InsufficientData and * Inconclusive finding reason codes. *

          * *

          * Functions with a finding of unavailable are not returned unless you specify the filter parameter * with a value of Unavailable in your GetLambdaFunctionRecommendations request. *

          *
        • *
        * * @param finding * The finding classification of the function.

        *

        * Findings for functions include: *

        *
          *
        • *

          * Optimized — The function is correctly provisioned to run your workload based on its * current configuration and its utilization history. This finding classification does not include finding * reason codes. *

          *
        • *
        • *

          * NotOptimized — The function is performing at a higher level (over-provisioned) or at * a lower level (under-provisioned) than required for your workload because its current configuration is not * optimal. Over-provisioned resources might lead to unnecessary infrastructure cost, and under-provisioned * resources might lead to poor application performance. This finding classification can include the * MemoryUnderprovisioned and MemoryUnderprovisioned finding reason codes. *

          *
        • *
        • *

          * Unavailable — Compute Optimizer was unable to generate a recommendation for the * function. This could be because the function has not accumulated sufficient metric data, or the function * does not qualify for a recommendation. This finding classification can include the * InsufficientData and Inconclusive finding reason codes. *

          * *

          * Functions with a finding of unavailable are not returned unless you specify the filter * parameter with a value of Unavailable in your GetLambdaFunctionRecommendations * request. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see LambdaFunctionRecommendationFinding */ public LambdaFunctionRecommendation withFinding(LambdaFunctionRecommendationFinding finding) { this.finding = finding.toString(); return this; } /** *

          * The reason for the finding classification of the function. *

          * *

          * Functions that have a finding classification of Optimized don't have a finding reason code. *

          *
          *

          * Finding reason codes for functions include: *

          *
            *
          • *

            * MemoryOverprovisioned — The function is over-provisioned when its memory configuration can * be sized down while still meeting the performance requirements of your workload. An over-provisioned function * might lead to unnecessary infrastructure cost. This finding reason code is part of the NotOptimized * finding classification. *

            *
          • *
          • *

            * MemoryUnderprovisioned — The function is under-provisioned when its memory configuration * doesn't meet the performance requirements of the workload. An under-provisioned function might lead to poor * application performance. This finding reason code is part of the NotOptimized finding * classification. *

            *
          • *
          • *

            * InsufficientData — The function does not have sufficient metric data for Compute Optimizer * to generate a recommendation. For more information, see the Supported resources and * requirements in the Compute Optimizer User Guide. This finding reason code is part of the * Unavailable finding classification. *

            *
          • *
          • *

            * Inconclusive — The function does not qualify for a recommendation because Compute Optimizer * cannot generate a recommendation with a high degree of confidence. This finding reason code is part of the * Unavailable finding classification. *

            *
          • *
          * * @return The reason for the finding classification of the function.

          *

          * Functions that have a finding classification of Optimized don't have a finding reason code. *

          *
          *

          * Finding reason codes for functions include: *

          *
            *
          • *

            * MemoryOverprovisioned — The function is over-provisioned when its memory * configuration can be sized down while still meeting the performance requirements of your workload. An * over-provisioned function might lead to unnecessary infrastructure cost. This finding reason code is part * of the NotOptimized finding classification. *

            *
          • *
          • *

            * MemoryUnderprovisioned — The function is under-provisioned when its memory * configuration doesn't meet the performance requirements of the workload. An under-provisioned function * might lead to poor application performance. This finding reason code is part of the * NotOptimized finding classification. *

            *
          • *
          • *

            * InsufficientData — The function does not have sufficient metric data for Compute * Optimizer to generate a recommendation. For more information, see the Supported resources and * requirements in the Compute Optimizer User Guide. This finding reason code is part of the * Unavailable finding classification. *

            *
          • *
          • *

            * Inconclusive — The function does not qualify for a recommendation because Compute * Optimizer cannot generate a recommendation with a high degree of confidence. This finding reason code is * part of the Unavailable finding classification. *

            *
          • * @see LambdaFunctionRecommendationFindingReasonCode */ public java.util.List getFindingReasonCodes() { return findingReasonCodes; } /** *

            * The reason for the finding classification of the function. *

            * *

            * Functions that have a finding classification of Optimized don't have a finding reason code. *

            *
            *

            * Finding reason codes for functions include: *

            *
              *
            • *

              * MemoryOverprovisioned — The function is over-provisioned when its memory configuration can * be sized down while still meeting the performance requirements of your workload. An over-provisioned function * might lead to unnecessary infrastructure cost. This finding reason code is part of the NotOptimized * finding classification. *

              *
            • *
            • *

              * MemoryUnderprovisioned — The function is under-provisioned when its memory configuration * doesn't meet the performance requirements of the workload. An under-provisioned function might lead to poor * application performance. This finding reason code is part of the NotOptimized finding * classification. *

              *
            • *
            • *

              * InsufficientData — The function does not have sufficient metric data for Compute Optimizer * to generate a recommendation. For more information, see the Supported resources and * requirements in the Compute Optimizer User Guide. This finding reason code is part of the * Unavailable finding classification. *

              *
            • *
            • *

              * Inconclusive — The function does not qualify for a recommendation because Compute Optimizer * cannot generate a recommendation with a high degree of confidence. This finding reason code is part of the * Unavailable finding classification. *

              *
            • *
            * * @param findingReasonCodes * The reason for the finding classification of the function.

            *

            * Functions that have a finding classification of Optimized don't have a finding reason code. *

            *
            *

            * Finding reason codes for functions include: *

            *
              *
            • *

              * MemoryOverprovisioned — The function is over-provisioned when its memory * configuration can be sized down while still meeting the performance requirements of your workload. An * over-provisioned function might lead to unnecessary infrastructure cost. This finding reason code is part * of the NotOptimized finding classification. *

              *
            • *
            • *

              * MemoryUnderprovisioned — The function is under-provisioned when its memory * configuration doesn't meet the performance requirements of the workload. An under-provisioned function * might lead to poor application performance. This finding reason code is part of the * NotOptimized finding classification. *

              *
            • *
            • *

              * InsufficientData — The function does not have sufficient metric data for Compute * Optimizer to generate a recommendation. For more information, see the Supported resources and * requirements in the Compute Optimizer User Guide. This finding reason code is part of the * Unavailable finding classification. *

              *
            • *
            • *

              * Inconclusive — The function does not qualify for a recommendation because Compute * Optimizer cannot generate a recommendation with a high degree of confidence. This finding reason code is * part of the Unavailable finding classification. *

              *
            • * @see LambdaFunctionRecommendationFindingReasonCode */ public void setFindingReasonCodes(java.util.Collection findingReasonCodes) { if (findingReasonCodes == null) { this.findingReasonCodes = null; return; } this.findingReasonCodes = new java.util.ArrayList(findingReasonCodes); } /** *

              * The reason for the finding classification of the function. *

              * *

              * Functions that have a finding classification of Optimized don't have a finding reason code. *

              *
              *

              * Finding reason codes for functions include: *

              *
                *
              • *

                * MemoryOverprovisioned — The function is over-provisioned when its memory configuration can * be sized down while still meeting the performance requirements of your workload. An over-provisioned function * might lead to unnecessary infrastructure cost. This finding reason code is part of the NotOptimized * finding classification. *

                *
              • *
              • *

                * MemoryUnderprovisioned — The function is under-provisioned when its memory configuration * doesn't meet the performance requirements of the workload. An under-provisioned function might lead to poor * application performance. This finding reason code is part of the NotOptimized finding * classification. *

                *
              • *
              • *

                * InsufficientData — The function does not have sufficient metric data for Compute Optimizer * to generate a recommendation. For more information, see the Supported resources and * requirements in the Compute Optimizer User Guide. This finding reason code is part of the * Unavailable finding classification. *

                *
              • *
              • *

                * Inconclusive — The function does not qualify for a recommendation because Compute Optimizer * cannot generate a recommendation with a high degree of confidence. This finding reason code is part of the * Unavailable finding classification. *

                *
              • *
              *

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

              * * @param findingReasonCodes * The reason for the finding classification of the function.

              *

              * Functions that have a finding classification of Optimized don't have a finding reason code. *

              *
              *

              * Finding reason codes for functions include: *

              *
                *
              • *

                * MemoryOverprovisioned — The function is over-provisioned when its memory * configuration can be sized down while still meeting the performance requirements of your workload. An * over-provisioned function might lead to unnecessary infrastructure cost. This finding reason code is part * of the NotOptimized finding classification. *

                *
              • *
              • *

                * MemoryUnderprovisioned — The function is under-provisioned when its memory * configuration doesn't meet the performance requirements of the workload. An under-provisioned function * might lead to poor application performance. This finding reason code is part of the * NotOptimized finding classification. *

                *
              • *
              • *

                * InsufficientData — The function does not have sufficient metric data for Compute * Optimizer to generate a recommendation. For more information, see the Supported resources and * requirements in the Compute Optimizer User Guide. This finding reason code is part of the * Unavailable finding classification. *

                *
              • *
              • *

                * Inconclusive — The function does not qualify for a recommendation because Compute * Optimizer cannot generate a recommendation with a high degree of confidence. This finding reason code is * part of the Unavailable finding classification. *

                *
              • * @return Returns a reference to this object so that method calls can be chained together. * @see LambdaFunctionRecommendationFindingReasonCode */ public LambdaFunctionRecommendation withFindingReasonCodes(String... findingReasonCodes) { if (this.findingReasonCodes == null) { setFindingReasonCodes(new java.util.ArrayList(findingReasonCodes.length)); } for (String ele : findingReasonCodes) { this.findingReasonCodes.add(ele); } return this; } /** *

                * The reason for the finding classification of the function. *

                * *

                * Functions that have a finding classification of Optimized don't have a finding reason code. *

                *
                *

                * Finding reason codes for functions include: *

                *
                  *
                • *

                  * MemoryOverprovisioned — The function is over-provisioned when its memory configuration can * be sized down while still meeting the performance requirements of your workload. An over-provisioned function * might lead to unnecessary infrastructure cost. This finding reason code is part of the NotOptimized * finding classification. *

                  *
                • *
                • *

                  * MemoryUnderprovisioned — The function is under-provisioned when its memory configuration * doesn't meet the performance requirements of the workload. An under-provisioned function might lead to poor * application performance. This finding reason code is part of the NotOptimized finding * classification. *

                  *
                • *
                • *

                  * InsufficientData — The function does not have sufficient metric data for Compute Optimizer * to generate a recommendation. For more information, see the Supported resources and * requirements in the Compute Optimizer User Guide. This finding reason code is part of the * Unavailable finding classification. *

                  *
                • *
                • *

                  * Inconclusive — The function does not qualify for a recommendation because Compute Optimizer * cannot generate a recommendation with a high degree of confidence. This finding reason code is part of the * Unavailable finding classification. *

                  *
                • *
                * * @param findingReasonCodes * The reason for the finding classification of the function.

                *

                * Functions that have a finding classification of Optimized don't have a finding reason code. *

                *
                *

                * Finding reason codes for functions include: *

                *
                  *
                • *

                  * MemoryOverprovisioned — The function is over-provisioned when its memory * configuration can be sized down while still meeting the performance requirements of your workload. An * over-provisioned function might lead to unnecessary infrastructure cost. This finding reason code is part * of the NotOptimized finding classification. *

                  *
                • *
                • *

                  * MemoryUnderprovisioned — The function is under-provisioned when its memory * configuration doesn't meet the performance requirements of the workload. An under-provisioned function * might lead to poor application performance. This finding reason code is part of the * NotOptimized finding classification. *

                  *
                • *
                • *

                  * InsufficientData — The function does not have sufficient metric data for Compute * Optimizer to generate a recommendation. For more information, see the Supported resources and * requirements in the Compute Optimizer User Guide. This finding reason code is part of the * Unavailable finding classification. *

                  *
                • *
                • *

                  * Inconclusive — The function does not qualify for a recommendation because Compute * Optimizer cannot generate a recommendation with a high degree of confidence. This finding reason code is * part of the Unavailable finding classification. *

                  *
                • * @return Returns a reference to this object so that method calls can be chained together. * @see LambdaFunctionRecommendationFindingReasonCode */ public LambdaFunctionRecommendation withFindingReasonCodes(java.util.Collection findingReasonCodes) { setFindingReasonCodes(findingReasonCodes); return this; } /** *

                  * The reason for the finding classification of the function. *

                  * *

                  * Functions that have a finding classification of Optimized don't have a finding reason code. *

                  *
                  *

                  * Finding reason codes for functions include: *

                  *
                    *
                  • *

                    * MemoryOverprovisioned — The function is over-provisioned when its memory configuration can * be sized down while still meeting the performance requirements of your workload. An over-provisioned function * might lead to unnecessary infrastructure cost. This finding reason code is part of the NotOptimized * finding classification. *

                    *
                  • *
                  • *

                    * MemoryUnderprovisioned — The function is under-provisioned when its memory configuration * doesn't meet the performance requirements of the workload. An under-provisioned function might lead to poor * application performance. This finding reason code is part of the NotOptimized finding * classification. *

                    *
                  • *
                  • *

                    * InsufficientData — The function does not have sufficient metric data for Compute Optimizer * to generate a recommendation. For more information, see the Supported resources and * requirements in the Compute Optimizer User Guide. This finding reason code is part of the * Unavailable finding classification. *

                    *
                  • *
                  • *

                    * Inconclusive — The function does not qualify for a recommendation because Compute Optimizer * cannot generate a recommendation with a high degree of confidence. This finding reason code is part of the * Unavailable finding classification. *

                    *
                  • *
                  * * @param findingReasonCodes * The reason for the finding classification of the function.

                  *

                  * Functions that have a finding classification of Optimized don't have a finding reason code. *

                  *
                  *

                  * Finding reason codes for functions include: *

                  *
                    *
                  • *

                    * MemoryOverprovisioned — The function is over-provisioned when its memory * configuration can be sized down while still meeting the performance requirements of your workload. An * over-provisioned function might lead to unnecessary infrastructure cost. This finding reason code is part * of the NotOptimized finding classification. *

                    *
                  • *
                  • *

                    * MemoryUnderprovisioned — The function is under-provisioned when its memory * configuration doesn't meet the performance requirements of the workload. An under-provisioned function * might lead to poor application performance. This finding reason code is part of the * NotOptimized finding classification. *

                    *
                  • *
                  • *

                    * InsufficientData — The function does not have sufficient metric data for Compute * Optimizer to generate a recommendation. For more information, see the Supported resources and * requirements in the Compute Optimizer User Guide. This finding reason code is part of the * Unavailable finding classification. *

                    *
                  • *
                  • *

                    * Inconclusive — The function does not qualify for a recommendation because Compute * Optimizer cannot generate a recommendation with a high degree of confidence. This finding reason code is * part of the Unavailable finding classification. *

                    *
                  • * @return Returns a reference to this object so that method calls can be chained together. * @see LambdaFunctionRecommendationFindingReasonCode */ public LambdaFunctionRecommendation withFindingReasonCodes(LambdaFunctionRecommendationFindingReasonCode... findingReasonCodes) { java.util.ArrayList findingReasonCodesCopy = new java.util.ArrayList(findingReasonCodes.length); for (LambdaFunctionRecommendationFindingReasonCode value : findingReasonCodes) { findingReasonCodesCopy.add(value.toString()); } if (getFindingReasonCodes() == null) { setFindingReasonCodes(findingReasonCodesCopy); } else { getFindingReasonCodes().addAll(findingReasonCodesCopy); } return this; } /** *

                    * An array of objects that describe the memory configuration recommendation options for the function. *

                    * * @return An array of objects that describe the memory configuration recommendation options for the function. */ public java.util.List getMemorySizeRecommendationOptions() { return memorySizeRecommendationOptions; } /** *

                    * An array of objects that describe the memory configuration recommendation options for the function. *

                    * * @param memorySizeRecommendationOptions * An array of objects that describe the memory configuration recommendation options for the function. */ public void setMemorySizeRecommendationOptions(java.util.Collection memorySizeRecommendationOptions) { if (memorySizeRecommendationOptions == null) { this.memorySizeRecommendationOptions = null; return; } this.memorySizeRecommendationOptions = new java.util.ArrayList(memorySizeRecommendationOptions); } /** *

                    * An array of objects that describe the memory configuration recommendation options for the function. *

                    *

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

                    * * @param memorySizeRecommendationOptions * An array of objects that describe the memory configuration recommendation options for the function. * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaFunctionRecommendation withMemorySizeRecommendationOptions(LambdaFunctionMemoryRecommendationOption... memorySizeRecommendationOptions) { if (this.memorySizeRecommendationOptions == null) { setMemorySizeRecommendationOptions(new java.util.ArrayList(memorySizeRecommendationOptions.length)); } for (LambdaFunctionMemoryRecommendationOption ele : memorySizeRecommendationOptions) { this.memorySizeRecommendationOptions.add(ele); } return this; } /** *

                    * An array of objects that describe the memory configuration recommendation options for the function. *

                    * * @param memorySizeRecommendationOptions * An array of objects that describe the memory configuration recommendation options for the function. * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaFunctionRecommendation withMemorySizeRecommendationOptions( java.util.Collection memorySizeRecommendationOptions) { setMemorySizeRecommendationOptions(memorySizeRecommendationOptions); return this; } /** *

                    * The risk of the current Lambda function not meeting the performance needs of its workloads. The higher the risk, * the more likely the current Lambda function requires more memory. *

                    * * @param currentPerformanceRisk * The risk of the current Lambda function not meeting the performance needs of its workloads. The higher the * risk, the more likely the current Lambda function requires more memory. * @see CurrentPerformanceRisk */ public void setCurrentPerformanceRisk(String currentPerformanceRisk) { this.currentPerformanceRisk = currentPerformanceRisk; } /** *

                    * The risk of the current Lambda function not meeting the performance needs of its workloads. The higher the risk, * the more likely the current Lambda function requires more memory. *

                    * * @return The risk of the current Lambda function not meeting the performance needs of its workloads. The higher * the risk, the more likely the current Lambda function requires more memory. * @see CurrentPerformanceRisk */ public String getCurrentPerformanceRisk() { return this.currentPerformanceRisk; } /** *

                    * The risk of the current Lambda function not meeting the performance needs of its workloads. The higher the risk, * the more likely the current Lambda function requires more memory. *

                    * * @param currentPerformanceRisk * The risk of the current Lambda function not meeting the performance needs of its workloads. The higher the * risk, the more likely the current Lambda function requires more memory. * @return Returns a reference to this object so that method calls can be chained together. * @see CurrentPerformanceRisk */ public LambdaFunctionRecommendation withCurrentPerformanceRisk(String currentPerformanceRisk) { setCurrentPerformanceRisk(currentPerformanceRisk); return this; } /** *

                    * The risk of the current Lambda function not meeting the performance needs of its workloads. The higher the risk, * the more likely the current Lambda function requires more memory. *

                    * * @param currentPerformanceRisk * The risk of the current Lambda function not meeting the performance needs of its workloads. The higher the * risk, the more likely the current Lambda function requires more memory. * @return Returns a reference to this object so that method calls can be chained together. * @see CurrentPerformanceRisk */ public LambdaFunctionRecommendation withCurrentPerformanceRisk(CurrentPerformanceRisk currentPerformanceRisk) { this.currentPerformanceRisk = currentPerformanceRisk.toString(); return this; } /** *

                    * A list of tags assigned to your Lambda function recommendations. *

                    * * @return A list of tags assigned to your Lambda function recommendations. */ public java.util.List getTags() { return tags; } /** *

                    * A list of tags assigned to your Lambda function recommendations. *

                    * * @param tags * A list of tags assigned to your Lambda function recommendations. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

                    * A list of tags assigned to your Lambda function recommendations. *

                    *

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

                    * * @param tags * A list of tags assigned to your Lambda function recommendations. * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaFunctionRecommendation withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

                    * A list of tags assigned to your Lambda function recommendations. *

                    * * @param tags * A list of tags assigned to your Lambda function recommendations. * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaFunctionRecommendation withTags(java.util.Collection tags) { setTags(tags); 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 (getFunctionArn() != null) sb.append("FunctionArn: ").append(getFunctionArn()).append(","); if (getFunctionVersion() != null) sb.append("FunctionVersion: ").append(getFunctionVersion()).append(","); if (getAccountId() != null) sb.append("AccountId: ").append(getAccountId()).append(","); if (getCurrentMemorySize() != null) sb.append("CurrentMemorySize: ").append(getCurrentMemorySize()).append(","); if (getNumberOfInvocations() != null) sb.append("NumberOfInvocations: ").append(getNumberOfInvocations()).append(","); if (getUtilizationMetrics() != null) sb.append("UtilizationMetrics: ").append(getUtilizationMetrics()).append(","); if (getLookbackPeriodInDays() != null) sb.append("LookbackPeriodInDays: ").append(getLookbackPeriodInDays()).append(","); if (getLastRefreshTimestamp() != null) sb.append("LastRefreshTimestamp: ").append(getLastRefreshTimestamp()).append(","); if (getFinding() != null) sb.append("Finding: ").append(getFinding()).append(","); if (getFindingReasonCodes() != null) sb.append("FindingReasonCodes: ").append(getFindingReasonCodes()).append(","); if (getMemorySizeRecommendationOptions() != null) sb.append("MemorySizeRecommendationOptions: ").append(getMemorySizeRecommendationOptions()).append(","); if (getCurrentPerformanceRisk() != null) sb.append("CurrentPerformanceRisk: ").append(getCurrentPerformanceRisk()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof LambdaFunctionRecommendation == false) return false; LambdaFunctionRecommendation other = (LambdaFunctionRecommendation) obj; if (other.getFunctionArn() == null ^ this.getFunctionArn() == null) return false; if (other.getFunctionArn() != null && other.getFunctionArn().equals(this.getFunctionArn()) == false) return false; if (other.getFunctionVersion() == null ^ this.getFunctionVersion() == null) return false; if (other.getFunctionVersion() != null && other.getFunctionVersion().equals(this.getFunctionVersion()) == false) return false; if (other.getAccountId() == null ^ this.getAccountId() == null) return false; if (other.getAccountId() != null && other.getAccountId().equals(this.getAccountId()) == false) return false; if (other.getCurrentMemorySize() == null ^ this.getCurrentMemorySize() == null) return false; if (other.getCurrentMemorySize() != null && other.getCurrentMemorySize().equals(this.getCurrentMemorySize()) == false) return false; if (other.getNumberOfInvocations() == null ^ this.getNumberOfInvocations() == null) return false; if (other.getNumberOfInvocations() != null && other.getNumberOfInvocations().equals(this.getNumberOfInvocations()) == false) return false; if (other.getUtilizationMetrics() == null ^ this.getUtilizationMetrics() == null) return false; if (other.getUtilizationMetrics() != null && other.getUtilizationMetrics().equals(this.getUtilizationMetrics()) == false) return false; if (other.getLookbackPeriodInDays() == null ^ this.getLookbackPeriodInDays() == null) return false; if (other.getLookbackPeriodInDays() != null && other.getLookbackPeriodInDays().equals(this.getLookbackPeriodInDays()) == false) return false; if (other.getLastRefreshTimestamp() == null ^ this.getLastRefreshTimestamp() == null) return false; if (other.getLastRefreshTimestamp() != null && other.getLastRefreshTimestamp().equals(this.getLastRefreshTimestamp()) == false) return false; if (other.getFinding() == null ^ this.getFinding() == null) return false; if (other.getFinding() != null && other.getFinding().equals(this.getFinding()) == false) return false; if (other.getFindingReasonCodes() == null ^ this.getFindingReasonCodes() == null) return false; if (other.getFindingReasonCodes() != null && other.getFindingReasonCodes().equals(this.getFindingReasonCodes()) == false) return false; if (other.getMemorySizeRecommendationOptions() == null ^ this.getMemorySizeRecommendationOptions() == null) return false; if (other.getMemorySizeRecommendationOptions() != null && other.getMemorySizeRecommendationOptions().equals(this.getMemorySizeRecommendationOptions()) == false) return false; if (other.getCurrentPerformanceRisk() == null ^ this.getCurrentPerformanceRisk() == null) return false; if (other.getCurrentPerformanceRisk() != null && other.getCurrentPerformanceRisk().equals(this.getCurrentPerformanceRisk()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFunctionArn() == null) ? 0 : getFunctionArn().hashCode()); hashCode = prime * hashCode + ((getFunctionVersion() == null) ? 0 : getFunctionVersion().hashCode()); hashCode = prime * hashCode + ((getAccountId() == null) ? 0 : getAccountId().hashCode()); hashCode = prime * hashCode + ((getCurrentMemorySize() == null) ? 0 : getCurrentMemorySize().hashCode()); hashCode = prime * hashCode + ((getNumberOfInvocations() == null) ? 0 : getNumberOfInvocations().hashCode()); hashCode = prime * hashCode + ((getUtilizationMetrics() == null) ? 0 : getUtilizationMetrics().hashCode()); hashCode = prime * hashCode + ((getLookbackPeriodInDays() == null) ? 0 : getLookbackPeriodInDays().hashCode()); hashCode = prime * hashCode + ((getLastRefreshTimestamp() == null) ? 0 : getLastRefreshTimestamp().hashCode()); hashCode = prime * hashCode + ((getFinding() == null) ? 0 : getFinding().hashCode()); hashCode = prime * hashCode + ((getFindingReasonCodes() == null) ? 0 : getFindingReasonCodes().hashCode()); hashCode = prime * hashCode + ((getMemorySizeRecommendationOptions() == null) ? 0 : getMemorySizeRecommendationOptions().hashCode()); hashCode = prime * hashCode + ((getCurrentPerformanceRisk() == null) ? 0 : getCurrentPerformanceRisk().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public LambdaFunctionRecommendation clone() { try { return (LambdaFunctionRecommendation) 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.LambdaFunctionRecommendationMarshaller.getInstance().marshall(this, protocolMarshaller); } }