![JAR search and dependency download from the Maven repository](/logo.png)
com.amazonaws.services.securitytoken.model.ProvidedContext Maven / Gradle / Ivy
/*
* 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.securitytoken.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* Contains information about the provided context. This includes the signed and encrypted trusted context assertion and
* the context provider ARN from which the trusted context assertion was generated.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ProvidedContext implements Serializable, Cloneable {
/**
*
* The context provider ARN from which the trusted context assertion was generated.
*
*/
private String providerArn;
/**
*
* The signed and encrypted trusted context assertion generated by the context provider. The trusted context
* assertion is signed and encrypted by Amazon Web Services STS.
*
*/
private String contextAssertion;
/**
*
* The context provider ARN from which the trusted context assertion was generated.
*
*
* @param providerArn
* The context provider ARN from which the trusted context assertion was generated.
*/
public void setProviderArn(String providerArn) {
this.providerArn = providerArn;
}
/**
*
* The context provider ARN from which the trusted context assertion was generated.
*
*
* @return The context provider ARN from which the trusted context assertion was generated.
*/
public String getProviderArn() {
return this.providerArn;
}
/**
*
* The context provider ARN from which the trusted context assertion was generated.
*
*
* @param providerArn
* The context provider ARN from which the trusted context assertion was generated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProvidedContext withProviderArn(String providerArn) {
setProviderArn(providerArn);
return this;
}
/**
*
* The signed and encrypted trusted context assertion generated by the context provider. The trusted context
* assertion is signed and encrypted by Amazon Web Services STS.
*
*
* @param contextAssertion
* The signed and encrypted trusted context assertion generated by the context provider. The trusted context
* assertion is signed and encrypted by Amazon Web Services STS.
*/
public void setContextAssertion(String contextAssertion) {
this.contextAssertion = contextAssertion;
}
/**
*
* The signed and encrypted trusted context assertion generated by the context provider. The trusted context
* assertion is signed and encrypted by Amazon Web Services STS.
*
*
* @return The signed and encrypted trusted context assertion generated by the context provider. The trusted context
* assertion is signed and encrypted by Amazon Web Services STS.
*/
public String getContextAssertion() {
return this.contextAssertion;
}
/**
*
* The signed and encrypted trusted context assertion generated by the context provider. The trusted context
* assertion is signed and encrypted by Amazon Web Services STS.
*
*
* @param contextAssertion
* The signed and encrypted trusted context assertion generated by the context provider. The trusted context
* assertion is signed and encrypted by Amazon Web Services STS.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProvidedContext withContextAssertion(String contextAssertion) {
setContextAssertion(contextAssertion);
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 (getProviderArn() != null)
sb.append("ProviderArn: ").append(getProviderArn()).append(",");
if (getContextAssertion() != null)
sb.append("ContextAssertion: ").append(getContextAssertion());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ProvidedContext == false)
return false;
ProvidedContext other = (ProvidedContext) obj;
if (other.getProviderArn() == null ^ this.getProviderArn() == null)
return false;
if (other.getProviderArn() != null && other.getProviderArn().equals(this.getProviderArn()) == false)
return false;
if (other.getContextAssertion() == null ^ this.getContextAssertion() == null)
return false;
if (other.getContextAssertion() != null && other.getContextAssertion().equals(this.getContextAssertion()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getProviderArn() == null) ? 0 : getProviderArn().hashCode());
hashCode = prime * hashCode + ((getContextAssertion() == null) ? 0 : getContextAssertion().hashCode());
return hashCode;
}
@Override
public ProvidedContext clone() {
try {
return (ProvidedContext) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}