/* * 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.codeguruprofiler.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* The response of
* ConfigureAgent
that specifies if an agent profiles or not and for how long to return profiling
* data.
*
* Parameters used by the profiler. The valid parameters are: *
*
* MaxStackDepth
- The maximum depth of the stacks in the code that is represented in the profile. For
* example, if CodeGuru Profiler finds a method A
, which calls method B
, which calls
* method C
, which calls method D
, then the depth is 4. If the maxDepth
is
* set to 2, then the profiler evaluates A
and B
.
*
* MemoryUsageLimitPercent
- The percentage of memory that is used by the profiler.
*
* MinimumTimeForReportingInMilliseconds
- The minimum time in milliseconds between sending reports.
*
* ReportingIntervalInMilliseconds
- The reporting interval in milliseconds used to report profiles.
*
* SamplingIntervalInMilliseconds
- The sampling interval in milliseconds that is used to profile
* samples.
*
* How long a profiling agent should send profiling data using
* ConfigureAgent
. For example, if this is set to 300, the profiling agent calls
* ConfigureAgent
every 5 minutes to submit the profiled data collected during that period.
*
* A Boolean
that specifies whether the profiling agent collects profiling data or not. Set to
* true
to enable profiling.
*
* Parameters used by the profiler. The valid parameters are: *
*
* MaxStackDepth
- The maximum depth of the stacks in the code that is represented in the profile. For
* example, if CodeGuru Profiler finds a method A
, which calls method B
, which calls
* method C
, which calls method D
, then the depth is 4. If the maxDepth
is
* set to 2, then the profiler evaluates A
and B
.
*
* MemoryUsageLimitPercent
- The percentage of memory that is used by the profiler.
*
* MinimumTimeForReportingInMilliseconds
- The minimum time in milliseconds between sending reports.
*
* ReportingIntervalInMilliseconds
- The reporting interval in milliseconds used to report profiles.
*
* SamplingIntervalInMilliseconds
- The sampling interval in milliseconds that is used to profile
* samples.
*
* MaxStackDepth
- The maximum depth of the stacks in the code that is represented in the
* profile. For example, if CodeGuru Profiler finds a method A
, which calls method
* B
, which calls method C
, which calls method D
, then the depth is
* 4. If the maxDepth
is set to 2, then the profiler evaluates A
and
* B
.
*
* MemoryUsageLimitPercent
- The percentage of memory that is used by the profiler.
*
* MinimumTimeForReportingInMilliseconds
- The minimum time in milliseconds between sending
* reports.
*
* ReportingIntervalInMilliseconds
- The reporting interval in milliseconds used to report
* profiles.
*
* SamplingIntervalInMilliseconds
- The sampling interval in milliseconds that is used to
* profile samples.
*
* Parameters used by the profiler. The valid parameters are: *
*
* MaxStackDepth
- The maximum depth of the stacks in the code that is represented in the profile. For
* example, if CodeGuru Profiler finds a method A
, which calls method B
, which calls
* method C
, which calls method D
, then the depth is 4. If the maxDepth
is
* set to 2, then the profiler evaluates A
and B
.
*
* MemoryUsageLimitPercent
- The percentage of memory that is used by the profiler.
*
* MinimumTimeForReportingInMilliseconds
- The minimum time in milliseconds between sending reports.
*
* ReportingIntervalInMilliseconds
- The reporting interval in milliseconds used to report profiles.
*
* SamplingIntervalInMilliseconds
- The sampling interval in milliseconds that is used to profile
* samples.
*
* MaxStackDepth
- The maximum depth of the stacks in the code that is represented in the
* profile. For example, if CodeGuru Profiler finds a method A
, which calls method
* B
, which calls method C
, which calls method D
, then the depth is 4.
* If the maxDepth
is set to 2, then the profiler evaluates A
and B
.
*
* MemoryUsageLimitPercent
- The percentage of memory that is used by the profiler.
*
* MinimumTimeForReportingInMilliseconds
- The minimum time in milliseconds between sending
* reports.
*
* ReportingIntervalInMilliseconds
- The reporting interval in milliseconds used to report
* profiles.
*
* SamplingIntervalInMilliseconds
- The sampling interval in milliseconds that is used to
* profile samples.
*
* Parameters used by the profiler. The valid parameters are: *
*
* MaxStackDepth
- The maximum depth of the stacks in the code that is represented in the profile. For
* example, if CodeGuru Profiler finds a method A
, which calls method B
, which calls
* method C
, which calls method D
, then the depth is 4. If the maxDepth
is
* set to 2, then the profiler evaluates A
and B
.
*
* MemoryUsageLimitPercent
- The percentage of memory that is used by the profiler.
*
* MinimumTimeForReportingInMilliseconds
- The minimum time in milliseconds between sending reports.
*
* ReportingIntervalInMilliseconds
- The reporting interval in milliseconds used to report profiles.
*
* SamplingIntervalInMilliseconds
- The sampling interval in milliseconds that is used to profile
* samples.
*
* MaxStackDepth
- The maximum depth of the stacks in the code that is represented in the
* profile. For example, if CodeGuru Profiler finds a method A
, which calls method
* B
, which calls method C
, which calls method D
, then the depth is 4.
* If the maxDepth
is set to 2, then the profiler evaluates A
and B
.
*
* MemoryUsageLimitPercent
- The percentage of memory that is used by the profiler.
*
* MinimumTimeForReportingInMilliseconds
- The minimum time in milliseconds between sending
* reports.
*
* ReportingIntervalInMilliseconds
- The reporting interval in milliseconds used to report
* profiles.
*
* SamplingIntervalInMilliseconds
- The sampling interval in milliseconds that is used to
* profile samples.
*
* How long a profiling agent should send profiling data using
* ConfigureAgent
. For example, if this is set to 300, the profiling agent calls
* ConfigureAgent
every 5 minutes to submit the profiled data collected during that period.
*
ConfigureAgent
. For example, if this is set to 300, the profiling agent calls
* ConfigureAgent
every 5 minutes to submit the profiled data collected during that period.
*/
public void setPeriodInSeconds(Integer periodInSeconds) {
this.periodInSeconds = periodInSeconds;
}
/**
*
* How long a profiling agent should send profiling data using
* ConfigureAgent
. For example, if this is set to 300, the profiling agent calls
* ConfigureAgent
every 5 minutes to submit the profiled data collected during that period.
*
ConfigureAgent
. For example, if this is set to 300, the profiling agent calls
* ConfigureAgent
every 5 minutes to submit the profiled data collected during that
* period.
*/
public Integer getPeriodInSeconds() {
return this.periodInSeconds;
}
/**
*
* How long a profiling agent should send profiling data using
* ConfigureAgent
. For example, if this is set to 300, the profiling agent calls
* ConfigureAgent
every 5 minutes to submit the profiled data collected during that period.
*
ConfigureAgent
. For example, if this is set to 300, the profiling agent calls
* ConfigureAgent
every 5 minutes to submit the profiled data collected during that period.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AgentConfiguration withPeriodInSeconds(Integer periodInSeconds) {
setPeriodInSeconds(periodInSeconds);
return this;
}
/**
*
* A Boolean
that specifies whether the profiling agent collects profiling data or not. Set to
* true
to enable profiling.
*
Boolean
that specifies whether the profiling agent collects profiling data or not. Set to
* true
to enable profiling.
*/
public void setShouldProfile(Boolean shouldProfile) {
this.shouldProfile = shouldProfile;
}
/**
*
* A Boolean
that specifies whether the profiling agent collects profiling data or not. Set to
* true
to enable profiling.
*
Boolean
that specifies whether the profiling agent collects profiling data or not. Set to
* true
to enable profiling.
*/
public Boolean getShouldProfile() {
return this.shouldProfile;
}
/**
*
* A Boolean
that specifies whether the profiling agent collects profiling data or not. Set to
* true
to enable profiling.
*
Boolean
that specifies whether the profiling agent collects profiling data or not. Set to
* true
to enable profiling.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AgentConfiguration withShouldProfile(Boolean shouldProfile) {
setShouldProfile(shouldProfile);
return this;
}
/**
*
* A Boolean
that specifies whether the profiling agent collects profiling data or not. Set to
* true
to enable profiling.
*
Boolean
that specifies whether the profiling agent collects profiling data or not. Set to
* true
to enable profiling.
*/
public Boolean isShouldProfile() {
return this.shouldProfile;
}
/**
* 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 (getAgentParameters() != null)
sb.append("AgentParameters: ").append(getAgentParameters()).append(",");
if (getPeriodInSeconds() != null)
sb.append("PeriodInSeconds: ").append(getPeriodInSeconds()).append(",");
if (getShouldProfile() != null)
sb.append("ShouldProfile: ").append(getShouldProfile());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AgentConfiguration == false)
return false;
AgentConfiguration other = (AgentConfiguration) obj;
if (other.getAgentParameters() == null ^ this.getAgentParameters() == null)
return false;
if (other.getAgentParameters() != null && other.getAgentParameters().equals(this.getAgentParameters()) == false)
return false;
if (other.getPeriodInSeconds() == null ^ this.getPeriodInSeconds() == null)
return false;
if (other.getPeriodInSeconds() != null && other.getPeriodInSeconds().equals(this.getPeriodInSeconds()) == false)
return false;
if (other.getShouldProfile() == null ^ this.getShouldProfile() == null)
return false;
if (other.getShouldProfile() != null && other.getShouldProfile().equals(this.getShouldProfile()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAgentParameters() == null) ? 0 : getAgentParameters().hashCode());
hashCode = prime * hashCode + ((getPeriodInSeconds() == null) ? 0 : getPeriodInSeconds().hashCode());
hashCode = prime * hashCode + ((getShouldProfile() == null) ? 0 : getShouldProfile().hashCode());
return hashCode;
}
@Override
public AgentConfiguration clone() {
try {
return (AgentConfiguration) 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.AgentConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}