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

software.amazon.awssdk.services.wellarchitected.model.ProfileSummary Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.29.15
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.wellarchitected.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.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Summary of a profile. *

*/ @Generated("software.amazon.awssdk:codegen") public final class ProfileSummary implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField PROFILE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ProfileArn").getter(getter(ProfileSummary::profileArn)).setter(setter(Builder::profileArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProfileArn").build()).build(); private static final SdkField PROFILE_VERSION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ProfileVersion").getter(getter(ProfileSummary::profileVersion)).setter(setter(Builder::profileVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProfileVersion").build()).build(); private static final SdkField PROFILE_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ProfileName").getter(getter(ProfileSummary::profileName)).setter(setter(Builder::profileName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProfileName").build()).build(); private static final SdkField PROFILE_DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ProfileDescription").getter(getter(ProfileSummary::profileDescription)) .setter(setter(Builder::profileDescription)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProfileDescription").build()) .build(); private static final SdkField OWNER_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Owner") .getter(getter(ProfileSummary::owner)).setter(setter(Builder::owner)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Owner").build()).build(); private static final SdkField CREATED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("CreatedAt").getter(getter(ProfileSummary::createdAt)).setter(setter(Builder::createdAt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreatedAt").build()).build(); private static final SdkField UPDATED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("UpdatedAt").getter(getter(ProfileSummary::updatedAt)).setter(setter(Builder::updatedAt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UpdatedAt").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays .asList(PROFILE_ARN_FIELD, PROFILE_VERSION_FIELD, PROFILE_NAME_FIELD, PROFILE_DESCRIPTION_FIELD, OWNER_FIELD, CREATED_AT_FIELD, UPDATED_AT_FIELD)); private static final long serialVersionUID = 1L; private final String profileArn; private final String profileVersion; private final String profileName; private final String profileDescription; private final String owner; private final Instant createdAt; private final Instant updatedAt; private ProfileSummary(BuilderImpl builder) { this.profileArn = builder.profileArn; this.profileVersion = builder.profileVersion; this.profileName = builder.profileName; this.profileDescription = builder.profileDescription; this.owner = builder.owner; this.createdAt = builder.createdAt; this.updatedAt = builder.updatedAt; } /** *

* The profile ARN. *

* * @return The profile ARN. */ public final String profileArn() { return profileArn; } /** *

* The profile version. *

* * @return The profile version. */ public final String profileVersion() { return profileVersion; } /** *

* The profile name. *

* * @return The profile name. */ public final String profileName() { return profileName; } /** *

* The profile description. *

* * @return The profile description. */ public final String profileDescription() { return profileDescription; } /** * Returns the value of the Owner property for this object. * * @return The value of the Owner property for this object. */ public final String owner() { return owner; } /** * Returns the value of the CreatedAt property for this object. * * @return The value of the CreatedAt property for this object. */ public final Instant createdAt() { return createdAt; } /** * Returns the value of the UpdatedAt property for this object. * * @return The value of the UpdatedAt property for this object. */ public final Instant updatedAt() { return updatedAt; } @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(profileArn()); hashCode = 31 * hashCode + Objects.hashCode(profileVersion()); hashCode = 31 * hashCode + Objects.hashCode(profileName()); hashCode = 31 * hashCode + Objects.hashCode(profileDescription()); hashCode = 31 * hashCode + Objects.hashCode(owner()); hashCode = 31 * hashCode + Objects.hashCode(createdAt()); hashCode = 31 * hashCode + Objects.hashCode(updatedAt()); 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 ProfileSummary)) { return false; } ProfileSummary other = (ProfileSummary) obj; return Objects.equals(profileArn(), other.profileArn()) && Objects.equals(profileVersion(), other.profileVersion()) && Objects.equals(profileName(), other.profileName()) && Objects.equals(profileDescription(), other.profileDescription()) && Objects.equals(owner(), other.owner()) && Objects.equals(createdAt(), other.createdAt()) && Objects.equals(updatedAt(), other.updatedAt()); } /** * 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("ProfileSummary").add("ProfileArn", profileArn()).add("ProfileVersion", profileVersion()) .add("ProfileName", profileName()).add("ProfileDescription", profileDescription()).add("Owner", owner()) .add("CreatedAt", createdAt()).add("UpdatedAt", updatedAt()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "ProfileArn": return Optional.ofNullable(clazz.cast(profileArn())); case "ProfileVersion": return Optional.ofNullable(clazz.cast(profileVersion())); case "ProfileName": return Optional.ofNullable(clazz.cast(profileName())); case "ProfileDescription": return Optional.ofNullable(clazz.cast(profileDescription())); case "Owner": return Optional.ofNullable(clazz.cast(owner())); case "CreatedAt": return Optional.ofNullable(clazz.cast(createdAt())); case "UpdatedAt": return Optional.ofNullable(clazz.cast(updatedAt())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((ProfileSummary) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The profile ARN. *

* * @param profileArn * The profile ARN. * @return Returns a reference to this object so that method calls can be chained together. */ Builder profileArn(String profileArn); /** *

* The profile version. *

* * @param profileVersion * The profile version. * @return Returns a reference to this object so that method calls can be chained together. */ Builder profileVersion(String profileVersion); /** *

* The profile name. *

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

* The profile description. *

* * @param profileDescription * The profile description. * @return Returns a reference to this object so that method calls can be chained together. */ Builder profileDescription(String profileDescription); /** * Sets the value of the Owner property for this object. * * @param owner * The new value for the Owner property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder owner(String owner); /** * Sets the value of the CreatedAt property for this object. * * @param createdAt * The new value for the CreatedAt property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createdAt(Instant createdAt); /** * Sets the value of the UpdatedAt property for this object. * * @param updatedAt * The new value for the UpdatedAt property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder updatedAt(Instant updatedAt); } static final class BuilderImpl implements Builder { private String profileArn; private String profileVersion; private String profileName; private String profileDescription; private String owner; private Instant createdAt; private Instant updatedAt; private BuilderImpl() { } private BuilderImpl(ProfileSummary model) { profileArn(model.profileArn); profileVersion(model.profileVersion); profileName(model.profileName); profileDescription(model.profileDescription); owner(model.owner); createdAt(model.createdAt); updatedAt(model.updatedAt); } public final String getProfileArn() { return profileArn; } public final void setProfileArn(String profileArn) { this.profileArn = profileArn; } @Override public final Builder profileArn(String profileArn) { this.profileArn = profileArn; return this; } public final String getProfileVersion() { return profileVersion; } public final void setProfileVersion(String profileVersion) { this.profileVersion = profileVersion; } @Override public final Builder profileVersion(String profileVersion) { this.profileVersion = profileVersion; return this; } public final String getProfileName() { return profileName; } public final void setProfileName(String profileName) { this.profileName = profileName; } @Override public final Builder profileName(String profileName) { this.profileName = profileName; return this; } public final String getProfileDescription() { return profileDescription; } public final void setProfileDescription(String profileDescription) { this.profileDescription = profileDescription; } @Override public final Builder profileDescription(String profileDescription) { this.profileDescription = profileDescription; return this; } public final String getOwner() { return owner; } public final void setOwner(String owner) { this.owner = owner; } @Override public final Builder owner(String owner) { this.owner = owner; 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 Instant getUpdatedAt() { return updatedAt; } public final void setUpdatedAt(Instant updatedAt) { this.updatedAt = updatedAt; } @Override public final Builder updatedAt(Instant updatedAt) { this.updatedAt = updatedAt; return this; } @Override public ProfileSummary build() { return new ProfileSummary(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy