/* * 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.sns.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** *

* Input for CreateTopic action. *

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

* The name of the topic you want to create. *

*

* Constraints: Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and * hyphens, and must be between 1 and 256 characters long. *

*

* For a FIFO (first-in-first-out) topic, the name must end with the .fifo suffix. *

*/ private String name; /** *

* A map of attributes with their corresponding values. *

*

* The following lists the names, descriptions, and values of the special request parameters that the * CreateTopic action uses: *

* *

* The following attribute applies only to server-side encryption: *

* *

* The following attributes apply only to FIFO topics: *

* */ private com.amazonaws.internal.SdkInternalMap attributes; /** *

* The list of tags to add to a new topic. *

* *

* To be able to tag a topic on creation, you must have the sns:CreateTopic and * sns:TagResource permissions. *

*
*/ private com.amazonaws.internal.SdkInternalList tags; /** *

* The body of the policy document you want to use for this topic. *

*

* You can only add one policy per topic. *

*

* The policy must be in JSON string format. *

*

* Length Constraints: Maximum length of 30,720. *

*/ private String dataProtectionPolicy; /** * Default constructor for CreateTopicRequest object. Callers should use the setter or fluent setter (with...) * methods to initialize the object after creating it. */ public CreateTopicRequest() { } /** * Constructs a new CreateTopicRequest object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param name * The name of the topic you want to create.

*

* Constraints: Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, * underscores, and hyphens, and must be between 1 and 256 characters long. *

*

* For a FIFO (first-in-first-out) topic, the name must end with the .fifo suffix. */ public CreateTopicRequest(String name) { setName(name); } /** *

* The name of the topic you want to create. *

*

* Constraints: Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and * hyphens, and must be between 1 and 256 characters long. *

*

* For a FIFO (first-in-first-out) topic, the name must end with the .fifo suffix. *

* * @param name * The name of the topic you want to create.

*

* Constraints: Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, * underscores, and hyphens, and must be between 1 and 256 characters long. *

*

* For a FIFO (first-in-first-out) topic, the name must end with the .fifo suffix. */ public void setName(String name) { this.name = name; } /** *

* The name of the topic you want to create. *

*

* Constraints: Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and * hyphens, and must be between 1 and 256 characters long. *

*

* For a FIFO (first-in-first-out) topic, the name must end with the .fifo suffix. *

* * @return The name of the topic you want to create.

*

* Constraints: Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, * underscores, and hyphens, and must be between 1 and 256 characters long. *

*

* For a FIFO (first-in-first-out) topic, the name must end with the .fifo suffix. */ public String getName() { return this.name; } /** *

* The name of the topic you want to create. *

*

* Constraints: Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and * hyphens, and must be between 1 and 256 characters long. *

*

* For a FIFO (first-in-first-out) topic, the name must end with the .fifo suffix. *

* * @param name * The name of the topic you want to create.

*

* Constraints: Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, * underscores, and hyphens, and must be between 1 and 256 characters long. *

*

* For a FIFO (first-in-first-out) topic, the name must end with the .fifo suffix. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateTopicRequest withName(String name) { setName(name); return this; } /** *

* A map of attributes with their corresponding values. *

*

* The following lists the names, descriptions, and values of the special request parameters that the * CreateTopic action uses: *

* *

* The following attribute applies only to server-side encryption: *

* *

* The following attributes apply only to FIFO topics: *

* * * @return A map of attributes with their corresponding values.

*

* The following lists the names, descriptions, and values of the special request parameters that the * CreateTopic action uses: *

* *

* The following attribute applies only to server-side * encryption: *

* *

* The following attributes apply only to FIFO topics: *

*