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

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

/*
 * Copyright 2012-2017 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.util.Objects;
import java.util.Optional;
import java.util.function.Consumer;
import javax.annotation.Generated;
import software.amazon.awssdk.core.AwsRequestOverrideConfig;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Represents a request to set the position of a receipt rule in a receipt rule set. You use receipt rule sets to * receive email with Amazon SES. For more information, see the Amazon SES Developer * Guide. *

*/ @Generated("software.amazon.awssdk:codegen") public class SetReceiptRulePositionRequest extends SESRequest implements ToCopyableBuilder { private final String ruleSetName; private final String ruleName; private final String after; private SetReceiptRulePositionRequest(BuilderImpl builder) { super(builder); this.ruleSetName = builder.ruleSetName; this.ruleName = builder.ruleName; this.after = builder.after; } /** *

* The name of the receipt rule set that contains the receipt rule to reposition. *

* * @return The name of the receipt rule set that contains the receipt rule to reposition. */ public String ruleSetName() { return ruleSetName; } /** *

* The name of the receipt rule to reposition. *

* * @return The name of the receipt rule to reposition. */ public String ruleName() { return ruleName; } /** *

* The name of the receipt rule after which to place the specified receipt rule. *

* * @return The name of the receipt rule after which to place the specified receipt rule. */ public String after() { return after; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(ruleSetName()); hashCode = 31 * hashCode + Objects.hashCode(ruleName()); hashCode = 31 * hashCode + Objects.hashCode(after()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof SetReceiptRulePositionRequest)) { return false; } SetReceiptRulePositionRequest other = (SetReceiptRulePositionRequest) obj; return Objects.equals(ruleSetName(), other.ruleSetName()) && Objects.equals(ruleName(), other.ruleName()) && Objects.equals(after(), other.after()); } @Override public String toString() { StringBuilder sb = new StringBuilder("{"); if (ruleSetName() != null) { sb.append("RuleSetName: ").append(ruleSetName()).append(","); } if (ruleName() != null) { sb.append("RuleName: ").append(ruleName()).append(","); } if (after() != null) { sb.append("After: ").append(after()).append(","); } if (sb.length() > 1) { sb.setLength(sb.length() - 1); } sb.append("}"); return sb.toString(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "RuleSetName": return Optional.of(clazz.cast(ruleSetName())); case "RuleName": return Optional.of(clazz.cast(ruleName())); case "After": return Optional.of(clazz.cast(after())); default: return Optional.empty(); } } public interface Builder extends SESRequest.Builder, CopyableBuilder { /** *

* The name of the receipt rule set that contains the receipt rule to reposition. *

* * @param ruleSetName * The name of the receipt rule set that contains the receipt rule to reposition. * @return Returns a reference to this object so that method calls can be chained together. */ Builder ruleSetName(String ruleSetName); /** *

* The name of the receipt rule to reposition. *

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

* The name of the receipt rule after which to place the specified receipt rule. *

* * @param after * The name of the receipt rule after which to place the specified receipt rule. * @return Returns a reference to this object so that method calls can be chained together. */ Builder after(String after); @Override Builder requestOverrideConfig(AwsRequestOverrideConfig awsRequestOverrideConfig); } static final class BuilderImpl extends SESRequest.BuilderImpl implements Builder { private String ruleSetName; private String ruleName; private String after; private BuilderImpl() { } private BuilderImpl(SetReceiptRulePositionRequest model) { ruleSetName(model.ruleSetName); ruleName(model.ruleName); after(model.after); } public final String getRuleSetName() { return ruleSetName; } @Override public final Builder ruleSetName(String ruleSetName) { this.ruleSetName = ruleSetName; return this; } public final void setRuleSetName(String ruleSetName) { this.ruleSetName = ruleSetName; } public final String getRuleName() { return ruleName; } @Override public final Builder ruleName(String ruleName) { this.ruleName = ruleName; return this; } public final void setRuleName(String ruleName) { this.ruleName = ruleName; } public final String getAfter() { return after; } @Override public final Builder after(String after) { this.after = after; return this; } public final void setAfter(String after) { this.after = after; } @Override public Builder requestOverrideConfig(AwsRequestOverrideConfig awsRequestOverrideConfig) { super.requestOverrideConfig(awsRequestOverrideConfig); return this; } @Override public Builder requestOverrideConfig(Consumer builderConsumer) { super.requestOverrideConfig(builderConsumer); return this; } @Override public SetReceiptRulePositionRequest build() { return new SetReceiptRulePositionRequest(this); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy