/* * 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.AmazonWebServiceRequest; @Generated("com.amazonaws:aws-java-sdk-code-generator") public class TestAuthorizationRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The principal. Valid principals are CertificateArn * (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn * (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id). *
*/ private String principal; /** ** The Cognito identity pool ID. *
*/ private String cognitoIdentityPoolId; /** *
* A list of authorization info objects. Simulating authorization will create a response for each
* authInfo
object in the list.
*
* The MQTT client ID. *
*/ private String clientId; /** ** When testing custom authorization, the policies specified here are treated as if they are attached to the * principal being authorized. *
*/ private java.util.List* When testing custom authorization, the policies specified here are treated as if they are not attached to the * principal being authorized. *
*/ private java.util.List* The principal. Valid principals are CertificateArn * (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn * (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id). *
* * @param principal * The principal. Valid principals are CertificateArn * (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn * (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId * (region:id). */ public void setPrincipal(String principal) { this.principal = principal; } /** ** The principal. Valid principals are CertificateArn * (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn * (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id). *
* * @return The principal. Valid principals are CertificateArn * (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn * (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId * (region:id). */ public String getPrincipal() { return this.principal; } /** ** The principal. Valid principals are CertificateArn * (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn * (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id). *
* * @param principal * The principal. Valid principals are CertificateArn * (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn * (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId * (region:id). * @return Returns a reference to this object so that method calls can be chained together. */ public TestAuthorizationRequest withPrincipal(String principal) { setPrincipal(principal); return this; } /** ** The Cognito identity pool ID. *
* * @param cognitoIdentityPoolId * The Cognito identity pool ID. */ public void setCognitoIdentityPoolId(String cognitoIdentityPoolId) { this.cognitoIdentityPoolId = cognitoIdentityPoolId; } /** ** The Cognito identity pool ID. *
* * @return The Cognito identity pool ID. */ public String getCognitoIdentityPoolId() { return this.cognitoIdentityPoolId; } /** ** The Cognito identity pool ID. *
* * @param cognitoIdentityPoolId * The Cognito identity pool ID. * @return Returns a reference to this object so that method calls can be chained together. */ public TestAuthorizationRequest withCognitoIdentityPoolId(String cognitoIdentityPoolId) { setCognitoIdentityPoolId(cognitoIdentityPoolId); return this; } /** *
* A list of authorization info objects. Simulating authorization will create a response for each
* authInfo
object in the list.
*
authInfo
object in the list.
*/
public java.util.List
* A list of authorization info objects. Simulating authorization will create a response for each
* authInfo
object in the list.
*
authInfo
object in the list.
*/
public void setAuthInfos(java.util.Collection
* A list of authorization info objects. Simulating authorization will create a response for each
* authInfo
object in the list.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAuthInfos(java.util.Collection)} or {@link #withAuthInfos(java.util.Collection)} if you want to * override the existing values. *
* * @param authInfos * A list of authorization info objects. Simulating authorization will create a response for each *authInfo
object in the list.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TestAuthorizationRequest withAuthInfos(AuthInfo... authInfos) {
if (this.authInfos == null) {
setAuthInfos(new java.util.ArrayList
* A list of authorization info objects. Simulating authorization will create a response for each
* authInfo
object in the list.
*
authInfo
object in the list.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TestAuthorizationRequest withAuthInfos(java.util.Collection* The MQTT client ID. *
* * @param clientId * The MQTT client ID. */ public void setClientId(String clientId) { this.clientId = clientId; } /** ** The MQTT client ID. *
* * @return The MQTT client ID. */ public String getClientId() { return this.clientId; } /** ** The MQTT client ID. *
* * @param clientId * The MQTT client ID. * @return Returns a reference to this object so that method calls can be chained together. */ public TestAuthorizationRequest withClientId(String clientId) { setClientId(clientId); return this; } /** ** When testing custom authorization, the policies specified here are treated as if they are attached to the * principal being authorized. *
* * @return When testing custom authorization, the policies specified here are treated as if they are attached to the * principal being authorized. */ public java.util.List* When testing custom authorization, the policies specified here are treated as if they are attached to the * principal being authorized. *
* * @param policyNamesToAdd * When testing custom authorization, the policies specified here are treated as if they are attached to the * principal being authorized. */ public void setPolicyNamesToAdd(java.util.Collection* When testing custom authorization, the policies specified here are treated as if they are attached to the * principal being authorized. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setPolicyNamesToAdd(java.util.Collection)} or {@link #withPolicyNamesToAdd(java.util.Collection)} if you * want to override the existing values. *
* * @param policyNamesToAdd * When testing custom authorization, the policies specified here are treated as if they are attached to the * principal being authorized. * @return Returns a reference to this object so that method calls can be chained together. */ public TestAuthorizationRequest withPolicyNamesToAdd(String... policyNamesToAdd) { if (this.policyNamesToAdd == null) { setPolicyNamesToAdd(new java.util.ArrayList* When testing custom authorization, the policies specified here are treated as if they are attached to the * principal being authorized. *
* * @param policyNamesToAdd * When testing custom authorization, the policies specified here are treated as if they are attached to the * principal being authorized. * @return Returns a reference to this object so that method calls can be chained together. */ public TestAuthorizationRequest withPolicyNamesToAdd(java.util.Collection* When testing custom authorization, the policies specified here are treated as if they are not attached to the * principal being authorized. *
* * @return When testing custom authorization, the policies specified here are treated as if they are not attached to * the principal being authorized. */ public java.util.List* When testing custom authorization, the policies specified here are treated as if they are not attached to the * principal being authorized. *
* * @param policyNamesToSkip * When testing custom authorization, the policies specified here are treated as if they are not attached to * the principal being authorized. */ public void setPolicyNamesToSkip(java.util.Collection* When testing custom authorization, the policies specified here are treated as if they are not attached to the * principal being authorized. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setPolicyNamesToSkip(java.util.Collection)} or {@link #withPolicyNamesToSkip(java.util.Collection)} if * you want to override the existing values. *
* * @param policyNamesToSkip * When testing custom authorization, the policies specified here are treated as if they are not attached to * the principal being authorized. * @return Returns a reference to this object so that method calls can be chained together. */ public TestAuthorizationRequest withPolicyNamesToSkip(String... policyNamesToSkip) { if (this.policyNamesToSkip == null) { setPolicyNamesToSkip(new java.util.ArrayList* When testing custom authorization, the policies specified here are treated as if they are not attached to the * principal being authorized. *
* * @param policyNamesToSkip * When testing custom authorization, the policies specified here are treated as if they are not attached to * the principal being authorized. * @return Returns a reference to this object so that method calls can be chained together. */ public TestAuthorizationRequest withPolicyNamesToSkip(java.util.Collection