/** * 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. */ @Override public String toString() { return ToString.builder("Certificate").add("CertificateIdentifier", certificateIdentifier()) .add("CertificateCreationDate", certificateCreationDate()).add("CertificatePem", certificatePem()) .add("CertificateWallet", certificateWallet()).add("CertificateArn", certificateArn()) .add("CertificateOwner", certificateOwner()).add("ValidFromDate", validFromDate()) .add("ValidToDate", validToDate()).add("SigningAlgorithm", signingAlgorithm()).add("KeyLength", keyLength()) .build(); }
/** * 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. */ @Override public String toString() { return ToString.builder("Certificate").add("CertificateIdentifier", certificateIdentifier()) .add("CertificateCreationDate", certificateCreationDate()).add("CertificatePem", certificatePem()) .add("CertificateWallet", certificateWallet()).add("CertificateArn", certificateArn()) .add("CertificateOwner", certificateOwner()).add("ValidFromDate", validFromDate()) .add("ValidToDate", validToDate()).add("SigningAlgorithm", signingAlgorithm()).add("KeyLength", keyLength()) .build(); }
@Override public String toString() { return ToString.builder("Certificate").add("CertificateIdentifier", certificateIdentifier()) .add("CertificateCreationDate", certificateCreationDate()).add("CertificatePem", certificatePem()) .add("CertificateWallet", certificateWallet()).add("CertificateArn", certificateArn()) .add("CertificateOwner", certificateOwner()).add("ValidFromDate", validFromDate()) .add("ValidToDate", validToDate()).add("SigningAlgorithm", signingAlgorithm()).add("KeyLength", keyLength()) .build(); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(certificateIdentifier()); hashCode = 31 * hashCode + Objects.hashCode(certificateCreationDate()); hashCode = 31 * hashCode + Objects.hashCode(certificatePem()); hashCode = 31 * hashCode + Objects.hashCode(certificateWallet()); hashCode = 31 * hashCode + Objects.hashCode(certificateArn()); hashCode = 31 * hashCode + Objects.hashCode(certificateOwner()); hashCode = 31 * hashCode + Objects.hashCode(validFromDate()); hashCode = 31 * hashCode + Objects.hashCode(validToDate()); hashCode = 31 * hashCode + Objects.hashCode(signingAlgorithm()); hashCode = 31 * hashCode + Objects.hashCode(keyLength()); return hashCode; }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(certificateIdentifier()); hashCode = 31 * hashCode + Objects.hashCode(certificateCreationDate()); hashCode = 31 * hashCode + Objects.hashCode(certificatePem()); hashCode = 31 * hashCode + Objects.hashCode(certificateWallet()); hashCode = 31 * hashCode + Objects.hashCode(certificateArn()); hashCode = 31 * hashCode + Objects.hashCode(certificateOwner()); hashCode = 31 * hashCode + Objects.hashCode(validFromDate()); hashCode = 31 * hashCode + Objects.hashCode(validToDate()); hashCode = 31 * hashCode + Objects.hashCode(signingAlgorithm()); hashCode = 31 * hashCode + Objects.hashCode(keyLength()); return hashCode; }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "CertificateIdentifier": return Optional.ofNullable(clazz.cast(certificateIdentifier())); case "CertificateCreationDate": return Optional.ofNullable(clazz.cast(certificateCreationDate())); case "CertificatePem": return Optional.ofNullable(clazz.cast(certificatePem())); case "CertificateWallet": return Optional.ofNullable(clazz.cast(certificateWallet())); case "CertificateArn": return Optional.ofNullable(clazz.cast(certificateArn())); case "CertificateOwner": return Optional.ofNullable(clazz.cast(certificateOwner())); case "ValidFromDate": return Optional.ofNullable(clazz.cast(validFromDate())); case "ValidToDate": return Optional.ofNullable(clazz.cast(validToDate())); case "SigningAlgorithm": return Optional.ofNullable(clazz.cast(signingAlgorithm())); case "KeyLength": return Optional.ofNullable(clazz.cast(keyLength())); default: return Optional.empty(); } }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(certificateIdentifier()); hashCode = 31 * hashCode + Objects.hashCode(certificateCreationDate()); hashCode = 31 * hashCode + Objects.hashCode(certificatePem()); hashCode = 31 * hashCode + Objects.hashCode(certificateWallet()); hashCode = 31 * hashCode + Objects.hashCode(certificateArn()); hashCode = 31 * hashCode + Objects.hashCode(certificateOwner()); hashCode = 31 * hashCode + Objects.hashCode(validFromDate()); hashCode = 31 * hashCode + Objects.hashCode(validToDate()); hashCode = 31 * hashCode + Objects.hashCode(signingAlgorithm()); hashCode = 31 * hashCode + Objects.hashCode(keyLength()); return hashCode; }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "CertificateIdentifier": return Optional.ofNullable(clazz.cast(certificateIdentifier())); case "CertificateCreationDate": return Optional.ofNullable(clazz.cast(certificateCreationDate())); case "CertificatePem": return Optional.ofNullable(clazz.cast(certificatePem())); case "CertificateWallet": return Optional.ofNullable(clazz.cast(certificateWallet())); case "CertificateArn": return Optional.ofNullable(clazz.cast(certificateArn())); case "CertificateOwner": return Optional.ofNullable(clazz.cast(certificateOwner())); case "ValidFromDate": return Optional.ofNullable(clazz.cast(validFromDate())); case "ValidToDate": return Optional.ofNullable(clazz.cast(validToDate())); case "SigningAlgorithm": return Optional.ofNullable(clazz.cast(signingAlgorithm())); case "KeyLength": return Optional.ofNullable(clazz.cast(keyLength())); default: return Optional.empty(); } }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "CertificateIdentifier": return Optional.ofNullable(clazz.cast(certificateIdentifier())); case "CertificateCreationDate": return Optional.ofNullable(clazz.cast(certificateCreationDate())); case "CertificatePem": return Optional.ofNullable(clazz.cast(certificatePem())); case "CertificateWallet": return Optional.ofNullable(clazz.cast(certificateWallet())); case "CertificateArn": return Optional.ofNullable(clazz.cast(certificateArn())); case "CertificateOwner": return Optional.ofNullable(clazz.cast(certificateOwner())); case "ValidFromDate": return Optional.ofNullable(clazz.cast(validFromDate())); case "ValidToDate": return Optional.ofNullable(clazz.cast(validToDate())); case "SigningAlgorithm": return Optional.ofNullable(clazz.cast(signingAlgorithm())); case "KeyLength": return Optional.ofNullable(clazz.cast(keyLength())); default: return Optional.empty(); } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Certificate)) { return false; } Certificate other = (Certificate) obj; return Objects.equals(certificateIdentifier(), other.certificateIdentifier()) && Objects.equals(certificateCreationDate(), other.certificateCreationDate()) && Objects.equals(certificatePem(), other.certificatePem()) && Objects.equals(certificateWallet(), other.certificateWallet()) && Objects.equals(certificateArn(), other.certificateArn()) && Objects.equals(certificateOwner(), other.certificateOwner()) && Objects.equals(validFromDate(), other.validFromDate()) && Objects.equals(validToDate(), other.validToDate()) && Objects.equals(signingAlgorithm(), other.signingAlgorithm()) && Objects.equals(keyLength(), other.keyLength()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Certificate)) { return false; } Certificate other = (Certificate) obj; return Objects.equals(certificateIdentifier(), other.certificateIdentifier()) && Objects.equals(certificateCreationDate(), other.certificateCreationDate()) && Objects.equals(certificatePem(), other.certificatePem()) && Objects.equals(certificateWallet(), other.certificateWallet()) && Objects.equals(certificateArn(), other.certificateArn()) && Objects.equals(certificateOwner(), other.certificateOwner()) && Objects.equals(validFromDate(), other.validFromDate()) && Objects.equals(validToDate(), other.validToDate()) && Objects.equals(signingAlgorithm(), other.signingAlgorithm()) && Objects.equals(keyLength(), other.keyLength()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Certificate)) { return false; } Certificate other = (Certificate) obj; return Objects.equals(certificateIdentifier(), other.certificateIdentifier()) && Objects.equals(certificateCreationDate(), other.certificateCreationDate()) && Objects.equals(certificatePem(), other.certificatePem()) && Objects.equals(certificateWallet(), other.certificateWallet()) && Objects.equals(certificateArn(), other.certificateArn()) && Objects.equals(certificateOwner(), other.certificateOwner()) && Objects.equals(validFromDate(), other.validFromDate()) && Objects.equals(validToDate(), other.validToDate()) && Objects.equals(signingAlgorithm(), other.signingAlgorithm()) && Objects.equals(keyLength(), other.keyLength()); }
/** * Marshall the given parameter object */ public void marshall(Certificate certificate, ProtocolMarshaller protocolMarshaller) { Validate.paramNotNull(certificate, "certificate"); Validate.paramNotNull(protocolMarshaller, "protocolMarshaller"); try { protocolMarshaller.marshall(certificate.certificateIdentifier(), CERTIFICATEIDENTIFIER_BINDING); protocolMarshaller.marshall(certificate.certificateCreationDate(), CERTIFICATECREATIONDATE_BINDING); protocolMarshaller.marshall(certificate.certificatePem(), CERTIFICATEPEM_BINDING); protocolMarshaller.marshall(certificate.certificateWallet(), CERTIFICATEWALLET_BINDING); protocolMarshaller.marshall(certificate.certificateArn(), CERTIFICATEARN_BINDING); protocolMarshaller.marshall(certificate.certificateOwner(), CERTIFICATEOWNER_BINDING); protocolMarshaller.marshall(certificate.validFromDate(), VALIDFROMDATE_BINDING); protocolMarshaller.marshall(certificate.validToDate(), VALIDTODATE_BINDING); protocolMarshaller.marshall(certificate.signingAlgorithm(), SIGNINGALGORITHM_BINDING); protocolMarshaller.marshall(certificate.keyLength(), KEYLENGTH_BINDING); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }