/* * 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; /** *
* A container for one or more replication rules. A replication configuration must have at least one rule and you can * add up to 100 rules. The maximum size of a replication configuration is 128 KB. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ReplicationConfiguration implements Serializable, Cloneable { /** ** The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that S3 on Outposts assumes when * replicating objects. For information about S3 replication on Outposts configuration, see Setting up * replication in the Amazon S3 User Guide. *
*/ private String role; /** ** A container for one or more replication rules. A replication configuration must have at least one rule and can * contain an array of 100 rules at the most. *
*/ private java.util.List* The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that S3 on Outposts assumes when * replicating objects. For information about S3 replication on Outposts configuration, see Setting up * replication in the Amazon S3 User Guide. *
* * @param role * The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that S3 on Outposts * assumes when replicating objects. For information about S3 replication on Outposts configuration, see Setting * up replication in the Amazon S3 User Guide. */ public void setRole(String role) { this.role = role; } /** ** The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that S3 on Outposts assumes when * replicating objects. For information about S3 replication on Outposts configuration, see Setting up * replication in the Amazon S3 User Guide. *
* * @return The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that S3 on Outposts * assumes when replicating objects. For information about S3 replication on Outposts configuration, see Setting * up replication in the Amazon S3 User Guide. */ public String getRole() { return this.role; } /** ** The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that S3 on Outposts assumes when * replicating objects. For information about S3 replication on Outposts configuration, see Setting up * replication in the Amazon S3 User Guide. *
* * @param role * The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that S3 on Outposts * assumes when replicating objects. For information about S3 replication on Outposts configuration, see Setting * up replication in the Amazon S3 User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplicationConfiguration withRole(String role) { setRole(role); return this; } /** ** A container for one or more replication rules. A replication configuration must have at least one rule and can * contain an array of 100 rules at the most. *
* * @return A container for one or more replication rules. A replication configuration must have at least one rule * and can contain an array of 100 rules at the most. */ public java.util.List* A container for one or more replication rules. A replication configuration must have at least one rule and can * contain an array of 100 rules at the most. *
* * @param rules * A container for one or more replication rules. A replication configuration must have at least one rule and * can contain an array of 100 rules at the most. */ public void setRules(java.util.Collection* A container for one or more replication rules. A replication configuration must have at least one rule and can * contain an array of 100 rules at the most. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setRules(java.util.Collection)} or {@link #withRules(java.util.Collection)} if you want to override the * existing values. *
* * @param rules * A container for one or more replication rules. A replication configuration must have at least one rule and * can contain an array of 100 rules at the most. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplicationConfiguration withRules(ReplicationRule... rules) { if (this.rules == null) { setRules(new java.util.ArrayList* A container for one or more replication rules. A replication configuration must have at least one rule and can * contain an array of 100 rules at the most. *
* * @param rules * A container for one or more replication rules. A replication configuration must have at least one rule and * can contain an array of 100 rules at the most. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplicationConfiguration withRules(java.util.Collection