/* * Copyright 2010-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; public class TestInvokeAuthorizerResult implements Serializable { /** *

* True if the token is authenticated, otherwise false. *

*/ private Boolean isAuthenticated; /** *

* The principal ID. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9]+
*/ private String principalId; /** *

* IAM policy documents. *

*/ private java.util.List policyDocuments; /** *

* The number of seconds after which the temporary credentials are * refreshed. *

*/ private Integer refreshAfterInSeconds; /** *

* The number of seconds after which the connection is terminated. *

*/ private Integer disconnectAfterInSeconds; /** *

* True if the token is authenticated, otherwise false. *

* * @return

* True if the token is authenticated, otherwise false. *

*/ public Boolean isIsAuthenticated() { return isAuthenticated; } /** *

* True if the token is authenticated, otherwise false. *

* * @return

* True if the token is authenticated, otherwise false. *

*/ public Boolean getIsAuthenticated() { return isAuthenticated; } /** *

* True if the token is authenticated, otherwise false. *

* * @param isAuthenticated

* True if the token is authenticated, otherwise false. *

*/ public void setIsAuthenticated(Boolean isAuthenticated) { this.isAuthenticated = isAuthenticated; } /** *

* True if the token is authenticated, otherwise false. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param isAuthenticated

* True if the token is authenticated, otherwise false. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TestInvokeAuthorizerResult withIsAuthenticated(Boolean isAuthenticated) { this.isAuthenticated = isAuthenticated; return this; } /** *

* The principal ID. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9]+
* * @return

* The principal ID. *

*/ public String getPrincipalId() { return principalId; } /** *

* The principal ID. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9]+
* * @param principalId

* The principal ID. *

*/ public void setPrincipalId(String principalId) { this.principalId = principalId; } /** *

* The principal ID. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9]+
* * @param principalId

* The principal ID. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TestInvokeAuthorizerResult withPrincipalId(String principalId) { this.principalId = principalId; return this; } /** *

* IAM policy documents. *

* * @return

* IAM policy documents. *

*/ public java.util.List getPolicyDocuments() { return policyDocuments; } /** *

* IAM policy documents. *

* * @param policyDocuments

* IAM policy documents. *

*/ public void setPolicyDocuments(java.util.Collection policyDocuments) { if (policyDocuments == null) { this.policyDocuments = null; return; } this.policyDocuments = new java.util.ArrayList(policyDocuments); } /** *

* IAM policy documents. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param policyDocuments

* IAM policy documents. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TestInvokeAuthorizerResult withPolicyDocuments(String... policyDocuments) { if (getPolicyDocuments() == null) { this.policyDocuments = new java.util.ArrayList(policyDocuments.length); } for (String value : policyDocuments) { this.policyDocuments.add(value); } return this; } /** *

* IAM policy documents. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param policyDocuments

* IAM policy documents. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TestInvokeAuthorizerResult withPolicyDocuments( java.util.Collection policyDocuments) { setPolicyDocuments(policyDocuments); return this; } /** *

* The number of seconds after which the temporary credentials are * refreshed. *

* * @return

* The number of seconds after which the temporary credentials are * refreshed. *

*/ public Integer getRefreshAfterInSeconds() { return refreshAfterInSeconds; } /** *

* The number of seconds after which the temporary credentials are * refreshed. *

* * @param refreshAfterInSeconds

* The number of seconds after which the temporary credentials * are refreshed. *

*/ public void setRefreshAfterInSeconds(Integer refreshAfterInSeconds) { this.refreshAfterInSeconds = refreshAfterInSeconds; } /** *

* The number of seconds after which the temporary credentials are * refreshed. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param refreshAfterInSeconds

* The number of seconds after which the temporary credentials * are refreshed. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TestInvokeAuthorizerResult withRefreshAfterInSeconds(Integer refreshAfterInSeconds) { this.refreshAfterInSeconds = refreshAfterInSeconds; return this; } /** *

* The number of seconds after which the connection is terminated. *

* * @return

* The number of seconds after which the connection is terminated. *

*/ public Integer getDisconnectAfterInSeconds() { return disconnectAfterInSeconds; } /** *

* The number of seconds after which the connection is terminated. *

* * @param disconnectAfterInSeconds

* The number of seconds after which the connection is * terminated. *

*/ public void setDisconnectAfterInSeconds(Integer disconnectAfterInSeconds) { this.disconnectAfterInSeconds = disconnectAfterInSeconds; } /** *

* The number of seconds after which the connection is terminated. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param disconnectAfterInSeconds

* The number of seconds after which the connection is * terminated. *

* @return A reference to this updated object so that method calls can be * chained together. */ public TestInvokeAuthorizerResult withDisconnectAfterInSeconds(Integer disconnectAfterInSeconds) { this.disconnectAfterInSeconds = disconnectAfterInSeconds; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getIsAuthenticated() != null) sb.append("isAuthenticated: " + getIsAuthenticated() + ","); if (getPrincipalId() != null) sb.append("principalId: " + getPrincipalId() + ","); if (getPolicyDocuments() != null) sb.append("policyDocuments: " + getPolicyDocuments() + ","); if (getRefreshAfterInSeconds() != null) sb.append("refreshAfterInSeconds: " + getRefreshAfterInSeconds() + ","); if (getDisconnectAfterInSeconds() != null) sb.append("disconnectAfterInSeconds: " + getDisconnectAfterInSeconds()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIsAuthenticated() == null) ? 0 : getIsAuthenticated().hashCode()); hashCode = prime * hashCode + ((getPrincipalId() == null) ? 0 : getPrincipalId().hashCode()); hashCode = prime * hashCode + ((getPolicyDocuments() == null) ? 0 : getPolicyDocuments().hashCode()); hashCode = prime * hashCode + ((getRefreshAfterInSeconds() == null) ? 0 : getRefreshAfterInSeconds().hashCode()); hashCode = prime * hashCode + ((getDisconnectAfterInSeconds() == null) ? 0 : getDisconnectAfterInSeconds() .hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TestInvokeAuthorizerResult == false) return false; TestInvokeAuthorizerResult other = (TestInvokeAuthorizerResult) obj; if (other.getIsAuthenticated() == null ^ this.getIsAuthenticated() == null) return false; if (other.getIsAuthenticated() != null && other.getIsAuthenticated().equals(this.getIsAuthenticated()) == false) return false; if (other.getPrincipalId() == null ^ this.getPrincipalId() == null) return false; if (other.getPrincipalId() != null && other.getPrincipalId().equals(this.getPrincipalId()) == false) return false; if (other.getPolicyDocuments() == null ^ this.getPolicyDocuments() == null) return false; if (other.getPolicyDocuments() != null && other.getPolicyDocuments().equals(this.getPolicyDocuments()) == false) return false; if (other.getRefreshAfterInSeconds() == null ^ this.getRefreshAfterInSeconds() == null) return false; if (other.getRefreshAfterInSeconds() != null && other.getRefreshAfterInSeconds().equals(this.getRefreshAfterInSeconds()) == false) return false; if (other.getDisconnectAfterInSeconds() == null ^ this.getDisconnectAfterInSeconds() == null) return false; if (other.getDisconnectAfterInSeconds() != null && other.getDisconnectAfterInSeconds().equals(this.getDisconnectAfterInSeconds()) == false) return false; return true; } }