001/*
002 * oauth2-oidc-sdk
003 *
004 * Copyright 2012-2016, Connect2id Ltd and contributors.
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use
007 * this file except in compliance with the License. You may obtain a copy of the
008 * License at
009 *
010 *    http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software distributed
013 * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
014 * CONDITIONS OF ANY KIND, either express or implied. See the License for the
015 * specific language governing permissions and limitations under the License.
016 */
017
018package com.nimbusds.openid.connect.sdk.assurance.evidences;
019
020
021import net.jcip.annotations.Immutable;
022
023import com.nimbusds.oauth2.sdk.id.Identifier;
024
025
026/**
027 * Electronic record type.
028 *
029 * <p>Related specifications:
030 *
031 * <ul>
032 *     <li>OpenID Connect for Identity Assurance 1.0
033 *     <li>https://bitbucket.org/openid/ekyc-ida/wiki/identifiers
034 * </ul>
035 */
036@Immutable
037public final class ElectronicRecordType extends Identifier {
038        
039        
040        private static final long serialVersionUID = -3135412141332663342L;
041        
042        
043        /**
044         * A record from an official register of births.
045         */
046        public static final ElectronicRecordType BIRTH_REGISTER = new ElectronicRecordType("birth_register");
047        
048        
049        /**
050         * A record from an official population register.
051         */
052        public static final ElectronicRecordType POPULATION_REGISTER = new ElectronicRecordType("population_register");
053        
054        
055        /**
056         * A record from an official register of voters.
057         */
058        public static final ElectronicRecordType VOTER_REGISTER = new ElectronicRecordType("voter_register");
059        
060        
061        /**
062         * A record from an official register of adoptions.
063         */
064        public static final ElectronicRecordType ADOPTION_REGISTER = new ElectronicRecordType("adoption_register");
065        
066        
067        /**
068         * A record from an official register of marriages.
069         */
070        public static final ElectronicRecordType MARRIAGE_REGISTER = new ElectronicRecordType("marriage_register");
071        
072        
073        /**
074         * An authoritative record of a person having received specific
075         * education or has passed a test or series of tests.
076         */
077        public static final ElectronicRecordType EDUCATION = new ElectronicRecordType("education");
078        
079        
080        /**
081         * A military personnel record.
082         */
083        public static final ElectronicRecordType MILITARY = new ElectronicRecordType("military");
084        
085        
086        /**
087         * A record of a bank account from a recognized banking institution.
088         */
089        public static final ElectronicRecordType BANK_ACCOUNT = new ElectronicRecordType("bank_account");
090        
091        
092        /**
093         * A record of an account from a recognised utility provider.
094         */
095        public static final ElectronicRecordType UTILITY_ACCOUNT = new ElectronicRecordType("utility_account");
096        
097        
098        /**
099         * A record of a mortgage from a recognized mortgage provider.
100         */
101        public static final ElectronicRecordType MORTGAGE_ACCOUNT = new ElectronicRecordType("mortgage_account");
102        
103        
104        /**
105         * A record of a loan from a recognised loan provider.
106         */
107        public static final ElectronicRecordType LOAN_ACCOUNT = new ElectronicRecordType("loan_account");
108        
109        
110        /**
111         * A record from a country's tax authority.
112         */
113        public static final ElectronicRecordType TAX = new ElectronicRecordType("tax");
114        
115        
116        /**
117         * A record from a country's social security authority.
118         */
119        public static final ElectronicRecordType SOCIAL_SECURITY = new ElectronicRecordType("social_security");
120        
121        
122        /**
123         * A record from an institution or authority for the confinement of
124         * persons who have been deprived of their liberty following a criminal
125         * conviction by a judicial process.
126         */
127        public static final ElectronicRecordType PRISON_RECORD = new ElectronicRecordType("prison_record");
128        
129        
130        /**
131         * Creates a new electronic record type.
132         *
133         * @param value The electronic record type value. Must not be
134         *              {@code null}.
135         */
136        public ElectronicRecordType(final String value) {
137                super(value);
138        }
139        
140        
141        @Override
142        public boolean equals(final Object object) {
143                
144                return object instanceof ElectronicRecordType &&
145                        this.toString().equals(object.toString());
146        }
147}