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

org.hyperledger.acy_py.generated.model.Constraints Maven / Gradle / Ivy

There is a newer version: 0.10.0
Show newest version
/*
 * aca-py client
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v0.7.2
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package org.hyperledger.acy_py.generated.model;

import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;

import java.io.IOException;
import java.util.List;

/**
 * Constraints
 */

@lombok.Data
@lombok.AllArgsConstructor
@lombok.NoArgsConstructor
@lombok.Builder
public class Constraints {
    public static final String SERIALIZED_NAME_FIELDS = "fields";
    @SerializedName(SERIALIZED_NAME_FIELDS)
    private List fields = null;
    public static final String SERIALIZED_NAME_IS_HOLDER = "is_holder";
    @SerializedName(SERIALIZED_NAME_IS_HOLDER)
    private List isHolder = null;
    public static final String SERIALIZED_NAME_LIMIT_DISCLOSURE = "limit_disclosure";
    @SerializedName(SERIALIZED_NAME_LIMIT_DISCLOSURE)
    private String limitDisclosure;

    /**
     * Gets or Sets statusActive
     */
    @JsonAdapter(StatusActiveEnum.Adapter.class)
    public enum StatusActiveEnum {
        REQUIRED("required"),

        ALLOWED("allowed"),

        DISALLOWED("disallowed");

        private String value;

        StatusActiveEnum(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }

        @Override
        public String toString() {
            return String.valueOf(value);
        }

        public static StatusActiveEnum fromValue(String value) {
            for (StatusActiveEnum b : StatusActiveEnum.values()) {
                if (b.value.equals(value)) {
                    return b;
                }
            }
            throw new IllegalArgumentException("Unexpected value '" + value + "'");
        }

        public static class Adapter extends TypeAdapter {
            @Override
            public void write(final JsonWriter jsonWriter, final StatusActiveEnum enumeration) throws IOException {
                jsonWriter.value(enumeration.getValue());
            }

            @Override
            public StatusActiveEnum read(final JsonReader jsonReader) throws IOException {
                String value = jsonReader.nextString();
                return StatusActiveEnum.fromValue(value);
            }
        }
    }

    public static final String SERIALIZED_NAME_STATUS_ACTIVE = "status_active";
    @SerializedName(SERIALIZED_NAME_STATUS_ACTIVE)
    private StatusActiveEnum statusActive;

    /**
     * Gets or Sets statusRevoked
     */
    @JsonAdapter(StatusRevokedEnum.Adapter.class)
    public enum StatusRevokedEnum {
        REQUIRED("required"),

        ALLOWED("allowed"),

        DISALLOWED("disallowed");

        private String value;

        StatusRevokedEnum(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }

        @Override
        public String toString() {
            return String.valueOf(value);
        }

        public static StatusRevokedEnum fromValue(String value) {
            for (StatusRevokedEnum b : StatusRevokedEnum.values()) {
                if (b.value.equals(value)) {
                    return b;
                }
            }
            throw new IllegalArgumentException("Unexpected value '" + value + "'");
        }

        public static class Adapter extends TypeAdapter {
            @Override
            public void write(final JsonWriter jsonWriter, final StatusRevokedEnum enumeration) throws IOException {
                jsonWriter.value(enumeration.getValue());
            }

            @Override
            public StatusRevokedEnum read(final JsonReader jsonReader) throws IOException {
                String value = jsonReader.nextString();
                return StatusRevokedEnum.fromValue(value);
            }
        }
    }

    public static final String SERIALIZED_NAME_STATUS_REVOKED = "status_revoked";
    @SerializedName(SERIALIZED_NAME_STATUS_REVOKED)
    private StatusRevokedEnum statusRevoked;

    /**
     * Gets or Sets statusSuspended
     */
    @JsonAdapter(StatusSuspendedEnum.Adapter.class)
    public enum StatusSuspendedEnum {
        REQUIRED("required"),

        ALLOWED("allowed"),

        DISALLOWED("disallowed");

        private String value;

        StatusSuspendedEnum(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }

        @Override
        public String toString() {
            return String.valueOf(value);
        }

        public static StatusSuspendedEnum fromValue(String value) {
            for (StatusSuspendedEnum b : StatusSuspendedEnum.values()) {
                if (b.value.equals(value)) {
                    return b;
                }
            }
            throw new IllegalArgumentException("Unexpected value '" + value + "'");
        }

        public static class Adapter extends TypeAdapter {
            @Override
            public void write(final JsonWriter jsonWriter, final StatusSuspendedEnum enumeration) throws IOException {
                jsonWriter.value(enumeration.getValue());
            }

            @Override
            public StatusSuspendedEnum read(final JsonReader jsonReader) throws IOException {
                String value = jsonReader.nextString();
                return StatusSuspendedEnum.fromValue(value);
            }
        }
    }

    public static final String SERIALIZED_NAME_STATUS_SUSPENDED = "status_suspended";
    @SerializedName(SERIALIZED_NAME_STATUS_SUSPENDED)
    private StatusSuspendedEnum statusSuspended;

    /**
     * SubjectIsIssuer
     */
    @JsonAdapter(SubjectIsIssuerEnum.Adapter.class)
    public enum SubjectIsIssuerEnum {
        REQUIRED("required"),

        PREFERRED("preferred");

        private String value;

        SubjectIsIssuerEnum(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }

        @Override
        public String toString() {
            return String.valueOf(value);
        }

        public static SubjectIsIssuerEnum fromValue(String value) {
            for (SubjectIsIssuerEnum b : SubjectIsIssuerEnum.values()) {
                if (b.value.equals(value)) {
                    return b;
                }
            }
            throw new IllegalArgumentException("Unexpected value '" + value + "'");
        }

        public static class Adapter extends TypeAdapter {
            @Override
            public void write(final JsonWriter jsonWriter, final SubjectIsIssuerEnum enumeration) throws IOException {
                jsonWriter.value(enumeration.getValue());
            }

            @Override
            public SubjectIsIssuerEnum read(final JsonReader jsonReader) throws IOException {
                String value = jsonReader.nextString();
                return SubjectIsIssuerEnum.fromValue(value);
            }
        }
    }

    public static final String SERIALIZED_NAME_SUBJECT_IS_ISSUER = "subject_is_issuer";
    @SerializedName(SERIALIZED_NAME_SUBJECT_IS_ISSUER)
    private SubjectIsIssuerEnum subjectIsIssuer;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy