/* * Copyright 2018-2023 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.qldb.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* The Amazon Simple Storage Service (Amazon S3) bucket location in which a journal export job writes the journal * contents. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class S3ExportConfiguration implements Serializable, Cloneable, StructuredPojo { /** ** The Amazon S3 bucket name in which a journal export job writes the journal contents. *
** The bucket name must comply with the Amazon S3 bucket naming conventions. For more information, see Bucket Restrictions and * Limitations in the Amazon S3 Developer Guide. *
*/ private String bucket; /** ** The prefix for the Amazon S3 bucket in which a journal export job writes the journal contents. *
** The prefix must comply with Amazon S3 key naming rules and restrictions. For more information, see Object Key and Metadata in the * Amazon S3 Developer Guide. *
*
* The following are examples of valid Prefix
values:
*
* JournalExports-ForMyLedger/Testing/
*
* JournalExports
*
* My:Tests/
*
* The encryption settings that are used by a journal export job to write data in an Amazon S3 bucket. *
*/ private S3EncryptionConfiguration encryptionConfiguration; /** ** The Amazon S3 bucket name in which a journal export job writes the journal contents. *
** The bucket name must comply with the Amazon S3 bucket naming conventions. For more information, see Bucket Restrictions and * Limitations in the Amazon S3 Developer Guide. *
* * @param bucket * The Amazon S3 bucket name in which a journal export job writes the journal contents. ** The bucket name must comply with the Amazon S3 bucket naming conventions. For more information, see Bucket Restrictions and * Limitations in the Amazon S3 Developer Guide. */ public void setBucket(String bucket) { this.bucket = bucket; } /** *
* The Amazon S3 bucket name in which a journal export job writes the journal contents. *
** The bucket name must comply with the Amazon S3 bucket naming conventions. For more information, see Bucket Restrictions and * Limitations in the Amazon S3 Developer Guide. *
* * @return The Amazon S3 bucket name in which a journal export job writes the journal contents. ** The bucket name must comply with the Amazon S3 bucket naming conventions. For more information, see Bucket Restrictions and * Limitations in the Amazon S3 Developer Guide. */ public String getBucket() { return this.bucket; } /** *
* The Amazon S3 bucket name in which a journal export job writes the journal contents. *
** The bucket name must comply with the Amazon S3 bucket naming conventions. For more information, see Bucket Restrictions and * Limitations in the Amazon S3 Developer Guide. *
* * @param bucket * The Amazon S3 bucket name in which a journal export job writes the journal contents. ** The bucket name must comply with the Amazon S3 bucket naming conventions. For more information, see Bucket Restrictions and * Limitations in the Amazon S3 Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public S3ExportConfiguration withBucket(String bucket) { setBucket(bucket); return this; } /** *
* The prefix for the Amazon S3 bucket in which a journal export job writes the journal contents. *
** The prefix must comply with Amazon S3 key naming rules and restrictions. For more information, see Object Key and Metadata in the * Amazon S3 Developer Guide. *
*
* The following are examples of valid Prefix
values:
*
* JournalExports-ForMyLedger/Testing/
*
* JournalExports
*
* My:Tests/
*
* The prefix must comply with Amazon S3 key naming rules and restrictions. For more information, see Object Key and Metadata in * the Amazon S3 Developer Guide. *
*
* The following are examples of valid Prefix
values:
*
* JournalExports-ForMyLedger/Testing/
*
* JournalExports
*
* My:Tests/
*
* The prefix for the Amazon S3 bucket in which a journal export job writes the journal contents. *
** The prefix must comply with Amazon S3 key naming rules and restrictions. For more information, see Object Key and Metadata in the * Amazon S3 Developer Guide. *
*
* The following are examples of valid Prefix
values:
*
* JournalExports-ForMyLedger/Testing/
*
* JournalExports
*
* My:Tests/
*
* The prefix must comply with Amazon S3 key naming rules and restrictions. For more information, see Object Key and Metadata in * the Amazon S3 Developer Guide. *
*
* The following are examples of valid Prefix
values:
*
* JournalExports-ForMyLedger/Testing/
*
* JournalExports
*
* My:Tests/
*
* The prefix for the Amazon S3 bucket in which a journal export job writes the journal contents. *
** The prefix must comply with Amazon S3 key naming rules and restrictions. For more information, see Object Key and Metadata in the * Amazon S3 Developer Guide. *
*
* The following are examples of valid Prefix
values:
*
* JournalExports-ForMyLedger/Testing/
*
* JournalExports
*
* My:Tests/
*
* The prefix must comply with Amazon S3 key naming rules and restrictions. For more information, see Object Key and Metadata in * the Amazon S3 Developer Guide. *
*
* The following are examples of valid Prefix
values:
*
* JournalExports-ForMyLedger/Testing/
*
* JournalExports
*
* My:Tests/
*
* The encryption settings that are used by a journal export job to write data in an Amazon S3 bucket. *
* * @param encryptionConfiguration * The encryption settings that are used by a journal export job to write data in an Amazon S3 bucket. */ public void setEncryptionConfiguration(S3EncryptionConfiguration encryptionConfiguration) { this.encryptionConfiguration = encryptionConfiguration; } /** ** The encryption settings that are used by a journal export job to write data in an Amazon S3 bucket. *
* * @return The encryption settings that are used by a journal export job to write data in an Amazon S3 bucket. */ public S3EncryptionConfiguration getEncryptionConfiguration() { return this.encryptionConfiguration; } /** ** The encryption settings that are used by a journal export job to write data in an Amazon S3 bucket. *
* * @param encryptionConfiguration * The encryption settings that are used by a journal export job to write data in an Amazon S3 bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public S3ExportConfiguration withEncryptionConfiguration(S3EncryptionConfiguration encryptionConfiguration) { setEncryptionConfiguration(encryptionConfiguration); 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 (getBucket() != null) sb.append("Bucket: ").append(getBucket()).append(","); if (getPrefix() != null) sb.append("Prefix: ").append(getPrefix()).append(","); if (getEncryptionConfiguration() != null) sb.append("EncryptionConfiguration: ").append(getEncryptionConfiguration()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof S3ExportConfiguration == false) return false; S3ExportConfiguration other = (S3ExportConfiguration) obj; if (other.getBucket() == null ^ this.getBucket() == null) return false; if (other.getBucket() != null && other.getBucket().equals(this.getBucket()) == false) return false; if (other.getPrefix() == null ^ this.getPrefix() == null) return false; if (other.getPrefix() != null && other.getPrefix().equals(this.getPrefix()) == false) return false; if (other.getEncryptionConfiguration() == null ^ this.getEncryptionConfiguration() == null) return false; if (other.getEncryptionConfiguration() != null && other.getEncryptionConfiguration().equals(this.getEncryptionConfiguration()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBucket() == null) ? 0 : getBucket().hashCode()); hashCode = prime * hashCode + ((getPrefix() == null) ? 0 : getPrefix().hashCode()); hashCode = prime * hashCode + ((getEncryptionConfiguration() == null) ? 0 : getEncryptionConfiguration().hashCode()); return hashCode; } @Override public S3ExportConfiguration clone() { try { return (S3ExportConfiguration) 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.qldb.model.transform.S3ExportConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }