/* * 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.apprunner.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateObservabilityConfigurationRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* A name for the observability configuration. When you use it for the first time in an Amazon Web Services Region, * App Runner creates revision number 1 of this name. When you use the same name in subsequent calls, * App Runner creates incremental revisions of the configuration. *

* *

* The name DefaultConfiguration is reserved. You can't use it to create a new observability * configuration, and you can't create a revision of it. *

*

* When you want to use your own observability configuration for your App Runner service, create a configuration * with a different name, and then provide it when you create or update your service. *

*
*/ private String observabilityConfigurationName; /** *

* The configuration of the tracing feature within this observability configuration. If you don't specify it, App * Runner doesn't enable tracing. *

*/ private TraceConfiguration traceConfiguration; /** *

* A list of metadata items that you can associate with your observability configuration resource. A tag is a * key-value pair. *

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

* A name for the observability configuration. When you use it for the first time in an Amazon Web Services Region, * App Runner creates revision number 1 of this name. When you use the same name in subsequent calls, * App Runner creates incremental revisions of the configuration. *

* *

* The name DefaultConfiguration is reserved. You can't use it to create a new observability * configuration, and you can't create a revision of it. *

*

* When you want to use your own observability configuration for your App Runner service, create a configuration * with a different name, and then provide it when you create or update your service. *

*
* * @param observabilityConfigurationName * A name for the observability configuration. When you use it for the first time in an Amazon Web Services * Region, App Runner creates revision number 1 of this name. When you use the same name in * subsequent calls, App Runner creates incremental revisions of the configuration.

*

* The name DefaultConfiguration is reserved. You can't use it to create a new observability * configuration, and you can't create a revision of it. *

*

* When you want to use your own observability configuration for your App Runner service, create a * configuration with a different name, and then provide it when you create or update your service. *

*/ public void setObservabilityConfigurationName(String observabilityConfigurationName) { this.observabilityConfigurationName = observabilityConfigurationName; } /** *

* A name for the observability configuration. When you use it for the first time in an Amazon Web Services Region, * App Runner creates revision number 1 of this name. When you use the same name in subsequent calls, * App Runner creates incremental revisions of the configuration. *

* *

* The name DefaultConfiguration is reserved. You can't use it to create a new observability * configuration, and you can't create a revision of it. *

*

* When you want to use your own observability configuration for your App Runner service, create a configuration * with a different name, and then provide it when you create or update your service. *

*
* * @return A name for the observability configuration. When you use it for the first time in an Amazon Web Services * Region, App Runner creates revision number 1 of this name. When you use the same name in * subsequent calls, App Runner creates incremental revisions of the configuration.

*

* The name DefaultConfiguration is reserved. You can't use it to create a new observability * configuration, and you can't create a revision of it. *

*

* When you want to use your own observability configuration for your App Runner service, create a * configuration with a different name, and then provide it when you create or update your service. *

*/ public String getObservabilityConfigurationName() { return this.observabilityConfigurationName; } /** *

* A name for the observability configuration. When you use it for the first time in an Amazon Web Services Region, * App Runner creates revision number 1 of this name. When you use the same name in subsequent calls, * App Runner creates incremental revisions of the configuration. *

* *

* The name DefaultConfiguration is reserved. You can't use it to create a new observability * configuration, and you can't create a revision of it. *

*

* When you want to use your own observability configuration for your App Runner service, create a configuration * with a different name, and then provide it when you create or update your service. *

*
* * @param observabilityConfigurationName * A name for the observability configuration. When you use it for the first time in an Amazon Web Services * Region, App Runner creates revision number 1 of this name. When you use the same name in * subsequent calls, App Runner creates incremental revisions of the configuration.

*

* The name DefaultConfiguration is reserved. You can't use it to create a new observability * configuration, and you can't create a revision of it. *

*

* When you want to use your own observability configuration for your App Runner service, create a * configuration with a different name, and then provide it when you create or update your service. *

* @return Returns a reference to this object so that method calls can be chained together. */ public CreateObservabilityConfigurationRequest withObservabilityConfigurationName(String observabilityConfigurationName) { setObservabilityConfigurationName(observabilityConfigurationName); return this; } /** *

* The configuration of the tracing feature within this observability configuration. If you don't specify it, App * Runner doesn't enable tracing. *

* * @param traceConfiguration * The configuration of the tracing feature within this observability configuration. If you don't specify it, * App Runner doesn't enable tracing. */ public void setTraceConfiguration(TraceConfiguration traceConfiguration) { this.traceConfiguration = traceConfiguration; } /** *

* The configuration of the tracing feature within this observability configuration. If you don't specify it, App * Runner doesn't enable tracing. *

* * @return The configuration of the tracing feature within this observability configuration. If you don't specify * it, App Runner doesn't enable tracing. */ public TraceConfiguration getTraceConfiguration() { return this.traceConfiguration; } /** *

* The configuration of the tracing feature within this observability configuration. If you don't specify it, App * Runner doesn't enable tracing. *

* * @param traceConfiguration * The configuration of the tracing feature within this observability configuration. If you don't specify it, * App Runner doesn't enable tracing. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateObservabilityConfigurationRequest withTraceConfiguration(TraceConfiguration traceConfiguration) { setTraceConfiguration(traceConfiguration); return this; } /** *

* A list of metadata items that you can associate with your observability configuration resource. A tag is a * key-value pair. *

* * @return A list of metadata items that you can associate with your observability configuration resource. A tag is * a key-value pair. */ public java.util.List getTags() { return tags; } /** *

* A list of metadata items that you can associate with your observability configuration resource. A tag is a * key-value pair. *

* * @param tags * A list of metadata items that you can associate with your observability configuration resource. A tag is a * key-value pair. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

* A list of metadata items that you can associate with your observability configuration resource. A tag is a * key-value pair. *

*

* 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 metadata items that you can associate with your observability configuration resource. A tag is a * key-value pair. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateObservabilityConfigurationRequest 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 metadata items that you can associate with your observability configuration resource. A tag is a * key-value pair. *

* * @param tags * A list of metadata items that you can associate with your observability configuration resource. A tag is a * key-value pair. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateObservabilityConfigurationRequest 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 (getObservabilityConfigurationName() != null) sb.append("ObservabilityConfigurationName: ").append(getObservabilityConfigurationName()).append(","); if (getTraceConfiguration() != null) sb.append("TraceConfiguration: ").append(getTraceConfiguration()).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 CreateObservabilityConfigurationRequest == false) return false; CreateObservabilityConfigurationRequest other = (CreateObservabilityConfigurationRequest) obj; if (other.getObservabilityConfigurationName() == null ^ this.getObservabilityConfigurationName() == null) return false; if (other.getObservabilityConfigurationName() != null && other.getObservabilityConfigurationName().equals(this.getObservabilityConfigurationName()) == false) return false; if (other.getTraceConfiguration() == null ^ this.getTraceConfiguration() == null) return false; if (other.getTraceConfiguration() != null && other.getTraceConfiguration().equals(this.getTraceConfiguration()) == 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 + ((getObservabilityConfigurationName() == null) ? 0 : getObservabilityConfigurationName().hashCode()); hashCode = prime * hashCode + ((getTraceConfiguration() == null) ? 0 : getTraceConfiguration().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public CreateObservabilityConfigurationRequest clone() { return (CreateObservabilityConfigurationRequest) super.clone(); } }