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

com.amazonaws.services.mailmanager.model.S3Action Maven / Gradle / Ivy

Go to download

The AWS Java SDK for MailManager module holds the client classes that are used for communicating with MailManager Service

The newest version!
/*
 * Copyright 2019-2024 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 com.amazonaws.services.mailmanager.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Writes the MIME content of the email to an S3 bucket. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class S3Action implements Serializable, Cloneable, StructuredPojo { /** *

* A policy that states what to do in the case of failure. The action will fail if there are configuration errors. * For example, the specified the bucket has been deleted. *

*/ private String actionFailurePolicy; /** *

* The Amazon Resource Name (ARN) of the IAM Role to use while writing to S3. This role must have access to the * s3:PutObject, kms:Encrypt, and kms:GenerateDataKey APIs for the given bucket. *

*/ private String roleArn; /** *

* The bucket name of the S3 bucket to write to. *

*/ private String s3Bucket; /** *

* The S3 prefix to use for the write to the s3 bucket. *

*/ private String s3Prefix; /** *

* The KMS Key ID to use to encrypt the message in S3. *

*/ private String s3SseKmsKeyId; /** *

* A policy that states what to do in the case of failure. The action will fail if there are configuration errors. * For example, the specified the bucket has been deleted. *

* * @param actionFailurePolicy * A policy that states what to do in the case of failure. The action will fail if there are configuration * errors. For example, the specified the bucket has been deleted. * @see ActionFailurePolicy */ public void setActionFailurePolicy(String actionFailurePolicy) { this.actionFailurePolicy = actionFailurePolicy; } /** *

* A policy that states what to do in the case of failure. The action will fail if there are configuration errors. * For example, the specified the bucket has been deleted. *

* * @return A policy that states what to do in the case of failure. The action will fail if there are configuration * errors. For example, the specified the bucket has been deleted. * @see ActionFailurePolicy */ public String getActionFailurePolicy() { return this.actionFailurePolicy; } /** *

* A policy that states what to do in the case of failure. The action will fail if there are configuration errors. * For example, the specified the bucket has been deleted. *

* * @param actionFailurePolicy * A policy that states what to do in the case of failure. The action will fail if there are configuration * errors. For example, the specified the bucket has been deleted. * @return Returns a reference to this object so that method calls can be chained together. * @see ActionFailurePolicy */ public S3Action withActionFailurePolicy(String actionFailurePolicy) { setActionFailurePolicy(actionFailurePolicy); return this; } /** *

* A policy that states what to do in the case of failure. The action will fail if there are configuration errors. * For example, the specified the bucket has been deleted. *

* * @param actionFailurePolicy * A policy that states what to do in the case of failure. The action will fail if there are configuration * errors. For example, the specified the bucket has been deleted. * @return Returns a reference to this object so that method calls can be chained together. * @see ActionFailurePolicy */ public S3Action withActionFailurePolicy(ActionFailurePolicy actionFailurePolicy) { this.actionFailurePolicy = actionFailurePolicy.toString(); return this; } /** *

* The Amazon Resource Name (ARN) of the IAM Role to use while writing to S3. This role must have access to the * s3:PutObject, kms:Encrypt, and kms:GenerateDataKey APIs for the given bucket. *

* * @param roleArn * The Amazon Resource Name (ARN) of the IAM Role to use while writing to S3. This role must have access to * the s3:PutObject, kms:Encrypt, and kms:GenerateDataKey APIs for the given bucket. */ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** *

* The Amazon Resource Name (ARN) of the IAM Role to use while writing to S3. This role must have access to the * s3:PutObject, kms:Encrypt, and kms:GenerateDataKey APIs for the given bucket. *

