if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getKeyUsage() != null) sb.append("KeyUsage: ").append(getKeyUsage()).append(","); if (getKeyState() != null) sb.append("KeyState: ").append(getKeyState()).append(",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAWSAccountId() == null) ? 0 : getAWSAccountId().hashCode()); hashCode = prime * hashCode + ((getKeyId() == null) ? 0 : getKeyId().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getKeyUsage() == null) ? 0 : getKeyUsage().hashCode()); hashCode = prime * hashCode + ((getKeyState() == null) ? 0 : getKeyState().hashCode()); hashCode = prime * hashCode + ((getDeletionDate() == null) ? 0 : getDeletionDate().hashCode()); hashCode = prime * hashCode + ((getValidTo() == null) ? 0 : getValidTo().hashCode()); hashCode = prime * hashCode + ((getOrigin() == null) ? 0 : getOrigin().hashCode()); hashCode = prime * hashCode + ((getCustomKeyStoreId() == null) ? 0 : getCustomKeyStoreId().hashCode()); hashCode = prime * hashCode + ((getCloudHsmClusterId() == null) ? 0 : getCloudHsmClusterId().hashCode()); hashCode = prime * hashCode + ((getExpirationModel() == null) ? 0 : getExpirationModel().hashCode()); hashCode = prime * hashCode + ((getKeyManager() == null) ? 0 : getKeyManager().hashCode()); return hashCode; }
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getKeyUsage() == null ^ this.getKeyUsage() == null) return false; if (other.getKeyUsage() != null && other.getKeyUsage().equals(this.getKeyUsage()) == false) return false; if (other.getKeyState() == null ^ this.getKeyState() == null)
/** * Marshall the given parameter object. */ public void marshall(KeyMetadata keyMetadata, ProtocolMarshaller protocolMarshaller) { if (keyMetadata == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(keyMetadata.getAWSAccountId(), AWSACCOUNTID_BINDING); protocolMarshaller.marshall(keyMetadata.getKeyId(), KEYID_BINDING); protocolMarshaller.marshall(keyMetadata.getArn(), ARN_BINDING); protocolMarshaller.marshall(keyMetadata.getCreationDate(), CREATIONDATE_BINDING); protocolMarshaller.marshall(keyMetadata.getEnabled(), ENABLED_BINDING); protocolMarshaller.marshall(keyMetadata.getDescription(), DESCRIPTION_BINDING); protocolMarshaller.marshall(keyMetadata.getKeyUsage(), KEYUSAGE_BINDING); protocolMarshaller.marshall(keyMetadata.getKeyState(), KEYSTATE_BINDING); protocolMarshaller.marshall(keyMetadata.getDeletionDate(), DELETIONDATE_BINDING); protocolMarshaller.marshall(keyMetadata.getValidTo(), VALIDTO_BINDING); protocolMarshaller.marshall(keyMetadata.getOrigin(), ORIGIN_BINDING); protocolMarshaller.marshall(keyMetadata.getCustomKeyStoreId(), CUSTOMKEYSTOREID_BINDING); protocolMarshaller.marshall(keyMetadata.getCloudHsmClusterId(), CLOUDHSMCLUSTERID_BINDING); protocolMarshaller.marshall(keyMetadata.getExpirationModel(), EXPIRATIONMODEL_BINDING); protocolMarshaller.marshall(keyMetadata.getKeyManager(), KEYMANAGER_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 + ((getAWSAccountId() == null) ? 0 : getAWSAccountId().hashCode()); hashCode = prime * hashCode + ((getKeyId() == null) ? 0 : getKeyId().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getKeyUsage() == null) ? 0 : getKeyUsage().hashCode()); hashCode = prime * hashCode + ((getKeyState() == null) ? 0 : getKeyState().hashCode()); hashCode = prime * hashCode + ((getDeletionDate() == null) ? 0 : getDeletionDate().hashCode()); hashCode = prime * hashCode + ((getValidTo() == null) ? 0 : getValidTo().hashCode()); hashCode = prime * hashCode + ((getOrigin() == null) ? 0 : getOrigin().hashCode()); hashCode = prime * hashCode + ((getCustomKeyStoreId() == null) ? 0 : getCustomKeyStoreId().hashCode()); hashCode = prime * hashCode + ((getCloudHsmClusterId() == null) ? 0 : getCloudHsmClusterId().hashCode()); hashCode = prime * hashCode + ((getExpirationModel() == null) ? 0 : getExpirationModel().hashCode()); hashCode = prime * hashCode + ((getKeyManager() == null) ? 0 : getKeyManager().hashCode()); return hashCode; }
if (getDescription() != null) sb.append("Description: " + getDescription() + ","); if (getKeyUsage() != null) sb.append("KeyUsage: " + getKeyUsage() + ","); if (getKeyState() != null) sb.append("KeyState: " + getKeyState() + ",");
&& other.getDescription().equals(this.getDescription()) == false) return false; if (other.getKeyUsage() == null ^ this.getKeyUsage() == null) return false; if (other.getKeyUsage() != null && other.getKeyUsage().equals(this.getKeyUsage()) == false) return false; if (other.getKeyState() == null ^ this.getKeyState() == null)
if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getKeyUsage() != null) sb.append("KeyUsage: ").append(getKeyUsage()).append(","); if (getKeyState() != null) sb.append("KeyState: ").append(getKeyState()).append(",");
if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getKeyUsage() != null) sb.append("KeyUsage: ").append(getKeyUsage()).append(","); if (getKeyState() != null) sb.append("KeyState: ").append(getKeyState()).append(",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAWSAccountId() == null) ? 0 : getAWSAccountId().hashCode()); hashCode = prime * hashCode + ((getKeyId() == null) ? 0 : getKeyId().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getKeyUsage() == null) ? 0 : getKeyUsage().hashCode()); hashCode = prime * hashCode + ((getKeyState() == null) ? 0 : getKeyState().hashCode()); hashCode = prime * hashCode + ((getDeletionDate() == null) ? 0 : getDeletionDate().hashCode()); hashCode = prime * hashCode + ((getValidTo() == null) ? 0 : getValidTo().hashCode()); hashCode = prime * hashCode + ((getOrigin() == null) ? 0 : getOrigin().hashCode()); hashCode = prime * hashCode + ((getExpirationModel() == null) ? 0 : getExpirationModel().hashCode()); hashCode = prime * hashCode + ((getKeyManager() == null) ? 0 : getKeyManager().hashCode()); return hashCode; }
jsonWriter.value(description); if (keyMetadata.getKeyUsage() != null) { String keyUsage = keyMetadata.getKeyUsage(); jsonWriter.name("KeyUsage"); jsonWriter.value(keyUsage);
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAWSAccountId() == null) ? 0 : getAWSAccountId().hashCode()); hashCode = prime * hashCode + ((getKeyId() == null) ? 0 : getKeyId().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getKeyUsage() == null) ? 0 : getKeyUsage().hashCode()); hashCode = prime * hashCode + ((getKeyState() == null) ? 0 : getKeyState().hashCode()); hashCode = prime * hashCode + ((getDeletionDate() == null) ? 0 : getDeletionDate().hashCode()); hashCode = prime * hashCode + ((getValidTo() == null) ? 0 : getValidTo().hashCode()); hashCode = prime * hashCode + ((getOrigin() == null) ? 0 : getOrigin().hashCode()); hashCode = prime * hashCode + ((getExpirationModel() == null) ? 0 : getExpirationModel().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAWSAccountId() == null) ? 0 : getAWSAccountId().hashCode()); hashCode = prime * hashCode + ((getKeyId() == null) ? 0 : getKeyId().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getKeyUsage() == null) ? 0 : getKeyUsage().hashCode()); hashCode = prime * hashCode + ((getKeyState() == null) ? 0 : getKeyState().hashCode()); hashCode = prime * hashCode + ((getDeletionDate() == null) ? 0 : getDeletionDate().hashCode()); hashCode = prime * hashCode + ((getValidTo() == null) ? 0 : getValidTo().hashCode()); hashCode = prime * hashCode + ((getOrigin() == null) ? 0 : getOrigin().hashCode()); hashCode = prime * hashCode + ((getCustomKeyStoreId() == null) ? 0 : getCustomKeyStoreId().hashCode()); hashCode = prime * hashCode + ((getCloudHsmClusterId() == null) ? 0 : getCloudHsmClusterId().hashCode()); hashCode = prime * hashCode + ((getExpirationModel() == null) ? 0 : getExpirationModel().hashCode()); hashCode = prime * hashCode + ((getKeyManager() == null) ? 0 : getKeyManager().hashCode()); return hashCode; }
if (getDescription() != null) sb.append("Description: " + getDescription() + ","); if (getKeyUsage() != null) sb.append("KeyUsage: " + getKeyUsage() + ","); if (getKeyState() != null) sb.append("KeyState: " + getKeyState() + ",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAWSAccountId() == null) ? 0 : getAWSAccountId().hashCode()); hashCode = prime * hashCode + ((getKeyId() == null) ? 0 : getKeyId().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getKeyUsage() == null) ? 0 : getKeyUsage().hashCode()); hashCode = prime * hashCode + ((getKeyState() == null) ? 0 : getKeyState().hashCode()); hashCode = prime * hashCode + ((getDeletionDate() == null) ? 0 : getDeletionDate().hashCode()); hashCode = prime * hashCode + ((getValidTo() == null) ? 0 : getValidTo().hashCode()); hashCode = prime * hashCode + ((getOrigin() == null) ? 0 : getOrigin().hashCode()); hashCode = prime * hashCode + ((getCustomKeyStoreId() == null) ? 0 : getCustomKeyStoreId().hashCode()); hashCode = prime * hashCode + ((getCloudHsmClusterId() == null) ? 0 : getCloudHsmClusterId().hashCode()); hashCode = prime * hashCode + ((getExpirationModel() == null) ? 0 : getExpirationModel().hashCode()); hashCode = prime * hashCode + ((getKeyManager() == null) ? 0 : getKeyManager().hashCode()); return hashCode; }
if (getDescription() != null) sb.append("Description: " + getDescription() + ","); if (getKeyUsage() != null) sb.append("KeyUsage: " + getKeyUsage() + ","); if (getKeyState() != null) sb.append("KeyState: " + getKeyState() + ",");
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getKeyUsage() == null ^ this.getKeyUsage() == null) return false; if (other.getKeyUsage() != null && other.getKeyUsage().equals(this.getKeyUsage()) == false) return false; if (other.getKeyState() == null ^ this.getKeyState() == null)
/** * Marshall the given parameter object. */ public void marshall(KeyMetadata keyMetadata, ProtocolMarshaller protocolMarshaller) { if (keyMetadata == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(keyMetadata.getAWSAccountId(), AWSACCOUNTID_BINDING); protocolMarshaller.marshall(keyMetadata.getKeyId(), KEYID_BINDING); protocolMarshaller.marshall(keyMetadata.getArn(), ARN_BINDING); protocolMarshaller.marshall(keyMetadata.getCreationDate(), CREATIONDATE_BINDING); protocolMarshaller.marshall(keyMetadata.getEnabled(), ENABLED_BINDING); protocolMarshaller.marshall(keyMetadata.getDescription(), DESCRIPTION_BINDING); protocolMarshaller.marshall(keyMetadata.getKeyUsage(), KEYUSAGE_BINDING); protocolMarshaller.marshall(keyMetadata.getKeyState(), KEYSTATE_BINDING); protocolMarshaller.marshall(keyMetadata.getDeletionDate(), DELETIONDATE_BINDING); protocolMarshaller.marshall(keyMetadata.getValidTo(), VALIDTO_BINDING); protocolMarshaller.marshall(keyMetadata.getOrigin(), ORIGIN_BINDING); protocolMarshaller.marshall(keyMetadata.getExpirationModel(), EXPIRATIONMODEL_BINDING); protocolMarshaller.marshall(keyMetadata.getKeyManager(), KEYMANAGER_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * Marshall the given parameter object. */ public void marshall(KeyMetadata keyMetadata, ProtocolMarshaller protocolMarshaller) { if (keyMetadata == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(keyMetadata.getAWSAccountId(), AWSACCOUNTID_BINDING); protocolMarshaller.marshall(keyMetadata.getKeyId(), KEYID_BINDING); protocolMarshaller.marshall(keyMetadata.getArn(), ARN_BINDING); protocolMarshaller.marshall(keyMetadata.getCreationDate(), CREATIONDATE_BINDING); protocolMarshaller.marshall(keyMetadata.getEnabled(), ENABLED_BINDING); protocolMarshaller.marshall(keyMetadata.getDescription(), DESCRIPTION_BINDING); protocolMarshaller.marshall(keyMetadata.getKeyUsage(), KEYUSAGE_BINDING); protocolMarshaller.marshall(keyMetadata.getKeyState(), KEYSTATE_BINDING); protocolMarshaller.marshall(keyMetadata.getDeletionDate(), DELETIONDATE_BINDING); protocolMarshaller.marshall(keyMetadata.getValidTo(), VALIDTO_BINDING); protocolMarshaller.marshall(keyMetadata.getOrigin(), ORIGIN_BINDING); protocolMarshaller.marshall(keyMetadata.getCustomKeyStoreId(), CUSTOMKEYSTOREID_BINDING); protocolMarshaller.marshall(keyMetadata.getCloudHsmClusterId(), CLOUDHSMCLUSTERID_BINDING); protocolMarshaller.marshall(keyMetadata.getExpirationModel(), EXPIRATIONMODEL_BINDING); protocolMarshaller.marshall(keyMetadata.getKeyManager(), KEYMANAGER_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
jsonWriter.value(description); if (keyMetadata.getKeyUsage() != null) { String keyUsage = keyMetadata.getKeyUsage(); jsonWriter.name("KeyUsage"); jsonWriter.value(keyUsage);