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

com.amazonaws.services.codeguruprofiler.model.Pattern Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon CodeGuru Profiler module holds the client classes that are used for communicating with Amazon CodeGuru Profiler Service

There is a newer version: 1.12.778
Show 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.codeguruprofiler.model;

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

/**
 * 

* A set of rules used to make a recommendation during an analysis. *

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

* A list of the different counters used to determine if there is a match. *

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

* The description of the recommendation. This explains a potential inefficiency in a profiled application. *

*/ private String description; /** *

* The universally unique identifier (UUID) of this pattern. *

*/ private String id; /** *

* The name for this pattern. *

*/ private String name; /** *

* A string that contains the steps recommended to address the potential inefficiency. *

*/ private String resolutionSteps; /** *

* A list of frame names that were searched during the analysis that generated a recommendation. *

*/ private java.util.List> targetFrames; /** *

* The percentage of time an application spends in one method that triggers a recommendation. The percentage of time * is the same as the percentage of the total gathered sample counts during analysis. *

*/ private Double thresholdPercent; /** *

* A list of the different counters used to determine if there is a match. *

* * @return A list of the different counters used to determine if there is a match. */ public java.util.List getCountersToAggregate() { return countersToAggregate; } /** *

* A list of the different counters used to determine if there is a match. *

* * @param countersToAggregate * A list of the different counters used to determine if there is a match. */ public void setCountersToAggregate(java.util.Collection countersToAggregate) { if (countersToAggregate == null) { this.countersToAggregate = null; return; } this.countersToAggregate = new java.util.ArrayList(countersToAggregate); } /** *

* A list of the different counters used to determine if there is a match. *

*

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

* * @param countersToAggregate * A list of the different counters used to determine if there is a match. * @return Returns a reference to this object so that method calls can be chained together. */ public Pattern withCountersToAggregate(String... countersToAggregate) { if (this.countersToAggregate == null) { setCountersToAggregate(new java.util.ArrayList(countersToAggregate.length)); } for (String ele : countersToAggregate) { this.countersToAggregate.add(ele); } return this; } /** *

* A list of the different counters used to determine if there is a match. *

* * @param countersToAggregate * A list of the different counters used to determine if there is a match. * @return Returns a reference to this object so that method calls can be chained together. */ public Pattern withCountersToAggregate(java.util.Collection countersToAggregate) { setCountersToAggregate(countersToAggregate); return this; } /** *

* The description of the recommendation. This explains a potential inefficiency in a profiled application. *

* * @param description * The description of the recommendation. This explains a potential inefficiency in a profiled application. */ public void setDescription(String description) { this.description = description; } /** *

* The description of the recommendation. This explains a potential inefficiency in a profiled application. *

* * @return The description of the recommendation. This explains a potential inefficiency in a profiled application. */ public String getDescription() { return this.description; } /** *

* The description of the recommendation. This explains a potential inefficiency in a profiled application. *

* * @param description * The description of the recommendation. This explains a potential inefficiency in a profiled application. * @return Returns a reference to this object so that method calls can be chained together. */ public Pattern withDescription(String description) { setDescription(description); return this; } /** *

* The universally unique identifier (UUID) of this pattern. *

* * @param id * The universally unique identifier (UUID) of this pattern. */ public void setId(String id) { this.id = id; } /** *

* The universally unique identifier (UUID) of this pattern. *

* * @return The universally unique identifier (UUID) of this pattern. */ public String getId() { return this.id; } /** *

* The universally unique identifier (UUID) of this pattern. *

* * @param id * The universally unique identifier (UUID) of this pattern. * @return Returns a reference to this object so that method calls can be chained together. */ public Pattern withId(String id) { setId(id); return this; } /** *

* The name for this pattern. *

* * @param name * The name for this pattern. */ public void setName(String name) { this.name = name; } /** *

* The name for this pattern. *

* * @return The name for this pattern. */ public String getName() { return this.name; } /** *

* The name for this pattern. *

* * @param name * The name for this pattern. * @return Returns a reference to this object so that method calls can be chained together. */ public Pattern withName(String name) { setName(name); return this; } /** *

* A string that contains the steps recommended to address the potential inefficiency. *

* * @param resolutionSteps * A string that contains the steps recommended to address the potential inefficiency. */ public void setResolutionSteps(String resolutionSteps) { this.resolutionSteps = resolutionSteps; } /** *

* A string that contains the steps recommended to address the potential inefficiency. *

* * @return A string that contains the steps recommended to address the potential inefficiency. */ public String getResolutionSteps() { return this.resolutionSteps; } /** *

* A string that contains the steps recommended to address the potential inefficiency. *

* * @param resolutionSteps * A string that contains the steps recommended to address the potential inefficiency. * @return Returns a reference to this object so that method calls can be chained together. */ public Pattern withResolutionSteps(String resolutionSteps) { setResolutionSteps(resolutionSteps); return this; } /** *

* A list of frame names that were searched during the analysis that generated a recommendation. *

* * @return A list of frame names that were searched during the analysis that generated a recommendation. */ public java.util.List> getTargetFrames() { return targetFrames; } /** *

* A list of frame names that were searched during the analysis that generated a recommendation. *

* * @param targetFrames * A list of frame names that were searched during the analysis that generated a recommendation. */ public void setTargetFrames(java.util.Collection> targetFrames) { if (targetFrames == null) { this.targetFrames = null; return; } this.targetFrames = new java.util.ArrayList>(targetFrames); } /** *

* A list of frame names that were searched during the analysis that generated a recommendation. *

*

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

* * @param targetFrames * A list of frame names that were searched during the analysis that generated a recommendation. * @return Returns a reference to this object so that method calls can be chained together. */ public Pattern withTargetFrames(java.util.List... targetFrames) { if (this.targetFrames == null) { setTargetFrames(new java.util.ArrayList>(targetFrames.length)); } for (java.util.List ele : targetFrames) { this.targetFrames.add(ele); } return this; } /** *

* A list of frame names that were searched during the analysis that generated a recommendation. *

* * @param targetFrames * A list of frame names that were searched during the analysis that generated a recommendation. * @return Returns a reference to this object so that method calls can be chained together. */ public Pattern withTargetFrames(java.util.Collection> targetFrames) { setTargetFrames(targetFrames); return this; } /** *

* The percentage of time an application spends in one method that triggers a recommendation. The percentage of time * is the same as the percentage of the total gathered sample counts during analysis. *

* * @param thresholdPercent * The percentage of time an application spends in one method that triggers a recommendation. The percentage * of time is the same as the percentage of the total gathered sample counts during analysis. */ public void setThresholdPercent(Double thresholdPercent) { this.thresholdPercent = thresholdPercent; } /** *

* The percentage of time an application spends in one method that triggers a recommendation. The percentage of time * is the same as the percentage of the total gathered sample counts during analysis. *

* * @return The percentage of time an application spends in one method that triggers a recommendation. The percentage * of time is the same as the percentage of the total gathered sample counts during analysis. */ public Double getThresholdPercent() { return this.thresholdPercent; } /** *

* The percentage of time an application spends in one method that triggers a recommendation. The percentage of time * is the same as the percentage of the total gathered sample counts during analysis. *

* * @param thresholdPercent * The percentage of time an application spends in one method that triggers a recommendation. The percentage * of time is the same as the percentage of the total gathered sample counts during analysis. * @return Returns a reference to this object so that method calls can be chained together. */ public Pattern withThresholdPercent(Double thresholdPercent) { setThresholdPercent(thresholdPercent); 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 (getCountersToAggregate() != null) sb.append("CountersToAggregate: ").append(getCountersToAggregate()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getResolutionSteps() != null) sb.append("ResolutionSteps: ").append(getResolutionSteps()).append(","); if (getTargetFrames() != null) sb.append("TargetFrames: ").append(getTargetFrames()).append(","); if (getThresholdPercent() != null) sb.append("ThresholdPercent: ").append(getThresholdPercent()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Pattern == false) return false; Pattern other = (Pattern) obj; if (other.getCountersToAggregate() == null ^ this.getCountersToAggregate() == null) return false; if (other.getCountersToAggregate() != null && other.getCountersToAggregate().equals(this.getCountersToAggregate()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getResolutionSteps() == null ^ this.getResolutionSteps() == null) return false; if (other.getResolutionSteps() != null && other.getResolutionSteps().equals(this.getResolutionSteps()) == false) return false; if (other.getTargetFrames() == null ^ this.getTargetFrames() == null) return false; if (other.getTargetFrames() != null && other.getTargetFrames().equals(this.getTargetFrames()) == false) return false; if (other.getThresholdPercent() == null ^ this.getThresholdPercent() == null) return false; if (other.getThresholdPercent() != null && other.getThresholdPercent().equals(this.getThresholdPercent()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCountersToAggregate() == null) ? 0 : getCountersToAggregate().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getResolutionSteps() == null) ? 0 : getResolutionSteps().hashCode()); hashCode = prime * hashCode + ((getTargetFrames() == null) ? 0 : getTargetFrames().hashCode()); hashCode = prime * hashCode + ((getThresholdPercent() == null) ? 0 : getThresholdPercent().hashCode()); return hashCode; } @Override public Pattern clone() { try { return (Pattern) 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.codeguruprofiler.model.transform.PatternMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy