/* * Copyright 2010-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.kinesisvideo.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** *

* Creates a signaling channel. *

*

* CreateSignalingChannel is an asynchronous operation. *

*/ public class CreateSignalingChannelRequest extends AmazonWebServiceRequest implements Serializable { /** *

* A name for the signaling channel that you are creating. It must be unique * for each Amazon Web Services account and Amazon Web Services Region. *

*

* Constraints:
* Length: 1 - 256
* Pattern: [a-zA-Z0-9_.-]+
*/ private String channelName; /** *

* A type of the signaling channel that you are creating. Currently, * SINGLE_MASTER is the only supported channel type. *

*

* Constraints:
* Allowed Values: SINGLE_MASTER, FULL_MESH */ private String channelType; /** *

* A structure containing the configuration for the * SINGLE_MASTER channel type. *

*/ private SingleMasterConfiguration singleMasterConfiguration; /** *

* A set of tags (key-value pairs) that you want to associate with this * channel. *

*/ private java.util.List tags = new java.util.ArrayList(); /** *

* A name for the signaling channel that you are creating. It must be unique * for each Amazon Web Services account and Amazon Web Services Region. *

*

* Constraints:
* Length: 1 - 256
* Pattern: [a-zA-Z0-9_.-]+
* * @return

* A name for the signaling channel that you are creating. It must * be unique for each Amazon Web Services account and Amazon Web * Services Region. *

*/ public String getChannelName() { return channelName; } /** *

* A name for the signaling channel that you are creating. It must be unique * for each Amazon Web Services account and Amazon Web Services Region. *

*

* Constraints:
* Length: 1 - 256
* Pattern: [a-zA-Z0-9_.-]+
* * @param channelName

* A name for the signaling channel that you are creating. It * must be unique for each Amazon Web Services account and Amazon * Web Services Region. *

*/ public void setChannelName(String channelName) { this.channelName = channelName; } /** *

* A name for the signaling channel that you are creating. It must be unique * for each Amazon Web Services account and Amazon Web Services Region. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 256
* Pattern: [a-zA-Z0-9_.-]+
* * @param channelName

* A name for the signaling channel that you are creating. It * must be unique for each Amazon Web Services account and Amazon * Web Services Region. *

* @return A reference to this updated object so that method calls can be * chained together. */ public CreateSignalingChannelRequest withChannelName(String channelName) { this.channelName = channelName; return this; } /** *

* A type of the signaling channel that you are creating. Currently, * SINGLE_MASTER is the only supported channel type. *

*

* Constraints:
* Allowed Values: SINGLE_MASTER, FULL_MESH * * @return

* A type of the signaling channel that you are creating. Currently, * SINGLE_MASTER is the only supported channel type. *

* @see ChannelType */ public String getChannelType() { return channelType; } /** *

* A type of the signaling channel that you are creating. Currently, * SINGLE_MASTER is the only supported channel type. *

*

* Constraints:
* Allowed Values: SINGLE_MASTER, FULL_MESH * * @param channelType

* A type of the signaling channel that you are creating. * Currently, SINGLE_MASTER is the only supported * channel type. *

* @see ChannelType */ public void setChannelType(String channelType) { this.channelType = channelType; } /** *

* A type of the signaling channel that you are creating. Currently, * SINGLE_MASTER is the only supported channel type. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: SINGLE_MASTER, FULL_MESH * * @param channelType

* A type of the signaling channel that you are creating. * Currently, SINGLE_MASTER is the only supported * channel type. *

* @return A reference to this updated object so that method calls can be * chained together. * @see ChannelType */ public CreateSignalingChannelRequest withChannelType(String channelType) { this.channelType = channelType; return this; } /** *

* A type of the signaling channel that you are creating. Currently, * SINGLE_MASTER is the only supported channel type. *

*

* Constraints:
* Allowed Values: SINGLE_MASTER, FULL_MESH * * @param channelType

* A type of the signaling channel that you are creating. * Currently, SINGLE_MASTER is the only supported * channel type. *

* @see ChannelType */ public void setChannelType(ChannelType channelType) { this.channelType = channelType.toString(); } /** *

* A type of the signaling channel that you are creating. Currently, * SINGLE_MASTER is the only supported channel type. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: SINGLE_MASTER, FULL_MESH * * @param channelType

* A type of the signaling channel that you are creating. * Currently, SINGLE_MASTER is the only supported * channel type. *

* @return A reference to this updated object so that method calls can be * chained together. * @see ChannelType */ public CreateSignalingChannelRequest withChannelType(ChannelType channelType) { this.channelType = channelType.toString(); return this; } /** *

* A structure containing the configuration for the * SINGLE_MASTER channel type. *

* * @return

* A structure containing the configuration for the * SINGLE_MASTER channel type. *

*/ public SingleMasterConfiguration getSingleMasterConfiguration() { return singleMasterConfiguration; } /** *

* A structure containing the configuration for the * SINGLE_MASTER channel type. *

* * @param singleMasterConfiguration

* A structure containing the configuration for the * SINGLE_MASTER channel type. *

*/ public void setSingleMasterConfiguration(SingleMasterConfiguration singleMasterConfiguration) { this.singleMasterConfiguration = singleMasterConfiguration; } /** *

* A structure containing the configuration for the * SINGLE_MASTER channel type. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param singleMasterConfiguration

* A structure containing the configuration for the * SINGLE_MASTER channel type. *

* @return A reference to this updated object so that method calls can be * chained together. */ public CreateSignalingChannelRequest withSingleMasterConfiguration( SingleMasterConfiguration singleMasterConfiguration) { this.singleMasterConfiguration = singleMasterConfiguration; return this; } /** *

* A set of tags (key-value pairs) that you want to associate with this * channel. *

* * @return

* A set of tags (key-value pairs) that you want to associate with * this channel. *

*/ public java.util.List getTags() { return tags; } /** *

* A set of tags (key-value pairs) that you want to associate with this * channel. *

* * @param tags

* A set of tags (key-value pairs) that you want to associate * with this channel. *

*/ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

* A set of tags (key-value pairs) that you want to associate with this * channel. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param tags

* A set of tags (key-value pairs) that you want to associate * with this channel. *

* @return A reference to this updated object so that method calls can be * chained together. */ public CreateSignalingChannelRequest withTags(Tag... tags) { if (getTags() == null) { this.tags = new java.util.ArrayList(tags.length); } for (Tag value : tags) { this.tags.add(value); } return this; } /** *

* A set of tags (key-value pairs) that you want to associate with this * channel. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param tags

* A set of tags (key-value pairs) that you want to associate * with this channel. *

* @return A reference to this updated object so that method calls can be * chained together. */ public CreateSignalingChannelRequest withTags(java.util.Collection tags) { setTags(tags); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getChannelName() != null) sb.append("ChannelName: " + getChannelName() + ","); if (getChannelType() != null) sb.append("ChannelType: " + getChannelType() + ","); if (getSingleMasterConfiguration() != null) sb.append("SingleMasterConfiguration: " + getSingleMasterConfiguration() + ","); if (getTags() != null) sb.append("Tags: " + getTags()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getChannelName() == null) ? 0 : getChannelName().hashCode()); hashCode = prime * hashCode + ((getChannelType() == null) ? 0 : getChannelType().hashCode()); hashCode = prime * hashCode + ((getSingleMasterConfiguration() == null) ? 0 : getSingleMasterConfiguration() .hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateSignalingChannelRequest == false) return false; CreateSignalingChannelRequest other = (CreateSignalingChannelRequest) obj; if (other.getChannelName() == null ^ this.getChannelName() == null) return false; if (other.getChannelName() != null && other.getChannelName().equals(this.getChannelName()) == false) return false; if (other.getChannelType() == null ^ this.getChannelType() == null) return false; if (other.getChannelType() != null && other.getChannelType().equals(this.getChannelType()) == false) return false; if (other.getSingleMasterConfiguration() == null ^ this.getSingleMasterConfiguration() == null) return false; if (other.getSingleMasterConfiguration() != null && other.getSingleMasterConfiguration().equals(this.getSingleMasterConfiguration()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } }