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

software.amazon.awssdk.services.cleanrooms.model.CollaborationAnalysisTemplate Maven / Gradle / Ivy

Go to download

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

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.cleanrooms.model;

import java.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import 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;

/**
 * 

* The analysis template within a collaboration. *

*/ @Generated("software.amazon.awssdk:codegen") public final class CollaborationAnalysisTemplate implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("id") .getter(getter(CollaborationAnalysisTemplate::id)).setter(setter(Builder::id)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("id").build()).build(); private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("arn") .getter(getter(CollaborationAnalysisTemplate::arn)).setter(setter(Builder::arn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("arn").build()).build(); private static final SdkField COLLABORATION_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("collaborationId").getter(getter(CollaborationAnalysisTemplate::collaborationId)) .setter(setter(Builder::collaborationId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("collaborationId").build()).build(); private static final SdkField COLLABORATION_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("collaborationArn").getter(getter(CollaborationAnalysisTemplate::collaborationArn)) .setter(setter(Builder::collaborationArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("collaborationArn").build()).build(); private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("description").getter(getter(CollaborationAnalysisTemplate::description)) .setter(setter(Builder::description)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("description").build()).build(); private static final SdkField CREATOR_ACCOUNT_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("creatorAccountId").getter(getter(CollaborationAnalysisTemplate::creatorAccountId)) .setter(setter(Builder::creatorAccountId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("creatorAccountId").build()).build(); private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("name") .getter(getter(CollaborationAnalysisTemplate::name)).setter(setter(Builder::name)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build(); private static final SdkField CREATE_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("createTime").getter(getter(CollaborationAnalysisTemplate::createTime)) .setter(setter(Builder::createTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("createTime").build()).build(); private static final SdkField UPDATE_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("updateTime").getter(getter(CollaborationAnalysisTemplate::updateTime)) .setter(setter(Builder::updateTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("updateTime").build()).build(); private static final SdkField SCHEMA_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("schema").getter(getter(CollaborationAnalysisTemplate::schema)).setter(setter(Builder::schema)) .constructor(AnalysisSchema::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("schema").build()).build(); private static final SdkField FORMAT_FIELD = SdkField. builder(MarshallingType.STRING).memberName("format") .getter(getter(CollaborationAnalysisTemplate::formatAsString)).setter(setter(Builder::format)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("format").build()).build(); private static final SdkField SOURCE_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("source").getter(getter(CollaborationAnalysisTemplate::source)).setter(setter(Builder::source)) .constructor(AnalysisSource::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("source").build()).build(); private static final SdkField> ANALYSIS_PARAMETERS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("analysisParameters") .getter(getter(CollaborationAnalysisTemplate::analysisParameters)) .setter(setter(Builder::analysisParameters)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("analysisParameters").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(AnalysisParameter::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> VALIDATIONS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("validations") .getter(getter(CollaborationAnalysisTemplate::validations)) .setter(setter(Builder::validations)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("validations").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(AnalysisTemplateValidationStatusDetail::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ID_FIELD, ARN_FIELD, COLLABORATION_ID_FIELD, COLLABORATION_ARN_FIELD, DESCRIPTION_FIELD, CREATOR_ACCOUNT_ID_FIELD, NAME_FIELD, CREATE_TIME_FIELD, UPDATE_TIME_FIELD, SCHEMA_FIELD, FORMAT_FIELD, SOURCE_FIELD, ANALYSIS_PARAMETERS_FIELD, VALIDATIONS_FIELD)); private static final long serialVersionUID = 1L; private final String id; private final String arn; private final String collaborationId; private final String collaborationArn; private final String description; private final String creatorAccountId; private final String name; private final Instant createTime; private final Instant updateTime; private final AnalysisSchema schema; private final String format; private final AnalysisSource source; private final List analysisParameters; private final List validations; private CollaborationAnalysisTemplate(BuilderImpl builder) { this.id = builder.id; this.arn = builder.arn; this.collaborationId = builder.collaborationId; this.collaborationArn = builder.collaborationArn; this.description = builder.description; this.creatorAccountId = builder.creatorAccountId; this.name = builder.name; this.createTime = builder.createTime; this.updateTime = builder.updateTime; this.schema = builder.schema; this.format = builder.format; this.source = builder.source; this.analysisParameters = builder.analysisParameters; this.validations = builder.validations; } /** *

* The identifier of the analysis template. *

* * @return The identifier of the analysis template. */ public final String id() { return id; } /** *

* The Amazon Resource Name (ARN) of the analysis template. *

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

* A unique identifier for the collaboration that the analysis templates belong to. Currently accepts collaboration * ID. *

* * @return A unique identifier for the collaboration that the analysis templates belong to. Currently accepts * collaboration ID. */ public final String collaborationId() { return collaborationId; } /** *

* The unique ARN for the analysis template’s associated collaboration. *

* * @return The unique ARN for the analysis template’s associated collaboration. */ public final String collaborationArn() { return collaborationArn; } /** *

* The description of the analysis template. *

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

* The identifier used to reference members of the collaboration. Currently only supports Amazon Web Services * account ID. *

* * @return The identifier used to reference members of the collaboration. Currently only supports Amazon Web * Services account ID. */ public final String creatorAccountId() { return creatorAccountId; } /** *

* The name of the analysis template. *

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

* The time that the analysis template within a collaboration was created. *

* * @return The time that the analysis template within a collaboration was created. */ public final Instant createTime() { return createTime; } /** *

* The time that the analysis template in the collaboration was last updated. *

* * @return The time that the analysis template in the collaboration was last updated. */ public final Instant updateTime() { return updateTime; } /** *

* The entire schema object. *

* * @return The entire schema object. */ public final AnalysisSchema schema() { return schema; } /** *

* The format of the analysis template in the collaboration. *

*

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

* * @return The format of the analysis template in the collaboration. * @see AnalysisFormat */ public final AnalysisFormat format() { return AnalysisFormat.fromValue(format); } /** *

* The format of the analysis template in the collaboration. *

*

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

* * @return The format of the analysis template in the collaboration. * @see AnalysisFormat */ public final String formatAsString() { return format; } /** *

* The source of the analysis template within a collaboration. *

* * @return The source of the analysis template within a collaboration. */ public final AnalysisSource source() { return source; } /** * For responses, this returns true if the service returned a value for the AnalysisParameters 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 hasAnalysisParameters() { return analysisParameters != null && !(analysisParameters instanceof SdkAutoConstructList); } /** *

* The analysis parameters that have been specified in the analysis template. *

*

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

* * @return The analysis parameters that have been specified in the analysis template. */ public final List analysisParameters() { return analysisParameters; } /** * For responses, this returns true if the service returned a value for the Validations 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 hasValidations() { return validations != null && !(validations instanceof SdkAutoConstructList); } /** *

* The validations that were performed. *

*

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

* * @return The validations that were performed. */ public final List validations() { return validations; } @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(arn()); hashCode = 31 * hashCode + Objects.hashCode(collaborationId()); hashCode = 31 * hashCode + Objects.hashCode(collaborationArn()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(creatorAccountId()); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(createTime()); hashCode = 31 * hashCode + Objects.hashCode(updateTime()); hashCode = 31 * hashCode + Objects.hashCode(schema()); hashCode = 31 * hashCode + Objects.hashCode(formatAsString()); hashCode = 31 * hashCode + Objects.hashCode(source()); hashCode = 31 * hashCode + Objects.hashCode(hasAnalysisParameters() ? analysisParameters() : null); hashCode = 31 * hashCode + Objects.hashCode(hasValidations() ? validations() : 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 CollaborationAnalysisTemplate)) { return false; } CollaborationAnalysisTemplate other = (CollaborationAnalysisTemplate) obj; return Objects.equals(id(), other.id()) && Objects.equals(arn(), other.arn()) && Objects.equals(collaborationId(), other.collaborationId()) && Objects.equals(collaborationArn(), other.collaborationArn()) && Objects.equals(description(), other.description()) && Objects.equals(creatorAccountId(), other.creatorAccountId()) && Objects.equals(name(), other.name()) && Objects.equals(createTime(), other.createTime()) && Objects.equals(updateTime(), other.updateTime()) && Objects.equals(schema(), other.schema()) && Objects.equals(formatAsString(), other.formatAsString()) && Objects.equals(source(), other.source()) && hasAnalysisParameters() == other.hasAnalysisParameters() && Objects.equals(analysisParameters(), other.analysisParameters()) && hasValidations() == other.hasValidations() && Objects.equals(validations(), other.validations()); } /** * 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("CollaborationAnalysisTemplate").add("Id", id()).add("Arn", arn()) .add("CollaborationId", collaborationId()).add("CollaborationArn", collaborationArn()) .add("Description", description()).add("CreatorAccountId", creatorAccountId()).add("Name", name()) .add("CreateTime", createTime()).add("UpdateTime", updateTime()).add("Schema", schema()) .add("Format", formatAsString()).add("Source", source() == null ? null : "*** Sensitive Data Redacted ***") .add("AnalysisParameters", analysisParameters() == null ? null : "*** Sensitive Data Redacted ***") .add("Validations", hasValidations() ? validations() : null).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "id": return Optional.ofNullable(clazz.cast(id())); case "arn": return Optional.ofNullable(clazz.cast(arn())); case "collaborationId": return Optional.ofNullable(clazz.cast(collaborationId())); case "collaborationArn": return Optional.ofNullable(clazz.cast(collaborationArn())); case "description": return Optional.ofNullable(clazz.cast(description())); case "creatorAccountId": return Optional.ofNullable(clazz.cast(creatorAccountId())); case "name": return Optional.ofNullable(clazz.cast(name())); case "createTime": return Optional.ofNullable(clazz.cast(createTime())); case "updateTime": return Optional.ofNullable(clazz.cast(updateTime())); case "schema": return Optional.ofNullable(clazz.cast(schema())); case "format": return Optional.ofNullable(clazz.cast(formatAsString())); case "source": return Optional.ofNullable(clazz.cast(source())); case "analysisParameters": return Optional.ofNullable(clazz.cast(analysisParameters())); case "validations": return Optional.ofNullable(clazz.cast(validations())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((CollaborationAnalysisTemplate) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The identifier of the analysis template. *

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

* The Amazon Resource Name (ARN) of the analysis template. *

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

* A unique identifier for the collaboration that the analysis templates belong to. Currently accepts * collaboration ID. *

* * @param collaborationId * A unique identifier for the collaboration that the analysis templates belong to. Currently accepts * collaboration ID. * @return Returns a reference to this object so that method calls can be chained together. */ Builder collaborationId(String collaborationId); /** *

* The unique ARN for the analysis template’s associated collaboration. *

* * @param collaborationArn * The unique ARN for the analysis template’s associated collaboration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder collaborationArn(String collaborationArn); /** *

* The description of the analysis template. *

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

* The identifier used to reference members of the collaboration. Currently only supports Amazon Web Services * account ID. *

* * @param creatorAccountId * The identifier used to reference members of the collaboration. Currently only supports Amazon Web * Services account ID. * @return Returns a reference to this object so that method calls can be chained together. */ Builder creatorAccountId(String creatorAccountId); /** *

* The name of the analysis template. *

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

* The time that the analysis template within a collaboration was created. *

* * @param createTime * The time that the analysis template within a collaboration was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createTime(Instant createTime); /** *

* The time that the analysis template in the collaboration was last updated. *

* * @param updateTime * The time that the analysis template in the collaboration was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ Builder updateTime(Instant updateTime); /** *

* The entire schema object. *

* * @param schema * The entire schema object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder schema(AnalysisSchema schema); /** *

* The entire schema object. *

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

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

* The format of the analysis template in the collaboration. *

* * @param format * The format of the analysis template in the collaboration. * @see AnalysisFormat * @return Returns a reference to this object so that method calls can be chained together. * @see AnalysisFormat */ Builder format(String format); /** *

* The format of the analysis template in the collaboration. *

* * @param format * The format of the analysis template in the collaboration. * @see AnalysisFormat * @return Returns a reference to this object so that method calls can be chained together. * @see AnalysisFormat */ Builder format(AnalysisFormat format); /** *

* The source of the analysis template within a collaboration. *

* * @param source * The source of the analysis template within a collaboration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder source(AnalysisSource source); /** *

* The source of the analysis template within a collaboration. *

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

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

* The analysis parameters that have been specified in the analysis template. *

* * @param analysisParameters * The analysis parameters that have been specified in the analysis template. * @return Returns a reference to this object so that method calls can be chained together. */ Builder analysisParameters(Collection analysisParameters); /** *

* The analysis parameters that have been specified in the analysis template. *

* * @param analysisParameters * The analysis parameters that have been specified in the analysis template. * @return Returns a reference to this object so that method calls can be chained together. */ Builder analysisParameters(AnalysisParameter... analysisParameters); /** *

* The analysis parameters that have been specified in the analysis template. *

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

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

* The validations that were performed. *

* * @param validations * The validations that were performed. * @return Returns a reference to this object so that method calls can be chained together. */ Builder validations(Collection validations); /** *

* The validations that were performed. *

* * @param validations * The validations that were performed. * @return Returns a reference to this object so that method calls can be chained together. */ Builder validations(AnalysisTemplateValidationStatusDetail... validations); /** *

* The validations that were performed. *

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

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.cleanrooms.model.AnalysisTemplateValidationStatusDetail.Builder#build()} * is called immediately and its result is passed to {@link * #validations(List)}. * * @param validations * a consumer that will call methods on * {@link software.amazon.awssdk.services.cleanrooms.model.AnalysisTemplateValidationStatusDetail.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #validations(java.util.Collection) */ Builder validations(Consumer... validations); } static final class BuilderImpl implements Builder { private String id; private String arn; private String collaborationId; private String collaborationArn; private String description; private String creatorAccountId; private String name; private Instant createTime; private Instant updateTime; private AnalysisSchema schema; private String format; private AnalysisSource source; private List analysisParameters = DefaultSdkAutoConstructList.getInstance(); private List validations = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(CollaborationAnalysisTemplate model) { id(model.id); arn(model.arn); collaborationId(model.collaborationId); collaborationArn(model.collaborationArn); description(model.description); creatorAccountId(model.creatorAccountId); name(model.name); createTime(model.createTime); updateTime(model.updateTime); schema(model.schema); format(model.format); source(model.source); analysisParameters(model.analysisParameters); validations(model.validations); } 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 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 String getCollaborationId() { return collaborationId; } public final void setCollaborationId(String collaborationId) { this.collaborationId = collaborationId; } @Override public final Builder collaborationId(String collaborationId) { this.collaborationId = collaborationId; return this; } public final String getCollaborationArn() { return collaborationArn; } public final void setCollaborationArn(String collaborationArn) { this.collaborationArn = collaborationArn; } @Override public final Builder collaborationArn(String collaborationArn) { this.collaborationArn = collaborationArn; 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 getCreatorAccountId() { return creatorAccountId; } public final void setCreatorAccountId(String creatorAccountId) { this.creatorAccountId = creatorAccountId; } @Override public final Builder creatorAccountId(String creatorAccountId) { this.creatorAccountId = creatorAccountId; return this; } public final String getName() { return name; } public final void setName(String name) { this.name = name; } @Override public final Builder name(String name) { this.name = name; return this; } public final Instant getCreateTime() { return createTime; } public final void setCreateTime(Instant createTime) { this.createTime = createTime; } @Override public final Builder createTime(Instant createTime) { this.createTime = createTime; return this; } public final Instant getUpdateTime() { return updateTime; } public final void setUpdateTime(Instant updateTime) { this.updateTime = updateTime; } @Override public final Builder updateTime(Instant updateTime) { this.updateTime = updateTime; return this; } public final AnalysisSchema.Builder getSchema() { return schema != null ? schema.toBuilder() : null; } public final void setSchema(AnalysisSchema.BuilderImpl schema) { this.schema = schema != null ? schema.build() : null; } @Override public final Builder schema(AnalysisSchema schema) { this.schema = schema; return this; } public final String getFormat() { return format; } public final void setFormat(String format) { this.format = format; } @Override public final Builder format(String format) { this.format = format; return this; } @Override public final Builder format(AnalysisFormat format) { this.format(format == null ? null : format.toString()); return this; } public final AnalysisSource.Builder getSource() { return source != null ? source.toBuilder() : null; } public final void setSource(AnalysisSource.BuilderImpl source) { this.source = source != null ? source.build() : null; } @Override public final Builder source(AnalysisSource source) { this.source = source; return this; } public final List getAnalysisParameters() { List result = AnalysisParameterListCopier.copyToBuilder(this.analysisParameters); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setAnalysisParameters(Collection analysisParameters) { this.analysisParameters = AnalysisParameterListCopier.copyFromBuilder(analysisParameters); } @Override public final Builder analysisParameters(Collection analysisParameters) { this.analysisParameters = AnalysisParameterListCopier.copy(analysisParameters); return this; } @Override @SafeVarargs public final Builder analysisParameters(AnalysisParameter... analysisParameters) { analysisParameters(Arrays.asList(analysisParameters)); return this; } @Override @SafeVarargs public final Builder analysisParameters(Consumer... analysisParameters) { analysisParameters(Stream.of(analysisParameters).map(c -> AnalysisParameter.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final List getValidations() { List result = AnalysisTemplateValidationStatusDetailListCopier .copyToBuilder(this.validations); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setValidations(Collection validations) { this.validations = AnalysisTemplateValidationStatusDetailListCopier.copyFromBuilder(validations); } @Override public final Builder validations(Collection validations) { this.validations = AnalysisTemplateValidationStatusDetailListCopier.copy(validations); return this; } @Override @SafeVarargs public final Builder validations(AnalysisTemplateValidationStatusDetail... validations) { validations(Arrays.asList(validations)); return this; } @Override @SafeVarargs public final Builder validations(Consumer... validations) { validations(Stream.of(validations) .map(c -> AnalysisTemplateValidationStatusDetail.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } @Override public CollaborationAnalysisTemplate build() { return new CollaborationAnalysisTemplate(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy