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

software.amazon.awssdk.services.vpclattice.model.ServiceNetworkServiceAssociationSummary Maven / Gradle / Ivy

Go to download

The AWS Java SDK for VPC Lattice module holds the client classes that are used for communicating with VPC Lattice.

There is a newer version: 2.28.3
Show newest version
/*
 * 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.vpclattice.model;

import java.io.Serializable;
import java.time.Instant;
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.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.core.traits.TimestampFormatTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Summary information about the association between a service network and a service. *

*/ @Generated("software.amazon.awssdk:codegen") public final class ServiceNetworkServiceAssociationSummary implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("arn") .getter(getter(ServiceNetworkServiceAssociationSummary::arn)).setter(setter(Builder::arn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("arn").build()).build(); private static final SdkField CREATED_AT_FIELD = SdkField . builder(MarshallingType.INSTANT) .memberName("createdAt") .getter(getter(ServiceNetworkServiceAssociationSummary::createdAt)) .setter(setter(Builder::createdAt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("createdAt").build(), TimestampFormatTrait.create(TimestampFormatTrait.Format.ISO_8601)).build(); private static final SdkField CREATED_BY_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("createdBy").getter(getter(ServiceNetworkServiceAssociationSummary::createdBy)) .setter(setter(Builder::createdBy)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("createdBy").build()).build(); private static final SdkField CUSTOM_DOMAIN_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("customDomainName").getter(getter(ServiceNetworkServiceAssociationSummary::customDomainName)) .setter(setter(Builder::customDomainName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("customDomainName").build()).build(); private static final SdkField DNS_ENTRY_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("dnsEntry").getter(getter(ServiceNetworkServiceAssociationSummary::dnsEntry)) .setter(setter(Builder::dnsEntry)).constructor(DnsEntry::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dnsEntry").build()).build(); private static final SdkField ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("id") .getter(getter(ServiceNetworkServiceAssociationSummary::id)).setter(setter(Builder::id)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("id").build()).build(); private static final SdkField SERVICE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("serviceArn").getter(getter(ServiceNetworkServiceAssociationSummary::serviceArn)) .setter(setter(Builder::serviceArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("serviceArn").build()).build(); private static final SdkField SERVICE_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("serviceId").getter(getter(ServiceNetworkServiceAssociationSummary::serviceId)) .setter(setter(Builder::serviceId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("serviceId").build()).build(); private static final SdkField SERVICE_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("serviceName").getter(getter(ServiceNetworkServiceAssociationSummary::serviceName)) .setter(setter(Builder::serviceName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("serviceName").build()).build(); private static final SdkField SERVICE_NETWORK_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("serviceNetworkArn").getter(getter(ServiceNetworkServiceAssociationSummary::serviceNetworkArn)) .setter(setter(Builder::serviceNetworkArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("serviceNetworkArn").build()).build(); private static final SdkField SERVICE_NETWORK_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("serviceNetworkId").getter(getter(ServiceNetworkServiceAssociationSummary::serviceNetworkId)) .setter(setter(Builder::serviceNetworkId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("serviceNetworkId").build()).build(); private static final SdkField SERVICE_NETWORK_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("serviceNetworkName").getter(getter(ServiceNetworkServiceAssociationSummary::serviceNetworkName)) .setter(setter(Builder::serviceNetworkName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("serviceNetworkName").build()) .build(); private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("status") .getter(getter(ServiceNetworkServiceAssociationSummary::statusAsString)).setter(setter(Builder::status)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("status").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ARN_FIELD, CREATED_AT_FIELD, CREATED_BY_FIELD, CUSTOM_DOMAIN_NAME_FIELD, DNS_ENTRY_FIELD, ID_FIELD, SERVICE_ARN_FIELD, SERVICE_ID_FIELD, SERVICE_NAME_FIELD, SERVICE_NETWORK_ARN_FIELD, SERVICE_NETWORK_ID_FIELD, SERVICE_NETWORK_NAME_FIELD, STATUS_FIELD)); private static final long serialVersionUID = 1L; private final String arn; private final Instant createdAt; private final String createdBy; private final String customDomainName; private final DnsEntry dnsEntry; private final String id; private final String serviceArn; private final String serviceId; private final String serviceName; private final String serviceNetworkArn; private final String serviceNetworkId; private final String serviceNetworkName; private final String status; private ServiceNetworkServiceAssociationSummary(BuilderImpl builder) { this.arn = builder.arn; this.createdAt = builder.createdAt; this.createdBy = builder.createdBy; this.customDomainName = builder.customDomainName; this.dnsEntry = builder.dnsEntry; this.id = builder.id; this.serviceArn = builder.serviceArn; this.serviceId = builder.serviceId; this.serviceName = builder.serviceName; this.serviceNetworkArn = builder.serviceNetworkArn; this.serviceNetworkId = builder.serviceNetworkId; this.serviceNetworkName = builder.serviceNetworkName; this.status = builder.status; } /** *

* The Amazon Resource Name (ARN) of the association. *

* * @return The Amazon Resource Name (ARN) of the association. */ public final String arn() { return arn; } /** *

* The date and time that the association was created, specified in ISO-8601 format. *

* * @return The date and time that the association was created, specified in ISO-8601 format. */ public final Instant createdAt() { return createdAt; } /** *

* The account that created the association. *

* * @return The account that created the association. */ public final String createdBy() { return createdBy; } /** *

* The custom domain name of the service. *

* * @return The custom domain name of the service. */ public final String customDomainName() { return customDomainName; } /** *

* The DNS information. *

* * @return The DNS information. */ public final DnsEntry dnsEntry() { return dnsEntry; } /** *

* The ID of the association. *

* * @return The ID of the association. */ public final String id() { return id; } /** *

* The Amazon Resource Name (ARN) of the service. *

* * @return The Amazon Resource Name (ARN) of the service. */ public final String serviceArn() { return serviceArn; } /** *

* The ID of the service. *

* * @return The ID of the service. */ public final String serviceId() { return serviceId; } /** *

* The name of the service. *

* * @return The name of the service. */ public final String serviceName() { return serviceName; } /** *

* The Amazon Resource Name (ARN) of the service network. *

* * @return The Amazon Resource Name (ARN) of the service network. */ public final String serviceNetworkArn() { return serviceNetworkArn; } /** *

* The ID of the service network. *

* * @return The ID of the service network. */ public final String serviceNetworkId() { return serviceNetworkId; } /** *

* The name of the service network. *

* * @return The name of the service network. */ public final String serviceNetworkName() { return serviceNetworkName; } /** *

* The status. If the deletion fails, try to delete again. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #status} will * return {@link ServiceNetworkServiceAssociationStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the * service is available from {@link #statusAsString}. *

* * @return The status. If the deletion fails, try to delete again. * @see ServiceNetworkServiceAssociationStatus */ public final ServiceNetworkServiceAssociationStatus status() { return ServiceNetworkServiceAssociationStatus.fromValue(status); } /** *

* The status. If the deletion fails, try to delete again. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #status} will * return {@link ServiceNetworkServiceAssociationStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the * service is available from {@link #statusAsString}. *

* * @return The status. If the deletion fails, try to delete again. * @see ServiceNetworkServiceAssociationStatus */ public final String statusAsString() { return status; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(arn()); hashCode = 31 * hashCode + Objects.hashCode(createdAt()); hashCode = 31 * hashCode + Objects.hashCode(createdBy()); hashCode = 31 * hashCode + Objects.hashCode(customDomainName()); hashCode = 31 * hashCode + Objects.hashCode(dnsEntry()); hashCode = 31 * hashCode + Objects.hashCode(id()); hashCode = 31 * hashCode + Objects.hashCode(serviceArn()); hashCode = 31 * hashCode + Objects.hashCode(serviceId()); hashCode = 31 * hashCode + Objects.hashCode(serviceName()); hashCode = 31 * hashCode + Objects.hashCode(serviceNetworkArn()); hashCode = 31 * hashCode + Objects.hashCode(serviceNetworkId()); hashCode = 31 * hashCode + Objects.hashCode(serviceNetworkName()); hashCode = 31 * hashCode + Objects.hashCode(statusAsString()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ServiceNetworkServiceAssociationSummary)) { return false; } ServiceNetworkServiceAssociationSummary other = (ServiceNetworkServiceAssociationSummary) obj; return Objects.equals(arn(), other.arn()) && Objects.equals(createdAt(), other.createdAt()) && Objects.equals(createdBy(), other.createdBy()) && Objects.equals(customDomainName(), other.customDomainName()) && Objects.equals(dnsEntry(), other.dnsEntry()) && Objects.equals(id(), other.id()) && Objects.equals(serviceArn(), other.serviceArn()) && Objects.equals(serviceId(), other.serviceId()) && Objects.equals(serviceName(), other.serviceName()) && Objects.equals(serviceNetworkArn(), other.serviceNetworkArn()) && Objects.equals(serviceNetworkId(), other.serviceNetworkId()) && Objects.equals(serviceNetworkName(), other.serviceNetworkName()) && Objects.equals(statusAsString(), other.statusAsString()); } /** * 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("ServiceNetworkServiceAssociationSummary").add("Arn", arn()).add("CreatedAt", createdAt()) .add("CreatedBy", createdBy()).add("CustomDomainName", customDomainName()).add("DnsEntry", dnsEntry()) .add("Id", id()).add("ServiceArn", serviceArn()).add("ServiceId", serviceId()).add("ServiceName", serviceName()) .add("ServiceNetworkArn", serviceNetworkArn()).add("ServiceNetworkId", serviceNetworkId()) .add("ServiceNetworkName", serviceNetworkName()).add("Status", statusAsString()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "arn": return Optional.ofNullable(clazz.cast(arn())); case "createdAt": return Optional.ofNullable(clazz.cast(createdAt())); case "createdBy": return Optional.ofNullable(clazz.cast(createdBy())); case "customDomainName": return Optional.ofNullable(clazz.cast(customDomainName())); case "dnsEntry": return Optional.ofNullable(clazz.cast(dnsEntry())); case "id": return Optional.ofNullable(clazz.cast(id())); case "serviceArn": return Optional.ofNullable(clazz.cast(serviceArn())); case "serviceId": return Optional.ofNullable(clazz.cast(serviceId())); case "serviceName": return Optional.ofNullable(clazz.cast(serviceName())); case "serviceNetworkArn": return Optional.ofNullable(clazz.cast(serviceNetworkArn())); case "serviceNetworkId": return Optional.ofNullable(clazz.cast(serviceNetworkId())); case "serviceNetworkName": return Optional.ofNullable(clazz.cast(serviceNetworkName())); case "status": return Optional.ofNullable(clazz.cast(statusAsString())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((ServiceNetworkServiceAssociationSummary) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The Amazon Resource Name (ARN) of the association. *

* * @param arn * The Amazon Resource Name (ARN) of the association. * @return Returns a reference to this object so that method calls can be chained together. */ Builder arn(String arn); /** *

* The date and time that the association was created, specified in ISO-8601 format. *

* * @param createdAt * The date and time that the association was created, specified in ISO-8601 format. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createdAt(Instant createdAt); /** *

* The account that created the association. *

* * @param createdBy * The account that created the association. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createdBy(String createdBy); /** *

* The custom domain name of the service. *

* * @param customDomainName * The custom domain name of the service. * @return Returns a reference to this object so that method calls can be chained together. */ Builder customDomainName(String customDomainName); /** *

* The DNS information. *

* * @param dnsEntry * The DNS information. * @return Returns a reference to this object so that method calls can be chained together. */ Builder dnsEntry(DnsEntry dnsEntry); /** *

* The DNS information. *

* This is a convenience method that creates an instance of the {@link DnsEntry.Builder} avoiding the need to * create one manually via {@link DnsEntry#builder()}. * *

* When the {@link Consumer} completes, {@link DnsEntry.Builder#build()} is called immediately and its result is * passed to {@link #dnsEntry(DnsEntry)}. * * @param dnsEntry * a consumer that will call methods on {@link DnsEntry.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #dnsEntry(DnsEntry) */ default Builder dnsEntry(Consumer dnsEntry) { return dnsEntry(DnsEntry.builder().applyMutation(dnsEntry).build()); } /** *

* The ID of the association. *

* * @param id * The ID of the association. * @return Returns a reference to this object so that method calls can be chained together. */ Builder id(String id); /** *

* The Amazon Resource Name (ARN) of the service. *

* * @param serviceArn * The Amazon Resource Name (ARN) of the service. * @return Returns a reference to this object so that method calls can be chained together. */ Builder serviceArn(String serviceArn); /** *

* The ID of the service. *

* * @param serviceId * The ID of the service. * @return Returns a reference to this object so that method calls can be chained together. */ Builder serviceId(String serviceId); /** *

* The name of the service. *

* * @param serviceName * The name of the service. * @return Returns a reference to this object so that method calls can be chained together. */ Builder serviceName(String serviceName); /** *

* The Amazon Resource Name (ARN) of the service network. *

* * @param serviceNetworkArn * The Amazon Resource Name (ARN) of the service network. * @return Returns a reference to this object so that method calls can be chained together. */ Builder serviceNetworkArn(String serviceNetworkArn); /** *

* The ID of the service network. *

* * @param serviceNetworkId * The ID of the service network. * @return Returns a reference to this object so that method calls can be chained together. */ Builder serviceNetworkId(String serviceNetworkId); /** *

* The name of the service network. *

* * @param serviceNetworkName * The name of the service network. * @return Returns a reference to this object so that method calls can be chained together. */ Builder serviceNetworkName(String serviceNetworkName); /** *

* The status. If the deletion fails, try to delete again. *

* * @param status * The status. If the deletion fails, try to delete again. * @see ServiceNetworkServiceAssociationStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceNetworkServiceAssociationStatus */ Builder status(String status); /** *

* The status. If the deletion fails, try to delete again. *

* * @param status * The status. If the deletion fails, try to delete again. * @see ServiceNetworkServiceAssociationStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceNetworkServiceAssociationStatus */ Builder status(ServiceNetworkServiceAssociationStatus status); } static final class BuilderImpl implements Builder { private String arn; private Instant createdAt; private String createdBy; private String customDomainName; private DnsEntry dnsEntry; private String id; private String serviceArn; private String serviceId; private String serviceName; private String serviceNetworkArn; private String serviceNetworkId; private String serviceNetworkName; private String status; private BuilderImpl() { } private BuilderImpl(ServiceNetworkServiceAssociationSummary model) { arn(model.arn); createdAt(model.createdAt); createdBy(model.createdBy); customDomainName(model.customDomainName); dnsEntry(model.dnsEntry); id(model.id); serviceArn(model.serviceArn); serviceId(model.serviceId); serviceName(model.serviceName); serviceNetworkArn(model.serviceNetworkArn); serviceNetworkId(model.serviceNetworkId); serviceNetworkName(model.serviceNetworkName); status(model.status); } public final String getArn() { return arn; } public final void setArn(String arn) { this.arn = arn; } @Override public final Builder arn(String arn) { this.arn = arn; return this; } public final Instant getCreatedAt() { return createdAt; } public final void setCreatedAt(Instant createdAt) { this.createdAt = createdAt; } @Override public final Builder createdAt(Instant createdAt) { this.createdAt = createdAt; return this; } public final String getCreatedBy() { return createdBy; } public final void setCreatedBy(String createdBy) { this.createdBy = createdBy; } @Override public final Builder createdBy(String createdBy) { this.createdBy = createdBy; return this; } public final String getCustomDomainName() { return customDomainName; } public final void setCustomDomainName(String customDomainName) { this.customDomainName = customDomainName; } @Override public final Builder customDomainName(String customDomainName) { this.customDomainName = customDomainName; return this; } public final DnsEntry.Builder getDnsEntry() { return dnsEntry != null ? dnsEntry.toBuilder() : null; } public final void setDnsEntry(DnsEntry.BuilderImpl dnsEntry) { this.dnsEntry = dnsEntry != null ? dnsEntry.build() : null; } @Override public final Builder dnsEntry(DnsEntry dnsEntry) { this.dnsEntry = dnsEntry; return this; } public final String getId() { return id; } public final void setId(String id) { this.id = id; } @Override public final Builder id(String id) { this.id = id; return this; } public final String getServiceArn() { return serviceArn; } public final void setServiceArn(String serviceArn) { this.serviceArn = serviceArn; } @Override public final Builder serviceArn(String serviceArn) { this.serviceArn = serviceArn; return this; } public final String getServiceId() { return serviceId; } public final void setServiceId(String serviceId) { this.serviceId = serviceId; } @Override public final Builder serviceId(String serviceId) { this.serviceId = serviceId; return this; } public final String getServiceName() { return serviceName; } public final void setServiceName(String serviceName) { this.serviceName = serviceName; } @Override public final Builder serviceName(String serviceName) { this.serviceName = serviceName; return this; } public final String getServiceNetworkArn() { return serviceNetworkArn; } public final void setServiceNetworkArn(String serviceNetworkArn) { this.serviceNetworkArn = serviceNetworkArn; } @Override public final Builder serviceNetworkArn(String serviceNetworkArn) { this.serviceNetworkArn = serviceNetworkArn; return this; } public final String getServiceNetworkId() { return serviceNetworkId; } public final void setServiceNetworkId(String serviceNetworkId) { this.serviceNetworkId = serviceNetworkId; } @Override public final Builder serviceNetworkId(String serviceNetworkId) { this.serviceNetworkId = serviceNetworkId; return this; } public final String getServiceNetworkName() { return serviceNetworkName; } public final void setServiceNetworkName(String serviceNetworkName) { this.serviceNetworkName = serviceNetworkName; } @Override public final Builder serviceNetworkName(String serviceNetworkName) { this.serviceNetworkName = serviceNetworkName; return this; } public final String getStatus() { return status; } public final void setStatus(String status) { this.status = status; } @Override public final Builder status(String status) { this.status = status; return this; } @Override public final Builder status(ServiceNetworkServiceAssociationStatus status) { this.status(status == null ? null : status.toString()); return this; } @Override public ServiceNetworkServiceAssociationSummary build() { return new ServiceNetworkServiceAssociationSummary(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy