All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.arm.mbed.cloud.sdk.security.model.CertificateIssuerConfig Maven / Gradle / Ivy

Go to download

The Pelion Cloud SDK (formerly known as Mbed Cloud SDK) provides a simplified interface to the Pelion Cloud APIs by exposing functionality using conventions and paradigms familiar to Java developers.

There is a newer version: 2.5.0
Show newest version
// This file was generated by the Pelion SDK foundation code generator.
// This is an autogenerated class. Do not modify its content as modifications will be lost at next code generation.
package com.arm.mbed.cloud.sdk.security.model;

import com.arm.mbed.cloud.sdk.annotations.Internal;
import com.arm.mbed.cloud.sdk.annotations.Preamble;
import com.arm.mbed.cloud.sdk.annotations.Required;
import com.arm.mbed.cloud.sdk.common.SdkModel;
import java.util.Date;

/**
 * Model for a certificate issuer config.
 */
@Preamble(description = "Model for a certificate issuer config.")
@SuppressWarnings("PMD.AvoidDuplicateLiterals")
public class CertificateIssuerConfig implements SdkModel {
    /**
     * Serialisation Id.
     */
    private static final long serialVersionUID = 1579411600351820L;

    /**
     * The ID of the certificate issuer. Null if Device Management internal HSM is used.
     *
     */
    @Required
    private String certificateIssuerId;

    /**
     * Created UTC time RFC3339.
     */
    private final Date createdAt;

    /**
     * The ID of the certificate issuer configuration.
     *
     */
    private String id;

    /**
     * The certificate name to which the certificate issuer configuration applies.
     */
    @Required
    private String reference;

    /**
     * Updated UTC time RFC3339.
     */
    private final Date updatedAt;

