@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAliasName() == null) ? 0 : getAliasName().hashCode()); hashCode = prime * hashCode + ((getAliasArn() == null) ? 0 : getAliasArn().hashCode()); hashCode = prime * hashCode + ((getTargetKeyId() == null) ? 0 : getTargetKeyId().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 (getAliasName() != null) sb.append("AliasName: ").append(getAliasName()).append(","); if (getAliasArn() != null) sb.append("AliasArn: ").append(getAliasArn()).append(","); if (getTargetKeyId() != null) sb.append("TargetKeyId: ").append(getTargetKeyId()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AliasListEntry == false) return false; AliasListEntry other = (AliasListEntry) obj; if (other.getAliasName() == null ^ this.getAliasName() == null) return false; if (other.getAliasName() != null && other.getAliasName().equals(this.getAliasName()) == false) return false; if (other.getAliasArn() == null ^ this.getAliasArn() == null) return false; if (other.getAliasArn() != null && other.getAliasArn().equals(this.getAliasArn()) == false) return false; if (other.getTargetKeyId() == null ^ this.getTargetKeyId() == null) return false; if (other.getTargetKeyId() != null && other.getTargetKeyId().equals(this.getTargetKeyId()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(AliasListEntry aliasListEntry, ProtocolMarshaller protocolMarshaller) { if (aliasListEntry == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(aliasListEntry.getAliasName(), ALIASNAME_BINDING); protocolMarshaller.marshall(aliasListEntry.getAliasArn(), ALIASARN_BINDING); protocolMarshaller.marshall(aliasListEntry.getTargetKeyId(), TARGETKEYID_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 + ((getAliasName() == null) ? 0 : getAliasName().hashCode()); hashCode = prime * hashCode + ((getAliasArn() == null) ? 0 : getAliasArn().hashCode()); hashCode = prime * hashCode + ((getTargetKeyId() == null) ? 0 : getTargetKeyId().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 (getAliasName() != null) sb.append("AliasName: " + getAliasName() + ","); if (getAliasArn() != null) sb.append("AliasArn: " + getAliasArn() + ","); if (getTargetKeyId() != null) sb.append("TargetKeyId: " + getTargetKeyId()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AliasListEntry == false) return false; AliasListEntry other = (AliasListEntry) obj; if (other.getAliasName() == null ^ this.getAliasName() == null) return false; if (other.getAliasName() != null && other.getAliasName().equals(this.getAliasName()) == false) return false; if (other.getAliasArn() == null ^ this.getAliasArn() == null) return false; if (other.getAliasArn() != null && other.getAliasArn().equals(this.getAliasArn()) == false) return false; if (other.getTargetKeyId() == null ^ this.getTargetKeyId() == null) return false; if (other.getTargetKeyId() != null && other.getTargetKeyId().equals(this.getTargetKeyId()) == false) return false; return true; } }
public void marshall(AliasListEntry aliasListEntry, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (aliasListEntry.getAliasName() != null) { String aliasName = aliasListEntry.getAliasName(); jsonWriter.name("AliasName"); jsonWriter.value(aliasName); } if (aliasListEntry.getAliasArn() != null) { String aliasArn = aliasListEntry.getAliasArn(); jsonWriter.name("AliasArn"); jsonWriter.value(aliasArn); } if (aliasListEntry.getTargetKeyId() != null) { String targetKeyId = aliasListEntry.getTargetKeyId(); jsonWriter.name("TargetKeyId"); jsonWriter.value(targetKeyId); } jsonWriter.endObject(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAliasName() == null) ? 0 : getAliasName().hashCode()); hashCode = prime * hashCode + ((getAliasArn() == null) ? 0 : getAliasArn().hashCode()); hashCode = prime * hashCode + ((getTargetKeyId() == null) ? 0 : getTargetKeyId().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAliasName() == null) ? 0 : getAliasName().hashCode()); hashCode = prime * hashCode + ((getAliasArn() == null) ? 0 : getAliasArn().hashCode()); hashCode = prime * hashCode + ((getTargetKeyId() == null) ? 0 : getTargetKeyId().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAliasName() == null) ? 0 : getAliasName().hashCode()); hashCode = prime * hashCode + ((getAliasArn() == null) ? 0 : getAliasArn().hashCode()); hashCode = prime * hashCode + ((getTargetKeyId() == null) ? 0 : getTargetKeyId().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAliasName() == null) ? 0 : getAliasName().hashCode()); hashCode = prime * hashCode + ((getAliasArn() == null) ? 0 : getAliasArn().hashCode()); hashCode = prime * hashCode + ((getTargetKeyId() == null) ? 0 : getTargetKeyId().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 (getAliasName() != null) sb.append("AliasName: ").append(getAliasName()).append(","); if (getAliasArn() != null) sb.append("AliasArn: ").append(getAliasArn()).append(","); if (getTargetKeyId() != null) sb.append("TargetKeyId: ").append(getTargetKeyId()); 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 (getAliasName() != null) sb.append("AliasName: " + getAliasName() + ","); if (getAliasArn() != null) sb.append("AliasArn: " + getAliasArn() + ","); if (getTargetKeyId() != null) sb.append("TargetKeyId: " + getTargetKeyId()); 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 (getAliasName() != null) sb.append("AliasName: " + getAliasName() + ","); if (getAliasArn() != null) sb.append("AliasArn: " + getAliasArn() + ","); if (getTargetKeyId() != null) sb.append("TargetKeyId: " + getTargetKeyId()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(AliasListEntry aliasListEntry, ProtocolMarshaller protocolMarshaller) { if (aliasListEntry == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(aliasListEntry.getAliasName(), ALIASNAME_BINDING); protocolMarshaller.marshall(aliasListEntry.getAliasArn(), ALIASARN_BINDING); protocolMarshaller.marshall(aliasListEntry.getTargetKeyId(), TARGETKEYID_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * Marshall the given parameter object. */ public void marshall(AliasListEntry aliasListEntry, ProtocolMarshaller protocolMarshaller) { if (aliasListEntry == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(aliasListEntry.getAliasName(), ALIASNAME_BINDING); protocolMarshaller.marshall(aliasListEntry.getAliasArn(), ALIASARN_BINDING); protocolMarshaller.marshall(aliasListEntry.getTargetKeyId(), TARGETKEYID_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public Set<Algorithm> call() throws BackgroundException { final AWSKMS client = client(container); try { final Map<String, String> aliases = new HashMap<String, String>(); for(AliasListEntry entry : client.listAliases().getAliases()) { aliases.put(entry.getTargetKeyId(), entry.getAliasName()); } final Set<Algorithm> keys = new HashSet<Algorithm>(); for(KeyListEntry entry : client.listKeys().getKeys()) { keys.add(new AliasedAlgorithm(entry, aliases.get(entry.getKeyId()))); } return keys; } catch(AmazonClientException e) { throw new AmazonServiceExceptionMappingService().map("Cannot read AWS KMS configuration", e); } finally { client.shutdown(); } } }, prompt));
public void marshall(AliasListEntry aliasListEntry, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (aliasListEntry.getAliasName() != null) { String aliasName = aliasListEntry.getAliasName(); jsonWriter.name("AliasName"); jsonWriter.value(aliasName); } if (aliasListEntry.getAliasArn() != null) { String aliasArn = aliasListEntry.getAliasArn(); jsonWriter.name("AliasArn"); jsonWriter.value(aliasArn); } if (aliasListEntry.getTargetKeyId() != null) { String targetKeyId = aliasListEntry.getTargetKeyId(); jsonWriter.name("TargetKeyId"); jsonWriter.value(targetKeyId); } jsonWriter.endObject(); }
public void marshall(AliasListEntry aliasListEntry, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (aliasListEntry.getAliasName() != null) { String aliasName = aliasListEntry.getAliasName(); jsonWriter.name("AliasName"); jsonWriter.value(aliasName); } if (aliasListEntry.getAliasArn() != null) { String aliasArn = aliasListEntry.getAliasArn(); jsonWriter.name("AliasArn"); jsonWriter.value(aliasArn); } if (aliasListEntry.getTargetKeyId() != null) { String targetKeyId = aliasListEntry.getTargetKeyId(); jsonWriter.name("TargetKeyId"); jsonWriter.value(targetKeyId); } jsonWriter.endObject(); }