/* * 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.iot.model; import java.io.Serializable; /** *
* A collection of authorization information. *
*/ public class AuthInfo implements Serializable { /** ** The type of action for which the principal is being authorized. *
*
* Constraints:
* Allowed Values: PUBLISH, SUBSCRIBE, RECEIVE, CONNECT
*/
private String actionType;
/**
*
* The resources for which the principal is being authorized to perform the * specified action. *
*/ private java.util.List* The type of action for which the principal is being authorized. *
*
* Constraints:
* Allowed Values: PUBLISH, SUBSCRIBE, RECEIVE, CONNECT
*
* @return
* The type of action for which the principal is being authorized. *
* @see ActionType */ public String getActionType() { return actionType; } /** ** The type of action for which the principal is being authorized. *
*
* Constraints:
* Allowed Values: PUBLISH, SUBSCRIBE, RECEIVE, CONNECT
*
* @param actionType
* The type of action for which the principal is being * authorized. *
* @see ActionType */ public void setActionType(String actionType) { this.actionType = actionType; } /** ** The type of action for which the principal is being authorized. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: PUBLISH, SUBSCRIBE, RECEIVE, CONNECT
*
* @param actionType
* The type of action for which the principal is being * authorized. *
* @return A reference to this updated object so that method calls can be * chained together. * @see ActionType */ public AuthInfo withActionType(String actionType) { this.actionType = actionType; return this; } /** ** The type of action for which the principal is being authorized. *
*
* Constraints:
* Allowed Values: PUBLISH, SUBSCRIBE, RECEIVE, CONNECT
*
* @param actionType
* The type of action for which the principal is being * authorized. *
* @see ActionType */ public void setActionType(ActionType actionType) { this.actionType = actionType.toString(); } /** ** The type of action for which the principal is being authorized. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: PUBLISH, SUBSCRIBE, RECEIVE, CONNECT
*
* @param actionType
* The type of action for which the principal is being * authorized. *
* @return A reference to this updated object so that method calls can be * chained together. * @see ActionType */ public AuthInfo withActionType(ActionType actionType) { this.actionType = actionType.toString(); return this; } /** ** The resources for which the principal is being authorized to perform the * specified action. *
* * @return* The resources for which the principal is being authorized to * perform the specified action. *
*/ public java.util.List* The resources for which the principal is being authorized to perform the * specified action. *
* * @param resources* The resources for which the principal is being authorized to * perform the specified action. *
*/ public void setResources(java.util.Collection* The resources for which the principal is being authorized to perform the * specified action. *
** Returns a reference to this object so that method calls can be chained * together. * * @param resources
* The resources for which the principal is being authorized to * perform the specified action. *
* @return A reference to this updated object so that method calls can be * chained together. */ public AuthInfo withResources(String... resources) { if (getResources() == null) { this.resources = new java.util.ArrayList* The resources for which the principal is being authorized to perform the * specified action. *
** Returns a reference to this object so that method calls can be chained * together. * * @param resources
* The resources for which the principal is being authorized to * perform the specified action. *
* @return A reference to this updated object so that method calls can be * chained together. */ public AuthInfo withResources(java.util.Collection