com.yahoo.athenz.zts.RoleCertificateRequest Maven / Gradle / Ivy
//
// This file generated by rdl 1.5.2. Do not modify!
//
package com.yahoo.athenz.zts;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.yahoo.rdl.*;
//
// RoleCertificateRequest - RoleCertificateRequest - a certificate signing
// request. By including the optional previous Certificate NotBefore and
// NotAfter dates would all the server to correctly prioritize this request in
// case the certificate signer is under heavy load and it can't sign all
// submitted requests from the Athenz Server.
//
@JsonIgnoreProperties(ignoreUnknown = true)
public class RoleCertificateRequest {
public String csr;
@RdlOptional
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public String proxyForPrincipal;
public long expiryTime;
@RdlOptional
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public Timestamp prevCertNotBefore;
@RdlOptional
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public Timestamp prevCertNotAfter;
public RoleCertificateRequest setCsr(String csr) {
this.csr = csr;
return this;
}
public String getCsr() {
return csr;
}
public RoleCertificateRequest setProxyForPrincipal(String proxyForPrincipal) {
this.proxyForPrincipal = proxyForPrincipal;
return this;
}
public String getProxyForPrincipal() {
return proxyForPrincipal;
}
public RoleCertificateRequest setExpiryTime(long expiryTime) {
this.expiryTime = expiryTime;
return this;
}
public long getExpiryTime() {
return expiryTime;
}
public RoleCertificateRequest setPrevCertNotBefore(Timestamp prevCertNotBefore) {
this.prevCertNotBefore = prevCertNotBefore;
return this;
}
public Timestamp getPrevCertNotBefore() {
return prevCertNotBefore;
}
public RoleCertificateRequest setPrevCertNotAfter(Timestamp prevCertNotAfter) {
this.prevCertNotAfter = prevCertNotAfter;
return this;
}
public Timestamp getPrevCertNotAfter() {
return prevCertNotAfter;
}
@Override
public boolean equals(Object another) {
if (this != another) {
if (another == null || another.getClass() != RoleCertificateRequest.class) {
return false;
}
RoleCertificateRequest a = (RoleCertificateRequest) another;
if (csr == null ? a.csr != null : !csr.equals(a.csr)) {
return false;
}
if (proxyForPrincipal == null ? a.proxyForPrincipal != null : !proxyForPrincipal.equals(a.proxyForPrincipal)) {
return false;
}
if (expiryTime != a.expiryTime) {
return false;
}
if (prevCertNotBefore == null ? a.prevCertNotBefore != null : !prevCertNotBefore.equals(a.prevCertNotBefore)) {
return false;
}
if (prevCertNotAfter == null ? a.prevCertNotAfter != null : !prevCertNotAfter.equals(a.prevCertNotAfter)) {
return false;
}
}
return true;
}
}