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

software.amazon.awssdk.services.fis.model.UpdateExperimentTemplateReportConfigurationInput Maven / Gradle / Ivy

/*
 * 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.fis.model;

import java.io.Serializable;
import java.util.Arrays;
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 software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Specifies the input for the experiment report configuration. *

*/ @Generated("software.amazon.awssdk:codegen") public final class UpdateExperimentTemplateReportConfigurationInput implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField OUTPUTS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("outputs") .getter(getter(UpdateExperimentTemplateReportConfigurationInput::outputs)).setter(setter(Builder::outputs)) .constructor(ExperimentTemplateReportConfigurationOutputsInput::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("outputs").build()).build(); private static final SdkField DATA_SOURCES_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("dataSources") .getter(getter(UpdateExperimentTemplateReportConfigurationInput::dataSources)).setter(setter(Builder::dataSources)) .constructor(ExperimentTemplateReportConfigurationDataSourcesInput::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dataSources").build()).build(); private static final SdkField PRE_EXPERIMENT_DURATION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("preExperimentDuration") .getter(getter(UpdateExperimentTemplateReportConfigurationInput::preExperimentDuration)) .setter(setter(Builder::preExperimentDuration)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("preExperimentDuration").build()) .build(); private static final SdkField POST_EXPERIMENT_DURATION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("postExperimentDuration") .getter(getter(UpdateExperimentTemplateReportConfigurationInput::postExperimentDuration)) .setter(setter(Builder::postExperimentDuration)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("postExperimentDuration").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(OUTPUTS_FIELD, DATA_SOURCES_FIELD, PRE_EXPERIMENT_DURATION_FIELD, POST_EXPERIMENT_DURATION_FIELD)); private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer(); private static final long serialVersionUID = 1L; private final ExperimentTemplateReportConfigurationOutputsInput outputs; private final ExperimentTemplateReportConfigurationDataSourcesInput dataSources; private final String preExperimentDuration; private final String postExperimentDuration; private UpdateExperimentTemplateReportConfigurationInput(BuilderImpl builder) { this.outputs = builder.outputs; this.dataSources = builder.dataSources; this.preExperimentDuration = builder.preExperimentDuration; this.postExperimentDuration = builder.postExperimentDuration; } /** *

* Describes the output destinations of the experiment report. *

* * @return Describes the output destinations of the experiment report. */ public final ExperimentTemplateReportConfigurationOutputsInput outputs() { return outputs; } /** *

* The data sources for the experiment report. *

* * @return The data sources for the experiment report. */ public final ExperimentTemplateReportConfigurationDataSourcesInput dataSources() { return dataSources; } /** *

* The duration before the experiment start time for the data sources to include in the report. *

* * @return The duration before the experiment start time for the data sources to include in the report. */ public final String preExperimentDuration() { return preExperimentDuration; } /** *

* The duration after the experiment end time for the data sources to include in the report. *

* * @return The duration after the experiment end time for the data sources to include in the report. */ public final String postExperimentDuration() { return postExperimentDuration; } @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(outputs()); hashCode = 31 * hashCode + Objects.hashCode(dataSources()); hashCode = 31 * hashCode + Objects.hashCode(preExperimentDuration()); hashCode = 31 * hashCode + Objects.hashCode(postExperimentDuration()); 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 UpdateExperimentTemplateReportConfigurationInput)) { return false; } UpdateExperimentTemplateReportConfigurationInput other = (UpdateExperimentTemplateReportConfigurationInput) obj; return Objects.equals(outputs(), other.outputs()) && Objects.equals(dataSources(), other.dataSources()) && Objects.equals(preExperimentDuration(), other.preExperimentDuration()) && Objects.equals(postExperimentDuration(), other.postExperimentDuration()); } /** * 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("UpdateExperimentTemplateReportConfigurationInput").add("Outputs", outputs()) .add("DataSources", dataSources()).add("PreExperimentDuration", preExperimentDuration()) .add("PostExperimentDuration", postExperimentDuration()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "outputs": return Optional.ofNullable(clazz.cast(outputs())); case "dataSources": return Optional.ofNullable(clazz.cast(dataSources())); case "preExperimentDuration": return Optional.ofNullable(clazz.cast(preExperimentDuration())); case "postExperimentDuration": return Optional.ofNullable(clazz.cast(postExperimentDuration())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Map> memberNameToFieldInitializer() { Map> map = new HashMap<>(); map.put("outputs", OUTPUTS_FIELD); map.put("dataSources", DATA_SOURCES_FIELD); map.put("preExperimentDuration", PRE_EXPERIMENT_DURATION_FIELD); map.put("postExperimentDuration", POST_EXPERIMENT_DURATION_FIELD); return Collections.unmodifiableMap(map); } private static Function getter(Function g) { return obj -> g.apply((UpdateExperimentTemplateReportConfigurationInput) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* Describes the output destinations of the experiment report. *

* * @param outputs * Describes the output destinations of the experiment report. * @return Returns a reference to this object so that method calls can be chained together. */ Builder outputs(ExperimentTemplateReportConfigurationOutputsInput outputs); /** *

* Describes the output destinations of the experiment report. *

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

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

* The data sources for the experiment report. *

* * @param dataSources * The data sources for the experiment report. * @return Returns a reference to this object so that method calls can be chained together. */ Builder dataSources(ExperimentTemplateReportConfigurationDataSourcesInput dataSources); /** *

* The data sources for the experiment report. *

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

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

* The duration before the experiment start time for the data sources to include in the report. *

* * @param preExperimentDuration * The duration before the experiment start time for the data sources to include in the report. * @return Returns a reference to this object so that method calls can be chained together. */ Builder preExperimentDuration(String preExperimentDuration); /** *

* The duration after the experiment end time for the data sources to include in the report. *

* * @param postExperimentDuration * The duration after the experiment end time for the data sources to include in the report. * @return Returns a reference to this object so that method calls can be chained together. */ Builder postExperimentDuration(String postExperimentDuration); } static final class BuilderImpl implements Builder { private ExperimentTemplateReportConfigurationOutputsInput outputs; private ExperimentTemplateReportConfigurationDataSourcesInput dataSources; private String preExperimentDuration; private String postExperimentDuration; private BuilderImpl() { } private BuilderImpl(UpdateExperimentTemplateReportConfigurationInput model) { outputs(model.outputs); dataSources(model.dataSources); preExperimentDuration(model.preExperimentDuration); postExperimentDuration(model.postExperimentDuration); } public final ExperimentTemplateReportConfigurationOutputsInput.Builder getOutputs() { return outputs != null ? outputs.toBuilder() : null; } public final void setOutputs(ExperimentTemplateReportConfigurationOutputsInput.BuilderImpl outputs) { this.outputs = outputs != null ? outputs.build() : null; } @Override public final Builder outputs(ExperimentTemplateReportConfigurationOutputsInput outputs) { this.outputs = outputs; return this; } public final ExperimentTemplateReportConfigurationDataSourcesInput.Builder getDataSources() { return dataSources != null ? dataSources.toBuilder() : null; } public final void setDataSources(ExperimentTemplateReportConfigurationDataSourcesInput.BuilderImpl dataSources) { this.dataSources = dataSources != null ? dataSources.build() : null; } @Override public final Builder dataSources(ExperimentTemplateReportConfigurationDataSourcesInput dataSources) { this.dataSources = dataSources; return this; } public final String getPreExperimentDuration() { return preExperimentDuration; } public final void setPreExperimentDuration(String preExperimentDuration) { this.preExperimentDuration = preExperimentDuration; } @Override public final Builder preExperimentDuration(String preExperimentDuration) { this.preExperimentDuration = preExperimentDuration; return this; } public final String getPostExperimentDuration() { return postExperimentDuration; } public final void setPostExperimentDuration(String postExperimentDuration) { this.postExperimentDuration = postExperimentDuration; } @Override public final Builder postExperimentDuration(String postExperimentDuration) { this.postExperimentDuration = postExperimentDuration; return this; } @Override public UpdateExperimentTemplateReportConfigurationInput build() { return new UpdateExperimentTemplateReportConfigurationInput(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy