software.amazon.awssdk.services.fis.model.ExperimentLogConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fis Show documentation
Show all versions of fis Show documentation
The AWS Java SDK for Fis module holds the client classes that are used for
communicating with Fis.
/*
* 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.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 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;
/**
*
* Describes the configuration for experiment logging.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class ExperimentLogConfiguration implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField CLOUD_WATCH_LOGS_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO)
.memberName("cloudWatchLogsConfiguration")
.getter(getter(ExperimentLogConfiguration::cloudWatchLogsConfiguration))
.setter(setter(Builder::cloudWatchLogsConfiguration))
.constructor(ExperimentCloudWatchLogsLogConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("cloudWatchLogsConfiguration")
.build()).build();
private static final SdkField S3_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("s3Configuration")
.getter(getter(ExperimentLogConfiguration::s3Configuration)).setter(setter(Builder::s3Configuration))
.constructor(ExperimentS3LogConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("s3Configuration").build()).build();
private static final SdkField LOG_SCHEMA_VERSION_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("logSchemaVersion").getter(getter(ExperimentLogConfiguration::logSchemaVersion))
.setter(setter(Builder::logSchemaVersion))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("logSchemaVersion").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(
CLOUD_WATCH_LOGS_CONFIGURATION_FIELD, S3_CONFIGURATION_FIELD, LOG_SCHEMA_VERSION_FIELD));
private static final long serialVersionUID = 1L;
private final ExperimentCloudWatchLogsLogConfiguration cloudWatchLogsConfiguration;
private final ExperimentS3LogConfiguration s3Configuration;
private final Integer logSchemaVersion;
private ExperimentLogConfiguration(BuilderImpl builder) {
this.cloudWatchLogsConfiguration = builder.cloudWatchLogsConfiguration;
this.s3Configuration = builder.s3Configuration;
this.logSchemaVersion = builder.logSchemaVersion;
}
/**
*
* The configuration for experiment logging to Amazon CloudWatch Logs.
*
*
* @return The configuration for experiment logging to Amazon CloudWatch Logs.
*/
public final ExperimentCloudWatchLogsLogConfiguration cloudWatchLogsConfiguration() {
return cloudWatchLogsConfiguration;
}
/**
*
* The configuration for experiment logging to Amazon S3.
*
*
* @return The configuration for experiment logging to Amazon S3.
*/
public final ExperimentS3LogConfiguration s3Configuration() {
return s3Configuration;
}
/**
*
* The schema version.
*
*
* @return The schema version.
*/
public final Integer logSchemaVersion() {
return logSchemaVersion;
}
@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(cloudWatchLogsConfiguration());
hashCode = 31 * hashCode + Objects.hashCode(s3Configuration());
hashCode = 31 * hashCode + Objects.hashCode(logSchemaVersion());
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 ExperimentLogConfiguration)) {
return false;
}
ExperimentLogConfiguration other = (ExperimentLogConfiguration) obj;
return Objects.equals(cloudWatchLogsConfiguration(), other.cloudWatchLogsConfiguration())
&& Objects.equals(s3Configuration(), other.s3Configuration())
&& Objects.equals(logSchemaVersion(), other.logSchemaVersion());
}
/**
* 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("ExperimentLogConfiguration").add("CloudWatchLogsConfiguration", cloudWatchLogsConfiguration())
.add("S3Configuration", s3Configuration()).add("LogSchemaVersion", logSchemaVersion()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "cloudWatchLogsConfiguration":
return Optional.ofNullable(clazz.cast(cloudWatchLogsConfiguration()));
case "s3Configuration":
return Optional.ofNullable(clazz.cast(s3Configuration()));
case "logSchemaVersion":
return Optional.ofNullable(clazz.cast(logSchemaVersion()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy