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

software.amazon.awssdk.services.wellarchitected.model.LensReview 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.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
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.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* A lens review of a question. *

*/ @Generated("software.amazon.awssdk:codegen") public final class LensReview implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField LENS_ALIAS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("LensAlias").getter(getter(LensReview::lensAlias)).setter(setter(Builder::lensAlias)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LensAlias").build()).build(); private static final SdkField LENS_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("LensArn").getter(getter(LensReview::lensArn)).setter(setter(Builder::lensArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LensArn").build()).build(); private static final SdkField LENS_VERSION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("LensVersion").getter(getter(LensReview::lensVersion)).setter(setter(Builder::lensVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LensVersion").build()).build(); private static final SdkField LENS_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("LensName").getter(getter(LensReview::lensName)).setter(setter(Builder::lensName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LensName").build()).build(); private static final SdkField LENS_STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("LensStatus").getter(getter(LensReview::lensStatusAsString)).setter(setter(Builder::lensStatus)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LensStatus").build()).build(); private static final SdkField> PILLAR_REVIEW_SUMMARIES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("PillarReviewSummaries") .getter(getter(LensReview::pillarReviewSummaries)) .setter(setter(Builder::pillarReviewSummaries)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PillarReviewSummaries").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(PillarReviewSummary::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField JIRA_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("JiraConfiguration") .getter(getter(LensReview::jiraConfiguration)).setter(setter(Builder::jiraConfiguration)) .constructor(JiraSelectedQuestionConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("JiraConfiguration").build()).build(); private static final SdkField UPDATED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("UpdatedAt").getter(getter(LensReview::updatedAt)).setter(setter(Builder::updatedAt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("UpdatedAt").build()).build(); private static final SdkField NOTES_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Notes") .getter(getter(LensReview::notes)).setter(setter(Builder::notes)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Notes").build()).build(); private static final SdkField> RISK_COUNTS_FIELD = SdkField .> builder(MarshallingType.MAP) .memberName("RiskCounts") .getter(getter(LensReview::riskCountsAsStrings)) .setter(setter(Builder::riskCountsWithStrings)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RiskCounts").build(), MapTrait.builder() .keyLocationName("key") .valueLocationName("value") .valueFieldInfo( SdkField. builder(MarshallingType.INTEGER) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("value").build()).build()).build()).build(); private static final SdkField NEXT_TOKEN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("NextToken").getter(getter(LensReview::nextToken)).setter(setter(Builder::nextToken)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NextToken").build()).build(); private static final SdkField> PROFILES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Profiles") .getter(getter(LensReview::profiles)) .setter(setter(Builder::profiles)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Profiles").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(WorkloadProfile::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> PRIORITIZED_RISK_COUNTS_FIELD = SdkField .> builder(MarshallingType.MAP) .memberName("PrioritizedRiskCounts") .getter(getter(LensReview::prioritizedRiskCountsAsStrings)) .setter(setter(Builder::prioritizedRiskCountsWithStrings)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PrioritizedRiskCounts").build(), MapTrait.builder() .keyLocationName("key") .valueLocationName("value") .valueFieldInfo( SdkField. builder(MarshallingType.INTEGER) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("value").build()).build()).build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(LENS_ALIAS_FIELD, LENS_ARN_FIELD, LENS_VERSION_FIELD, LENS_NAME_FIELD, LENS_STATUS_FIELD, PILLAR_REVIEW_SUMMARIES_FIELD, JIRA_CONFIGURATION_FIELD, UPDATED_AT_FIELD, NOTES_FIELD, RISK_COUNTS_FIELD, NEXT_TOKEN_FIELD, PROFILES_FIELD, PRIORITIZED_RISK_COUNTS_FIELD)); private static final Map> SDK_NAME_TO_FIELD = Collections .unmodifiableMap(new HashMap>() { { put("LensAlias", LENS_ALIAS_FIELD); put("LensArn", LENS_ARN_FIELD); put("LensVersion", LENS_VERSION_FIELD); put("LensName", LENS_NAME_FIELD); put("LensStatus", LENS_STATUS_FIELD); put("PillarReviewSummaries", PILLAR_REVIEW_SUMMARIES_FIELD); put("JiraConfiguration", JIRA_CONFIGURATION_FIELD); put("UpdatedAt", UPDATED_AT_FIELD); put("Notes", NOTES_FIELD); put("RiskCounts", RISK_COUNTS_FIELD); put("NextToken", NEXT_TOKEN_FIELD); put("Profiles", PROFILES_FIELD); put("PrioritizedRiskCounts", PRIORITIZED_RISK_COUNTS_FIELD); } }); private static final long serialVersionUID = 1L; private final String lensAlias; private final String lensArn; private final String lensVersion; private final String lensName; private final String lensStatus; private final List pillarReviewSummaries; private final JiraSelectedQuestionConfiguration jiraConfiguration; private final Instant updatedAt; private final String notes; private final Map riskCounts; private final String nextToken; private final List profiles; private final Map prioritizedRiskCounts; private LensReview(BuilderImpl builder) { this.lensAlias = builder.lensAlias; this.lensArn = builder.lensArn; this.lensVersion = builder.lensVersion; this.lensName = builder.lensName; this.lensStatus = builder.lensStatus; this.pillarReviewSummaries = builder.pillarReviewSummaries; this.jiraConfiguration = builder.jiraConfiguration; this.updatedAt = builder.updatedAt; this.notes = builder.notes; this.riskCounts = builder.riskCounts; this.nextToken = builder.nextToken; this.profiles = builder.profiles; this.prioritizedRiskCounts = builder.prioritizedRiskCounts; } /** * Returns the value of the LensAlias property for this object. * * @return The value of the LensAlias property for this object. */ public final String lensAlias() { return lensAlias; } /** *

* The ARN for the lens. *

* * @return The ARN for the lens. */ public final String lensArn() { return lensArn; } /** *

* The version of the lens. *

* * @return The version of the lens. */ public final String lensVersion() { return lensVersion; } /** * Returns the value of the LensName property for this object. * * @return The value of the LensName property for this object. */ public final String lensName() { return lensName; } /** *

* The status of the lens. *

*

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

* * @return The status of the lens. * @see LensStatus */ public final LensStatus lensStatus() { return LensStatus.fromValue(lensStatus); } /** *

* The status of the lens. *

*

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

* * @return The status of the lens. * @see LensStatus */ public final String lensStatusAsString() { return lensStatus; } /** * For responses, this returns true if the service returned a value for the PillarReviewSummaries property. This * DOES NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the * property). This is useful because the SDK will never return a null collection or map, but you may need to * differentiate between the service returning nothing (or null) and the service returning an empty collection or * map. For requests, this returns true if a value for the property was specified in the request builder, and false * if a value was not specified. */ public final boolean hasPillarReviewSummaries() { return pillarReviewSummaries != null && !(pillarReviewSummaries instanceof SdkAutoConstructList); } /** * Returns the value of the PillarReviewSummaries property for this object. *

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasPillarReviewSummaries} method. *

* * @return The value of the PillarReviewSummaries property for this object. */ public final List pillarReviewSummaries() { return pillarReviewSummaries; } /** *

* Jira configuration status of the Lens review. *

* * @return Jira configuration status of the Lens review. */ public final JiraSelectedQuestionConfiguration jiraConfiguration() { return jiraConfiguration; } /** * 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; } /** * Returns the value of the Notes property for this object. * * @return The value of the Notes property for this object. */ public final String notes() { return notes; } /** * Returns the value of the RiskCounts property for this object. *

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasRiskCounts} method. *

* * @return The value of the RiskCounts property for this object. */ public final Map riskCounts() { return RiskCountsCopier.copyStringToEnum(riskCounts); } /** * For responses, this returns true if the service returned a value for the RiskCounts property. This DOES NOT check * that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is * useful because the SDK will never return a null collection or map, but you may need to differentiate between the * service returning nothing (or null) and the service returning an empty collection or map. For requests, this * returns true if a value for the property was specified in the request builder, and false if a value was not * specified. */ public final boolean hasRiskCounts() { return riskCounts != null && !(riskCounts instanceof SdkAutoConstructMap); } /** * Returns the value of the RiskCounts property for this object. *

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasRiskCounts} method. *

* * @return The value of the RiskCounts property for this object. */ public final Map riskCountsAsStrings() { return riskCounts; } /** * Returns the value of the NextToken property for this object. * * @return The value of the NextToken property for this object. */ public final String nextToken() { return nextToken; } /** * For responses, this returns true if the service returned a value for the Profiles property. This DOES NOT check * that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is * useful because the SDK will never return a null collection or map, but you may need to differentiate between the * service returning nothing (or null) and the service returning an empty collection or map. For requests, this * returns true if a value for the property was specified in the request builder, and false if a value was not * specified. */ public final boolean hasProfiles() { return profiles != null && !(profiles instanceof SdkAutoConstructList); } /** *

* The profiles associated with the workload. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasProfiles} method. *

* * @return The profiles associated with the workload. */ public final List profiles() { return profiles; } /** * Returns the value of the PrioritizedRiskCounts property for this object. *

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasPrioritizedRiskCounts} method. *

* * @return The value of the PrioritizedRiskCounts property for this object. */ public final Map prioritizedRiskCounts() { return RiskCountsCopier.copyStringToEnum(prioritizedRiskCounts); } /** * For responses, this returns true if the service returned a value for the PrioritizedRiskCounts property. This * DOES NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the * property). This is useful because the SDK will never return a null collection or map, but you may need to * differentiate between the service returning nothing (or null) and the service returning an empty collection or * map. For requests, this returns true if a value for the property was specified in the request builder, and false * if a value was not specified. */ public final boolean hasPrioritizedRiskCounts() { return prioritizedRiskCounts != null && !(prioritizedRiskCounts instanceof SdkAutoConstructMap); } /** * Returns the value of the PrioritizedRiskCounts property for this object. *

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasPrioritizedRiskCounts} method. *

* * @return The value of the PrioritizedRiskCounts property for this object. */ public final Map prioritizedRiskCountsAsStrings() { return prioritizedRiskCounts; } @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(lensAlias()); hashCode = 31 * hashCode + Objects.hashCode(lensArn()); hashCode = 31 * hashCode + Objects.hashCode(lensVersion()); hashCode = 31 * hashCode + Objects.hashCode(lensName()); hashCode = 31 * hashCode + Objects.hashCode(lensStatusAsString()); hashCode = 31 * hashCode + Objects.hashCode(hasPillarReviewSummaries() ? pillarReviewSummaries() : null); hashCode = 31 * hashCode + Objects.hashCode(jiraConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(updatedAt()); hashCode = 31 * hashCode + Objects.hashCode(notes()); hashCode = 31 * hashCode + Objects.hashCode(hasRiskCounts() ? riskCountsAsStrings() : null); hashCode = 31 * hashCode + Objects.hashCode(nextToken()); hashCode = 31 * hashCode + Objects.hashCode(hasProfiles() ? profiles() : null); hashCode = 31 * hashCode + Objects.hashCode(hasPrioritizedRiskCounts() ? prioritizedRiskCountsAsStrings() : null); 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 LensReview)) { return false; } LensReview other = (LensReview) obj; return Objects.equals(lensAlias(), other.lensAlias()) && Objects.equals(lensArn(), other.lensArn()) && Objects.equals(lensVersion(), other.lensVersion()) && Objects.equals(lensName(), other.lensName()) && Objects.equals(lensStatusAsString(), other.lensStatusAsString()) && hasPillarReviewSummaries() == other.hasPillarReviewSummaries() && Objects.equals(pillarReviewSummaries(), other.pillarReviewSummaries()) && Objects.equals(jiraConfiguration(), other.jiraConfiguration()) && Objects.equals(updatedAt(), other.updatedAt()) && Objects.equals(notes(), other.notes()) && hasRiskCounts() == other.hasRiskCounts() && Objects.equals(riskCountsAsStrings(), other.riskCountsAsStrings()) && Objects.equals(nextToken(), other.nextToken()) && hasProfiles() == other.hasProfiles() && Objects.equals(profiles(), other.profiles()) && hasPrioritizedRiskCounts() == other.hasPrioritizedRiskCounts() && Objects.equals(prioritizedRiskCountsAsStrings(), other.prioritizedRiskCountsAsStrings()); } /** * 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("LensReview").add("LensAlias", lensAlias()).add("LensArn", lensArn()) .add("LensVersion", lensVersion()).add("LensName", lensName()).add("LensStatus", lensStatusAsString()) .add("PillarReviewSummaries", hasPillarReviewSummaries() ? pillarReviewSummaries() : null) .add("JiraConfiguration", jiraConfiguration()).add("UpdatedAt", updatedAt()).add("Notes", notes()) .add("RiskCounts", hasRiskCounts() ? riskCountsAsStrings() : null).add("NextToken", nextToken()) .add("Profiles", hasProfiles() ? profiles() : null) .add("PrioritizedRiskCounts", hasPrioritizedRiskCounts() ? prioritizedRiskCountsAsStrings() : null).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "LensAlias": return Optional.ofNullable(clazz.cast(lensAlias())); case "LensArn": return Optional.ofNullable(clazz.cast(lensArn())); case "LensVersion": return Optional.ofNullable(clazz.cast(lensVersion())); case "LensName": return Optional.ofNullable(clazz.cast(lensName())); case "LensStatus": return Optional.ofNullable(clazz.cast(lensStatusAsString())); case "PillarReviewSummaries": return Optional.ofNullable(clazz.cast(pillarReviewSummaries())); case "JiraConfiguration": return Optional.ofNullable(clazz.cast(jiraConfiguration())); case "UpdatedAt": return Optional.ofNullable(clazz.cast(updatedAt())); case "Notes": return Optional.ofNullable(clazz.cast(notes())); case "RiskCounts": return Optional.ofNullable(clazz.cast(riskCountsAsStrings())); case "NextToken": return Optional.ofNullable(clazz.cast(nextToken())); case "Profiles": return Optional.ofNullable(clazz.cast(profiles())); case "PrioritizedRiskCounts": return Optional.ofNullable(clazz.cast(prioritizedRiskCountsAsStrings())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Function getter(Function g) { return obj -> g.apply((LensReview) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** * Sets the value of the LensAlias property for this object. * * @param lensAlias * The new value for the LensAlias property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lensAlias(String lensAlias); /** *

* The ARN for the lens. *

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

* The version of the lens. *

* * @param lensVersion * The version of the lens. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lensVersion(String lensVersion); /** * Sets the value of the LensName property for this object. * * @param lensName * The new value for the LensName property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lensName(String lensName); /** *

* The status of the lens. *

* * @param lensStatus * The status of the lens. * @see LensStatus * @return Returns a reference to this object so that method calls can be chained together. * @see LensStatus */ Builder lensStatus(String lensStatus); /** *

* The status of the lens. *

* * @param lensStatus * The status of the lens. * @see LensStatus * @return Returns a reference to this object so that method calls can be chained together. * @see LensStatus */ Builder lensStatus(LensStatus lensStatus); /** * Sets the value of the PillarReviewSummaries property for this object. * * @param pillarReviewSummaries * The new value for the PillarReviewSummaries property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder pillarReviewSummaries(Collection pillarReviewSummaries); /** * Sets the value of the PillarReviewSummaries property for this object. * * @param pillarReviewSummaries * The new value for the PillarReviewSummaries property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder pillarReviewSummaries(PillarReviewSummary... pillarReviewSummaries); /** * Sets the value of the PillarReviewSummaries property for this object. * * This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.wellarchitected.model.PillarReviewSummary.Builder} avoiding the need * to create one manually via * {@link software.amazon.awssdk.services.wellarchitected.model.PillarReviewSummary#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.wellarchitected.model.PillarReviewSummary.Builder#build()} is called * immediately and its result is passed to {@link #pillarReviewSummaries(List)}. * * @param pillarReviewSummaries * a consumer that will call methods on * {@link software.amazon.awssdk.services.wellarchitected.model.PillarReviewSummary.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #pillarReviewSummaries(java.util.Collection) */ Builder pillarReviewSummaries(Consumer... pillarReviewSummaries); /** *

* Jira configuration status of the Lens review. *

* * @param jiraConfiguration * Jira configuration status of the Lens review. * @return Returns a reference to this object so that method calls can be chained together. */ Builder jiraConfiguration(JiraSelectedQuestionConfiguration jiraConfiguration); /** *

* Jira configuration status of the Lens review. *

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

* When the {@link Consumer} completes, {@link JiraSelectedQuestionConfiguration.Builder#build()} is called * immediately and its result is passed to {@link #jiraConfiguration(JiraSelectedQuestionConfiguration)}. * * @param jiraConfiguration * a consumer that will call methods on {@link JiraSelectedQuestionConfiguration.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #jiraConfiguration(JiraSelectedQuestionConfiguration) */ default Builder jiraConfiguration(Consumer jiraConfiguration) { return jiraConfiguration(JiraSelectedQuestionConfiguration.builder().applyMutation(jiraConfiguration).build()); } /** * 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); /** * Sets the value of the Notes property for this object. * * @param notes * The new value for the Notes property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder notes(String notes); /** * Sets the value of the RiskCounts property for this object. * * @param riskCounts * The new value for the RiskCounts property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder riskCountsWithStrings(Map riskCounts); /** * Sets the value of the RiskCounts property for this object. * * @param riskCounts * The new value for the RiskCounts property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder riskCounts(Map riskCounts); /** * Sets the value of the NextToken property for this object. * * @param nextToken * The new value for the NextToken property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder nextToken(String nextToken); /** *

* The profiles associated with the workload. *

* * @param profiles * The profiles associated with the workload. * @return Returns a reference to this object so that method calls can be chained together. */ Builder profiles(Collection profiles); /** *

* The profiles associated with the workload. *

* * @param profiles * The profiles associated with the workload. * @return Returns a reference to this object so that method calls can be chained together. */ Builder profiles(WorkloadProfile... profiles); /** *

* The profiles associated with the workload. *

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.wellarchitected.model.WorkloadProfile.Builder} avoiding the need to * create one manually via * {@link software.amazon.awssdk.services.wellarchitected.model.WorkloadProfile#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.wellarchitected.model.WorkloadProfile.Builder#build()} is called * immediately and its result is passed to {@link #profiles(List)}. * * @param profiles * a consumer that will call methods on * {@link software.amazon.awssdk.services.wellarchitected.model.WorkloadProfile.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #profiles(java.util.Collection) */ Builder profiles(Consumer... profiles); /** * Sets the value of the PrioritizedRiskCounts property for this object. * * @param prioritizedRiskCounts * The new value for the PrioritizedRiskCounts property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder prioritizedRiskCountsWithStrings(Map prioritizedRiskCounts); /** * Sets the value of the PrioritizedRiskCounts property for this object. * * @param prioritizedRiskCounts * The new value for the PrioritizedRiskCounts property for this object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder prioritizedRiskCounts(Map prioritizedRiskCounts); } static final class BuilderImpl implements Builder { private String lensAlias; private String lensArn; private String lensVersion; private String lensName; private String lensStatus; private List pillarReviewSummaries = DefaultSdkAutoConstructList.getInstance(); private JiraSelectedQuestionConfiguration jiraConfiguration; private Instant updatedAt; private String notes; private Map riskCounts = DefaultSdkAutoConstructMap.getInstance(); private String nextToken; private List profiles = DefaultSdkAutoConstructList.getInstance(); private Map prioritizedRiskCounts = DefaultSdkAutoConstructMap.getInstance(); private BuilderImpl() { } private BuilderImpl(LensReview model) { lensAlias(model.lensAlias); lensArn(model.lensArn); lensVersion(model.lensVersion); lensName(model.lensName); lensStatus(model.lensStatus); pillarReviewSummaries(model.pillarReviewSummaries); jiraConfiguration(model.jiraConfiguration); updatedAt(model.updatedAt); notes(model.notes); riskCountsWithStrings(model.riskCounts); nextToken(model.nextToken); profiles(model.profiles); prioritizedRiskCountsWithStrings(model.prioritizedRiskCounts); } public final String getLensAlias() { return lensAlias; } public final void setLensAlias(String lensAlias) { this.lensAlias = lensAlias; } @Override public final Builder lensAlias(String lensAlias) { this.lensAlias = lensAlias; return this; } public final String getLensArn() { return lensArn; } public final void setLensArn(String lensArn) { this.lensArn = lensArn; } @Override public final Builder lensArn(String lensArn) { this.lensArn = lensArn; return this; } public final String getLensVersion() { return lensVersion; } public final void setLensVersion(String lensVersion) { this.lensVersion = lensVersion; } @Override public final Builder lensVersion(String lensVersion) { this.lensVersion = lensVersion; return this; } public final String getLensName() { return lensName; } public final void setLensName(String lensName) { this.lensName = lensName; } @Override public final Builder lensName(String lensName) { this.lensName = lensName; return this; } public final String getLensStatus() { return lensStatus; } public final void setLensStatus(String lensStatus) { this.lensStatus = lensStatus; } @Override public final Builder lensStatus(String lensStatus) { this.lensStatus = lensStatus; return this; } @Override public final Builder lensStatus(LensStatus lensStatus) { this.lensStatus(lensStatus == null ? null : lensStatus.toString()); return this; } public final List getPillarReviewSummaries() { List result = PillarReviewSummariesCopier.copyToBuilder(this.pillarReviewSummaries); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setPillarReviewSummaries(Collection pillarReviewSummaries) { this.pillarReviewSummaries = PillarReviewSummariesCopier.copyFromBuilder(pillarReviewSummaries); } @Override public final Builder pillarReviewSummaries(Collection pillarReviewSummaries) { this.pillarReviewSummaries = PillarReviewSummariesCopier.copy(pillarReviewSummaries); return this; } @Override @SafeVarargs public final Builder pillarReviewSummaries(PillarReviewSummary... pillarReviewSummaries) { pillarReviewSummaries(Arrays.asList(pillarReviewSummaries)); return this; } @Override @SafeVarargs public final Builder pillarReviewSummaries(Consumer... pillarReviewSummaries) { pillarReviewSummaries(Stream.of(pillarReviewSummaries) .map(c -> PillarReviewSummary.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final JiraSelectedQuestionConfiguration.Builder getJiraConfiguration() { return jiraConfiguration != null ? jiraConfiguration.toBuilder() : null; } public final void setJiraConfiguration(JiraSelectedQuestionConfiguration.BuilderImpl jiraConfiguration) { this.jiraConfiguration = jiraConfiguration != null ? jiraConfiguration.build() : null; } @Override public final Builder jiraConfiguration(JiraSelectedQuestionConfiguration jiraConfiguration) { this.jiraConfiguration = jiraConfiguration; 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; } public final String getNotes() { return notes; } public final void setNotes(String notes) { this.notes = notes; } @Override public final Builder notes(String notes) { this.notes = notes; return this; } public final Map getRiskCounts() { if (riskCounts instanceof SdkAutoConstructMap) { return null; } return riskCounts; } public final void setRiskCounts(Map riskCounts) { this.riskCounts = RiskCountsCopier.copy(riskCounts); } @Override public final Builder riskCountsWithStrings(Map riskCounts) { this.riskCounts = RiskCountsCopier.copy(riskCounts); return this; } @Override public final Builder riskCounts(Map riskCounts) { this.riskCounts = RiskCountsCopier.copyEnumToString(riskCounts); return this; } public final String getNextToken() { return nextToken; } public final void setNextToken(String nextToken) { this.nextToken = nextToken; } @Override public final Builder nextToken(String nextToken) { this.nextToken = nextToken; return this; } public final List getProfiles() { List result = WorkloadProfilesCopier.copyToBuilder(this.profiles); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setProfiles(Collection profiles) { this.profiles = WorkloadProfilesCopier.copyFromBuilder(profiles); } @Override public final Builder profiles(Collection profiles) { this.profiles = WorkloadProfilesCopier.copy(profiles); return this; } @Override @SafeVarargs public final Builder profiles(WorkloadProfile... profiles) { profiles(Arrays.asList(profiles)); return this; } @Override @SafeVarargs public final Builder profiles(Consumer... profiles) { profiles(Stream.of(profiles).map(c -> WorkloadProfile.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final Map getPrioritizedRiskCounts() { if (prioritizedRiskCounts instanceof SdkAutoConstructMap) { return null; } return prioritizedRiskCounts; } public final void setPrioritizedRiskCounts(Map prioritizedRiskCounts) { this.prioritizedRiskCounts = RiskCountsCopier.copy(prioritizedRiskCounts); } @Override public final Builder prioritizedRiskCountsWithStrings(Map prioritizedRiskCounts) { this.prioritizedRiskCounts = RiskCountsCopier.copy(prioritizedRiskCounts); return this; } @Override public final Builder prioritizedRiskCounts(Map prioritizedRiskCounts) { this.prioritizedRiskCounts = RiskCountsCopier.copyEnumToString(prioritizedRiskCounts); return this; } @Override public LensReview build() { return new LensReview(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy