/* * 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.AmazonWebServiceRequest; /** *
* The structure representing the configureAgentRequest. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ConfigureAgentRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** ** A universally unique identifier (UUID) for a profiling instance. For example, if the profiling instance is an * Amazon EC2 instance, it is the instance ID. If it is an AWS Fargate container, it is the container's task ID. *
*/ private String fleetInstanceId; /** ** Metadata captured about the compute platform the agent is running on. It includes information about sampling and * reporting. The valid fields are: *
*
* COMPUTE_PLATFORM
- The compute platform on which the agent is running
*
* AGENT_ID
- The ID for an agent instance.
*
* AWS_REQUEST_ID
- The AWS request ID of a Lambda invocation.
*
* EXECUTION_ENVIRONMENT
- The execution environment a Lambda function is running on.
*
* LAMBDA_FUNCTION_ARN
- The Amazon Resource Name (ARN) that is used to invoke a Lambda function.
*
* LAMBDA_MEMORY_LIMIT_IN_MB
- The memory allocated to a Lambda function.
*
* LAMBDA_REMAINING_TIME_IN_MILLISECONDS
- The time in milliseconds before execution of a Lambda
* function times out.
*
* LAMBDA_TIME_GAP_BETWEEN_INVOKES_IN_MILLISECONDS
- The time in milliseconds between two invocations
* of a Lambda function.
*
* LAMBDA_PREVIOUS_EXECUTION_TIME_IN_MILLISECONDS
- The time in milliseconds for the previous Lambda
* invocation.
*
* The name of the profiling group for which the configured agent is collecting profiling data. *
*/ private String profilingGroupName; /** ** A universally unique identifier (UUID) for a profiling instance. For example, if the profiling instance is an * Amazon EC2 instance, it is the instance ID. If it is an AWS Fargate container, it is the container's task ID. *
* * @param fleetInstanceId * A universally unique identifier (UUID) for a profiling instance. For example, if the profiling instance is * an Amazon EC2 instance, it is the instance ID. If it is an AWS Fargate container, it is the container's * task ID. */ public void setFleetInstanceId(String fleetInstanceId) { this.fleetInstanceId = fleetInstanceId; } /** ** A universally unique identifier (UUID) for a profiling instance. For example, if the profiling instance is an * Amazon EC2 instance, it is the instance ID. If it is an AWS Fargate container, it is the container's task ID. *
* * @return A universally unique identifier (UUID) for a profiling instance. For example, if the profiling instance * is an Amazon EC2 instance, it is the instance ID. If it is an AWS Fargate container, it is the * container's task ID. */ public String getFleetInstanceId() { return this.fleetInstanceId; } /** ** A universally unique identifier (UUID) for a profiling instance. For example, if the profiling instance is an * Amazon EC2 instance, it is the instance ID. If it is an AWS Fargate container, it is the container's task ID. *
* * @param fleetInstanceId * A universally unique identifier (UUID) for a profiling instance. For example, if the profiling instance is * an Amazon EC2 instance, it is the instance ID. If it is an AWS Fargate container, it is the container's * task ID. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigureAgentRequest withFleetInstanceId(String fleetInstanceId) { setFleetInstanceId(fleetInstanceId); return this; } /** ** Metadata captured about the compute platform the agent is running on. It includes information about sampling and * reporting. The valid fields are: *
*
* COMPUTE_PLATFORM
- The compute platform on which the agent is running
*
* AGENT_ID
- The ID for an agent instance.
*
* AWS_REQUEST_ID
- The AWS request ID of a Lambda invocation.
*
* EXECUTION_ENVIRONMENT
- The execution environment a Lambda function is running on.
*
* LAMBDA_FUNCTION_ARN
- The Amazon Resource Name (ARN) that is used to invoke a Lambda function.
*
* LAMBDA_MEMORY_LIMIT_IN_MB
- The memory allocated to a Lambda function.
*
* LAMBDA_REMAINING_TIME_IN_MILLISECONDS
- The time in milliseconds before execution of a Lambda
* function times out.
*
* LAMBDA_TIME_GAP_BETWEEN_INVOKES_IN_MILLISECONDS
- The time in milliseconds between two invocations
* of a Lambda function.
*
* LAMBDA_PREVIOUS_EXECUTION_TIME_IN_MILLISECONDS
- The time in milliseconds for the previous Lambda
* invocation.
*
* COMPUTE_PLATFORM
- The compute platform on which the agent is running
*
* AGENT_ID
- The ID for an agent instance.
*
* AWS_REQUEST_ID
- The AWS request ID of a Lambda invocation.
*
* EXECUTION_ENVIRONMENT
- The execution environment a Lambda function is running on.
*
* LAMBDA_FUNCTION_ARN
- The Amazon Resource Name (ARN) that is used to invoke a Lambda
* function.
*
* LAMBDA_MEMORY_LIMIT_IN_MB
- The memory allocated to a Lambda function.
*
* LAMBDA_REMAINING_TIME_IN_MILLISECONDS
- The time in milliseconds before execution of a
* Lambda function times out.
*
* LAMBDA_TIME_GAP_BETWEEN_INVOKES_IN_MILLISECONDS
- The time in milliseconds between two
* invocations of a Lambda function.
*
* LAMBDA_PREVIOUS_EXECUTION_TIME_IN_MILLISECONDS
- The time in milliseconds for the previous
* Lambda invocation.
*
* Metadata captured about the compute platform the agent is running on. It includes information about sampling and * reporting. The valid fields are: *
*
* COMPUTE_PLATFORM
- The compute platform on which the agent is running
*
* AGENT_ID
- The ID for an agent instance.
*
* AWS_REQUEST_ID
- The AWS request ID of a Lambda invocation.
*
* EXECUTION_ENVIRONMENT
- The execution environment a Lambda function is running on.
*
* LAMBDA_FUNCTION_ARN
- The Amazon Resource Name (ARN) that is used to invoke a Lambda function.
*
* LAMBDA_MEMORY_LIMIT_IN_MB
- The memory allocated to a Lambda function.
*
* LAMBDA_REMAINING_TIME_IN_MILLISECONDS
- The time in milliseconds before execution of a Lambda
* function times out.
*
* LAMBDA_TIME_GAP_BETWEEN_INVOKES_IN_MILLISECONDS
- The time in milliseconds between two invocations
* of a Lambda function.
*
* LAMBDA_PREVIOUS_EXECUTION_TIME_IN_MILLISECONDS
- The time in milliseconds for the previous Lambda
* invocation.
*
* COMPUTE_PLATFORM
- The compute platform on which the agent is running
*
* AGENT_ID
- The ID for an agent instance.
*
* AWS_REQUEST_ID
- The AWS request ID of a Lambda invocation.
*
* EXECUTION_ENVIRONMENT
- The execution environment a Lambda function is running on.
*
* LAMBDA_FUNCTION_ARN
- The Amazon Resource Name (ARN) that is used to invoke a Lambda
* function.
*
* LAMBDA_MEMORY_LIMIT_IN_MB
- The memory allocated to a Lambda function.
*
* LAMBDA_REMAINING_TIME_IN_MILLISECONDS
- The time in milliseconds before execution of a Lambda
* function times out.
*
* LAMBDA_TIME_GAP_BETWEEN_INVOKES_IN_MILLISECONDS
- The time in milliseconds between two
* invocations of a Lambda function.
*
* LAMBDA_PREVIOUS_EXECUTION_TIME_IN_MILLISECONDS
- The time in milliseconds for the previous
* Lambda invocation.
*
* Metadata captured about the compute platform the agent is running on. It includes information about sampling and * reporting. The valid fields are: *
*
* COMPUTE_PLATFORM
- The compute platform on which the agent is running
*
* AGENT_ID
- The ID for an agent instance.
*
* AWS_REQUEST_ID
- The AWS request ID of a Lambda invocation.
*
* EXECUTION_ENVIRONMENT
- The execution environment a Lambda function is running on.
*
* LAMBDA_FUNCTION_ARN
- The Amazon Resource Name (ARN) that is used to invoke a Lambda function.
*
* LAMBDA_MEMORY_LIMIT_IN_MB
- The memory allocated to a Lambda function.
*
* LAMBDA_REMAINING_TIME_IN_MILLISECONDS
- The time in milliseconds before execution of a Lambda
* function times out.
*
* LAMBDA_TIME_GAP_BETWEEN_INVOKES_IN_MILLISECONDS
- The time in milliseconds between two invocations
* of a Lambda function.
*
* LAMBDA_PREVIOUS_EXECUTION_TIME_IN_MILLISECONDS
- The time in milliseconds for the previous Lambda
* invocation.
*
* COMPUTE_PLATFORM
- The compute platform on which the agent is running
*
* AGENT_ID
- The ID for an agent instance.
*
* AWS_REQUEST_ID
- The AWS request ID of a Lambda invocation.
*
* EXECUTION_ENVIRONMENT
- The execution environment a Lambda function is running on.
*
* LAMBDA_FUNCTION_ARN
- The Amazon Resource Name (ARN) that is used to invoke a Lambda
* function.
*
* LAMBDA_MEMORY_LIMIT_IN_MB
- The memory allocated to a Lambda function.
*
* LAMBDA_REMAINING_TIME_IN_MILLISECONDS
- The time in milliseconds before execution of a Lambda
* function times out.
*
* LAMBDA_TIME_GAP_BETWEEN_INVOKES_IN_MILLISECONDS
- The time in milliseconds between two
* invocations of a Lambda function.
*
* LAMBDA_PREVIOUS_EXECUTION_TIME_IN_MILLISECONDS
- The time in milliseconds for the previous
* Lambda invocation.
*
* The name of the profiling group for which the configured agent is collecting profiling data. *
* * @param profilingGroupName * The name of the profiling group for which the configured agent is collecting profiling data. */ public void setProfilingGroupName(String profilingGroupName) { this.profilingGroupName = profilingGroupName; } /** ** The name of the profiling group for which the configured agent is collecting profiling data. *
* * @return The name of the profiling group for which the configured agent is collecting profiling data. */ public String getProfilingGroupName() { return this.profilingGroupName; } /** ** The name of the profiling group for which the configured agent is collecting profiling data. *
* * @param profilingGroupName * The name of the profiling group for which the configured agent is collecting profiling data. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigureAgentRequest withProfilingGroupName(String profilingGroupName) { setProfilingGroupName(profilingGroupName); 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 (getFleetInstanceId() != null) sb.append("FleetInstanceId: ").append(getFleetInstanceId()).append(","); if (getMetadata() != null) sb.append("Metadata: ").append(getMetadata()).append(","); if (getProfilingGroupName() != null) sb.append("ProfilingGroupName: ").append(getProfilingGroupName()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ConfigureAgentRequest == false) return false; ConfigureAgentRequest other = (ConfigureAgentRequest) obj; if (other.getFleetInstanceId() == null ^ this.getFleetInstanceId() == null) return false; if (other.getFleetInstanceId() != null && other.getFleetInstanceId().equals(this.getFleetInstanceId()) == false) return false; if (other.getMetadata() == null ^ this.getMetadata() == null) return false; if (other.getMetadata() != null && other.getMetadata().equals(this.getMetadata()) == false) return false; if (other.getProfilingGroupName() == null ^ this.getProfilingGroupName() == null) return false; if (other.getProfilingGroupName() != null && other.getProfilingGroupName().equals(this.getProfilingGroupName()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFleetInstanceId() == null) ? 0 : getFleetInstanceId().hashCode()); hashCode = prime * hashCode + ((getMetadata() == null) ? 0 : getMetadata().hashCode()); hashCode = prime * hashCode + ((getProfilingGroupName() == null) ? 0 : getProfilingGroupName().hashCode()); return hashCode; } @Override public ConfigureAgentRequest clone() { return (ConfigureAgentRequest) super.clone(); } }