/* * 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.iot.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* A collection of authorization information. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AuthInfo implements Serializable, Cloneable, StructuredPojo { /** ** The type of action for which the principal is being authorized. *
*/ 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. *
* * @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. *
* * @return The type of action for which the principal is being authorized. * @see ActionType */ public String getActionType() { return this.actionType; } /** ** The type of action for which the principal is being authorized. *
* * @param actionType * The type of action for which the principal is being authorized. * @return Returns a reference to this object so that method calls can be chained together. * @see ActionType */ public AuthInfo withActionType(String actionType) { setActionType(actionType); return this; } /** ** The type of action for which the principal is being authorized. *
* * @param actionType * The type of action for which the principal is being authorized. * @return Returns a reference to this 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. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setResources(java.util.Collection)} or {@link #withResources(java.util.Collection)} if you want to * override the existing values. *
* * @param resources * The resources for which the principal is being authorized to perform the specified action. * @return Returns a reference to this object so that method calls can be chained together. */ public AuthInfo withResources(String... resources) { if (this.resources == null) { setResources(new java.util.ArrayList* 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. * @return Returns a reference to this object so that method calls can be chained together. */ public AuthInfo withResources(java.util.Collection