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

software.amazon.awssdk.services.vpclattice.model.AccessLogSubscriptionSummary 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.29.16
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.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 an access log subscription. *

*/ @Generated("software.amazon.awssdk:codegen") public final class AccessLogSubscriptionSummary implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("arn") .getter(getter(AccessLogSubscriptionSummary::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(AccessLogSubscriptionSummary::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 DESTINATION_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("destinationArn").getter(getter(AccessLogSubscriptionSummary::destinationArn)) .setter(setter(Builder::destinationArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("destinationArn").build()).build(); private static final SdkField ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("id") .getter(getter(AccessLogSubscriptionSummary::id)).setter(setter(Builder::id)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("id").build()).build(); private static final SdkField LAST_UPDATED_AT_FIELD = SdkField . builder(MarshallingType.INSTANT) .memberName("lastUpdatedAt") .getter(getter(AccessLogSubscriptionSummary::lastUpdatedAt)) .setter(setter(Builder::lastUpdatedAt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("lastUpdatedAt").build(), TimestampFormatTrait.create(TimestampFormatTrait.Format.ISO_8601)).build(); private static final SdkField RESOURCE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("resourceArn").getter(getter(AccessLogSubscriptionSummary::resourceArn)) .setter(setter(Builder::resourceArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("resourceArn").build()).build(); private static final SdkField RESOURCE_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("resourceId").getter(getter(AccessLogSubscriptionSummary::resourceId)) .setter(setter(Builder::resourceId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("resourceId").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ARN_FIELD, CREATED_AT_FIELD, DESTINATION_ARN_FIELD, ID_FIELD, LAST_UPDATED_AT_FIELD, RESOURCE_ARN_FIELD, RESOURCE_ID_FIELD)); private static final long serialVersionUID = 1L; private final String arn; private final Instant createdAt; private final String destinationArn; private final String id; private final Instant lastUpdatedAt; private final String resourceArn; private final String resourceId; private AccessLogSubscriptionSummary(BuilderImpl builder) { this.arn = builder.arn; this.createdAt = builder.createdAt; this.destinationArn = builder.destinationArn; this.id = builder.id; this.lastUpdatedAt = builder.lastUpdatedAt; this.resourceArn = builder.resourceArn; this.resourceId = builder.resourceId; } /** *

* The Amazon Resource Name (ARN) of the access log subscription *

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

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

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

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

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

* The ID of the access log subscription. *

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

* The date and time that the access log subscription was last updated, specified in ISO-8601 format. *

* * @return The date and time that the access log subscription was last updated, specified in ISO-8601 format. */ public final Instant lastUpdatedAt() { return lastUpdatedAt; } /** *

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

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

* The ID of the service or service network. *

* * @return The ID of the service or service network. */ public final String resourceId() { return resourceId; } @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(destinationArn()); hashCode = 31 * hashCode + Objects.hashCode(id()); hashCode = 31 * hashCode + Objects.hashCode(lastUpdatedAt()); hashCode = 31 * hashCode + Objects.hashCode(resourceArn()); hashCode = 31 * hashCode + Objects.hashCode(resourceId()); 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 AccessLogSubscriptionSummary)) { return false; } AccessLogSubscriptionSummary other = (AccessLogSubscriptionSummary) obj; return Objects.equals(arn(), other.arn()) && Objects.equals(createdAt(), other.createdAt()) && Objects.equals(destinationArn(), other.destinationArn()) && Objects.equals(id(), other.id()) && Objects.equals(lastUpdatedAt(), other.lastUpdatedAt()) && Objects.equals(resourceArn(), other.resourceArn()) && Objects.equals(resourceId(), other.resourceId()); } /** * 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("AccessLogSubscriptionSummary").add("Arn", arn()).add("CreatedAt", createdAt()) .add("DestinationArn", destinationArn()).add("Id", id()).add("LastUpdatedAt", lastUpdatedAt()) .add("ResourceArn", resourceArn()).add("ResourceId", resourceId()).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 "destinationArn": return Optional.ofNullable(clazz.cast(destinationArn())); case "id": return Optional.ofNullable(clazz.cast(id())); case "lastUpdatedAt": return Optional.ofNullable(clazz.cast(lastUpdatedAt())); case "resourceArn": return Optional.ofNullable(clazz.cast(resourceArn())); case "resourceId": return Optional.ofNullable(clazz.cast(resourceId())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((AccessLogSubscriptionSummary) 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 access log subscription *

* * @param arn * The Amazon Resource Name (ARN) of the access log subscription * @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 access log subscription was created, specified in ISO-8601 format. *

* * @param createdAt * The date and time that the access log subscription 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 Amazon Resource Name (ARN) of the destination. *

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

* The ID of the access log subscription. *

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

* The date and time that the access log subscription was last updated, specified in ISO-8601 format. *

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

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

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

* The ID of the service or service network. *

* * @param resourceId * The ID of the service or service network. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourceId(String resourceId); } static final class BuilderImpl implements Builder { private String arn; private Instant createdAt; private String destinationArn; private String id; private Instant lastUpdatedAt; private String resourceArn; private String resourceId; private BuilderImpl() { } private BuilderImpl(AccessLogSubscriptionSummary model) { arn(model.arn); createdAt(model.createdAt); destinationArn(model.destinationArn); id(model.id); lastUpdatedAt(model.lastUpdatedAt); resourceArn(model.resourceArn); resourceId(model.resourceId); } 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 getDestinationArn() { return destinationArn; } public final void setDestinationArn(String destinationArn) { this.destinationArn = destinationArn; } @Override public final Builder destinationArn(String destinationArn) { this.destinationArn = destinationArn; 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 Instant getLastUpdatedAt() { return lastUpdatedAt; } public final void setLastUpdatedAt(Instant lastUpdatedAt) { this.lastUpdatedAt = lastUpdatedAt; } @Override public final Builder lastUpdatedAt(Instant lastUpdatedAt) { this.lastUpdatedAt = lastUpdatedAt; return this; } public final String getResourceArn() { return resourceArn; } public final void setResourceArn(String resourceArn) { this.resourceArn = resourceArn; } @Override public final Builder resourceArn(String resourceArn) { this.resourceArn = resourceArn; return this; } public final String getResourceId() { return resourceId; } public final void setResourceId(String resourceId) { this.resourceId = resourceId; } @Override public final Builder resourceId(String resourceId) { this.resourceId = resourceId; return this; } @Override public AccessLogSubscriptionSummary build() { return new AccessLogSubscriptionSummary(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy