/* * 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.route53resolver.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 CreateOutpostResolverRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* A unique string that identifies the request and that allows failed requests to be retried without the risk of * running the operation twice. *

*

* CreatorRequestId can be any unique string, for example, a date/time stamp. *

*/ private String creatorRequestId; /** *

* A friendly name that lets you easily find a configuration in the Resolver dashboard in the Route 53 console. *

*/ private String name; /** *

* Number of Amazon EC2 instances for the Resolver on Outpost. The default and minimal value is 4. *

*/ private Integer instanceCount; /** *

* The Amazon EC2 instance type. If you specify this, you must also specify a value for the OutpostArn. *

*/ private String preferredInstanceType; /** *

* The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must also specify a value for the * PreferredInstanceType. *

*/ private String outpostArn; /** *

* A string that helps identify the Route 53 Resolvers on Outpost. *

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

* A unique string that identifies the request and that allows failed requests to be retried without the risk of * running the operation twice. *

*

* CreatorRequestId can be any unique string, for example, a date/time stamp. *

* * @param creatorRequestId * A unique string that identifies the request and that allows failed requests to be retried without the risk * of running the operation twice.

*

* CreatorRequestId can be any unique string, for example, a date/time stamp. */ public void setCreatorRequestId(String creatorRequestId) { this.creatorRequestId = creatorRequestId; } /** *

* A unique string that identifies the request and that allows failed requests to be retried without the risk of * running the operation twice. *

*

* CreatorRequestId can be any unique string, for example, a date/time stamp. *

* * @return A unique string that identifies the request and that allows failed requests to be retried without the * risk of running the operation twice.

*

* CreatorRequestId can be any unique string, for example, a date/time stamp. */ public String getCreatorRequestId() { return this.creatorRequestId; } /** *

* A unique string that identifies the request and that allows failed requests to be retried without the risk of * running the operation twice. *

*

* CreatorRequestId can be any unique string, for example, a date/time stamp. *

* * @param creatorRequestId * A unique string that identifies the request and that allows failed requests to be retried without the risk * of running the operation twice.

*

* CreatorRequestId can be any unique string, for example, a date/time stamp. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOutpostResolverRequest withCreatorRequestId(String creatorRequestId) { setCreatorRequestId(creatorRequestId); return this; } /** *

* A friendly name that lets you easily find a configuration in the Resolver dashboard in the Route 53 console. *

* * @param name * A friendly name that lets you easily find a configuration in the Resolver dashboard in the Route 53 * console. */ public void setName(String name) { this.name = name; } /** *

* A friendly name that lets you easily find a configuration in the Resolver dashboard in the Route 53 console. *

* * @return A friendly name that lets you easily find a configuration in the Resolver dashboard in the Route 53 * console. */ public String getName() { return this.name; } /** *

* A friendly name that lets you easily find a configuration in the Resolver dashboard in the Route 53 console. *

* * @param name * A friendly name that lets you easily find a configuration in the Resolver dashboard in the Route 53 * console. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOutpostResolverRequest withName(String name) { setName(name); return this; } /** *

* Number of Amazon EC2 instances for the Resolver on Outpost. The default and minimal value is 4. *

* * @param instanceCount * Number of Amazon EC2 instances for the Resolver on Outpost. The default and minimal value is 4. */ public void setInstanceCount(Integer instanceCount) { this.instanceCount = instanceCount; } /** *

* Number of Amazon EC2 instances for the Resolver on Outpost. The default and minimal value is 4. *

* * @return Number of Amazon EC2 instances for the Resolver on Outpost. The default and minimal value is 4. */ public Integer getInstanceCount() { return this.instanceCount; } /** *

* Number of Amazon EC2 instances for the Resolver on Outpost. The default and minimal value is 4. *

* * @param instanceCount * Number of Amazon EC2 instances for the Resolver on Outpost. The default and minimal value is 4. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOutpostResolverRequest withInstanceCount(Integer instanceCount) { setInstanceCount(instanceCount); return this; } /** *

* The Amazon EC2 instance type. If you specify this, you must also specify a value for the OutpostArn. *

* * @param preferredInstanceType * The Amazon EC2 instance type. If you specify this, you must also specify a value for the * OutpostArn. */ public void setPreferredInstanceType(String preferredInstanceType) { this.preferredInstanceType = preferredInstanceType; } /** *

* The Amazon EC2 instance type. If you specify this, you must also specify a value for the OutpostArn. *

* * @return The Amazon EC2 instance type. If you specify this, you must also specify a value for the * OutpostArn. */ public String getPreferredInstanceType() { return this.preferredInstanceType; } /** *

* The Amazon EC2 instance type. If you specify this, you must also specify a value for the OutpostArn. *

* * @param preferredInstanceType * The Amazon EC2 instance type. If you specify this, you must also specify a value for the * OutpostArn. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOutpostResolverRequest withPreferredInstanceType(String preferredInstanceType) { setPreferredInstanceType(preferredInstanceType); return this; } /** *

* The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must also specify a value for the * PreferredInstanceType. *

* * @param outpostArn * The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must also specify a value for the * PreferredInstanceType. */ public void setOutpostArn(String outpostArn) { this.outpostArn = outpostArn; } /** *

* The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must also specify a value for the * PreferredInstanceType. *

* * @return The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must also specify a value for the * PreferredInstanceType. */ public String getOutpostArn() { return this.outpostArn; } /** *

* The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must also specify a value for the * PreferredInstanceType. *

* * @param outpostArn * The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must also specify a value for the * PreferredInstanceType. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOutpostResolverRequest withOutpostArn(String outpostArn) { setOutpostArn(outpostArn); return this; } /** *

* A string that helps identify the Route 53 Resolvers on Outpost. *

* * @return A string that helps identify the Route 53 Resolvers on Outpost. */ public java.util.List getTags() { return tags; } /** *

* A string that helps identify the Route 53 Resolvers on Outpost. *

* * @param tags * A string that helps identify the Route 53 Resolvers on Outpost. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

* A string that helps identify the Route 53 Resolvers on Outpost. *

*

* 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 string that helps identify the Route 53 Resolvers on Outpost. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOutpostResolverRequest 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 string that helps identify the Route 53 Resolvers on Outpost. *

* * @param tags * A string that helps identify the Route 53 Resolvers on Outpost. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateOutpostResolverRequest 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 (getCreatorRequestId() != null) sb.append("CreatorRequestId: ").append(getCreatorRequestId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getInstanceCount() != null) sb.append("InstanceCount: ").append(getInstanceCount()).append(","); if (getPreferredInstanceType() != null) sb.append("PreferredInstanceType: ").append(getPreferredInstanceType()).append(","); if (getOutpostArn() != null) sb.append("OutpostArn: ").append(getOutpostArn()).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 CreateOutpostResolverRequest == false) return false; CreateOutpostResolverRequest other = (CreateOutpostResolverRequest) obj; if (other.getCreatorRequestId() == null ^ this.getCreatorRequestId() == null) return false; if (other.getCreatorRequestId() != null && other.getCreatorRequestId().equals(this.getCreatorRequestId()) == 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.getInstanceCount() == null ^ this.getInstanceCount() == null) return false; if (other.getInstanceCount() != null && other.getInstanceCount().equals(this.getInstanceCount()) == false) return false; if (other.getPreferredInstanceType() == null ^ this.getPreferredInstanceType() == null) return false; if (other.getPreferredInstanceType() != null && other.getPreferredInstanceType().equals(this.getPreferredInstanceType()) == false) return false; if (other.getOutpostArn() == null ^ this.getOutpostArn() == null) return false; if (other.getOutpostArn() != null && other.getOutpostArn().equals(this.getOutpostArn()) == 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 + ((getCreatorRequestId() == null) ? 0 : getCreatorRequestId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getInstanceCount() == null) ? 0 : getInstanceCount().hashCode()); hashCode = prime * hashCode + ((getPreferredInstanceType() == null) ? 0 : getPreferredInstanceType().hashCode()); hashCode = prime * hashCode + ((getOutpostArn() == null) ? 0 : getOutpostArn().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public CreateOutpostResolverRequest clone() { return (CreateOutpostResolverRequest) super.clone(); } }