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

software.amazon.awssdk.services.ses.model.ReputationOptions Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.29.39
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.ses.model;

import java.io.Serializable;
import java.time.Instant;
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.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;

/**
 * 

* Contains information about the reputation settings for a configuration set. *

*/ @Generated("software.amazon.awssdk:codegen") public final class ReputationOptions implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField SENDING_ENABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("SendingEnabled").getter(getter(ReputationOptions::sendingEnabled)) .setter(setter(Builder::sendingEnabled)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SendingEnabled").build()).build(); private static final SdkField REPUTATION_METRICS_ENABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("ReputationMetricsEnabled").getter(getter(ReputationOptions::reputationMetricsEnabled)) .setter(setter(Builder::reputationMetricsEnabled)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReputationMetricsEnabled").build()) .build(); private static final SdkField LAST_FRESH_START_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("LastFreshStart").getter(getter(ReputationOptions::lastFreshStart)) .setter(setter(Builder::lastFreshStart)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastFreshStart").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(SENDING_ENABLED_FIELD, REPUTATION_METRICS_ENABLED_FIELD, LAST_FRESH_START_FIELD)); private static final long serialVersionUID = 1L; private final Boolean sendingEnabled; private final Boolean reputationMetricsEnabled; private final Instant lastFreshStart; private ReputationOptions(BuilderImpl builder) { this.sendingEnabled = builder.sendingEnabled; this.reputationMetricsEnabled = builder.reputationMetricsEnabled; this.lastFreshStart = builder.lastFreshStart; } /** *

* Describes whether email sending is enabled or disabled for the configuration set. If the value is * true, then Amazon SES will send emails that use the configuration set. If the value is * false, Amazon SES will not send emails that use the configuration set. The default value is * true. You can change this setting using UpdateConfigurationSetSendingEnabled. *

* * @return Describes whether email sending is enabled or disabled for the configuration set. If the value is * true, then Amazon SES will send emails that use the configuration set. If the value is * false, Amazon SES will not send emails that use the configuration set. The default value is * true. You can change this setting using UpdateConfigurationSetSendingEnabled. */ public final Boolean sendingEnabled() { return sendingEnabled; } /** *

* Describes whether or not Amazon SES publishes reputation metrics for the configuration set, such as bounce and * complaint rates, to Amazon CloudWatch. *

*

* If the value is true, reputation metrics are published. If the value is false, * reputation metrics are not published. The default value is false. *

* * @return Describes whether or not Amazon SES publishes reputation metrics for the configuration set, such as * bounce and complaint rates, to Amazon CloudWatch.

*

* If the value is true, reputation metrics are published. If the value is false, * reputation metrics are not published. The default value is false. */ public final Boolean reputationMetricsEnabled() { return reputationMetricsEnabled; } /** *

* The date and time at which the reputation metrics for the configuration set were last reset. Resetting these * metrics is known as a fresh start. *

*

* When you disable email sending for a configuration set using UpdateConfigurationSetSendingEnabled and * later re-enable it, the reputation metrics for the configuration set (but not for the entire Amazon SES account) * are reset. *

*

* If email sending for the configuration set has never been disabled and later re-enabled, the value of this * attribute is null. *

* * @return The date and time at which the reputation metrics for the configuration set were last reset. Resetting * these metrics is known as a fresh start.

*

* When you disable email sending for a configuration set using UpdateConfigurationSetSendingEnabled * and later re-enable it, the reputation metrics for the configuration set (but not for the entire Amazon * SES account) are reset. *

*

* If email sending for the configuration set has never been disabled and later re-enabled, the value of * this attribute is null. */ public final Instant lastFreshStart() { return lastFreshStart; } @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(sendingEnabled()); hashCode = 31 * hashCode + Objects.hashCode(reputationMetricsEnabled()); hashCode = 31 * hashCode + Objects.hashCode(lastFreshStart()); 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 ReputationOptions)) { return false; } ReputationOptions other = (ReputationOptions) obj; return Objects.equals(sendingEnabled(), other.sendingEnabled()) && Objects.equals(reputationMetricsEnabled(), other.reputationMetricsEnabled()) && Objects.equals(lastFreshStart(), other.lastFreshStart()); } /** * 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("ReputationOptions").add("SendingEnabled", sendingEnabled()) .add("ReputationMetricsEnabled", reputationMetricsEnabled()).add("LastFreshStart", lastFreshStart()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "SendingEnabled": return Optional.ofNullable(clazz.cast(sendingEnabled())); case "ReputationMetricsEnabled": return Optional.ofNullable(clazz.cast(reputationMetricsEnabled())); case "LastFreshStart": return Optional.ofNullable(clazz.cast(lastFreshStart())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((ReputationOptions) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* Describes whether email sending is enabled or disabled for the configuration set. If the value is * true, then Amazon SES will send emails that use the configuration set. If the value is * false, Amazon SES will not send emails that use the configuration set. The default value is * true. You can change this setting using UpdateConfigurationSetSendingEnabled. *

* * @param sendingEnabled * Describes whether email sending is enabled or disabled for the configuration set. If the value is * true, then Amazon SES will send emails that use the configuration set. If the value is * false, Amazon SES will not send emails that use the configuration set. The default value * is true. You can change this setting using UpdateConfigurationSetSendingEnabled. * @return Returns a reference to this object so that method calls can be chained together. */ Builder sendingEnabled(Boolean sendingEnabled); /** *

* Describes whether or not Amazon SES publishes reputation metrics for the configuration set, such as bounce * and complaint rates, to Amazon CloudWatch. *

*

* If the value is true, reputation metrics are published. If the value is false, * reputation metrics are not published. The default value is false. *

* * @param reputationMetricsEnabled * Describes whether or not Amazon SES publishes reputation metrics for the configuration set, such as * bounce and complaint rates, to Amazon CloudWatch.

*

* If the value is true, reputation metrics are published. If the value is * false, reputation metrics are not published. The default value is false. * @return Returns a reference to this object so that method calls can be chained together. */ Builder reputationMetricsEnabled(Boolean reputationMetricsEnabled); /** *

* The date and time at which the reputation metrics for the configuration set were last reset. Resetting these * metrics is known as a fresh start. *

*

* When you disable email sending for a configuration set using UpdateConfigurationSetSendingEnabled and * later re-enable it, the reputation metrics for the configuration set (but not for the entire Amazon SES * account) are reset. *

*

* If email sending for the configuration set has never been disabled and later re-enabled, the value of this * attribute is null. *

* * @param lastFreshStart * The date and time at which the reputation metrics for the configuration set were last reset. Resetting * these metrics is known as a fresh start.

*

* When you disable email sending for a configuration set using * UpdateConfigurationSetSendingEnabled and later re-enable it, the reputation metrics for the * configuration set (but not for the entire Amazon SES account) are reset. *

*

* If email sending for the configuration set has never been disabled and later re-enabled, the value of * this attribute is null. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastFreshStart(Instant lastFreshStart); } static final class BuilderImpl implements Builder { private Boolean sendingEnabled; private Boolean reputationMetricsEnabled; private Instant lastFreshStart; private BuilderImpl() { } private BuilderImpl(ReputationOptions model) { sendingEnabled(model.sendingEnabled); reputationMetricsEnabled(model.reputationMetricsEnabled); lastFreshStart(model.lastFreshStart); } public final Boolean getSendingEnabled() { return sendingEnabled; } @Override public final Builder sendingEnabled(Boolean sendingEnabled) { this.sendingEnabled = sendingEnabled; return this; } public final void setSendingEnabled(Boolean sendingEnabled) { this.sendingEnabled = sendingEnabled; } public final Boolean getReputationMetricsEnabled() { return reputationMetricsEnabled; } @Override public final Builder reputationMetricsEnabled(Boolean reputationMetricsEnabled) { this.reputationMetricsEnabled = reputationMetricsEnabled; return this; } public final void setReputationMetricsEnabled(Boolean reputationMetricsEnabled) { this.reputationMetricsEnabled = reputationMetricsEnabled; } public final Instant getLastFreshStart() { return lastFreshStart; } @Override public final Builder lastFreshStart(Instant lastFreshStart) { this.lastFreshStart = lastFreshStart; return this; } public final void setLastFreshStart(Instant lastFreshStart) { this.lastFreshStart = lastFreshStart; } @Override public ReputationOptions build() { return new ReputationOptions(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy