@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAccessKeyId() == null) ? 0 : getAccessKeyId().hashCode()); hashCode = prime * hashCode + ((getSecretKey() == null) ? 0 : getSecretKey().hashCode()); hashCode = prime * hashCode + ((getSessionToken() == null) ? 0 : getSessionToken().hashCode()); hashCode = prime * hashCode + ((getExpiration() == null) ? 0 : getExpiration().hashCode()); return hashCode; }
/** * 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 (getAccessKeyId() != null) sb.append("AccessKeyId: ").append(getAccessKeyId()).append(","); if (getSecretKey() != null) sb.append("SecretKey: ").append(getSecretKey()).append(","); if (getSessionToken() != null) sb.append("SessionToken: ").append(getSessionToken()).append(","); if (getExpiration() != null) sb.append("Expiration: ").append(getExpiration()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Credentials == false) return false; Credentials other = (Credentials) obj; if (other.getAccessKeyId() == null ^ this.getAccessKeyId() == null) return false; if (other.getAccessKeyId() != null && other.getAccessKeyId().equals(this.getAccessKeyId()) == false) return false; if (other.getSecretKey() == null ^ this.getSecretKey() == null) return false; if (other.getSecretKey() != null && other.getSecretKey().equals(this.getSecretKey()) == false) return false; if (other.getSessionToken() == null ^ this.getSessionToken() == null) return false; if (other.getSessionToken() != null && other.getSessionToken().equals(this.getSessionToken()) == false) return false; if (other.getExpiration() == null ^ this.getExpiration() == null) return false; if (other.getExpiration() != null && other.getExpiration().equals(this.getExpiration()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(Credentials credentials, ProtocolMarshaller protocolMarshaller) { if (credentials == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(credentials.getAccessKeyId(), ACCESSKEYID_BINDING); protocolMarshaller.marshall(credentials.getSecretKey(), SECRETKEY_BINDING); protocolMarshaller.marshall(credentials.getSessionToken(), SESSIONTOKEN_BINDING); protocolMarshaller.marshall(credentials.getExpiration(), EXPIRATION_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAccessKeyId() == null) ? 0 : getAccessKeyId().hashCode()); hashCode = prime * hashCode + ((getSecretKey() == null) ? 0 : getSecretKey().hashCode()); hashCode = prime * hashCode + ((getSessionToken() == null) ? 0 : getSessionToken().hashCode()); hashCode = prime * hashCode + ((getExpiration() == null) ? 0 : getExpiration().hashCode()); return hashCode; }
/** * 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 (getAccessKeyId() != null) sb.append("AccessKeyId: " + getAccessKeyId() + ","); if (getSecretKey() != null) sb.append("SecretKey: " + getSecretKey() + ","); if (getSessionToken() != null) sb.append("SessionToken: " + getSessionToken() + ","); if (getExpiration() != null) sb.append("Expiration: " + getExpiration()); sb.append("}"); return sb.toString(); }
&& other.getSecretKey().equals(this.getSecretKey()) == false) return false; if (other.getSessionToken() == null ^ this.getSessionToken() == null) return false; if (other.getSessionToken() != null && other.getSessionToken().equals(this.getSessionToken()) == false) return false; if (other.getExpiration() == null ^ this.getExpiration() == null)
.getCredentials(); sessionCredentials = new BasicSessionCredentials(credentials.getAccessKeyId(), credentials.getSecretKey(), credentials.getSessionToken()); setSessionCredentialsExpiration(credentials.getExpiration());
public void marshall(Credentials credentials, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (credentials.getAccessKeyId() != null) { String accessKeyId = credentials.getAccessKeyId(); jsonWriter.name("AccessKeyId"); jsonWriter.value(accessKeyId); } if (credentials.getSecretKey() != null) { String secretKey = credentials.getSecretKey(); jsonWriter.name("SecretKey"); jsonWriter.value(secretKey); } if (credentials.getSessionToken() != null) { String sessionToken = credentials.getSessionToken(); jsonWriter.name("SessionToken"); jsonWriter.value(sessionToken); } if (credentials.getExpiration() != null) { java.util.Date expiration = credentials.getExpiration(); jsonWriter.name("Expiration"); jsonWriter.value(expiration); } jsonWriter.endObject(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAccessKeyId() == null) ? 0 : getAccessKeyId().hashCode()); hashCode = prime * hashCode + ((getSecretKey() == null) ? 0 : getSecretKey().hashCode()); hashCode = prime * hashCode + ((getSessionToken() == null) ? 0 : getSessionToken().hashCode()); hashCode = prime * hashCode + ((getExpiration() == null) ? 0 : getExpiration().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAccessKeyId() == null) ? 0 : getAccessKeyId().hashCode()); hashCode = prime * hashCode + ((getSecretKey() == null) ? 0 : getSecretKey().hashCode()); hashCode = prime * hashCode + ((getSessionToken() == null) ? 0 : getSessionToken().hashCode()); hashCode = prime * hashCode + ((getExpiration() == null) ? 0 : getExpiration().hashCode()); return hashCode; }
/** * 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 (getAccessKeyId() != null) sb.append("AccessKeyId: " + getAccessKeyId() + ","); if (getSecretKey() != null) sb.append("SecretKey: " + getSecretKey() + ","); if (getSessionToken() != null) sb.append("SessionToken: " + getSessionToken() + ","); if (getExpiration() != null) sb.append("Expiration: " + getExpiration()); sb.append("}"); return sb.toString(); }
/** * 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 (getAccessKeyId() != null) sb.append("AccessKeyId: " + getAccessKeyId() + ","); if (getSecretKey() != null) sb.append("SecretKey: " + getSecretKey() + ","); if (getSessionToken() != null) sb.append("SessionToken: " + getSessionToken() + ","); if (getExpiration() != null) sb.append("Expiration: " + getExpiration()); sb.append("}"); return sb.toString(); }
&& other.getSecretKey().equals(this.getSecretKey()) == false) return false; if (other.getSessionToken() == null ^ this.getSessionToken() == null) return false; if (other.getSessionToken() != null && other.getSessionToken().equals(this.getSessionToken()) == false) return false; if (other.getExpiration() == null ^ this.getExpiration() == null)
&& other.getSecretKey().equals(this.getSecretKey()) == false) return false; if (other.getSessionToken() == null ^ this.getSessionToken() == null) return false; if (other.getSessionToken() != null && other.getSessionToken().equals(this.getSessionToken()) == false) return false; if (other.getExpiration() == null ^ this.getExpiration() == null)
public void marshall(Credentials credentials, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (credentials.getAccessKeyId() != null) { String accessKeyId = credentials.getAccessKeyId(); jsonWriter.name("AccessKeyId"); jsonWriter.value(accessKeyId); } if (credentials.getSecretKey() != null) { String secretKey = credentials.getSecretKey(); jsonWriter.name("SecretKey"); jsonWriter.value(secretKey); } if (credentials.getSessionToken() != null) { String sessionToken = credentials.getSessionToken(); jsonWriter.name("SessionToken"); jsonWriter.value(sessionToken); } if (credentials.getExpiration() != null) { java.util.Date expiration = credentials.getExpiration(); jsonWriter.name("Expiration"); jsonWriter.value(expiration); } jsonWriter.endObject(); }
.getCredentials(); sessionCredentials = new BasicSessionCredentials(credentials.getAccessKeyId(), credentials.getSecretKey(), credentials.getSessionToken()); setSessionCredentialsExpiration(credentials.getExpiration());
public void marshall(Credentials credentials, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (credentials.getAccessKeyId() != null) { String accessKeyId = credentials.getAccessKeyId(); jsonWriter.name("AccessKeyId"); jsonWriter.value(accessKeyId); } if (credentials.getSecretKey() != null) { String secretKey = credentials.getSecretKey(); jsonWriter.name("SecretKey"); jsonWriter.value(secretKey); } if (credentials.getSessionToken() != null) { String sessionToken = credentials.getSessionToken(); jsonWriter.name("SessionToken"); jsonWriter.value(sessionToken); } if (credentials.getExpiration() != null) { java.util.Date expiration = credentials.getExpiration(); jsonWriter.name("Expiration"); jsonWriter.value(expiration); } jsonWriter.endObject(); }
.getCredentials(); sessionCredentials = new BasicSessionCredentials(credentials.getAccessKeyId(), credentials.getSecretKey(), credentials.getSessionToken()); setSessionCredentialsExpiration(credentials.getExpiration());