/* * 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.s3control.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PutBucketVersioningRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The Amazon Web Services account ID of the S3 on Outposts bucket. *
*/ private String accountId; /** ** The S3 on Outposts bucket to set the versioning state for. *
*/ private String bucket; /** ** The concatenation of the authentication device's serial number, a space, and the value that is displayed on your * authentication device. *
*/ private String mFA; /** *
* The root-level tag for the VersioningConfiguration
parameters.
*
* The Amazon Web Services account ID of the S3 on Outposts bucket. *
* * @param accountId * The Amazon Web Services account ID of the S3 on Outposts bucket. */ public void setAccountId(String accountId) { this.accountId = accountId; } /** ** The Amazon Web Services account ID of the S3 on Outposts bucket. *
* * @return The Amazon Web Services account ID of the S3 on Outposts bucket. */ public String getAccountId() { return this.accountId; } /** ** The Amazon Web Services account ID of the S3 on Outposts bucket. *
* * @param accountId * The Amazon Web Services account ID of the S3 on Outposts bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public PutBucketVersioningRequest withAccountId(String accountId) { setAccountId(accountId); return this; } /** ** The S3 on Outposts bucket to set the versioning state for. *
* * @param bucket * The S3 on Outposts bucket to set the versioning state for. */ public void setBucket(String bucket) { this.bucket = bucket; } /** ** The S3 on Outposts bucket to set the versioning state for. *
* * @return The S3 on Outposts bucket to set the versioning state for. */ public String getBucket() { return this.bucket; } /** ** The S3 on Outposts bucket to set the versioning state for. *
* * @param bucket * The S3 on Outposts bucket to set the versioning state for. * @return Returns a reference to this object so that method calls can be chained together. */ public PutBucketVersioningRequest withBucket(String bucket) { setBucket(bucket); return this; } /** ** The concatenation of the authentication device's serial number, a space, and the value that is displayed on your * authentication device. *
* * @param mFA * The concatenation of the authentication device's serial number, a space, and the value that is displayed * on your authentication device. */ public void setMFA(String mFA) { this.mFA = mFA; } /** ** The concatenation of the authentication device's serial number, a space, and the value that is displayed on your * authentication device. *
* * @return The concatenation of the authentication device's serial number, a space, and the value that is displayed * on your authentication device. */ public String getMFA() { return this.mFA; } /** ** The concatenation of the authentication device's serial number, a space, and the value that is displayed on your * authentication device. *
* * @param mFA * The concatenation of the authentication device's serial number, a space, and the value that is displayed * on your authentication device. * @return Returns a reference to this object so that method calls can be chained together. */ public PutBucketVersioningRequest withMFA(String mFA) { setMFA(mFA); return this; } /** *
* The root-level tag for the VersioningConfiguration
parameters.
*
VersioningConfiguration
parameters.
*/
public void setVersioningConfiguration(VersioningConfiguration versioningConfiguration) {
this.versioningConfiguration = versioningConfiguration;
}
/**
*
* The root-level tag for the VersioningConfiguration
parameters.
*
VersioningConfiguration
parameters.
*/
public VersioningConfiguration getVersioningConfiguration() {
return this.versioningConfiguration;
}
/**
*
* The root-level tag for the VersioningConfiguration
parameters.
*
VersioningConfiguration
parameters.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutBucketVersioningRequest withVersioningConfiguration(VersioningConfiguration versioningConfiguration) {
setVersioningConfiguration(versioningConfiguration);
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 (getAccountId() != null)
sb.append("AccountId: ").append(getAccountId()).append(",");
if (getBucket() != null)
sb.append("Bucket: ").append(getBucket()).append(",");
if (getMFA() != null)
sb.append("MFA: ").append(getMFA()).append(",");
if (getVersioningConfiguration() != null)
sb.append("VersioningConfiguration: ").append(getVersioningConfiguration());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof PutBucketVersioningRequest == false)
return false;
PutBucketVersioningRequest other = (PutBucketVersioningRequest) obj;
if (other.getAccountId() == null ^ this.getAccountId() == null)
return false;
if (other.getAccountId() != null && other.getAccountId().equals(this.getAccountId()) == false)
return false;
if (other.getBucket() == null ^ this.getBucket() == null)
return false;
if (other.getBucket() != null && other.getBucket().equals(this.getBucket()) == false)
return false;
if (other.getMFA() == null ^ this.getMFA() == null)
return false;
if (other.getMFA() != null && other.getMFA().equals(this.getMFA()) == false)
return false;
if (other.getVersioningConfiguration() == null ^ this.getVersioningConfiguration() == null)
return false;
if (other.getVersioningConfiguration() != null && other.getVersioningConfiguration().equals(this.getVersioningConfiguration()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAccountId() == null) ? 0 : getAccountId().hashCode());
hashCode = prime * hashCode + ((getBucket() == null) ? 0 : getBucket().hashCode());
hashCode = prime * hashCode + ((getMFA() == null) ? 0 : getMFA().hashCode());
hashCode = prime * hashCode + ((getVersioningConfiguration() == null) ? 0 : getVersioningConfiguration().hashCode());
return hashCode;
}
@Override
public PutBucketVersioningRequest clone() {
return (PutBucketVersioningRequest) super.clone();
}
}