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

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

// This file was generated by the Pelion SDK foundation code generator.
// This model class was autogenerated on Thu May 02 19:21:45 BST 2019. Feel free to change its contents as you wish.
package com.arm.mbed.cloud.sdk.security.model;

import java.util.Date;

import com.arm.mbed.cloud.sdk.annotations.Internal;
import com.arm.mbed.cloud.sdk.annotations.Preamble;
import com.arm.mbed.cloud.sdk.common.SdkModel;

/**
 * Model for a subtenant trusted certificate.
 */
@Preamble(description = "Model for a subtenant trusted certificate.")
@SuppressWarnings("PMD.CyclomaticComplexity")
public class SubtenantTrustedCertificate extends AbstractSubtenantTrustedCertificate {
    /**
     * Serialisation Id.
     */
    private static final long serialVersionUID = 8306879121921220L;

    /**
     * Internal constructor.
     * 
     * 

* Constructor based on all fields. *

* Note: Should not be used. Use {@link #SubtenantTrustedCertificate()} instead. * * @param accountId * The ID of the account. * @param certificate * X509.v3 trusted certificate in PEM format. * @param certificateFingerprint * A SHA-256 fingerprint of the certificate. * @param createdAt * Creation UTC time RFC3339. * @param description * Human readable description of this certificate. * @param deviceExecutionMode * Device execution mode where 1 means a developer certificate. * @param enrollmentMode * If true, signature is not required. Default value false. * @param id * Entity ID. * @param issuer * Issuer of the certificate. * @param name * Certificate name. * @param ownerId * The ID of the owner. * @param service * Service name where the certificate is used. * @param status * Status of the certificate. * @param subject * Subject of the certificate. * @param updatedAt * Last update UTC time RFC3339. * @param valid * This read-only flag indicates whether the certificate is valid or not. * @param validity * Expiration time in UTC formatted as RFC3339. */ @Internal @SuppressWarnings("PMD.CyclomaticComplexity") public SubtenantTrustedCertificate(String accountId, String certificate, String certificateFingerprint, Date createdAt, String description, int deviceExecutionMode, boolean enrollmentMode, String id, String issuer, String name, String ownerId, SubtenantTrustedCertificateService service, SubtenantTrustedCertificateStatus status, String subject, Date updatedAt, boolean valid, Date validity) { super(accountId, certificate, certificateFingerprint, createdAt, description, deviceExecutionMode, enrollmentMode, id, issuer, name, ownerId, service, status, subject, updatedAt, valid, validity); } /** * Internal constructor. * *

* Constructor based on a similar object. *

* Note: Should not be used. Use {@link #SubtenantTrustedCertificate()} instead. * * @param subtenantTrustedCertificate * a subtenant trusted certificate. */ @Internal public SubtenantTrustedCertificate(SubtenantTrustedCertificate subtenantTrustedCertificate) { this(subtenantTrustedCertificate == null ? (String) null : subtenantTrustedCertificate.accountId, subtenantTrustedCertificate == null ? (String) null : subtenantTrustedCertificate.certificate, subtenantTrustedCertificate == null ? (String) null : subtenantTrustedCertificate.certificateFingerprint, subtenantTrustedCertificate == null ? new Date() : subtenantTrustedCertificate.createdAt, subtenantTrustedCertificate == null ? (String) null : subtenantTrustedCertificate.description, subtenantTrustedCertificate == null ? 0 : subtenantTrustedCertificate.deviceExecutionMode, subtenantTrustedCertificate != null && subtenantTrustedCertificate.enrollmentMode, subtenantTrustedCertificate == null ? (String) null : subtenantTrustedCertificate.id, subtenantTrustedCertificate == null ? (String) null : subtenantTrustedCertificate.issuer, subtenantTrustedCertificate == null ? (String) null : subtenantTrustedCertificate.name, subtenantTrustedCertificate == null ? (String) null : subtenantTrustedCertificate.ownerId, subtenantTrustedCertificate == null ? SubtenantTrustedCertificateService.getDefault() : subtenantTrustedCertificate.service, subtenantTrustedCertificate == null ? SubtenantTrustedCertificateStatus.getDefault() : subtenantTrustedCertificate.status, subtenantTrustedCertificate == null ? (String) null : subtenantTrustedCertificate.subject, subtenantTrustedCertificate == null ? new Date() : subtenantTrustedCertificate.updatedAt, subtenantTrustedCertificate != null && subtenantTrustedCertificate.valid, subtenantTrustedCertificate == null ? new Date() : subtenantTrustedCertificate.validity); } /** * Constructor. */ public SubtenantTrustedCertificate() { this((String) null, (String) null, (String) null, new Date(), (String) null, 0, false, (String) null, (String) null, (String) null, (String) null, SubtenantTrustedCertificateService.getDefault(), SubtenantTrustedCertificateStatus.getDefault(), (String) null, new Date(), false, new Date()); } /** * Constructor. * *

* Constructor based on object identifier. *

* * @param id * Entity ID. */ public SubtenantTrustedCertificate(String id) { this(); setId(id); } /** * Internal constructor. * *

* Constructor based on read-only fields. *

* Note: Should not be used. Use {@link #SubtenantTrustedCertificate()} instead. * * @param certificateFingerprint * A SHA-256 fingerprint of the certificate. * @param createdAt * Creation UTC time RFC3339. * @param deviceExecutionMode * Device execution mode where 1 means a developer certificate. * @param isDeveloperCertificate * whether or not this certificate is a developer certificate. * @param issuer * Issuer of the certificate. * @param ownerId * The ID of the owner. * @param subject * Subject of the certificate. * @param updatedAt * Last update UTC time RFC3339. * @param valid * This read-only flag indicates whether the certificate is valid or not. * @param validity * Expiration time in UTC formatted as RFC3339. */ @SuppressWarnings("PMD.UnusedFormalParameter") @Internal public SubtenantTrustedCertificate(String certificateFingerprint, Date createdAt, int deviceExecutionMode, boolean isDeveloperCertificate, String issuer, String ownerId, String subject, Date updatedAt, boolean valid, Date validity) { this((String) null, (String) null, certificateFingerprint, createdAt, (String) null, deviceExecutionMode, false, (String) null, issuer, (String) null, ownerId, SubtenantTrustedCertificateService.getDefault(), SubtenantTrustedCertificateStatus.getDefault(), subject, updatedAt, valid, validity); } /** * Constructor. * *

* Constructor based on required fields. *

* * @param accountId * The ID of the account. * @param certificate * X509.v3 trusted certificate in PEM format. * @param name * Certificate name. * @param service * Service name where the certificate is used. */ public SubtenantTrustedCertificate(String accountId, String certificate, String name, SubtenantTrustedCertificateService service) { this(accountId, certificate, (String) null, new Date(), (String) null, 0, false, (String) null, (String) null, name, (String) null, service, SubtenantTrustedCertificateStatus.getDefault(), (String) null, new Date(), false, new Date()); } /** * Gets whether or not this certificate is a developer certificate. * * @return isDeveloperCertificate */ public boolean isDeveloperCertificate() { return getDeviceExecutionMode() == 1; } /** * Gets whether or not this certificate is a developer certificate. *

* Note: Similar to {@link #isDeveloperCertificate()} * * @return isDeveloperCertificate */ @SuppressWarnings("PMD.BooleanGetMethodName") @Internal public boolean getIsDeveloperCertificate() { return isDeveloperCertificate(); } /** * Checks whether the model is valid or not. * *

* * @see SdkModel#isValid() * @return true if the model is valid; false otherwise. */ @SuppressWarnings("PMD.UselessOverridingMethod") @Override public boolean isValid() { return super.isValid(); } /** * Returns a string representation of the object. * *

* * @see java.lang.Object#toString() * @return the string representation */ @Override public String toString() { return "SubtenantTrustedCertificate [isDeveloperCertificate=" + isDeveloperCertificate() + ", accountId=" + accountId + ", certificate=" + certificate + ", certificateFingerprint=" + certificateFingerprint + ", createdAt=" + createdAt + ", description=" + description + ", deviceExecutionMode=" + deviceExecutionMode + ", enrollmentMode=" + enrollmentMode + ", id=" + id + ", issuer=" + issuer + ", name=" + name + ", ownerId=" + ownerId + ", service=" + service + ", status=" + status + ", subject=" + subject + ", updatedAt=" + updatedAt + ", valid=" + valid + ", validity=" + validity + "]"; } /** * Calculates the hash code of this instance based on field values. * *

* * @see java.lang.Object#hashCode() * @return hash code */ @SuppressWarnings("PMD.UselessOverridingMethod") @Override public int hashCode() { return super.hashCode(); } /** * 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 (!super.equals(obj)) { return false; } if (!(obj instanceof SubtenantTrustedCertificate)) { return false; } final SubtenantTrustedCertificate other = (SubtenantTrustedCertificate) obj; if (!other.canEqual(this)) { return false; } return true; } /** * Clones this instance. * *

* * @see java.lang.Object#clone() * @return a cloned instance */ @Override public SubtenantTrustedCertificate clone() { return new SubtenantTrustedCertificate(this); } /** * 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. */ @Override protected boolean canEqual(Object other) { return other instanceof SubtenantTrustedCertificate; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy