All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.verifiedpermissions.model.BatchIsAuthorizedWithTokenInputItem Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Verified Permissions module holds the client classes that are used for communicating with Amazon Verified Permissions Service

The newest version!
/*
 * Copyright 2019-2024 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;

/**
 * 

* An authorization request that you include in a BatchIsAuthorizedWithToken API request. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class BatchIsAuthorizedWithTokenInputItem implements Serializable, Cloneable, StructuredPojo { /** *

* Specifies the requested action to be authorized. For example, PhotoFlash::ReadPhoto. *

*/ private ActionIdentifier action; /** *

* Specifies the resource that you want an authorization decision for. For example, PhotoFlash::Photo. *

*/ private EntityIdentifier resource; /** *

* Specifies additional context that can be used to make more granular authorization decisions. *

*/ private ContextDefinition context; /** *

* Specifies the requested action to be authorized. For example, PhotoFlash::ReadPhoto. *

* * @param action * Specifies the requested action to be authorized. For example, PhotoFlash::ReadPhoto. */ public void setAction(ActionIdentifier action) { this.action = action; } /** *

* Specifies the requested action to be authorized. For example, PhotoFlash::ReadPhoto. *

* * @return Specifies the requested action to be authorized. For example, PhotoFlash::ReadPhoto. */ public ActionIdentifier getAction() { return this.action; } /** *

* Specifies the requested action to be authorized. For example, PhotoFlash::ReadPhoto. *

* * @param action * Specifies the requested action to be authorized. For example, PhotoFlash::ReadPhoto. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchIsAuthorizedWithTokenInputItem withAction(ActionIdentifier action) { setAction(action); return this; } /** *

* Specifies the resource that you want an authorization decision for. For example, PhotoFlash::Photo. *

* * @param resource * Specifies the resource that you want an authorization decision for. For example, * PhotoFlash::Photo. */ public void setResource(EntityIdentifier resource) { this.resource = resource; } /** *

* Specifies the resource that you want an authorization decision for. For example, PhotoFlash::Photo. *

* * @return Specifies the resource that you want an authorization decision for. For example, * PhotoFlash::Photo. */ public EntityIdentifier getResource() { return this.resource; } /** *

* Specifies the resource that you want an authorization decision for. For example, PhotoFlash::Photo. *

* * @param resource * Specifies the resource that you want an authorization decision for. For example, * PhotoFlash::Photo. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchIsAuthorizedWithTokenInputItem withResource(EntityIdentifier resource) { setResource(resource); return this; } /** *

* Specifies additional context that can be used to make more granular authorization decisions. *

* * @param context * Specifies additional context that can be used to make more granular authorization decisions. */ public void setContext(ContextDefinition context) { this.context = context; } /** *

* Specifies additional context that can be used to make more granular authorization decisions. *

* * @return Specifies additional context that can be used to make more granular authorization decisions. */ public ContextDefinition getContext() { return this.context; } /** *

* Specifies additional context that can be used to make more granular authorization decisions. *

* * @param context * Specifies additional context that can be used to make more granular authorization decisions. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchIsAuthorizedWithTokenInputItem withContext(ContextDefinition context) { setContext(context); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAction() != null) sb.append("Action: ").append(getAction()).append(","); if (getResource() != null) sb.append("Resource: ").append(getResource()).append(","); if (getContext() != null) sb.append("Context: ").append(getContext()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BatchIsAuthorizedWithTokenInputItem == false) return false; BatchIsAuthorizedWithTokenInputItem other = (BatchIsAuthorizedWithTokenInputItem) obj; if (other.getAction() == null ^ this.getAction() == null) return false; if (other.getAction() != null && other.getAction().equals(this.getAction()) == false) return false; if (other.getResource() == null ^ this.getResource() == null) return false; if (other.getResource() != null && other.getResource().equals(this.getResource()) == false) return false; if (other.getContext() == null ^ this.getContext() == null) return false; if (other.getContext() != null && other.getContext().equals(this.getContext()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAction() == null) ? 0 : getAction().hashCode()); hashCode = prime * hashCode + ((getResource() == null) ? 0 : getResource().hashCode()); hashCode = prime * hashCode + ((getContext() == null) ? 0 : getContext().hashCode()); return hashCode; } @Override public BatchIsAuthorizedWithTokenInputItem clone() { try { return (BatchIsAuthorizedWithTokenInputItem) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.verifiedpermissions.model.transform.BatchIsAuthorizedWithTokenInputItemMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy