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

com.amazonaws.services.route53resolver.model.ResolverRule Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Route 53 Resolver module holds the client classes that are used for communicating with Amazon Route 53 Resolver Service

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2014-2019 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;

/**
 * 

* For queries that originate in your VPC, detailed information about a resolver rule, which specifies how to route DNS * queries out of the VPC. The ResolverRule parameter appears in the response to a * CreateResolverRule, DeleteResolverRule, GetResolverRule, ListResolverRules, or * UpdateResolverRule request. *

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

* The ID that Resolver assigned to the resolver rule when you created it. *

*/ private String id; /** *

* A unique string that you specified when you created the resolver rule. CreatorRequestIdidentifies * the request and allows failed requests to be retried without the risk of executing the operation twice. *

*/ private String creatorRequestId; /** *

* The ARN (Amazon Resource Name) for the resolver rule specified by Id. *

*/ private String arn; /** *

* DNS queries for this domain name are forwarded to the IP addresses that are specified in TargetIps. * If a query matches multiple resolver rules (example.com and www.example.com), the query is routed using the * resolver rule that contains the most specific domain name (www.example.com). *

*/ private String domainName; /** *

* A code that specifies the current status of the resolver rule. *

*/ private String status; /** *

* A detailed description of the status of a resolver rule. *

*/ private String statusMessage; /** *

* This value is always FORWARD. Other resolver rule types aren't supported. *

*/ private String ruleType; /** *

* The name for the resolver rule, which you specified when you created the resolver rule. *

*/ private String name; /** *

* An array that contains the IP addresses and ports that you want to forward *

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

* The ID of the endpoint that the rule is associated with. *

*/ private String resolverEndpointId; /** *

* When a rule is shared with another AWS account, the account ID of the account that the rule is shared with. *

*/ private String ownerId; /** *

* Whether the rules is shared and, if so, whether the current account is sharing the rule with another account, or * another account is sharing the rule with the current account. *

*/ private String shareStatus; /** *

* The ID that Resolver assigned to the resolver rule when you created it. *

* * @param id * The ID that Resolver assigned to the resolver rule when you created it. */ public void setId(String id) { this.id = id; } /** *

* The ID that Resolver assigned to the resolver rule when you created it. *

* * @return The ID that Resolver assigned to the resolver rule when you created it. */ public String getId() { return this.id; } /** *

* The ID that Resolver assigned to the resolver rule when you created it. *

* * @param id * The ID that Resolver assigned to the resolver rule when you created it. * @return Returns a reference to this object so that method calls can be chained together. */ public ResolverRule withId(String id) { setId(id); return this; } /** *

* A unique string that you specified when you created the resolver rule. CreatorRequestIdidentifies * the request and allows failed requests to be retried without the risk of executing the operation twice. *

* * @param creatorRequestId * A unique string that you specified when you created the resolver rule. CreatorRequestId * identifies the request and allows failed requests to be retried without the risk of executing the * operation twice. */ public void setCreatorRequestId(String creatorRequestId) { this.creatorRequestId = creatorRequestId; } /** *

* A unique string that you specified when you created the resolver rule. CreatorRequestIdidentifies * the request and allows failed requests to be retried without the risk of executing the operation twice. *

* * @return A unique string that you specified when you created the resolver rule. CreatorRequestId * identifies the request and allows failed requests to be retried without the risk of executing the * operation twice. */ public String getCreatorRequestId() { return this.creatorRequestId; } /** *

* A unique string that you specified when you created the resolver rule. CreatorRequestIdidentifies * the request and allows failed requests to be retried without the risk of executing the operation twice. *

* * @param creatorRequestId * A unique string that you specified when you created the resolver rule. CreatorRequestId * identifies the request and allows failed requests to be retried without the risk of executing the * operation twice. * @return Returns a reference to this object so that method calls can be chained together. */ public ResolverRule withCreatorRequestId(String creatorRequestId) { setCreatorRequestId(creatorRequestId); return this; } /** *

* The ARN (Amazon Resource Name) for the resolver rule specified by Id. *

* * @param arn * The ARN (Amazon Resource Name) for the resolver rule specified by Id. */ public void setArn(String arn) { this.arn = arn; } /** *

* The ARN (Amazon Resource Name) for the resolver rule specified by Id. *

* * @return The ARN (Amazon Resource Name) for the resolver rule specified by Id. */ public String getArn() { return this.arn; } /** *

* The ARN (Amazon Resource Name) for the resolver rule specified by Id. *

* * @param arn * The ARN (Amazon Resource Name) for the resolver rule specified by Id. * @return Returns a reference to this object so that method calls can be chained together. */ public ResolverRule withArn(String arn) { setArn(arn); return this; } /** *

* DNS queries for this domain name are forwarded to the IP addresses that are specified in TargetIps. * If a query matches multiple resolver rules (example.com and www.example.com), the query is routed using the * resolver rule that contains the most specific domain name (www.example.com). *

* * @param domainName * DNS queries for this domain name are forwarded to the IP addresses that are specified in * TargetIps. If a query matches multiple resolver rules (example.com and www.example.com), the * query is routed using the resolver rule that contains the most specific domain name (www.example.com). */ public void setDomainName(String domainName) { this.domainName = domainName; } /** *

* DNS queries for this domain name are forwarded to the IP addresses that are specified in TargetIps. * If a query matches multiple resolver rules (example.com and www.example.com), the query is routed using the * resolver rule that contains the most specific domain name (www.example.com). *

* * @return DNS queries for this domain name are forwarded to the IP addresses that are specified in * TargetIps. If a query matches multiple resolver rules (example.com and www.example.com), the * query is routed using the resolver rule that contains the most specific domain name (www.example.com). */ public String getDomainName() { return this.domainName; } /** *

* DNS queries for this domain name are forwarded to the IP addresses that are specified in TargetIps. * If a query matches multiple resolver rules (example.com and www.example.com), the query is routed using the * resolver rule that contains the most specific domain name (www.example.com). *

* * @param domainName * DNS queries for this domain name are forwarded to the IP addresses that are specified in * TargetIps. If a query matches multiple resolver rules (example.com and www.example.com), the * query is routed using the resolver rule that contains the most specific domain name (www.example.com). * @return Returns a reference to this object so that method calls can be chained together. */ public ResolverRule withDomainName(String domainName) { setDomainName(domainName); return this; } /** *

* A code that specifies the current status of the resolver rule. *

* * @param status * A code that specifies the current status of the resolver rule. * @see ResolverRuleStatus */ public void setStatus(String status) { this.status = status; } /** *

* A code that specifies the current status of the resolver rule. *

* * @return A code that specifies the current status of the resolver rule. * @see ResolverRuleStatus */ public String getStatus() { return this.status; } /** *

* A code that specifies the current status of the resolver rule. *

* * @param status * A code that specifies the current status of the resolver rule. * @return Returns a reference to this object so that method calls can be chained together. * @see ResolverRuleStatus */ public ResolverRule withStatus(String status) { setStatus(status); return this; } /** *

* A code that specifies the current status of the resolver rule. *

* * @param status * A code that specifies the current status of the resolver rule. * @return Returns a reference to this object so that method calls can be chained together. * @see ResolverRuleStatus */ public ResolverRule withStatus(ResolverRuleStatus status) { this.status = status.toString(); return this; } /** *

* A detailed description of the status of a resolver rule. *

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

* A detailed description of the status of a resolver rule. *

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

* A detailed description of the status of a resolver rule. *

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

* This value is always FORWARD. Other resolver rule types aren't supported. *

* * @param ruleType * This value is always FORWARD. Other resolver rule types aren't supported. * @see RuleTypeOption */ public void setRuleType(String ruleType) { this.ruleType = ruleType; } /** *

* This value is always FORWARD. Other resolver rule types aren't supported. *

* * @return This value is always FORWARD. Other resolver rule types aren't supported. * @see RuleTypeOption */ public String getRuleType() { return this.ruleType; } /** *

* This value is always FORWARD. Other resolver rule types aren't supported. *

* * @param ruleType * This value is always FORWARD. Other resolver rule types aren't supported. * @return Returns a reference to this object so that method calls can be chained together. * @see RuleTypeOption */ public ResolverRule withRuleType(String ruleType) { setRuleType(ruleType); return this; } /** *

* This value is always FORWARD. Other resolver rule types aren't supported. *

* * @param ruleType * This value is always FORWARD. Other resolver rule types aren't supported. * @return Returns a reference to this object so that method calls can be chained together. * @see RuleTypeOption */ public ResolverRule withRuleType(RuleTypeOption ruleType) { this.ruleType = ruleType.toString(); return this; } /** *

* The name for the resolver rule, which you specified when you created the resolver rule. *

* * @param name * The name for the resolver rule, which you specified when you created the resolver rule. */ public void setName(String name) { this.name = name; } /** *

* The name for the resolver rule, which you specified when you created the resolver rule. *

* * @return The name for the resolver rule, which you specified when you created the resolver rule. */ public String getName() { return this.name; } /** *

* The name for the resolver rule, which you specified when you created the resolver rule. *

* * @param name * The name for the resolver rule, which you specified when you created the resolver rule. * @return Returns a reference to this object so that method calls can be chained together. */ public ResolverRule withName(String name) { setName(name); return this; } /** *

* An array that contains the IP addresses and ports that you want to forward *

* * @return An array that contains the IP addresses and ports that you want to forward */ public java.util.List getTargetIps() { return targetIps; } /** *

* An array that contains the IP addresses and ports that you want to forward *

* * @param targetIps * An array that contains the IP addresses and ports that you want to forward */ public void setTargetIps(java.util.Collection targetIps) { if (targetIps == null) { this.targetIps = null; return; } this.targetIps = new java.util.ArrayList(targetIps); } /** *

* An array that contains the IP addresses and ports that you want to forward *

*

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

* * @param targetIps * An array that contains the IP addresses and ports that you want to forward * @return Returns a reference to this object so that method calls can be chained together. */ public ResolverRule withTargetIps(TargetAddress... targetIps) { if (this.targetIps == null) { setTargetIps(new java.util.ArrayList(targetIps.length)); } for (TargetAddress ele : targetIps) { this.targetIps.add(ele); } return this; } /** *

* An array that contains the IP addresses and ports that you want to forward *

* * @param targetIps * An array that contains the IP addresses and ports that you want to forward * @return Returns a reference to this object so that method calls can be chained together. */ public ResolverRule withTargetIps(java.util.Collection targetIps) { setTargetIps(targetIps); return this; } /** *

* The ID of the endpoint that the rule is associated with. *

* * @param resolverEndpointId * The ID of the endpoint that the rule is associated with. */ public void setResolverEndpointId(String resolverEndpointId) { this.resolverEndpointId = resolverEndpointId; } /** *

* The ID of the endpoint that the rule is associated with. *

* * @return The ID of the endpoint that the rule is associated with. */ public String getResolverEndpointId() { return this.resolverEndpointId; } /** *

* The ID of the endpoint that the rule is associated with. *

* * @param resolverEndpointId * The ID of the endpoint that the rule is associated with. * @return Returns a reference to this object so that method calls can be chained together. */ public ResolverRule withResolverEndpointId(String resolverEndpointId) { setResolverEndpointId(resolverEndpointId); return this; } /** *

* When a rule is shared with another AWS account, the account ID of the account that the rule is shared with. *

* * @param ownerId * When a rule is shared with another AWS account, the account ID of the account that the rule is shared * with. */ public void setOwnerId(String ownerId) { this.ownerId = ownerId; } /** *

* When a rule is shared with another AWS account, the account ID of the account that the rule is shared with. *

* * @return When a rule is shared with another AWS account, the account ID of the account that the rule is shared * with. */ public String getOwnerId() { return this.ownerId; } /** *

* When a rule is shared with another AWS account, the account ID of the account that the rule is shared with. *

* * @param ownerId * When a rule is shared with another AWS account, the account ID of the account that the rule is shared * with. * @return Returns a reference to this object so that method calls can be chained together. */ public ResolverRule withOwnerId(String ownerId) { setOwnerId(ownerId); return this; } /** *

* Whether the rules is shared and, if so, whether the current account is sharing the rule with another account, or * another account is sharing the rule with the current account. *

* * @param shareStatus * Whether the rules is shared and, if so, whether the current account is sharing the rule with another * account, or another account is sharing the rule with the current account. * @see ShareStatus */ public void setShareStatus(String shareStatus) { this.shareStatus = shareStatus; } /** *

* Whether the rules is shared and, if so, whether the current account is sharing the rule with another account, or * another account is sharing the rule with the current account. *

* * @return Whether the rules is shared and, if so, whether the current account is sharing the rule with another * account, or another account is sharing the rule with the current account. * @see ShareStatus */ public String getShareStatus() { return this.shareStatus; } /** *

* Whether the rules is shared and, if so, whether the current account is sharing the rule with another account, or * another account is sharing the rule with the current account. *

* * @param shareStatus * Whether the rules is shared and, if so, whether the current account is sharing the rule with another * account, or another account is sharing the rule with the current account. * @return Returns a reference to this object so that method calls can be chained together. * @see ShareStatus */ public ResolverRule withShareStatus(String shareStatus) { setShareStatus(shareStatus); return this; } /** *

* Whether the rules is shared and, if so, whether the current account is sharing the rule with another account, or * another account is sharing the rule with the current account. *

* * @param shareStatus * Whether the rules is shared and, if so, whether the current account is sharing the rule with another * account, or another account is sharing the rule with the current account. * @return Returns a reference to this object so that method calls can be chained together. * @see ShareStatus */ public ResolverRule withShareStatus(ShareStatus shareStatus) { this.shareStatus = shareStatus.toString(); 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 (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getCreatorRequestId() != null) sb.append("CreatorRequestId: ").append(getCreatorRequestId()).append(","); if (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getDomainName() != null) sb.append("DomainName: ").append(getDomainName()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getStatusMessage() != null) sb.append("StatusMessage: ").append(getStatusMessage()).append(","); if (getRuleType() != null) sb.append("RuleType: ").append(getRuleType()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getTargetIps() != null) sb.append("TargetIps: ").append(getTargetIps()).append(","); if (getResolverEndpointId() != null) sb.append("ResolverEndpointId: ").append(getResolverEndpointId()).append(","); if (getOwnerId() != null) sb.append("OwnerId: ").append(getOwnerId()).append(","); if (getShareStatus() != null) sb.append("ShareStatus: ").append(getShareStatus()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ResolverRule == false) return false; ResolverRule other = (ResolverRule) obj; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == 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.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getDomainName() == null ^ this.getDomainName() == null) return false; if (other.getDomainName() != null && other.getDomainName().equals(this.getDomainName()) == 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.getRuleType() == null ^ this.getRuleType() == null) return false; if (other.getRuleType() != null && other.getRuleType().equals(this.getRuleType()) == 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.getTargetIps() == null ^ this.getTargetIps() == null) return false; if (other.getTargetIps() != null && other.getTargetIps().equals(this.getTargetIps()) == false) return false; if (other.getResolverEndpointId() == null ^ this.getResolverEndpointId() == null) return false; if (other.getResolverEndpointId() != null && other.getResolverEndpointId().equals(this.getResolverEndpointId()) == false) return false; if (other.getOwnerId() == null ^ this.getOwnerId() == null) return false; if (other.getOwnerId() != null && other.getOwnerId().equals(this.getOwnerId()) == false) return false; if (other.getShareStatus() == null ^ this.getShareStatus() == null) return false; if (other.getShareStatus() != null && other.getShareStatus().equals(this.getShareStatus()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getCreatorRequestId() == null) ? 0 : getCreatorRequestId().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getDomainName() == null) ? 0 : getDomainName().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getStatusMessage() == null) ? 0 : getStatusMessage().hashCode()); hashCode = prime * hashCode + ((getRuleType() == null) ? 0 : getRuleType().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getTargetIps() == null) ? 0 : getTargetIps().hashCode()); hashCode = prime * hashCode + ((getResolverEndpointId() == null) ? 0 : getResolverEndpointId().hashCode()); hashCode = prime * hashCode + ((getOwnerId() == null) ? 0 : getOwnerId().hashCode()); hashCode = prime * hashCode + ((getShareStatus() == null) ? 0 : getShareStatus().hashCode()); return hashCode; } @Override public ResolverRule clone() { try { return (ResolverRule) 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.ResolverRuleMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy