All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.route53.model.TestDNSAnswerResult Maven / Gradle / Ivy

/*
 * Copyright 2019-2024 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.route53.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* A complex type that contains the response to a TestDNSAnswer request. *

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

* The Amazon Route 53 name server used to respond to the request. *

*/ private String nameserver; /** *

* The name of the resource record set that you submitted a request for. *

*/ private String recordName; /** *

* The type of the resource record set that you submitted a request for. *

*/ private String recordType; /** *

* A list that contains values that Amazon Route 53 returned for this resource record set. *

*/ private com.amazonaws.internal.SdkInternalList recordData; /** *

* A code that indicates whether the request is valid or not. The most common response code is NOERROR, * meaning that the request is valid. If the response is not valid, Amazon Route 53 returns a response code that * describes the error. For a list of possible response codes, see DNS RCODES on the * IANA website. *

*/ private String responseCode; /** *

* The protocol that Amazon Route 53 used to respond to the request, either UDP or TCP. *

*/ private String protocol; /** *

* The Amazon Route 53 name server used to respond to the request. *

* * @param nameserver * The Amazon Route 53 name server used to respond to the request. */ public void setNameserver(String nameserver) { this.nameserver = nameserver; } /** *

* The Amazon Route 53 name server used to respond to the request. *

* * @return The Amazon Route 53 name server used to respond to the request. */ public String getNameserver() { return this.nameserver; } /** *

* The Amazon Route 53 name server used to respond to the request. *

* * @param nameserver * The Amazon Route 53 name server used to respond to the request. * @return Returns a reference to this object so that method calls can be chained together. */ public TestDNSAnswerResult withNameserver(String nameserver) { setNameserver(nameserver); return this; } /** *

* The name of the resource record set that you submitted a request for. *

* * @param recordName * The name of the resource record set that you submitted a request for. */ public void setRecordName(String recordName) { this.recordName = recordName; } /** *

* The name of the resource record set that you submitted a request for. *

* * @return The name of the resource record set that you submitted a request for. */ public String getRecordName() { return this.recordName; } /** *

* The name of the resource record set that you submitted a request for. *

* * @param recordName * The name of the resource record set that you submitted a request for. * @return Returns a reference to this object so that method calls can be chained together. */ public TestDNSAnswerResult withRecordName(String recordName) { setRecordName(recordName); return this; } /** *

* The type of the resource record set that you submitted a request for. *

* * @param recordType * The type of the resource record set that you submitted a request for. * @see RRType */ public void setRecordType(String recordType) { this.recordType = recordType; } /** *

* The type of the resource record set that you submitted a request for. *

* * @return The type of the resource record set that you submitted a request for. * @see RRType */ public String getRecordType() { return this.recordType; } /** *

* The type of the resource record set that you submitted a request for. *

* * @param recordType * The type of the resource record set that you submitted a request for. * @return Returns a reference to this object so that method calls can be chained together. * @see RRType */ public TestDNSAnswerResult withRecordType(String recordType) { setRecordType(recordType); return this; } /** *

* The type of the resource record set that you submitted a request for. *

* * @param recordType * The type of the resource record set that you submitted a request for. * @see RRType */ public void setRecordType(RRType recordType) { withRecordType(recordType); } /** *

* The type of the resource record set that you submitted a request for. *

* * @param recordType * The type of the resource record set that you submitted a request for. * @return Returns a reference to this object so that method calls can be chained together. * @see RRType */ public TestDNSAnswerResult withRecordType(RRType recordType) { this.recordType = recordType.toString(); return this; } /** *

* A list that contains values that Amazon Route 53 returned for this resource record set. *

* * @return A list that contains values that Amazon Route 53 returned for this resource record set. */ public java.util.List getRecordData() { if (recordData == null) { recordData = new com.amazonaws.internal.SdkInternalList(); } return recordData; } /** *

* A list that contains values that Amazon Route 53 returned for this resource record set. *

* * @param recordData * A list that contains values that Amazon Route 53 returned for this resource record set. */ public void setRecordData(java.util.Collection recordData) { if (recordData == null) { this.recordData = null; return; } this.recordData = new com.amazonaws.internal.SdkInternalList(recordData); } /** *

* A list that contains values that Amazon Route 53 returned for this resource record set. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setRecordData(java.util.Collection)} or {@link #withRecordData(java.util.Collection)} if you want to * override the existing values. *

* * @param recordData * A list that contains values that Amazon Route 53 returned for this resource record set. * @return Returns a reference to this object so that method calls can be chained together. */ public TestDNSAnswerResult withRecordData(String... recordData) { if (this.recordData == null) { setRecordData(new com.amazonaws.internal.SdkInternalList(recordData.length)); } for (String ele : recordData) { this.recordData.add(ele); } return this; } /** *

* A list that contains values that Amazon Route 53 returned for this resource record set. *

* * @param recordData * A list that contains values that Amazon Route 53 returned for this resource record set. * @return Returns a reference to this object so that method calls can be chained together. */ public TestDNSAnswerResult withRecordData(java.util.Collection recordData) { setRecordData(recordData); return this; } /** *

* A code that indicates whether the request is valid or not. The most common response code is NOERROR, * meaning that the request is valid. If the response is not valid, Amazon Route 53 returns a response code that * describes the error. For a list of possible response codes, see DNS RCODES on the * IANA website. *

* * @param responseCode * A code that indicates whether the request is valid or not. The most common response code is * NOERROR, meaning that the request is valid. If the response is not valid, Amazon Route 53 * returns a response code that describes the error. For a list of possible response codes, see DNS RCODES * on the IANA website. */ public void setResponseCode(String responseCode) { this.responseCode = responseCode; } /** *

* A code that indicates whether the request is valid or not. The most common response code is NOERROR, * meaning that the request is valid. If the response is not valid, Amazon Route 53 returns a response code that * describes the error. For a list of possible response codes, see DNS RCODES on the * IANA website. *

* * @return A code that indicates whether the request is valid or not. The most common response code is * NOERROR, meaning that the request is valid. If the response is not valid, Amazon Route 53 * returns a response code that describes the error. For a list of possible response codes, see DNS * RCODES on the IANA website. */ public String getResponseCode() { return this.responseCode; } /** *

* A code that indicates whether the request is valid or not. The most common response code is NOERROR, * meaning that the request is valid. If the response is not valid, Amazon Route 53 returns a response code that * describes the error. For a list of possible response codes, see DNS RCODES on the * IANA website. *

* * @param responseCode * A code that indicates whether the request is valid or not. The most common response code is * NOERROR, meaning that the request is valid. If the response is not valid, Amazon Route 53 * returns a response code that describes the error. For a list of possible response codes, see DNS RCODES * on the IANA website. * @return Returns a reference to this object so that method calls can be chained together. */ public TestDNSAnswerResult withResponseCode(String responseCode) { setResponseCode(responseCode); return this; } /** *

* The protocol that Amazon Route 53 used to respond to the request, either UDP or TCP. *

* * @param protocol * The protocol that Amazon Route 53 used to respond to the request, either UDP or * TCP. */ public void setProtocol(String protocol) { this.protocol = protocol; } /** *

* The protocol that Amazon Route 53 used to respond to the request, either UDP or TCP. *

* * @return The protocol that Amazon Route 53 used to respond to the request, either UDP or * TCP. */ public String getProtocol() { return this.protocol; } /** *

* The protocol that Amazon Route 53 used to respond to the request, either UDP or TCP. *

* * @param protocol * The protocol that Amazon Route 53 used to respond to the request, either UDP or * TCP. * @return Returns a reference to this object so that method calls can be chained together. */ public TestDNSAnswerResult withProtocol(String protocol) { setProtocol(protocol); 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 (getNameserver() != null) sb.append("Nameserver: ").append(getNameserver()).append(","); if (getRecordName() != null) sb.append("RecordName: ").append(getRecordName()).append(","); if (getRecordType() != null) sb.append("RecordType: ").append(getRecordType()).append(","); if (getRecordData() != null) sb.append("RecordData: ").append(getRecordData()).append(","); if (getResponseCode() != null) sb.append("ResponseCode: ").append(getResponseCode()).append(","); if (getProtocol() != null) sb.append("Protocol: ").append(getProtocol()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TestDNSAnswerResult == false) return false; TestDNSAnswerResult other = (TestDNSAnswerResult) obj; if (other.getNameserver() == null ^ this.getNameserver() == null) return false; if (other.getNameserver() != null && other.getNameserver().equals(this.getNameserver()) == false) return false; if (other.getRecordName() == null ^ this.getRecordName() == null) return false; if (other.getRecordName() != null && other.getRecordName().equals(this.getRecordName()) == false) return false; if (other.getRecordType() == null ^ this.getRecordType() == null) return false; if (other.getRecordType() != null && other.getRecordType().equals(this.getRecordType()) == false) return false; if (other.getRecordData() == null ^ this.getRecordData() == null) return false; if (other.getRecordData() != null && other.getRecordData().equals(this.getRecordData()) == false) return false; if (other.getResponseCode() == null ^ this.getResponseCode() == null) return false; if (other.getResponseCode() != null && other.getResponseCode().equals(this.getResponseCode()) == false) return false; if (other.getProtocol() == null ^ this.getProtocol() == null) return false; if (other.getProtocol() != null && other.getProtocol().equals(this.getProtocol()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getNameserver() == null) ? 0 : getNameserver().hashCode()); hashCode = prime * hashCode + ((getRecordName() == null) ? 0 : getRecordName().hashCode()); hashCode = prime * hashCode + ((getRecordType() == null) ? 0 : getRecordType().hashCode()); hashCode = prime * hashCode + ((getRecordData() == null) ? 0 : getRecordData().hashCode()); hashCode = prime * hashCode + ((getResponseCode() == null) ? 0 : getResponseCode().hashCode()); hashCode = prime * hashCode + ((getProtocol() == null) ? 0 : getProtocol().hashCode()); return hashCode; } @Override public TestDNSAnswerResult clone() { try { return (TestDNSAnswerResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy