/* * 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.redshiftserverless.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 CreateSnapshotRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The namespace to create a snapshot for. *
*/ private String namespaceName; /** ** How long to retain the created snapshot. *
*/ private Integer retentionPeriod; /** ** The name of the snapshot. *
*/ private String snapshotName; /** ** An array of Tag * objects to associate with the snapshot. *
*/ private java.util.List* The namespace to create a snapshot for. *
* * @param namespaceName * The namespace to create a snapshot for. */ public void setNamespaceName(String namespaceName) { this.namespaceName = namespaceName; } /** ** The namespace to create a snapshot for. *
* * @return The namespace to create a snapshot for. */ public String getNamespaceName() { return this.namespaceName; } /** ** The namespace to create a snapshot for. *
* * @param namespaceName * The namespace to create a snapshot for. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSnapshotRequest withNamespaceName(String namespaceName) { setNamespaceName(namespaceName); return this; } /** ** How long to retain the created snapshot. *
* * @param retentionPeriod * How long to retain the created snapshot. */ public void setRetentionPeriod(Integer retentionPeriod) { this.retentionPeriod = retentionPeriod; } /** ** How long to retain the created snapshot. *
* * @return How long to retain the created snapshot. */ public Integer getRetentionPeriod() { return this.retentionPeriod; } /** ** How long to retain the created snapshot. *
* * @param retentionPeriod * How long to retain the created snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSnapshotRequest withRetentionPeriod(Integer retentionPeriod) { setRetentionPeriod(retentionPeriod); return this; } /** ** The name of the snapshot. *
* * @param snapshotName * The name of the snapshot. */ public void setSnapshotName(String snapshotName) { this.snapshotName = snapshotName; } /** ** The name of the snapshot. *
* * @return The name of the snapshot. */ public String getSnapshotName() { return this.snapshotName; } /** ** The name of the snapshot. *
* * @param snapshotName * The name of the snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSnapshotRequest withSnapshotName(String snapshotName) { setSnapshotName(snapshotName); return this; } /** ** An array of Tag * objects to associate with the snapshot. *
* * @return An array of Tag objects * to associate with the snapshot. */ public java.util.List* An array of Tag * objects to associate with the snapshot. *
* * @param tags * An array of Tag * objects to associate with the snapshot. */ public void setTags(java.util.Collection* An array of Tag * objects to associate with the snapshot. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * An array of Tag * objects to associate with the snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSnapshotRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* An array of Tag * objects to associate with the snapshot. *
* * @param tags * An array of Tag * objects to associate with the snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSnapshotRequest withTags(java.util.Collection