
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 extends Builder> 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
© 2015 - 2025 Weber Informatics LLC | Privacy Policy