/* * Copyright 2010-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.connect.model; import java.io.Serializable; /** *

* Information about the Amazon Simple Storage Service (Amazon S3) storage type. *

*/ public class S3Config implements Serializable { /** *

* The S3 bucket name. *

*

* Constraints:
* Length: 1 - 128
*/ private String bucketName; /** *

* The S3 bucket prefix. *

*

* Constraints:
* Length: 1 - 128
*/ private String bucketPrefix; /** *

* The Amazon S3 encryption configuration. *

*/ private EncryptionConfig encryptionConfig; /** *

* The S3 bucket name. *

*

* Constraints:
* Length: 1 - 128
* * @return

* The S3 bucket name. *

*/ public String getBucketName() { return bucketName; } /** *

* The S3 bucket name. *

*

* Constraints:
* Length: 1 - 128
* * @param bucketName

* The S3 bucket name. *

*/ public void setBucketName(String bucketName) { this.bucketName = bucketName; } /** *

* The S3 bucket name. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 128
* * @param bucketName

* The S3 bucket name. *

* @return A reference to this updated object so that method calls can be * chained together. */ public S3Config withBucketName(String bucketName) { this.bucketName = bucketName; return this; } /** *

* The S3 bucket prefix. *

*

* Constraints:
* Length: 1 - 128
* * @return

* The S3 bucket prefix. *

*/ public String getBucketPrefix() { return bucketPrefix; } /** *

* The S3 bucket prefix. *

*

* Constraints:
* Length: 1 - 128
* * @param bucketPrefix

* The S3 bucket prefix. *

*/ public void setBucketPrefix(String bucketPrefix) { this.bucketPrefix = bucketPrefix; } /** *

* The S3 bucket prefix. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 128
* * @param bucketPrefix

* The S3 bucket prefix. *

* @return A reference to this updated object so that method calls can be * chained together. */ public S3Config withBucketPrefix(String bucketPrefix) { this.bucketPrefix = bucketPrefix; return this; } /** *

* The Amazon S3 encryption configuration. *

* * @return

* The Amazon S3 encryption configuration. *

*/ public EncryptionConfig getEncryptionConfig() { return encryptionConfig; } /** *

* The Amazon S3 encryption configuration. *

* * @param encryptionConfig

* The Amazon S3 encryption configuration. *

*/ public void setEncryptionConfig(EncryptionConfig encryptionConfig) { this.encryptionConfig = encryptionConfig; } /** *

* The Amazon S3 encryption configuration. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param encryptionConfig

* The Amazon S3 encryption configuration. *

* @return A reference to this updated object so that method calls can be * chained together. */ public S3Config withEncryptionConfig(EncryptionConfig encryptionConfig) { this.encryptionConfig = encryptionConfig; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getBucketName() != null) sb.append("BucketName: " + getBucketName() + ","); if (getBucketPrefix() != null) sb.append("BucketPrefix: " + getBucketPrefix() + ","); if (getEncryptionConfig() != null) sb.append("EncryptionConfig: " + getEncryptionConfig()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBucketName() == null) ? 0 : getBucketName().hashCode()); hashCode = prime * hashCode + ((getBucketPrefix() == null) ? 0 : getBucketPrefix().hashCode()); hashCode = prime * hashCode + ((getEncryptionConfig() == null) ? 0 : getEncryptionConfig().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof S3Config == false) return false; S3Config other = (S3Config) obj; if (other.getBucketName() == null ^ this.getBucketName() == null) return false; if (other.getBucketName() != null && other.getBucketName().equals(this.getBucketName()) == false) return false; if (other.getBucketPrefix() == null ^ this.getBucketPrefix() == null) return false; if (other.getBucketPrefix() != null && other.getBucketPrefix().equals(this.getBucketPrefix()) == false) return false; if (other.getEncryptionConfig() == null ^ this.getEncryptionConfig() == null) return false; if (other.getEncryptionConfig() != null && other.getEncryptionConfig().equals(this.getEncryptionConfig()) == false) return false; return true; } }