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

com.arm.mbed.cloud.sdk.security.model.VerificationResponse 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.PerformsNoOperation;
import com.arm.mbed.cloud.sdk.annotations.Preamble;
import com.arm.mbed.cloud.sdk.common.SdkModel;
import java.util.Objects;

/**
 * Model for a verification response.
 */
@Preamble(description = "Model for a verification response.")
public class VerificationResponse implements SdkModel {
    /**
     * Serialisation Id.
     */
    private static final long serialVersionUID = 1622944186225189L;

    /**
     * Provides details in case of failure.
     *
     */
    private final String message;

    /**
     * Indicates whether the certificate issuer was verified successfully.
     *
     */
    private final boolean successful;

    /**
     * Internal constructor.
     *
     * 

* Constructor based on all fields. *

* Note: Should not be used. Use {@link #VerificationResponse()} instead. * * @param message * Provides details in case of failure. * * @param successful * Indicates whether the certificate issuer was verified successfully. * */ @Internal public VerificationResponse(String message, boolean successful) { super(); this.message = message; this.successful = successful; } /** * Internal constructor. * *

* Constructor based on a similar object. *

* Note: Should not be used. Use {@link #VerificationResponse()} instead. * * @param verificationResponse * a verification response. */ @Internal public VerificationResponse(VerificationResponse verificationResponse) { this(verificationResponse == null ? (String) null : verificationResponse.message, verificationResponse != null && verificationResponse.successful); } /** * Constructor. */ public VerificationResponse() { this((String) null, false); } /** * Sets id. * * @param id * id. */ @Override @Internal @PerformsNoOperation public void setId(String id) { // Nothing to do } /** * Gets id. * *

* Warning: VerificationResponse model does not have any ID field. This always returns {@code null}. * * @return id */ @Override @Internal public String getId() { return null; } /** * Gets provides details in case of failure. * * @return message */ public String getMessage() { return message; } /** * Gets indicates whether the certificate issuer was verified successfully. * * @return successful */ public boolean isSuccessful() { return successful; } /** * Returns a string representation of the object. * *

* * @see java.lang.Object#toString() * @return the string representation */ @Override public String toString() { return "VerificationResponse [message=" + message + ", successful=" + successful + "]"; } /** * 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 + ((message == null) ? 0 : message.hashCode()); result = prime * result + Objects.hashCode(Boolean.valueOf(successful)); 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 VerificationResponse; } /** * 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 VerificationResponse)) { return false; } final VerificationResponse other = (VerificationResponse) obj; if (!other.canEqual(this)) { return false; } if (message == null) { if (other.message != null) { return false; } } else if (!message.equals(other.message)) { return false; } if (successful != other.successful) { 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 true; } /** * Clones this instance. * *

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





© 2015 - 2024 Weber Informatics LLC | Privacy Policy