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

* A unique string that identifies the request. *

*/ private String callerReference; /** *

* The unique string (ID) used to identify a hosted zone. *

*/ private String hostedZoneId; /** *

* The Amazon resource name (ARN) for a customer managed key in Key Management Service (KMS). The * KeyManagementServiceArn must be unique for each key-signing key (KSK) in a single hosted zone. To * see an example of KeyManagementServiceArn that grants the correct permissions for DNSSEC, scroll * down to Example. *

*

* You must configure the customer managed customer managed key as follows: *

*
*
Status
*
*

* Enabled *

*
*
Key spec
*
*

* ECC_NIST_P256 *

*
*
Key usage
*
*

* Sign and verify *

*
*
Key policy
*
*

* The key policy must give permission for the following actions: *

* *

* The key policy must also include the Amazon Route 53 service in the principal for your account. Specify the * following: *

* *
*
*

* For more information about working with a customer managed key in KMS, see Key Management Service concepts. *

*/ private String keyManagementServiceArn; /** *

* A string used to identify a key-signing key (KSK). Name can include numbers, letters, and * underscores (_). Name must be unique for each key-signing key in the same hosted zone. *

*/ private String name; /** *

* A string specifying the initial status of the key-signing key (KSK). You can set the value to ACTIVE * or INACTIVE. *

*/ private String status; /** *

* A unique string that identifies the request. *

* * @param callerReference * A unique string that identifies the request. */ public void setCallerReference(String callerReference) { this.callerReference = callerReference; } /** *

* A unique string that identifies the request. *

* * @return A unique string that identifies the request. */ public String getCallerReference() { return this.callerReference; } /** *

* A unique string that identifies the request. *

* * @param callerReference * A unique string that identifies the request. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateKeySigningKeyRequest withCallerReference(String callerReference) { setCallerReference(callerReference); return this; } /** *

* The unique string (ID) used to identify a hosted zone. *

* * @param hostedZoneId * The unique string (ID) used to identify a hosted zone. */ public void setHostedZoneId(String hostedZoneId) { this.hostedZoneId = hostedZoneId; } /** *

* The unique string (ID) used to identify a hosted zone. *

* * @return The unique string (ID) used to identify a hosted zone. */ public String getHostedZoneId() { return this.hostedZoneId; } /** *

* The unique string (ID) used to identify a hosted zone. *

* * @param hostedZoneId * The unique string (ID) used to identify a hosted zone. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateKeySigningKeyRequest withHostedZoneId(String hostedZoneId) { setHostedZoneId(hostedZoneId); return this; } /** *

* The Amazon resource name (ARN) for a customer managed key in Key Management Service (KMS). The * KeyManagementServiceArn must be unique for each key-signing key (KSK) in a single hosted zone. To * see an example of KeyManagementServiceArn that grants the correct permissions for DNSSEC, scroll * down to Example. *

*

* You must configure the customer managed customer managed key as follows: *

*
*
Status
*
*

* Enabled *

*
*
Key spec
*
*

* ECC_NIST_P256 *

*
*
Key usage
*
*

* Sign and verify *

*
*
Key policy
*
*

* The key policy must give permission for the following actions: *

* *

* The key policy must also include the Amazon Route 53 service in the principal for your account. Specify the * following: *

* *
*
*

* For more information about working with a customer managed key in KMS, see Key Management Service concepts. *

* * @param keyManagementServiceArn * The Amazon resource name (ARN) for a customer managed key in Key Management Service (KMS). The * KeyManagementServiceArn must be unique for each key-signing key (KSK) in a single hosted * zone. To see an example of KeyManagementServiceArn that grants the correct permissions for * DNSSEC, scroll down to Example.

*

* You must configure the customer managed customer managed key as follows: *

*
*
Status
*
*

* Enabled *

*
*
Key spec
*
*

* ECC_NIST_P256 *

*
*
Key usage
*
*

* Sign and verify *

*
*
Key policy
*
*

* The key policy must give permission for the following actions: *

* *

* The key policy must also include the Amazon Route 53 service in the principal for your account. Specify * the following: *

* *
*
*

* For more information about working with a customer managed key in KMS, see Key Management Service * concepts. */ public void setKeyManagementServiceArn(String keyManagementServiceArn) { this.keyManagementServiceArn = keyManagementServiceArn; } /** *

* The Amazon resource name (ARN) for a customer managed key in Key Management Service (KMS). The * KeyManagementServiceArn must be unique for each key-signing key (KSK) in a single hosted zone. To * see an example of KeyManagementServiceArn that grants the correct permissions for DNSSEC, scroll * down to Example. *

*

* You must configure the customer managed customer managed key as follows: *

*
*
Status
*
*

* Enabled *

*
*
Key spec
*
*

* ECC_NIST_P256 *

*
*
Key usage
*
*

* Sign and verify *

*
*
Key policy
*
*

* The key policy must give permission for the following actions: *

* *

* The key policy must also include the Amazon Route 53 service in the principal for your account. Specify the * following: *

* *
*
*

* For more information about working with a customer managed key in KMS, see Key Management Service concepts. *

* * @return The Amazon resource name (ARN) for a customer managed key in Key Management Service (KMS). The * KeyManagementServiceArn must be unique for each key-signing key (KSK) in a single hosted * zone. To see an example of KeyManagementServiceArn that grants the correct permissions for * DNSSEC, scroll down to Example.

*

* You must configure the customer managed customer managed key as follows: *

*
*
Status
*
*

* Enabled *

*
*
Key spec
*
*

* ECC_NIST_P256 *

*
*
Key usage
*
*

* Sign and verify *

*
*
Key policy
*
*

* The key policy must give permission for the following actions: *

* *

* The key policy must also include the Amazon Route 53 service in the principal for your account. Specify * the following: *

* *
*
*

* For more information about working with a customer managed key in KMS, see Key Management Service * concepts. */ public String getKeyManagementServiceArn() { return this.keyManagementServiceArn; } /** *

* The Amazon resource name (ARN) for a customer managed key in Key Management Service (KMS). The * KeyManagementServiceArn must be unique for each key-signing key (KSK) in a single hosted zone. To * see an example of KeyManagementServiceArn that grants the correct permissions for DNSSEC, scroll * down to Example. *

*

* You must configure the customer managed customer managed key as follows: *

*
*
Status
*
*

* Enabled *

*
*
Key spec
*
*

* ECC_NIST_P256 *

*
*
Key usage
*
*

* Sign and verify *

*
*
Key policy
*
*

* The key policy must give permission for the following actions: *

* *

* The key policy must also include the Amazon Route 53 service in the principal for your account. Specify the * following: *

* *
*
*

* For more information about working with a customer managed key in KMS, see Key Management Service concepts. *

* * @param keyManagementServiceArn * The Amazon resource name (ARN) for a customer managed key in Key Management Service (KMS). The * KeyManagementServiceArn must be unique for each key-signing key (KSK) in a single hosted * zone. To see an example of KeyManagementServiceArn that grants the correct permissions for * DNSSEC, scroll down to Example.

*

* You must configure the customer managed customer managed key as follows: *

*
*
Status
*
*

* Enabled *

*
*
Key spec
*
*

* ECC_NIST_P256 *

*
*
Key usage
*
*

* Sign and verify *

*
*
Key policy
*
*

* The key policy must give permission for the following actions: *

* *

* The key policy must also include the Amazon Route 53 service in the principal for your account. Specify * the following: *

* *
*
*

* For more information about working with a customer managed key in KMS, see Key Management Service * concepts. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateKeySigningKeyRequest withKeyManagementServiceArn(String keyManagementServiceArn) { setKeyManagementServiceArn(keyManagementServiceArn); return this; } /** *

* A string used to identify a key-signing key (KSK). Name can include numbers, letters, and * underscores (_). Name must be unique for each key-signing key in the same hosted zone. *

* * @param name * A string used to identify a key-signing key (KSK). Name can include numbers, letters, and * underscores (_). Name must be unique for each key-signing key in the same hosted zone. */ public void setName(String name) { this.name = name; } /** *

* A string used to identify a key-signing key (KSK). Name can include numbers, letters, and * underscores (_). Name must be unique for each key-signing key in the same hosted zone. *

* * @return A string used to identify a key-signing key (KSK). Name can include numbers, letters, and * underscores (_). Name must be unique for each key-signing key in the same hosted zone. */ public String getName() { return this.name; } /** *

* A string used to identify a key-signing key (KSK). Name can include numbers, letters, and * underscores (_). Name must be unique for each key-signing key in the same hosted zone. *

* * @param name * A string used to identify a key-signing key (KSK). Name can include numbers, letters, and * underscores (_). Name must be unique for each key-signing key in the same hosted zone. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateKeySigningKeyRequest withName(String name) { setName(name); return this; } /** *

* A string specifying the initial status of the key-signing key (KSK). You can set the value to ACTIVE * or INACTIVE. *

* * @param status * A string specifying the initial status of the key-signing key (KSK). You can set the value to * ACTIVE or INACTIVE. */ public void setStatus(String status) { this.status = status; } /** *

* A string specifying the initial status of the key-signing key (KSK). You can set the value to ACTIVE * or INACTIVE. *

* * @return A string specifying the initial status of the key-signing key (KSK). You can set the value to * ACTIVE or INACTIVE. */ public String getStatus() { return this.status; } /** *

* A string specifying the initial status of the key-signing key (KSK). You can set the value to ACTIVE * or INACTIVE. *

* * @param status * A string specifying the initial status of the key-signing key (KSK). You can set the value to * ACTIVE or INACTIVE. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateKeySigningKeyRequest withStatus(String status) { setStatus(status); 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 (getCallerReference() != null) sb.append("CallerReference: ").append(getCallerReference()).append(","); if (getHostedZoneId() != null) sb.append("HostedZoneId: ").append(getHostedZoneId()).append(","); if (getKeyManagementServiceArn() != null) sb.append("KeyManagementServiceArn: ").append(getKeyManagementServiceArn()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateKeySigningKeyRequest == false) return false; CreateKeySigningKeyRequest other = (CreateKeySigningKeyRequest) obj; if (other.getCallerReference() == null ^ this.getCallerReference() == null) return false; if (other.getCallerReference() != null && other.getCallerReference().equals(this.getCallerReference()) == false) return false; if (other.getHostedZoneId() == null ^ this.getHostedZoneId() == null) return false; if (other.getHostedZoneId() != null && other.getHostedZoneId().equals(this.getHostedZoneId()) == false) return false; if (other.getKeyManagementServiceArn() == null ^ this.getKeyManagementServiceArn() == null) return false; if (other.getKeyManagementServiceArn() != null && other.getKeyManagementServiceArn().equals(this.getKeyManagementServiceArn()) == 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; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCallerReference() == null) ? 0 : getCallerReference().hashCode()); hashCode = prime * hashCode + ((getHostedZoneId() == null) ? 0 : getHostedZoneId().hashCode()); hashCode = prime * hashCode + ((getKeyManagementServiceArn() == null) ? 0 : getKeyManagementServiceArn().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); return hashCode; } @Override public CreateKeySigningKeyRequest clone() { return (CreateKeySigningKeyRequest) super.clone(); } }