* * @return The Amazon Resource Name (ARN) of the IAM Role to use while writing to S3. This role must have access to * the s3:PutObject, kms:Encrypt, and kms:GenerateDataKey APIs for the given bucket. */ public String getRoleArn() { return this.roleArn; } /** *

* The Amazon Resource Name (ARN) of the IAM Role to use while writing to S3. This role must have access to the * s3:PutObject, kms:Encrypt, and kms:GenerateDataKey APIs for the given bucket. *

* * @param roleArn * The Amazon Resource Name (ARN) of the IAM Role to use while writing to S3. This role must have access to * the s3:PutObject, kms:Encrypt, and kms:GenerateDataKey APIs for the given bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public S3Action withRoleArn(String roleArn) { setRoleArn(roleArn); return this; } /** *

* The bucket name of the S3 bucket to write to. *

* * @param s3Bucket * The bucket name of the S3 bucket to write to. */ public void setS3Bucket(String s3Bucket) { this.s3Bucket = s3Bucket; } /** *

* The bucket name of the S3 bucket to write to. *

* * @return The bucket name of the S3 bucket to write to. */ public String getS3Bucket() { return this.s3Bucket; } /** *

* The bucket name of the S3 bucket to write to. *

* * @param s3Bucket * The bucket name of the S3 bucket to write to. * @return Returns a reference to this object so that method calls can be chained together. */ public S3Action withS3Bucket(String s3Bucket) { setS3Bucket(s3Bucket); return this; } /** *

* The S3 prefix to use for the write to the s3 bucket. *

* * @param s3Prefix * The S3 prefix to use for the write to the s3 bucket. */ public void setS3Prefix(String s3Prefix) { this.s3Prefix = s3Prefix; } /** *

* The S3 prefix to use for the write to the s3 bucket. *

* * @return The S3 prefix to use for the write to the s3 bucket. */ public String getS3Prefix() { return this.s3Prefix; } /** *

* The S3 prefix to use for the write to the s3 bucket. *

* * @param s3Prefix * The S3 prefix to use for the write to the s3 bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public S3Action withS3Prefix(String s3Prefix) { setS3Prefix(s3Prefix); return this; } /** *

* The KMS Key ID to use to encrypt the message in S3. *

* * @param s3SseKmsKeyId * The KMS Key ID to use to encrypt the message in S3. */ public void setS3SseKmsKeyId(String s3SseKmsKeyId) { this.s3SseKmsKeyId = s3SseKmsKeyId; } /** *

* The KMS Key ID to use to encrypt the message in S3. *

* * @return The KMS Key ID to use to encrypt the message in S3. */ public String getS3SseKmsKeyId() { return this.s3SseKmsKeyId; } /** *

* The KMS Key ID to use to encrypt the message in S3. *

* * @param s3SseKmsKeyId * The KMS Key ID to use to encrypt the message in S3. * @return Returns a reference to this object so that method calls can be chained together. */ public S3Action withS3SseKmsKeyId(String s3SseKmsKeyId) { setS3SseKmsKeyId(s3SseKmsKeyId); return this; } /** * 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getActionFailurePolicy() != null) sb.append("ActionFailurePolicy: ").append(getActionFailurePolicy()).append(","); if (getRoleArn() != null) sb.append("RoleArn: ").append(getRoleArn()).append(","); if (getS3Bucket() != null) sb.append("S3Bucket: ").append(getS3Bucket()).append(","); if (getS3Prefix() != null) sb.append("S3Prefix: ").append(getS3Prefix()).append(","); if (getS3SseKmsKeyId() != null) sb.append("S3SseKmsKeyId: ").append(getS3SseKmsKeyId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof S3Action == false) return false; S3Action other = (S3Action) obj; if (other.getActionFailurePolicy() == null ^ this.getActionFailurePolicy() == null) return false; if (other.getActionFailurePolicy() != null && other.getActionFailurePolicy().equals(this.getActionFailurePolicy()) == false) return false; if (other.getRoleArn() == null ^ this.getRoleArn() == null) return false; if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false) return false; if (other.getS3Bucket() == null ^ this.getS3Bucket() == null) return false; if (other.getS3Bucket() != null && other.getS3Bucket().equals(this.getS3Bucket()) == false) return false; if (other.getS3Prefix() == null ^ this.getS3Prefix() == null) return false; if (other.getS3Prefix() != null && other.getS3Prefix().equals(this.getS3Prefix()) == false) return false; if (other.getS3SseKmsKeyId() == null ^ this.getS3SseKmsKeyId() == null) return false; if (other.getS3SseKmsKeyId() != null && other.getS3SseKmsKeyId().equals(this.getS3SseKmsKeyId()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getActionFailurePolicy() == null) ? 0 : getActionFailurePolicy().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); hashCode = prime * hashCode + ((getS3Bucket() == null) ? 0 : getS3Bucket().hashCode()); hashCode = prime * hashCode + ((getS3Prefix() == null) ? 0 : getS3Prefix().hashCode()); hashCode = prime * hashCode + ((getS3SseKmsKeyId() == null) ? 0 : getS3SseKmsKeyId().hashCode()); return hashCode; } @Override public S3Action clone() { try { return (S3Action) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.mailmanager.model.transform.S3ActionMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy