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

com.amazonaws.services.s3control.model.S3SetObjectRetentionOperation Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2017-2022 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;

/**
 * 

* Contains the configuration parameters for the Object Lock retention action for an S3 Batch Operations job. Batch * Operations passes every object to the underlying PutObjectRetention API. For more information, see Using S3 Object Lock retention * with S3 Batch Operations in the Amazon S3 User Guide. *

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

* Indicates if the action should be applied to objects in the Batch Operations job even if they have Object Lock * GOVERNANCE type in place. *

*/ private Boolean bypassGovernanceRetention; /** *

* Contains the Object Lock retention mode to be applied to all objects in the Batch Operations job. For more * information, see Using S3 * Object Lock retention with S3 Batch Operations in the Amazon S3 User Guide. *

*/ private S3Retention retention; /** *

* Indicates if the action should be applied to objects in the Batch Operations job even if they have Object Lock * GOVERNANCE type in place. *

* * @param bypassGovernanceRetention * Indicates if the action should be applied to objects in the Batch Operations job even if they have Object * Lock GOVERNANCE type in place. */ public void setBypassGovernanceRetention(Boolean bypassGovernanceRetention) { this.bypassGovernanceRetention = bypassGovernanceRetention; } /** *

* Indicates if the action should be applied to objects in the Batch Operations job even if they have Object Lock * GOVERNANCE type in place. *

* * @return Indicates if the action should be applied to objects in the Batch Operations job even if they have Object * Lock GOVERNANCE type in place. */ public Boolean getBypassGovernanceRetention() { return this.bypassGovernanceRetention; } /** *

* Indicates if the action should be applied to objects in the Batch Operations job even if they have Object Lock * GOVERNANCE type in place. *

* * @param bypassGovernanceRetention * Indicates if the action should be applied to objects in the Batch Operations job even if they have Object * Lock GOVERNANCE type in place. * @return Returns a reference to this object so that method calls can be chained together. */ public S3SetObjectRetentionOperation withBypassGovernanceRetention(Boolean bypassGovernanceRetention) { setBypassGovernanceRetention(bypassGovernanceRetention); return this; } /** *

* Indicates if the action should be applied to objects in the Batch Operations job even if they have Object Lock * GOVERNANCE type in place. *

* * @return Indicates if the action should be applied to objects in the Batch Operations job even if they have Object * Lock GOVERNANCE type in place. */ public Boolean isBypassGovernanceRetention() { return this.bypassGovernanceRetention; } /** *

* Contains the Object Lock retention mode to be applied to all objects in the Batch Operations job. For more * information, see Using S3 * Object Lock retention with S3 Batch Operations in the Amazon S3 User Guide. *

* * @param retention * Contains the Object Lock retention mode to be applied to all objects in the Batch Operations job. For more * information, see Using S3 Object Lock * retention with S3 Batch Operations in the Amazon S3 User Guide. */ public void setRetention(S3Retention retention) { this.retention = retention; } /** *

* Contains the Object Lock retention mode to be applied to all objects in the Batch Operations job. For more * information, see Using S3 * Object Lock retention with S3 Batch Operations in the Amazon S3 User Guide. *

* * @return Contains the Object Lock retention mode to be applied to all objects in the Batch Operations job. For * more information, see Using S3 Object Lock * retention with S3 Batch Operations in the Amazon S3 User Guide. */ public S3Retention getRetention() { return this.retention; } /** *

* Contains the Object Lock retention mode to be applied to all objects in the Batch Operations job. For more * information, see Using S3 * Object Lock retention with S3 Batch Operations in the Amazon S3 User Guide. *

* * @param retention * Contains the Object Lock retention mode to be applied to all objects in the Batch Operations job. For more * information, see Using S3 Object Lock * retention with S3 Batch Operations in the Amazon S3 User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public S3SetObjectRetentionOperation withRetention(S3Retention retention) { setRetention(retention); 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 (getBypassGovernanceRetention() != null) sb.append("BypassGovernanceRetention: ").append(getBypassGovernanceRetention()).append(","); if (getRetention() != null) sb.append("Retention: ").append(getRetention()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof S3SetObjectRetentionOperation == false) return false; S3SetObjectRetentionOperation other = (S3SetObjectRetentionOperation) obj; if (other.getBypassGovernanceRetention() == null ^ this.getBypassGovernanceRetention() == null) return false; if (other.getBypassGovernanceRetention() != null && other.getBypassGovernanceRetention().equals(this.getBypassGovernanceRetention()) == false) return false; if (other.getRetention() == null ^ this.getRetention() == null) return false; if (other.getRetention() != null && other.getRetention().equals(this.getRetention()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBypassGovernanceRetention() == null) ? 0 : getBypassGovernanceRetention().hashCode()); hashCode = prime * hashCode + ((getRetention() == null) ? 0 : getRetention().hashCode()); return hashCode; } @Override public S3SetObjectRetentionOperation clone() { try { return (S3SetObjectRetentionOperation) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy