/* * 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; /** *
* The authorizer result. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AuthResult implements Serializable, Cloneable, StructuredPojo { /** ** Authorization information. *
*/ private AuthInfo authInfo; /** ** The policies and statements that allowed the specified action. *
*/ private Allowed allowed; /** ** The policies and statements that denied the specified action. *
*/ private Denied denied; /** ** The final authorization decision of this scenario. Multiple statements are taken into account when determining * the authorization decision. An explicit deny statement can override multiple allow statements. *
*/ private String authDecision; /** ** Contains any missing context values found while evaluating policy. *
*/ private java.util.List* Authorization information. *
* * @param authInfo * Authorization information. */ public void setAuthInfo(AuthInfo authInfo) { this.authInfo = authInfo; } /** ** Authorization information. *
* * @return Authorization information. */ public AuthInfo getAuthInfo() { return this.authInfo; } /** ** Authorization information. *
* * @param authInfo * Authorization information. * @return Returns a reference to this object so that method calls can be chained together. */ public AuthResult withAuthInfo(AuthInfo authInfo) { setAuthInfo(authInfo); return this; } /** ** The policies and statements that allowed the specified action. *
* * @param allowed * The policies and statements that allowed the specified action. */ public void setAllowed(Allowed allowed) { this.allowed = allowed; } /** ** The policies and statements that allowed the specified action. *
* * @return The policies and statements that allowed the specified action. */ public Allowed getAllowed() { return this.allowed; } /** ** The policies and statements that allowed the specified action. *
* * @param allowed * The policies and statements that allowed the specified action. * @return Returns a reference to this object so that method calls can be chained together. */ public AuthResult withAllowed(Allowed allowed) { setAllowed(allowed); return this; } /** ** The policies and statements that denied the specified action. *
* * @param denied * The policies and statements that denied the specified action. */ public void setDenied(Denied denied) { this.denied = denied; } /** ** The policies and statements that denied the specified action. *
* * @return The policies and statements that denied the specified action. */ public Denied getDenied() { return this.denied; } /** ** The policies and statements that denied the specified action. *
* * @param denied * The policies and statements that denied the specified action. * @return Returns a reference to this object so that method calls can be chained together. */ public AuthResult withDenied(Denied denied) { setDenied(denied); return this; } /** ** The final authorization decision of this scenario. Multiple statements are taken into account when determining * the authorization decision. An explicit deny statement can override multiple allow statements. *
* * @param authDecision * The final authorization decision of this scenario. Multiple statements are taken into account when * determining the authorization decision. An explicit deny statement can override multiple allow statements. * @see AuthDecision */ public void setAuthDecision(String authDecision) { this.authDecision = authDecision; } /** ** The final authorization decision of this scenario. Multiple statements are taken into account when determining * the authorization decision. An explicit deny statement can override multiple allow statements. *
* * @return The final authorization decision of this scenario. Multiple statements are taken into account when * determining the authorization decision. An explicit deny statement can override multiple allow * statements. * @see AuthDecision */ public String getAuthDecision() { return this.authDecision; } /** ** The final authorization decision of this scenario. Multiple statements are taken into account when determining * the authorization decision. An explicit deny statement can override multiple allow statements. *
* * @param authDecision * The final authorization decision of this scenario. Multiple statements are taken into account when * determining the authorization decision. An explicit deny statement can override multiple allow statements. * @return Returns a reference to this object so that method calls can be chained together. * @see AuthDecision */ public AuthResult withAuthDecision(String authDecision) { setAuthDecision(authDecision); return this; } /** ** The final authorization decision of this scenario. Multiple statements are taken into account when determining * the authorization decision. An explicit deny statement can override multiple allow statements. *
* * @param authDecision * The final authorization decision of this scenario. Multiple statements are taken into account when * determining the authorization decision. An explicit deny statement can override multiple allow statements. * @return Returns a reference to this object so that method calls can be chained together. * @see AuthDecision */ public AuthResult withAuthDecision(AuthDecision authDecision) { this.authDecision = authDecision.toString(); return this; } /** ** Contains any missing context values found while evaluating policy. *
* * @return Contains any missing context values found while evaluating policy. */ public java.util.List* Contains any missing context values found while evaluating policy. *
* * @param missingContextValues * Contains any missing context values found while evaluating policy. */ public void setMissingContextValues(java.util.Collection* Contains any missing context values found while evaluating policy. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setMissingContextValues(java.util.Collection)} or {@link #withMissingContextValues(java.util.Collection)} * if you want to override the existing values. *
* * @param missingContextValues * Contains any missing context values found while evaluating policy. * @return Returns a reference to this object so that method calls can be chained together. */ public AuthResult withMissingContextValues(String... missingContextValues) { if (this.missingContextValues == null) { setMissingContextValues(new java.util.ArrayList* Contains any missing context values found while evaluating policy. *
* * @param missingContextValues * Contains any missing context values found while evaluating policy. * @return Returns a reference to this object so that method calls can be chained together. */ public AuthResult withMissingContextValues(java.util.Collection