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

software.amazon.awssdk.services.redshift.model.Recommendation Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Redshift module holds the client classes that are used for communicating with Amazon Redshift Service

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.redshift.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.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* An Amazon Redshift Advisor recommended action on the Amazon Redshift cluster. *

*/ @Generated("software.amazon.awssdk:codegen") public final class Recommendation implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Id") .getter(getter(Recommendation::id)).setter(setter(Builder::id)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Id").build()).build(); private static final SdkField CLUSTER_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ClusterIdentifier").getter(getter(Recommendation::clusterIdentifier)) .setter(setter(Builder::clusterIdentifier)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ClusterIdentifier").build()).build(); private static final SdkField NAMESPACE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("NamespaceArn").getter(getter(Recommendation::namespaceArn)).setter(setter(Builder::namespaceArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NamespaceArn").build()).build(); private static final SdkField CREATED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("CreatedAt").getter(getter(Recommendation::createdAt)).setter(setter(Builder::createdAt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreatedAt").build()).build(); private static final SdkField RECOMMENDATION_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("RecommendationType").getter(getter(Recommendation::recommendationType)) .setter(setter(Builder::recommendationType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RecommendationType").build()) .build(); private static final SdkField TITLE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Title") .getter(getter(Recommendation::title)).setter(setter(Builder::title)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Title").build()).build(); private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("Description").getter(getter(Recommendation::description)).setter(setter(Builder::description)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Description").build()).build(); private static final SdkField OBSERVATION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("Observation").getter(getter(Recommendation::observation)).setter(setter(Builder::observation)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Observation").build()).build(); private static final SdkField IMPACT_RANKING_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ImpactRanking").getter(getter(Recommendation::impactRankingAsString)) .setter(setter(Builder::impactRanking)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ImpactRanking").build()).build(); private static final SdkField RECOMMENDATION_TEXT_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("RecommendationText").getter(getter(Recommendation::recommendationText)) .setter(setter(Builder::recommendationText)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RecommendationText").build()) .build(); private static final SdkField> RECOMMENDED_ACTIONS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("RecommendedActions") .getter(getter(Recommendation::recommendedActions)) .setter(setter(Builder::recommendedActions)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RecommendedActions").build(), ListTrait .builder() .memberLocationName("RecommendedAction") .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(RecommendedAction::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("RecommendedAction").build()).build()).build()).build(); private static final SdkField> REFERENCE_LINKS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("ReferenceLinks") .getter(getter(Recommendation::referenceLinks)) .setter(setter(Builder::referenceLinks)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReferenceLinks").build(), ListTrait .builder() .memberLocationName("ReferenceLink") .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(ReferenceLink::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("ReferenceLink").build()).build()).build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ID_FIELD, CLUSTER_IDENTIFIER_FIELD, NAMESPACE_ARN_FIELD, CREATED_AT_FIELD, RECOMMENDATION_TYPE_FIELD, TITLE_FIELD, DESCRIPTION_FIELD, OBSERVATION_FIELD, IMPACT_RANKING_FIELD, RECOMMENDATION_TEXT_FIELD, RECOMMENDED_ACTIONS_FIELD, REFERENCE_LINKS_FIELD)); private static final Map> SDK_NAME_TO_FIELD = Collections .unmodifiableMap(new HashMap>() { { put("Id", ID_FIELD); put("ClusterIdentifier", CLUSTER_IDENTIFIER_FIELD); put("NamespaceArn", NAMESPACE_ARN_FIELD); put("CreatedAt", CREATED_AT_FIELD); put("RecommendationType", RECOMMENDATION_TYPE_FIELD); put("Title", TITLE_FIELD); put("Description", DESCRIPTION_FIELD); put("Observation", OBSERVATION_FIELD); put("ImpactRanking", IMPACT_RANKING_FIELD); put("RecommendationText", RECOMMENDATION_TEXT_FIELD); put("RecommendedActions", RECOMMENDED_ACTIONS_FIELD); put("ReferenceLinks", REFERENCE_LINKS_FIELD); } }); private static final long serialVersionUID = 1L; private final String id; private final String clusterIdentifier; private final String namespaceArn; private final Instant createdAt; private final String recommendationType; private final String title; private final String description; private final String observation; private final String impactRanking; private final String recommendationText; private final List recommendedActions; private final List referenceLinks; private Recommendation(BuilderImpl builder) { this.id = builder.id; this.clusterIdentifier = builder.clusterIdentifier; this.namespaceArn = builder.namespaceArn; this.createdAt = builder.createdAt; this.recommendationType = builder.recommendationType; this.title = builder.title; this.description = builder.description; this.observation = builder.observation; this.impactRanking = builder.impactRanking; this.recommendationText = builder.recommendationText; this.recommendedActions = builder.recommendedActions; this.referenceLinks = builder.referenceLinks; } /** *

* A unique identifier of the Advisor recommendation. *

* * @return A unique identifier of the Advisor recommendation. */ public final String id() { return id; } /** *

* The unique identifier of the cluster for which the recommendation is returned. *

* * @return The unique identifier of the cluster for which the recommendation is returned. */ public final String clusterIdentifier() { return clusterIdentifier; } /** *

* The Amazon Redshift cluster namespace ARN for which the recommendations is returned. *

* * @return The Amazon Redshift cluster namespace ARN for which the recommendations is returned. */ public final String namespaceArn() { return namespaceArn; } /** *

* The date and time (UTC) that the recommendation was created. *

* * @return The date and time (UTC) that the recommendation was created. */ public final Instant createdAt() { return createdAt; } /** *

* The type of Advisor recommendation. *

* * @return The type of Advisor recommendation. */ public final String recommendationType() { return recommendationType; } /** *

* The title of the recommendation. *

* * @return The title of the recommendation. */ public final String title() { return title; } /** *

* The description of the recommendation. *

* * @return The description of the recommendation. */ public final String description() { return description; } /** *

* The description of what was observed about your cluster. *

* * @return The description of what was observed about your cluster. */ public final String observation() { return observation; } /** *

* The scale of the impact that the Advisor recommendation has to the performance and cost of the cluster. *

*

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

* * @return The scale of the impact that the Advisor recommendation has to the performance and cost of the cluster. * @see ImpactRankingType */ public final ImpactRankingType impactRanking() { return ImpactRankingType.fromValue(impactRanking); } /** *

* The scale of the impact that the Advisor recommendation has to the performance and cost of the cluster. *

*

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

* * @return The scale of the impact that the Advisor recommendation has to the performance and cost of the cluster. * @see ImpactRankingType */ public final String impactRankingAsString() { return impactRanking; } /** *

* The description of the recommendation. *

* * @return The description of the recommendation. */ public final String recommendationText() { return recommendationText; } /** * For responses, this returns true if the service returned a value for the RecommendedActions 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 hasRecommendedActions() { return recommendedActions != null && !(recommendedActions instanceof SdkAutoConstructList); } /** *

* List of Amazon Redshift recommended actions. *

*

* 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 #hasRecommendedActions} method. *

* * @return List of Amazon Redshift recommended actions. */ public final List recommendedActions() { return recommendedActions; } /** * For responses, this returns true if the service returned a value for the ReferenceLinks 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 hasReferenceLinks() { return referenceLinks != null && !(referenceLinks instanceof SdkAutoConstructList); } /** *

* List of helpful links for more information about the Advisor recommendation. *

*

* 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 #hasReferenceLinks} method. *

* * @return List of helpful links for more information about the Advisor recommendation. */ public final List referenceLinks() { return referenceLinks; } @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(id()); hashCode = 31 * hashCode + Objects.hashCode(clusterIdentifier()); hashCode = 31 * hashCode + Objects.hashCode(namespaceArn()); hashCode = 31 * hashCode + Objects.hashCode(createdAt()); hashCode = 31 * hashCode + Objects.hashCode(recommendationType()); hashCode = 31 * hashCode + Objects.hashCode(title()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(observation()); hashCode = 31 * hashCode + Objects.hashCode(impactRankingAsString()); hashCode = 31 * hashCode + Objects.hashCode(recommendationText()); hashCode = 31 * hashCode + Objects.hashCode(hasRecommendedActions() ? recommendedActions() : null); hashCode = 31 * hashCode + Objects.hashCode(hasReferenceLinks() ? referenceLinks() : 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 Recommendation)) { return false; } Recommendation other = (Recommendation) obj; return Objects.equals(id(), other.id()) && Objects.equals(clusterIdentifier(), other.clusterIdentifier()) && Objects.equals(namespaceArn(), other.namespaceArn()) && Objects.equals(createdAt(), other.createdAt()) && Objects.equals(recommendationType(), other.recommendationType()) && Objects.equals(title(), other.title()) && Objects.equals(description(), other.description()) && Objects.equals(observation(), other.observation()) && Objects.equals(impactRankingAsString(), other.impactRankingAsString()) && Objects.equals(recommendationText(), other.recommendationText()) && hasRecommendedActions() == other.hasRecommendedActions() && Objects.equals(recommendedActions(), other.recommendedActions()) && hasReferenceLinks() == other.hasReferenceLinks() && Objects.equals(referenceLinks(), other.referenceLinks()); } /** * 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("Recommendation").add("Id", id()).add("ClusterIdentifier", clusterIdentifier()) .add("NamespaceArn", namespaceArn()).add("CreatedAt", createdAt()) .add("RecommendationType", recommendationType()).add("Title", title()).add("Description", description()) .add("Observation", observation()).add("ImpactRanking", impactRankingAsString()) .add("RecommendationText", recommendationText()) .add("RecommendedActions", hasRecommendedActions() ? recommendedActions() : null) .add("ReferenceLinks", hasReferenceLinks() ? referenceLinks() : null).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Id": return Optional.ofNullable(clazz.cast(id())); case "ClusterIdentifier": return Optional.ofNullable(clazz.cast(clusterIdentifier())); case "NamespaceArn": return Optional.ofNullable(clazz.cast(namespaceArn())); case "CreatedAt": return Optional.ofNullable(clazz.cast(createdAt())); case "RecommendationType": return Optional.ofNullable(clazz.cast(recommendationType())); case "Title": return Optional.ofNullable(clazz.cast(title())); case "Description": return Optional.ofNullable(clazz.cast(description())); case "Observation": return Optional.ofNullable(clazz.cast(observation())); case "ImpactRanking": return Optional.ofNullable(clazz.cast(impactRankingAsString())); case "RecommendationText": return Optional.ofNullable(clazz.cast(recommendationText())); case "RecommendedActions": return Optional.ofNullable(clazz.cast(recommendedActions())); case "ReferenceLinks": return Optional.ofNullable(clazz.cast(referenceLinks())); 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((Recommendation) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* A unique identifier of the Advisor recommendation. *

* * @param id * A unique identifier of the Advisor recommendation. * @return Returns a reference to this object so that method calls can be chained together. */ Builder id(String id); /** *

* The unique identifier of the cluster for which the recommendation is returned. *

* * @param clusterIdentifier * The unique identifier of the cluster for which the recommendation is returned. * @return Returns a reference to this object so that method calls can be chained together. */ Builder clusterIdentifier(String clusterIdentifier); /** *

* The Amazon Redshift cluster namespace ARN for which the recommendations is returned. *

* * @param namespaceArn * The Amazon Redshift cluster namespace ARN for which the recommendations is returned. * @return Returns a reference to this object so that method calls can be chained together. */ Builder namespaceArn(String namespaceArn); /** *

* The date and time (UTC) that the recommendation was created. *

* * @param createdAt * The date and time (UTC) that the recommendation was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createdAt(Instant createdAt); /** *

* The type of Advisor recommendation. *

* * @param recommendationType * The type of Advisor recommendation. * @return Returns a reference to this object so that method calls can be chained together. */ Builder recommendationType(String recommendationType); /** *

* The title of the recommendation. *

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

* The description of the recommendation. *

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

* The description of what was observed about your cluster. *

* * @param observation * The description of what was observed about your cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder observation(String observation); /** *

* The scale of the impact that the Advisor recommendation has to the performance and cost of the cluster. *

* * @param impactRanking * The scale of the impact that the Advisor recommendation has to the performance and cost of the * cluster. * @see ImpactRankingType * @return Returns a reference to this object so that method calls can be chained together. * @see ImpactRankingType */ Builder impactRanking(String impactRanking); /** *

* The scale of the impact that the Advisor recommendation has to the performance and cost of the cluster. *

* * @param impactRanking * The scale of the impact that the Advisor recommendation has to the performance and cost of the * cluster. * @see ImpactRankingType * @return Returns a reference to this object so that method calls can be chained together. * @see ImpactRankingType */ Builder impactRanking(ImpactRankingType impactRanking); /** *

* The description of the recommendation. *

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

* List of Amazon Redshift recommended actions. *

* * @param recommendedActions * List of Amazon Redshift recommended actions. * @return Returns a reference to this object so that method calls can be chained together. */ Builder recommendedActions(Collection recommendedActions); /** *

* List of Amazon Redshift recommended actions. *

* * @param recommendedActions * List of Amazon Redshift recommended actions. * @return Returns a reference to this object so that method calls can be chained together. */ Builder recommendedActions(RecommendedAction... recommendedActions); /** *

* List of Amazon Redshift recommended actions. *

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

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

* List of helpful links for more information about the Advisor recommendation. *

* * @param referenceLinks * List of helpful links for more information about the Advisor recommendation. * @return Returns a reference to this object so that method calls can be chained together. */ Builder referenceLinks(Collection referenceLinks); /** *

* List of helpful links for more information about the Advisor recommendation. *

* * @param referenceLinks * List of helpful links for more information about the Advisor recommendation. * @return Returns a reference to this object so that method calls can be chained together. */ Builder referenceLinks(ReferenceLink... referenceLinks); /** *

* List of helpful links for more information about the Advisor recommendation. *

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

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.redshift.model.ReferenceLink.Builder#build()} is called immediately * and its result is passed to {@link #referenceLinks(List)}. * * @param referenceLinks * a consumer that will call methods on * {@link software.amazon.awssdk.services.redshift.model.ReferenceLink.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #referenceLinks(java.util.Collection) */ Builder referenceLinks(Consumer... referenceLinks); } static final class BuilderImpl implements Builder { private String id; private String clusterIdentifier; private String namespaceArn; private Instant createdAt; private String recommendationType; private String title; private String description; private String observation; private String impactRanking; private String recommendationText; private List recommendedActions = DefaultSdkAutoConstructList.getInstance(); private List referenceLinks = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(Recommendation model) { id(model.id); clusterIdentifier(model.clusterIdentifier); namespaceArn(model.namespaceArn); createdAt(model.createdAt); recommendationType(model.recommendationType); title(model.title); description(model.description); observation(model.observation); impactRanking(model.impactRanking); recommendationText(model.recommendationText); recommendedActions(model.recommendedActions); referenceLinks(model.referenceLinks); } 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 getClusterIdentifier() { return clusterIdentifier; } public final void setClusterIdentifier(String clusterIdentifier) { this.clusterIdentifier = clusterIdentifier; } @Override public final Builder clusterIdentifier(String clusterIdentifier) { this.clusterIdentifier = clusterIdentifier; return this; } public final String getNamespaceArn() { return namespaceArn; } public final void setNamespaceArn(String namespaceArn) { this.namespaceArn = namespaceArn; } @Override public final Builder namespaceArn(String namespaceArn) { this.namespaceArn = namespaceArn; 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 getRecommendationType() { return recommendationType; } public final void setRecommendationType(String recommendationType) { this.recommendationType = recommendationType; } @Override public final Builder recommendationType(String recommendationType) { this.recommendationType = recommendationType; return this; } public final String getTitle() { return title; } public final void setTitle(String title) { this.title = title; } @Override public final Builder title(String title) { this.title = title; return this; } public final String getDescription() { return description; } public final void setDescription(String description) { this.description = description; } @Override public final Builder description(String description) { this.description = description; return this; } public final String getObservation() { return observation; } public final void setObservation(String observation) { this.observation = observation; } @Override public final Builder observation(String observation) { this.observation = observation; return this; } public final String getImpactRanking() { return impactRanking; } public final void setImpactRanking(String impactRanking) { this.impactRanking = impactRanking; } @Override public final Builder impactRanking(String impactRanking) { this.impactRanking = impactRanking; return this; } @Override public final Builder impactRanking(ImpactRankingType impactRanking) { this.impactRanking(impactRanking == null ? null : impactRanking.toString()); return this; } public final String getRecommendationText() { return recommendationText; } public final void setRecommendationText(String recommendationText) { this.recommendationText = recommendationText; } @Override public final Builder recommendationText(String recommendationText) { this.recommendationText = recommendationText; return this; } public final List getRecommendedActions() { List result = RecommendedActionListCopier.copyToBuilder(this.recommendedActions); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setRecommendedActions(Collection recommendedActions) { this.recommendedActions = RecommendedActionListCopier.copyFromBuilder(recommendedActions); } @Override public final Builder recommendedActions(Collection recommendedActions) { this.recommendedActions = RecommendedActionListCopier.copy(recommendedActions); return this; } @Override @SafeVarargs public final Builder recommendedActions(RecommendedAction... recommendedActions) { recommendedActions(Arrays.asList(recommendedActions)); return this; } @Override @SafeVarargs public final Builder recommendedActions(Consumer... recommendedActions) { recommendedActions(Stream.of(recommendedActions).map(c -> RecommendedAction.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final List getReferenceLinks() { List result = ReferenceLinkListCopier.copyToBuilder(this.referenceLinks); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setReferenceLinks(Collection referenceLinks) { this.referenceLinks = ReferenceLinkListCopier.copyFromBuilder(referenceLinks); } @Override public final Builder referenceLinks(Collection referenceLinks) { this.referenceLinks = ReferenceLinkListCopier.copy(referenceLinks); return this; } @Override @SafeVarargs public final Builder referenceLinks(ReferenceLink... referenceLinks) { referenceLinks(Arrays.asList(referenceLinks)); return this; } @Override @SafeVarargs public final Builder referenceLinks(Consumer... referenceLinks) { referenceLinks(Stream.of(referenceLinks).map(c -> ReferenceLink.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } @Override public Recommendation build() { return new Recommendation(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy