@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 + ((getIdentityId() == null) ? 0 : getIdentityId().hashCode()); hashCode = prime * hashCode + ((getCredentials() == null) ? 0 : getCredentials().hashCode()); return hashCode; }
/** * <p> * The Access Key portion of the credentials. * </p> * * @param accessKeyId * The Access Key portion of the credentials. * @return Returns a reference to this object so that method calls can be chained together. */ public Credentials withAccessKeyId(String accessKeyId) { setAccessKeyId(accessKeyId); return this; }
public Credentials unmarshall(JsonUnmarshallerContext context) throws Exception { Credentials credentials = new Credentials(); if (context.testExpression("AccessKeyId", targetDepth)) { context.nextToken(); credentials.setAccessKeyId(context.getUnmarshaller(String.class).unmarshall(context)); credentials.setSecretKey(context.getUnmarshaller(String.class).unmarshall(context)); credentials.setSessionToken(context.getUnmarshaller(String.class).unmarshall(context)); credentials.setExpiration(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetCredentialsForIdentityResult == false) return false; GetCredentialsForIdentityResult other = (GetCredentialsForIdentityResult) obj; if (other.getIdentityId() == null ^ this.getIdentityId() == null) return false; if (other.getIdentityId() != null && other.getIdentityId().equals(this.getIdentityId()) == false) return false; if (other.getCredentials() == null ^ this.getCredentials() == null) return false; if (other.getCredentials() != null && other.getCredentials().equals(this.getCredentials()) == false) return false; return true; }
/** * <p> * The Secret Access Key portion of the credentials * </p> * * @param secretKey * The Secret Access Key portion of the credentials * @return Returns a reference to this object so that method calls can be chained together. */ public Credentials withSecretKey(String secretKey) { setSecretKey(secretKey); return this; }
/** * <p> * The date at which these credentials will expire. * </p> * * @param expiration * The date at which these credentials will expire. * @return Returns a reference to this object so that method calls can be chained together. */ public Credentials withExpiration(java.util.Date expiration) { setExpiration(expiration); return this; }
public Credentials unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } Credentials credentials = new Credentials(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("AccessKeyId")) { credentials.setAccessKeyId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("SecretKey")) { credentials.setSecretKey(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("SessionToken")) { credentials.setSessionToken(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Expiration")) { credentials.setExpiration(DateJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return credentials; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetCredentialsForIdentityResult == false) return false; GetCredentialsForIdentityResult other = (GetCredentialsForIdentityResult) obj; if (other.getIdentityId() == null ^ this.getIdentityId() == null) return false; if (other.getIdentityId() != null && other.getIdentityId().equals(this.getIdentityId()) == false) return false; if (other.getCredentials() == null ^ this.getCredentials() == null) return false; if (other.getCredentials() != null && other.getCredentials().equals(this.getCredentials()) == false) return false; return true; } }
@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; }
public Credentials unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } Credentials credentials = new Credentials(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("AccessKeyId")) { credentials.setAccessKeyId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("SecretKey")) { credentials.setSecretKey(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("SessionToken")) { credentials.setSessionToken(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Expiration")) { credentials.setExpiration(DateJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return credentials; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIdentityId() == null) ? 0 : getIdentityId().hashCode()); hashCode = prime * hashCode + ((getCredentials() == null) ? 0 : getCredentials().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetCredentialsForIdentityResult == false) return false; GetCredentialsForIdentityResult other = (GetCredentialsForIdentityResult) obj; if (other.getIdentityId() == null ^ this.getIdentityId() == null) return false; if (other.getIdentityId() != null && other.getIdentityId().equals(this.getIdentityId()) == false) return false; if (other.getCredentials() == null ^ this.getCredentials() == null) return false; if (other.getCredentials() != null && other.getCredentials().equals(this.getCredentials()) == false) return false; return true; } }
/** * 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(); }
public Credentials unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } Credentials credentials = new Credentials(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("AccessKeyId")) { credentials.setAccessKeyId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("SecretKey")) { credentials.setSecretKey(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("SessionToken")) { credentials.setSessionToken(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Expiration")) { credentials.setExpiration(DateJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return credentials; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIdentityId() == null) ? 0 : getIdentityId().hashCode()); hashCode = prime * hashCode + ((getCredentials() == null) ? 0 : getCredentials().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetCredentialsForIdentityResult == false) return false; GetCredentialsForIdentityResult other = (GetCredentialsForIdentityResult) obj; if (other.getIdentityId() == null ^ this.getIdentityId() == null) return false; if (other.getIdentityId() != null && other.getIdentityId().equals(this.getIdentityId()) == false) return false; if (other.getCredentials() == null ^ this.getCredentials() == null) return false; if (other.getCredentials() != null && other.getCredentials().equals(this.getCredentials()) == 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 + ((getIdentityId() == null) ? 0 : getIdentityId().hashCode()); hashCode = prime * hashCode + ((getCredentials() == null) ? 0 : getCredentials().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; }