    /**
     * Internal constructor.
     *
     * 

* Constructor based on all fields. *

* Note: Should not be used. Use {@link #CertificateIssuerConfig()} instead. * * @param certificateIssuerId * The ID of the certificate issuer. Null if Device Management internal HSM is used. * * @param createdAt * Created UTC time RFC3339. * @param id * The ID of the certificate issuer configuration. * * @param reference * The certificate name to which the certificate issuer configuration applies. * @param updatedAt * Updated UTC time RFC3339. */ @Internal public CertificateIssuerConfig(String certificateIssuerId, Date createdAt, String id, String reference, Date updatedAt) { super(); this.createdAt = createdAt; this.updatedAt = updatedAt; setCertificateIssuerId(certificateIssuerId); setId(id); setReference(reference); } /** * Internal constructor. * *

* Constructor based on a similar object. *

* Note: Should not be used. Use {@link #CertificateIssuerConfig()} instead. * * @param certificateIssuerConfig * a certificate issuer config. */ @Internal public CertificateIssuerConfig(CertificateIssuerConfig certificateIssuerConfig) { this(certificateIssuerConfig == null ? (String) null : certificateIssuerConfig.certificateIssuerId, certificateIssuerConfig == null ? new Date() : certificateIssuerConfig.createdAt, certificateIssuerConfig == null ? (String) null : certificateIssuerConfig.id, certificateIssuerConfig == null ? (String) null : certificateIssuerConfig.reference, certificateIssuerConfig == null ? new Date() : certificateIssuerConfig.updatedAt); } /** * Constructor. */ public CertificateIssuerConfig() { this((String) null, new Date(), (String) null, (String) null, new Date()); } /** * Constructor. * *

* Constructor based on object identifier. *

* * @param id * The ID of the certificate issuer configuration. * */ public CertificateIssuerConfig(String id) { this(); setId(id); } /** * Internal constructor. * *

* Constructor based on read-only fields. *

* Note: Should not be used. Use {@link #CertificateIssuerConfig()} instead. * * @param createdAt * Created UTC time RFC3339. * @param updatedAt * Updated UTC time RFC3339. */ @Internal public CertificateIssuerConfig(Date createdAt, Date updatedAt) { this((String) null, createdAt, (String) null, (String) null, updatedAt); } /** * Constructor. * *

* Constructor based on required fields. *

* * @param certificateIssuerId * The ID of the certificate issuer. Null if Device Management internal HSM is used. * * @param reference * The certificate name to which the certificate issuer configuration applies. */ public CertificateIssuerConfig(String certificateIssuerId, String reference) { this(certificateIssuerId, new Date(), (String) null, reference, new Date()); } /** * Gets the id of the certificate issuer. null if device management internal hsm is used. * * @return certificateIssuerId */ public String getCertificateIssuerId() { return certificateIssuerId; } /** * Sets the id of the certificate issuer. null if device management internal hsm is used. * * @param certificateIssuerId * The ID of the certificate issuer. Null if Device Management internal HSM is used. * */ @Required public void setCertificateIssuerId(String certificateIssuerId) { this.certificateIssuerId = certificateIssuerId; } /** * Checks whether certificateIssuerId value is valid. * * @return true if the value is valid; false otherwise. */ @SuppressWarnings("PMD.UselessParentheses") public boolean isCertificateIssuerIdValid() { return certificateIssuerId != null; } /** * Gets created utc time rfc3339. * * @return createdAt */ public Date getCreatedAt() { return createdAt; } /** * Gets the id of the certificate issuer configuration. * * @return id */ @Override public String getId() { return id; } /** * Sets the id of the certificate issuer configuration. * * @param id * The ID of the certificate issuer configuration. * */ @Override public void setId(String id) { this.id = id; } /** * Sets the id of the certificate issuer configuration. * *

* Similar to {@link #setId(String)} * * @param certificateIssuerConfigId * The ID of the certificate issuer configuration. * */ @Internal public void setCertificateIssuerConfigId(String certificateIssuerConfigId) { setId(certificateIssuerConfigId); } /** * Gets the certificate name to which the certificate issuer configuration applies. * * @return reference */ public String getReference() { return reference; } /** * Sets the certificate name to which the certificate issuer configuration applies. * * @param reference * The certificate name to which the certificate issuer configuration applies. */ @Required public void setReference(String reference) { this.reference = reference; } /** * Checks whether reference value is valid. * * @return true if the value is valid; false otherwise. */ @SuppressWarnings("PMD.UselessParentheses") public boolean isReferenceValid() { return reference != null; } /** * Gets updated utc time rfc3339. * * @return updatedAt */ public Date getUpdatedAt() { return updatedAt; } /** * Returns a string representation of the object. * *

* * @see java.lang.Object#toString() * @return the string representation */ @Override public String toString() { return "CertificateIssuerConfig [certificateIssuerId=" + certificateIssuerId + ", createdAt=" + createdAt + ", id=" + id + ", reference=" + reference + ", updatedAt=" + updatedAt + "]"; } /** * Calculates the hash code of this instance based on field values. * *

* * @see java.lang.Object#hashCode() * @return hash code */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((certificateIssuerId == null) ? 0 : certificateIssuerId.hashCode()); result = prime * result + ((createdAt == null) ? 0 : createdAt.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((reference == null) ? 0 : reference.hashCode()); result = prime * result + ((updatedAt == null) ? 0 : updatedAt.hashCode()); return result; } /** * Method to ensure {@link #equals(Object)} is correct. * *

* Note: see this article: canEqual() * * @param other * another object. * @return true if the other object is an instance of the class in which canEqual is (re)defined, false otherwise. */ protected boolean canEqual(Object other) { return other instanceof CertificateIssuerConfig; } /** * Indicates whether some other object is "equal to" this one. * *

* * @see java.lang.Object#equals(java.lang.Object) * @param obj * an object to compare with this instance. * @return true if this object is the same as the obj argument; false otherwise. */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof CertificateIssuerConfig)) { return false; } final CertificateIssuerConfig other = (CertificateIssuerConfig) obj; if (!other.canEqual(this)) { return false; } if (certificateIssuerId == null) { if (other.certificateIssuerId != null) { return false; } } else if (!certificateIssuerId.equals(other.certificateIssuerId)) { return false; } if (createdAt == null) { if (other.createdAt != null) { return false; } } else if (!createdAt.equals(other.createdAt)) { return false; } if (id == null) { if (other.id != null) { return false; } } else if (!id.equals(other.id)) { return false; } if (reference == null) { if (other.reference != null) { return false; } } else if (!reference.equals(other.reference)) { return false; } if (updatedAt == null) { if (other.updatedAt != null) { return false; } } else if (!updatedAt.equals(other.updatedAt)) { return false; } return true; } /** * Checks whether the model is valid or not. * *

* * @see SdkModel#isValid() * @return true if the model is valid; false otherwise. */ @Override public boolean isValid() { return isCertificateIssuerIdValid() && isReferenceValid(); } /** * Clones this instance. * *

* * @see java.lang.Object#clone() * @return a cloned instance */ @Override public CertificateIssuerConfig clone() { return new CertificateIssuerConfig(this); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy