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

com.amazonaws.services.sns.model.PublishBatchRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon SNS module holds the client classes that are used for communicating with Amazon Simple Notification Service

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2019-2024 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;

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

    /**
     * 

* The Amazon resource name (ARN) of the topic you want to batch publish to. *

*/ private String topicArn; /** *

* A list of PublishBatch request entries to be sent to the SNS topic. *

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

* The Amazon resource name (ARN) of the topic you want to batch publish to. *

* * @param topicArn * The Amazon resource name (ARN) of the topic you want to batch publish to. */ public void setTopicArn(String topicArn) { this.topicArn = topicArn; } /** *

* The Amazon resource name (ARN) of the topic you want to batch publish to. *

* * @return The Amazon resource name (ARN) of the topic you want to batch publish to. */ public String getTopicArn() { return this.topicArn; } /** *

* The Amazon resource name (ARN) of the topic you want to batch publish to. *

* * @param topicArn * The Amazon resource name (ARN) of the topic you want to batch publish to. * @return Returns a reference to this object so that method calls can be chained together. */ public PublishBatchRequest withTopicArn(String topicArn) { setTopicArn(topicArn); return this; } /** *

* A list of PublishBatch request entries to be sent to the SNS topic. *

* * @return A list of PublishBatch request entries to be sent to the SNS topic. */ public java.util.List getPublishBatchRequestEntries() { if (publishBatchRequestEntries == null) { publishBatchRequestEntries = new com.amazonaws.internal.SdkInternalList(); } return publishBatchRequestEntries; } /** *

* A list of PublishBatch request entries to be sent to the SNS topic. *

* * @param publishBatchRequestEntries * A list of PublishBatch request entries to be sent to the SNS topic. */ public void setPublishBatchRequestEntries(java.util.Collection publishBatchRequestEntries) { if (publishBatchRequestEntries == null) { this.publishBatchRequestEntries = null; return; } this.publishBatchRequestEntries = new com.amazonaws.internal.SdkInternalList(publishBatchRequestEntries); } /** *

* A list of PublishBatch request entries to be sent to the SNS topic. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setPublishBatchRequestEntries(java.util.Collection)} or * {@link #withPublishBatchRequestEntries(java.util.Collection)} if you want to override the existing values. *

* * @param publishBatchRequestEntries * A list of PublishBatch request entries to be sent to the SNS topic. * @return Returns a reference to this object so that method calls can be chained together. */ public PublishBatchRequest withPublishBatchRequestEntries(PublishBatchRequestEntry... publishBatchRequestEntries) { if (this.publishBatchRequestEntries == null) { setPublishBatchRequestEntries(new com.amazonaws.internal.SdkInternalList(publishBatchRequestEntries.length)); } for (PublishBatchRequestEntry ele : publishBatchRequestEntries) { this.publishBatchRequestEntries.add(ele); } return this; } /** *

* A list of PublishBatch request entries to be sent to the SNS topic. *

* * @param publishBatchRequestEntries * A list of PublishBatch request entries to be sent to the SNS topic. * @return Returns a reference to this object so that method calls can be chained together. */ public PublishBatchRequest withPublishBatchRequestEntries(java.util.Collection publishBatchRequestEntries) { setPublishBatchRequestEntries(publishBatchRequestEntries); 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 (getTopicArn() != null) sb.append("TopicArn: ").append(getTopicArn()).append(","); if (getPublishBatchRequestEntries() != null) sb.append("PublishBatchRequestEntries: ").append(getPublishBatchRequestEntries()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PublishBatchRequest == false) return false; PublishBatchRequest other = (PublishBatchRequest) obj; if (other.getTopicArn() == null ^ this.getTopicArn() == null) return false; if (other.getTopicArn() != null && other.getTopicArn().equals(this.getTopicArn()) == false) return false; if (other.getPublishBatchRequestEntries() == null ^ this.getPublishBatchRequestEntries() == null) return false; if (other.getPublishBatchRequestEntries() != null && other.getPublishBatchRequestEntries().equals(this.getPublishBatchRequestEntries()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTopicArn() == null) ? 0 : getTopicArn().hashCode()); hashCode = prime * hashCode + ((getPublishBatchRequestEntries() == null) ? 0 : getPublishBatchRequestEntries().hashCode()); return hashCode; } @Override public PublishBatchRequest clone() { return (PublishBatchRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy