|
| 1 | +/* |
| 2 | + * Copyright 2010-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"). |
| 5 | + * You may not use this file except in compliance with the License. |
| 6 | + * A copy of the License is located at |
| 7 | + * |
| 8 | + * http://aws.amazon.com/apache2.0 |
| 9 | + * |
| 10 | + * or in the "license" file accompanying this file. This file is distributed |
| 11 | + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| 12 | + * express or implied. See the License for the specific language governing |
| 13 | + * permissions and limitations under the License. |
| 14 | + */ |
| 15 | + |
| 16 | +package com.amazonaws.services.chimesdkmessaging.model; |
| 17 | + |
| 18 | +import java.io.Serializable; |
| 19 | + |
| 20 | +import com.amazonaws.AmazonWebServiceRequest; |
| 21 | + |
| 22 | +/** |
| 23 | + * <p> |
| 24 | + * Associates a channel flow with a channel. Once associated, all messages to |
| 25 | + * that channel go through channel flow processors. To stop processing, use the |
| 26 | + * <code>DisassociateChannelFlow</code> API. |
| 27 | + * </p> |
| 28 | + * <note> |
| 29 | + * <p> |
| 30 | + * Only administrators or channel moderators can associate a channel flow. The |
| 31 | + * <code>x-amz-chime-bearer</code> request header is mandatory. Use the |
| 32 | + * <code>AppInstanceUserArn</code> of the user that makes the API call as the |
| 33 | + * value in the header. |
| 34 | + * </p> |
| 35 | + * </note> |
| 36 | + */ |
| 37 | +public class AssociateChannelFlowRequest extends AmazonWebServiceRequest implements Serializable { |
| 38 | + /** |
| 39 | + * <p> |
| 40 | + * The ARN of the channel. |
| 41 | + * </p> |
| 42 | + * <p> |
| 43 | + * <b>Constraints:</b><br/> |
| 44 | + * <b>Length: </b>5 - 1600<br/> |
| 45 | + * <b>Pattern: |
| 46 | + * </b>arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: |
| 47 | + * [a-z0-9-\.]{0,63}:[^/].{0,1023}<br/> |
| 48 | + */ |
| 49 | + private String channelArn; |
| 50 | + |
| 51 | + /** |
| 52 | + * <p> |
| 53 | + * The ARN of the channel flow. |
| 54 | + * </p> |
| 55 | + * <p> |
| 56 | + * <b>Constraints:</b><br/> |
| 57 | + * <b>Length: </b>5 - 1600<br/> |
| 58 | + * <b>Pattern: |
| 59 | + * </b>arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: |
| 60 | + * [a-z0-9-\.]{0,63}:[^/].{0,1023}<br/> |
| 61 | + */ |
| 62 | + private String channelFlowArn; |
| 63 | + |
| 64 | + /** |
| 65 | + * <p> |
| 66 | + * The <code>AppInstanceUserArn</code> of the user making the API call. |
| 67 | + * </p> |
| 68 | + * <p> |
| 69 | + * <b>Constraints:</b><br/> |
| 70 | + * <b>Length: </b>5 - 1600<br/> |
| 71 | + * <b>Pattern: |
| 72 | + * </b>arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: |
| 73 | + * [a-z0-9-\.]{0,63}:[^/].{0,1023}<br/> |
| 74 | + */ |
| 75 | + private String chimeBearer; |
| 76 | + |
| 77 | + /** |
| 78 | + * <p> |
| 79 | + * The ARN of the channel. |
| 80 | + * </p> |
| 81 | + * <p> |
| 82 | + * <b>Constraints:</b><br/> |
| 83 | + * <b>Length: </b>5 - 1600<br/> |
| 84 | + * <b>Pattern: |
| 85 | + * </b>arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: |
| 86 | + * [a-z0-9-\.]{0,63}:[^/].{0,1023}<br/> |
| 87 | + * |
| 88 | + * @return <p> |
| 89 | + * The ARN of the channel. |
| 90 | + * </p> |
| 91 | + */ |
| 92 | + public String getChannelArn() { |
| 93 | + return channelArn; |
| 94 | + } |
| 95 | + |
| 96 | + /** |
| 97 | + * <p> |
| 98 | + * The ARN of the channel. |
| 99 | + * </p> |
| 100 | + * <p> |
| 101 | + * <b>Constraints:</b><br/> |
| 102 | + * <b>Length: </b>5 - 1600<br/> |
| 103 | + * <b>Pattern: |
| 104 | + * </b>arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: |
| 105 | + * [a-z0-9-\.]{0,63}:[^/].{0,1023}<br/> |
| 106 | + * |
| 107 | + * @param channelArn <p> |
| 108 | + * The ARN of the channel. |
| 109 | + * </p> |
| 110 | + */ |
| 111 | + public void setChannelArn(String channelArn) { |
| 112 | + this.channelArn = channelArn; |
| 113 | + } |
| 114 | + |
| 115 | + /** |
| 116 | + * <p> |
| 117 | + * The ARN of the channel. |
| 118 | + * </p> |
| 119 | + * <p> |
| 120 | + * Returns a reference to this object so that method calls can be chained |
| 121 | + * together. |
| 122 | + * <p> |
| 123 | + * <b>Constraints:</b><br/> |
| 124 | + * <b>Length: </b>5 - 1600<br/> |
| 125 | + * <b>Pattern: |
| 126 | + * </b>arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: |
| 127 | + * [a-z0-9-\.]{0,63}:[^/].{0,1023}<br/> |
| 128 | + * |
| 129 | + * @param channelArn <p> |
| 130 | + * The ARN of the channel. |
| 131 | + * </p> |
| 132 | + * @return A reference to this updated object so that method calls can be |
| 133 | + * chained together. |
| 134 | + */ |
| 135 | + public AssociateChannelFlowRequest withChannelArn(String channelArn) { |
| 136 | + this.channelArn = channelArn; |
| 137 | + return this; |
| 138 | + } |
| 139 | + |
| 140 | + /** |
| 141 | + * <p> |
| 142 | + * The ARN of the channel flow. |
| 143 | + * </p> |
| 144 | + * <p> |
| 145 | + * <b>Constraints:</b><br/> |
| 146 | + * <b>Length: </b>5 - 1600<br/> |
| 147 | + * <b>Pattern: |
| 148 | + * </b>arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: |
| 149 | + * [a-z0-9-\.]{0,63}:[^/].{0,1023}<br/> |
| 150 | + * |
| 151 | + * @return <p> |
| 152 | + * The ARN of the channel flow. |
| 153 | + * </p> |
| 154 | + */ |
| 155 | + public String getChannelFlowArn() { |
| 156 | + return channelFlowArn; |
| 157 | + } |
| 158 | + |
| 159 | + /** |
| 160 | + * <p> |
| 161 | + * The ARN of the channel flow. |
| 162 | + * </p> |
| 163 | + * <p> |
| 164 | + * <b>Constraints:</b><br/> |
| 165 | + * <b>Length: </b>5 - 1600<br/> |
| 166 | + * <b>Pattern: |
| 167 | + * </b>arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: |
| 168 | + * [a-z0-9-\.]{0,63}:[^/].{0,1023}<br/> |
| 169 | + * |
| 170 | + * @param channelFlowArn <p> |
| 171 | + * The ARN of the channel flow. |
| 172 | + * </p> |
| 173 | + */ |
| 174 | + public void setChannelFlowArn(String channelFlowArn) { |
| 175 | + this.channelFlowArn = channelFlowArn; |
| 176 | + } |
| 177 | + |
| 178 | + /** |
| 179 | + * <p> |
| 180 | + * The ARN of the channel flow. |
| 181 | + * </p> |
| 182 | + * <p> |
| 183 | + * Returns a reference to this object so that method calls can be chained |
| 184 | + * together. |
| 185 | + * <p> |
| 186 | + * <b>Constraints:</b><br/> |
| 187 | + * <b>Length: </b>5 - 1600<br/> |
| 188 | + * <b>Pattern: |
| 189 | + * </b>arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: |
| 190 | + * [a-z0-9-\.]{0,63}:[^/].{0,1023}<br/> |
| 191 | + * |
| 192 | + * @param channelFlowArn <p> |
| 193 | + * The ARN of the channel flow. |
| 194 | + * </p> |
| 195 | + * @return A reference to this updated object so that method calls can be |
| 196 | + * chained together. |
| 197 | + */ |
| 198 | + public AssociateChannelFlowRequest withChannelFlowArn(String channelFlowArn) { |
| 199 | + this.channelFlowArn = channelFlowArn; |
| 200 | + return this; |
| 201 | + } |
| 202 | + |
| 203 | + /** |
| 204 | + * <p> |
| 205 | + * The <code>AppInstanceUserArn</code> of the user making the API call. |
| 206 | + * </p> |
| 207 | + * <p> |
| 208 | + * <b>Constraints:</b><br/> |
| 209 | + * <b>Length: </b>5 - 1600<br/> |
| 210 | + * <b>Pattern: |
| 211 | + * </b>arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: |
| 212 | + * [a-z0-9-\.]{0,63}:[^/].{0,1023}<br/> |
| 213 | + * |
| 214 | + * @return <p> |
| 215 | + * The <code>AppInstanceUserArn</code> of the user making the API |
| 216 | + * call. |
| 217 | + * </p> |
| 218 | + */ |
| 219 | + public String getChimeBearer() { |
| 220 | + return chimeBearer; |
| 221 | + } |
| 222 | + |
| 223 | + /** |
| 224 | + * <p> |
| 225 | + * The <code>AppInstanceUserArn</code> of the user making the API call. |
| 226 | + * </p> |
| 227 | + * <p> |
| 228 | + * <b>Constraints:</b><br/> |
| 229 | + * <b>Length: </b>5 - 1600<br/> |
| 230 | + * <b>Pattern: |
| 231 | + * </b>arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: |
| 232 | + * [a-z0-9-\.]{0,63}:[^/].{0,1023}<br/> |
| 233 | + * |
| 234 | + * @param chimeBearer <p> |
| 235 | + * The <code>AppInstanceUserArn</code> of the user making the API |
| 236 | + * call. |
| 237 | + * </p> |
| 238 | + */ |
| 239 | + public void setChimeBearer(String chimeBearer) { |
| 240 | + this.chimeBearer = chimeBearer; |
| 241 | + } |
| 242 | + |
| 243 | + /** |
| 244 | + * <p> |
| 245 | + * The <code>AppInstanceUserArn</code> of the user making the API call. |
| 246 | + * </p> |
| 247 | + * <p> |
| 248 | + * Returns a reference to this object so that method calls can be chained |
| 249 | + * together. |
| 250 | + * <p> |
| 251 | + * <b>Constraints:</b><br/> |
| 252 | + * <b>Length: </b>5 - 1600<br/> |
| 253 | + * <b>Pattern: |
| 254 | + * </b>arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: |
| 255 | + * [a-z0-9-\.]{0,63}:[^/].{0,1023}<br/> |
| 256 | + * |
| 257 | + * @param chimeBearer <p> |
| 258 | + * The <code>AppInstanceUserArn</code> of the user making the API |
| 259 | + * call. |
| 260 | + * </p> |
| 261 | + * @return A reference to this updated object so that method calls can be |
| 262 | + * chained together. |
| 263 | + */ |
| 264 | + public AssociateChannelFlowRequest withChimeBearer(String chimeBearer) { |
| 265 | + this.chimeBearer = chimeBearer; |
| 266 | + return this; |
| 267 | + } |
| 268 | + |
| 269 | + /** |
| 270 | + * Returns a string representation of this object; useful for testing and |
| 271 | + * debugging. |
| 272 | + * |
| 273 | + * @return A string representation of this object. |
| 274 | + * @see java.lang.Object#toString() |
| 275 | + */ |
| 276 | + @Override |
| 277 | + public String toString() { |
| 278 | + StringBuilder sb = new StringBuilder(); |
| 279 | + sb.append("{"); |
| 280 | + if (getChannelArn() != null) |
| 281 | + sb.append("ChannelArn: " + getChannelArn() + ","); |
| 282 | + if (getChannelFlowArn() != null) |
| 283 | + sb.append("ChannelFlowArn: " + getChannelFlowArn() + ","); |
| 284 | + if (getChimeBearer() != null) |
| 285 | + sb.append("ChimeBearer: " + getChimeBearer()); |
| 286 | + sb.append("}"); |
| 287 | + return sb.toString(); |
| 288 | + } |
| 289 | + |
| 290 | + @Override |
| 291 | + public int hashCode() { |
| 292 | + final int prime = 31; |
| 293 | + int hashCode = 1; |
| 294 | + |
| 295 | + hashCode = prime * hashCode + ((getChannelArn() == null) ? 0 : getChannelArn().hashCode()); |
| 296 | + hashCode = prime * hashCode |
| 297 | + + ((getChannelFlowArn() == null) ? 0 : getChannelFlowArn().hashCode()); |
| 298 | + hashCode = prime * hashCode |
| 299 | + + ((getChimeBearer() == null) ? 0 : getChimeBearer().hashCode()); |
| 300 | + return hashCode; |
| 301 | + } |
| 302 | + |
| 303 | + @Override |
| 304 | + public boolean equals(Object obj) { |
| 305 | + if (this == obj) |
| 306 | + return true; |
| 307 | + if (obj == null) |
| 308 | + return false; |
| 309 | + |
| 310 | + if (obj instanceof AssociateChannelFlowRequest == false) |
| 311 | + return false; |
| 312 | + AssociateChannelFlowRequest other = (AssociateChannelFlowRequest) obj; |
| 313 | + |
| 314 | + if (other.getChannelArn() == null ^ this.getChannelArn() == null) |
| 315 | + return false; |
| 316 | + if (other.getChannelArn() != null |
| 317 | + && other.getChannelArn().equals(this.getChannelArn()) == false) |
| 318 | + return false; |
| 319 | + if (other.getChannelFlowArn() == null ^ this.getChannelFlowArn() == null) |
| 320 | + return false; |
| 321 | + if (other.getChannelFlowArn() != null |
| 322 | + && other.getChannelFlowArn().equals(this.getChannelFlowArn()) == false) |
| 323 | + return false; |
| 324 | + if (other.getChimeBearer() == null ^ this.getChimeBearer() == null) |
| 325 | + return false; |
| 326 | + if (other.getChimeBearer() != null |
| 327 | + && other.getChimeBearer().equals(this.getChimeBearer()) == false) |
| 328 | + return false; |
| 329 | + return true; |
| 330 | + } |
| 331 | +} |
0 commit comments