software.amazon.awssdk.services.route53domains.model.UpdateDomainContactRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of route53domains Show documentation
Show all versions of route53domains Show documentation
The AWS Java SDK for Amazon Route53 module holds the client classes that are used for communicating
with Amazon Route53 Domain Service
/*
* Copyright 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 software.amazon.awssdk.services.route53domains.model;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* The UpdateDomainContact request includes the following elements.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class UpdateDomainContactRequest extends Route53DomainsRequest implements
ToCopyableBuilder {
private static final SdkField DOMAIN_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DomainName").getter(getter(UpdateDomainContactRequest::domainName)).setter(setter(Builder::domainName))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DomainName").build()).build();
private static final SdkField ADMIN_CONTACT_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("AdminContact").getter(getter(UpdateDomainContactRequest::adminContact))
.setter(setter(Builder::adminContact)).constructor(ContactDetail::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AdminContact").build()).build();
private static final SdkField REGISTRANT_CONTACT_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("RegistrantContact")
.getter(getter(UpdateDomainContactRequest::registrantContact)).setter(setter(Builder::registrantContact))
.constructor(ContactDetail::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RegistrantContact").build()).build();
private static final SdkField TECH_CONTACT_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("TechContact").getter(getter(UpdateDomainContactRequest::techContact))
.setter(setter(Builder::techContact)).constructor(ContactDetail::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TechContact").build()).build();
private static final SdkField CONSENT_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("Consent").getter(getter(UpdateDomainContactRequest::consent)).setter(setter(Builder::consent))
.constructor(Consent::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Consent").build()).build();
private static final SdkField BILLING_CONTACT_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("BillingContact")
.getter(getter(UpdateDomainContactRequest::billingContact)).setter(setter(Builder::billingContact))
.constructor(ContactDetail::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("BillingContact").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(DOMAIN_NAME_FIELD,
ADMIN_CONTACT_FIELD, REGISTRANT_CONTACT_FIELD, TECH_CONTACT_FIELD, CONSENT_FIELD, BILLING_CONTACT_FIELD));
private final String domainName;
private final ContactDetail adminContact;
private final ContactDetail registrantContact;
private final ContactDetail techContact;
private final Consent consent;
private final ContactDetail billingContact;
private UpdateDomainContactRequest(BuilderImpl builder) {
super(builder);
this.domainName = builder.domainName;
this.adminContact = builder.adminContact;
this.registrantContact = builder.registrantContact;
this.techContact = builder.techContact;
this.consent = builder.consent;
this.billingContact = builder.billingContact;
}
/**
*
* The name of the domain that you want to update contact information for.
*
*
* @return The name of the domain that you want to update contact information for.
*/
public final String domainName() {
return domainName;
}
/**
*
* Provides detailed contact information.
*
*
* @return Provides detailed contact information.
*/
public final ContactDetail adminContact() {
return adminContact;
}
/**
*
* Provides detailed contact information.
*
*
* @return Provides detailed contact information.
*/
public final ContactDetail registrantContact() {
return registrantContact;
}
/**
*
* Provides detailed contact information.
*
*
* @return Provides detailed contact information.
*/
public final ContactDetail techContact() {
return techContact;
}
/**
*
* Customer's consent for the owner change request. Required if the domain is not free (consent price is more than
* $0.00).
*
*
* @return Customer's consent for the owner change request. Required if the domain is not free (consent price is
* more than $0.00).
*/
public final Consent consent() {
return consent;
}
/**
*
* Provides detailed contact information.
*
*
* @return Provides detailed contact information.
*/
public final ContactDetail billingContact() {
return billingContact;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(domainName());
hashCode = 31 * hashCode + Objects.hashCode(adminContact());
hashCode = 31 * hashCode + Objects.hashCode(registrantContact());
hashCode = 31 * hashCode + Objects.hashCode(techContact());
hashCode = 31 * hashCode + Objects.hashCode(consent());
hashCode = 31 * hashCode + Objects.hashCode(billingContact());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof UpdateDomainContactRequest)) {
return false;
}
UpdateDomainContactRequest other = (UpdateDomainContactRequest) obj;
return Objects.equals(domainName(), other.domainName()) && Objects.equals(adminContact(), other.adminContact())
&& Objects.equals(registrantContact(), other.registrantContact())
&& Objects.equals(techContact(), other.techContact()) && Objects.equals(consent(), other.consent())
&& Objects.equals(billingContact(), other.billingContact());
}
/**
* 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.
*/
@Override
public final String toString() {
return ToString.builder("UpdateDomainContactRequest").add("DomainName", domainName())
.add("AdminContact", adminContact() == null ? null : "*** Sensitive Data Redacted ***")
.add("RegistrantContact", registrantContact() == null ? null : "*** Sensitive Data Redacted ***")
.add("TechContact", techContact() == null ? null : "*** Sensitive Data Redacted ***").add("Consent", consent())
.add("BillingContact", billingContact() == null ? null : "*** Sensitive Data Redacted ***").build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "DomainName":
return Optional.ofNullable(clazz.cast(domainName()));
case "AdminContact":
return Optional.ofNullable(clazz.cast(adminContact()));
case "RegistrantContact":
return Optional.ofNullable(clazz.cast(registrantContact()));
case "TechContact":
return Optional.ofNullable(clazz.cast(techContact()));
case "Consent":
return Optional.ofNullable(clazz.cast(consent()));
case "BillingContact":
return Optional.ofNullable(clazz.cast(billingContact()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function