/* * 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.verifiedpermissions.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* The value of an attribute. *
** Contains information about the runtime context for a request for which an authorization decision is made. *
** This data type is used as a member of the ContextDefinition structure which is uses as a request parameter for the IsAuthorized and * * IsAuthorizedWithToken operations. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AttributeValue implements Serializable, Cloneable, StructuredPojo { /** ** An attribute value of Boolean type. *
*
* Example: {"boolean": true}
*
* An attribute value of type EntityIdentifier. *
*
* Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}
*
* An attribute value of Long type. *
*
* Example: {"long": 0}
*
* An attribute value of String type. *
*
* Example: {"string": "abc"}
*
* An attribute value of Set type. *
*
* Example: {"set": [ {} ] }
*
* An attribute value of Record type. *
*
* Example: {"record": { "keyName": {} } }
*
* An attribute value of Boolean type. *
*
* Example: {"boolean": true}
*
* Example: {"boolean": true}
*/
public void setBoolean(Boolean booleanValue) {
this.booleanValue = booleanValue;
}
/**
*
* An attribute value of Boolean type. *
*
* Example: {"boolean": true}
*
* Example: {"boolean": true}
*/
public Boolean getBoolean() {
return this.booleanValue;
}
/**
*
* An attribute value of Boolean type. *
*
* Example: {"boolean": true}
*
* Example: {"boolean": true}
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AttributeValue withBoolean(Boolean booleanValue) {
setBoolean(booleanValue);
return this;
}
/**
*
* An attribute value of Boolean type. *
*
* Example: {"boolean": true}
*
* Example: {"boolean": true}
*/
public Boolean isBoolean() {
return this.booleanValue;
}
/**
*
* An attribute value of type EntityIdentifier. *
*
* Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}
*
* Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}
*/
public void setEntityIdentifier(EntityIdentifier entityIdentifier) {
this.entityIdentifier = entityIdentifier;
}
/**
*
* An attribute value of type EntityIdentifier. *
*
* Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}
*
* Example:
* "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}
*/
public EntityIdentifier getEntityIdentifier() {
return this.entityIdentifier;
}
/**
*
* An attribute value of type EntityIdentifier. *
*
* Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}
*
* Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AttributeValue withEntityIdentifier(EntityIdentifier entityIdentifier) {
setEntityIdentifier(entityIdentifier);
return this;
}
/**
*
* An attribute value of Long type. *
*
* Example: {"long": 0}
*
* Example: {"long": 0}
*/
public void setLong(Long longValue) {
this.longValue = longValue;
}
/**
*
* An attribute value of Long type. *
*
* Example: {"long": 0}
*
* Example: {"long": 0}
*/
public Long getLong() {
return this.longValue;
}
/**
*
* An attribute value of Long type. *
*
* Example: {"long": 0}
*
* Example: {"long": 0}
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AttributeValue withLong(Long longValue) {
setLong(longValue);
return this;
}
/**
*
* An attribute value of String type. *
*
* Example: {"string": "abc"}
*
* Example: {"string": "abc"}
*/
public void setString(String string) {
this.string = string;
}
/**
*
* An attribute value of String type. *
*
* Example: {"string": "abc"}
*
* Example: {"string": "abc"}
*/
public String getString() {
return this.string;
}
/**
*
* An attribute value of String type. *
*
* Example: {"string": "abc"}
*
* Example: {"string": "abc"}
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AttributeValue withString(String string) {
setString(string);
return this;
}
/**
*
* An attribute value of Set type. *
*
* Example: {"set": [ {} ] }
*
* Example:
* An attribute value of Set type.
*
* Example: {"set": [ {} ] }
*/
public java.util.List{"set": [ {} ] }
*
* Example:
* An attribute value of Set type.
*
* Example:
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSet(java.util.Collection)} or {@link #withSet(java.util.Collection)} if you want to override the
* existing values.
* {"set": [ {} ] }
*/
public void setSet(java.util.Collection{"set": [ {} ] }
*
* Example:
* An attribute value of Set type.
*
* Example: {"set": [ {} ] }
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AttributeValue withSet(AttributeValue... set) {
if (this.set == null) {
setSet(new java.util.ArrayList{"set": [ {} ] }
*
* Example:
* An attribute value of Record type.
*
* Example: {"set": [ {} ] }
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AttributeValue withSet(java.util.Collection{"record": { "keyName": {} } }
*
* Example:
* An attribute value of Record type.
*
* Example: {"record": { "keyName": {} } }
*/
public java.util.Map{"record": { "keyName": {} } }
*
* Example:
* An attribute value of Record type.
*
* Example: {"record": { "keyName": {} } }
*/
public void setRecord(java.util.Map{"record": { "keyName": {} } }
*
* Example: {"record": { "keyName": {} } }
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AttributeValue withRecord(java.util.Map