/* * 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.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* A complex type that contains settings for an existing Resolver on an Outpost. *

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

* The ARN (Amazon Resource Name) for the Resolver on an Outpost. *

*/ private String arn; /** *

* The date and time that the Outpost Resolver was created, in Unix time format and Coordinated Universal Time * (UTC). *

*/ private String creationTime; /** *

* The date and time that the Outpost Resolver was modified, in Unix time format and Coordinated Universal Time * (UTC). *

*/ private String modificationTime; /** *

* A unique string that identifies the request that created the Resolver endpoint. The CreatorRequestId * allows failed requests to be retried without the risk of running the operation twice. *

*/ private String creatorRequestId; /** *

* The ID of the Resolver on Outpost. *

*/ private String id; /** *

* Amazon EC2 instance count for the Resolver on the Outpost. *

*/ private Integer instanceCount; /** *

* The Amazon EC2 instance type. *

*/ private String preferredInstanceType; /** *

* Name of the Resolver. *

*/ private String name; /** *

* Status of the Resolver. *

*/ private String status; /** *

* A detailed description of the Resolver. *

*/ private String statusMessage; /** *

* The ARN (Amazon Resource Name) for the Outpost. *

*/ private String outpostArn; /** *

* The ARN (Amazon Resource Name) for the Resolver on an Outpost. *

* * @param arn * The ARN (Amazon Resource Name) for the Resolver on an Outpost. */ public void setArn(String arn) { this.arn = arn; } /** *

* The ARN (Amazon Resource Name) for the Resolver on an Outpost. *

* * @return The ARN (Amazon Resource Name) for the Resolver on an Outpost. */ public String getArn() { return this.arn; } /** *

* The ARN (Amazon Resource Name) for the Resolver on an Outpost. *

* * @param arn * The ARN (Amazon Resource Name) for the Resolver on an Outpost. * @return Returns a reference to this object so that method calls can be chained together. */ public OutpostResolver withArn(String arn) { setArn(arn); return this; } /** *

* The date and time that the Outpost Resolver was created, in Unix time format and Coordinated Universal Time * (UTC). *

* * @param creationTime * The date and time that the Outpost Resolver was created, in Unix time format and Coordinated Universal * Time (UTC). */ public void setCreationTime(String creationTime) { this.creationTime = creationTime; } /** *

* The date and time that the Outpost Resolver was created, in Unix time format and Coordinated Universal Time * (UTC). *

* * @return The date and time that the Outpost Resolver was created, in Unix time format and Coordinated Universal * Time (UTC). */ public String getCreationTime() { return this.creationTime; } /** *

* The date and time that the Outpost Resolver was created, in Unix time format and Coordinated Universal Time * (UTC). *

* * @param creationTime * The date and time that the Outpost Resolver was created, in Unix time format and Coordinated Universal * Time (UTC). * @return Returns a reference to this object so that method calls can be chained together. */ public OutpostResolver withCreationTime(String creationTime) { setCreationTime(creationTime); return this; } /** *

* The date and time that the Outpost Resolver was modified, in Unix time format and Coordinated Universal Time * (UTC). *

* * @param modificationTime * The date and time that the Outpost Resolver was modified, in Unix time format and Coordinated Universal * Time (UTC). */ public void setModificationTime(String modificationTime) { this.modificationTime = modificationTime; } /** *

* The date and time that the Outpost Resolver was modified, in Unix time format and Coordinated Universal Time * (UTC). *

* * @return The date and time that the Outpost Resolver was modified, in Unix time format and Coordinated Universal * Time (UTC). */ public String getModificationTime() { return this.modificationTime; } /** *

* The date and time that the Outpost Resolver was modified, in Unix time format and Coordinated Universal Time * (UTC). *

* * @param modificationTime * The date and time that the Outpost Resolver was modified, in Unix time format and Coordinated Universal * Time (UTC). * @return Returns a reference to this object so that method calls can be chained together. */ public OutpostResolver withModificationTime(String modificationTime) { setModificationTime(modificationTime); return this; } /** *

* A unique string that identifies the request that created the Resolver endpoint. The CreatorRequestId * allows failed requests to be retried without the risk of running the operation twice. *

* * @param creatorRequestId * A unique string that identifies the request that created the Resolver endpoint. The * CreatorRequestId allows failed requests to be retried without the risk of running the * operation twice. */ public void setCreatorRequestId(String creatorRequestId) { this.creatorRequestId = creatorRequestId; } /** *

* A unique string that identifies the request that created the Resolver endpoint. The CreatorRequestId * allows failed requests to be retried without the risk of running the operation twice. *

* * @return A unique string that identifies the request that created the Resolver endpoint. The * CreatorRequestId allows failed requests to be retried without the risk of running the * operation twice. */ public String getCreatorRequestId() { return this.creatorRequestId; } /** *

* A unique string that identifies the request that created the Resolver endpoint. The CreatorRequestId * allows failed requests to be retried without the risk of running the operation twice. *

* * @param creatorRequestId * A unique string that identifies the request that created the Resolver endpoint. The * CreatorRequestId allows failed requests to be retried without the risk of running the * operation twice. * @return Returns a reference to this object so that method calls can be chained together. */ public OutpostResolver withCreatorRequestId(String creatorRequestId) { setCreatorRequestId(creatorRequestId); return this; } /** *

* The ID of the Resolver on Outpost. *

* * @param id * The ID of the Resolver on Outpost. */ public void setId(String id) { this.id = id; } /** *

* The ID of the Resolver on Outpost. *

* * @return The ID of the Resolver on Outpost. */ public String getId() { return this.id; } /** *

* The ID of the Resolver on Outpost. *

* * @param id * The ID of the Resolver on Outpost. * @return Returns a reference to this object so that method calls can be chained together. */ public OutpostResolver withId(String id) { setId(id); return this; } /** *

* Amazon EC2 instance count for the Resolver on the Outpost. *

* * @param instanceCount * Amazon EC2 instance count for the Resolver on the Outpost. */ public void setInstanceCount(Integer instanceCount) { this.instanceCount = instanceCount; } /** *

* Amazon EC2 instance count for the Resolver on the Outpost. *

* * @return Amazon EC2 instance count for the Resolver on the Outpost. */ public Integer getInstanceCount() { return this.instanceCount; } /** *

* Amazon EC2 instance count for the Resolver on the Outpost. *

* * @param instanceCount * Amazon EC2 instance count for the Resolver on the Outpost. * @return Returns a reference to this object so that method calls can be chained together. */ public OutpostResolver withInstanceCount(Integer instanceCount) { setInstanceCount(instanceCount); return this; } /** *

* The Amazon EC2 instance type. *

* * @param preferredInstanceType * The Amazon EC2 instance type. */ public void setPreferredInstanceType(String preferredInstanceType) { this.preferredInstanceType = preferredInstanceType; } /** *

* The Amazon EC2 instance type. *

* * @return The Amazon EC2 instance type. */ public String getPreferredInstanceType() { return this.preferredInstanceType; } /** *

* The Amazon EC2 instance type. *

* * @param preferredInstanceType * The Amazon EC2 instance type. * @return Returns a reference to this object so that method calls can be chained together. */ public OutpostResolver withPreferredInstanceType(String preferredInstanceType) { setPreferredInstanceType(preferredInstanceType); return this; } /** *

* Name of the Resolver. *

* * @param name * Name of the Resolver. */ public void setName(String name) { this.name = name; } /** *

* Name of the Resolver. *

* * @return Name of the Resolver. */ public String getName() { return this.name; } /** *

* Name of the Resolver. *

* * @param name * Name of the Resolver. * @return Returns a reference to this object so that method calls can be chained together. */ public OutpostResolver withName(String name) { setName(name); return this; } /** *

* Status of the Resolver. *

* * @param status * Status of the Resolver. * @see OutpostResolverStatus */ public void setStatus(String status) { this.status = status; } /** *

* Status of the Resolver. *

* * @return Status of the Resolver. * @see OutpostResolverStatus */ public String getStatus() { return this.status; } /** *

* Status of the Resolver. *

* * @param status * Status of the Resolver. * @return Returns a reference to this object so that method calls can be chained together. * @see OutpostResolverStatus */ public OutpostResolver withStatus(String status) { setStatus(status); return this; } /** *

* Status of the Resolver. *

* * @param status * Status of the Resolver. * @return Returns a reference to this object so that method calls can be chained together. * @see OutpostResolverStatus */ public OutpostResolver withStatus(OutpostResolverStatus status) { this.status = status.toString(); return this; } /** *

* A detailed description of the Resolver. *

* * @param statusMessage * A detailed description of the Resolver. */ public void setStatusMessage(String statusMessage) { this.statusMessage = statusMessage; } /** *

* A detailed description of the Resolver. *

* * @return A detailed description of the Resolver. */ public String getStatusMessage() { return this.statusMessage; } /** *

* A detailed description of the Resolver. *

* * @param statusMessage * A detailed description of the Resolver. * @return Returns a reference to this object so that method calls can be chained together. */ public OutpostResolver withStatusMessage(String statusMessage) { setStatusMessage(statusMessage); return this; } /** *

* The ARN (Amazon Resource Name) for the Outpost. *

* * @param outpostArn * The ARN (Amazon Resource Name) for the Outpost. */ public void setOutpostArn(String outpostArn) { this.outpostArn = outpostArn; } /** *

* The ARN (Amazon Resource Name) for the Outpost. *

* * @return The ARN (Amazon Resource Name) for the Outpost. */ public String getOutpostArn() { return this.outpostArn; } /** *

* The ARN (Amazon Resource Name) for the Outpost. *

* * @param outpostArn * The ARN (Amazon Resource Name) for the Outpost. * @return Returns a reference to this object so that method calls can be chained together. */ public OutpostResolver withOutpostArn(String outpostArn) { setOutpostArn(outpostArn); 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 (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getCreationTime() != null) sb.append("CreationTime: ").append(getCreationTime()).append(","); if (getModificationTime() != null) sb.append("ModificationTime: ").append(getModificationTime()).append(","); if (getCreatorRequestId() != null) sb.append("CreatorRequestId: ").append(getCreatorRequestId()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getInstanceCount() != null) sb.append("InstanceCount: ").append(getInstanceCount()).append(","); if (getPreferredInstanceType() != null) sb.append("PreferredInstanceType: ").append(getPreferredInstanceType()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getStatusMessage() != null) sb.append("StatusMessage: ").append(getStatusMessage()).append(","); if (getOutpostArn() != null) sb.append("OutpostArn: ").append(getOutpostArn()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof OutpostResolver == false) return false; OutpostResolver other = (OutpostResolver) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getCreationTime() == null ^ this.getCreationTime() == null) return false; if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false) return false; if (other.getModificationTime() == null ^ this.getModificationTime() == null) return false; if (other.getModificationTime() != null && other.getModificationTime().equals(this.getModificationTime()) == false) return false; if (other.getCreatorRequestId() == null ^ this.getCreatorRequestId() == null) return false; if (other.getCreatorRequestId() != null && other.getCreatorRequestId().equals(this.getCreatorRequestId()) == 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.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.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getStatusMessage() == null ^ this.getStatusMessage() == null) return false; if (other.getStatusMessage() != null && other.getStatusMessage().equals(this.getStatusMessage()) == false) return false; if (other.getOutpostArn() == null ^ this.getOutpostArn() == null) return false; if (other.getOutpostArn() != null && other.getOutpostArn().equals(this.getOutpostArn()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); hashCode = prime * hashCode + ((getModificationTime() == null) ? 0 : getModificationTime().hashCode()); hashCode = prime * hashCode + ((getCreatorRequestId() == null) ? 0 : getCreatorRequestId().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getInstanceCount() == null) ? 0 : getInstanceCount().hashCode()); hashCode = prime * hashCode + ((getPreferredInstanceType() == null) ? 0 : getPreferredInstanceType().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getStatusMessage() == null) ? 0 : getStatusMessage().hashCode()); hashCode = prime * hashCode + ((getOutpostArn() == null) ? 0 : getOutpostArn().hashCode()); return hashCode; } @Override public OutpostResolver clone() { try { return (OutpostResolver) 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.route53resolver.model.transform.OutpostResolverMarshaller.getInstance().marshall(this, protocolMarshaller); } }