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, sections 5.1.1.2 and
033 *         14.
034 *     <li>https://bitbucket.org/openid/ekyc-ida/wiki/identifiers
035 * </ul>
036 */
037@Immutable
038public final class ElectronicRecordType extends Identifier {
039        
040        
041        private static final long serialVersionUID = -3135412141332663342L;
042        
043        
044        /**
045         * A record from an official register of births.
046         */
047        public static final ElectronicRecordType BIRTH_REGISTER = new ElectronicRecordType("birth_register");
048        
049        
050        /**
051         * A record from an official population register.
052         */
053        public static final ElectronicRecordType POPULATION_REGISTER = new ElectronicRecordType("population_register");
054        
055        
056        /**
057         * A record from an official register of voters.
058         */
059        public static final ElectronicRecordType VOTER_REGISTER = new ElectronicRecordType("voter_register");
060        
061        
062        /**
063         * A record from an official register of adoptions.
064         */
065        public static final ElectronicRecordType ADOPTION_REGISTER = new ElectronicRecordType("adoption_register");
066        
067        
068        /**
069         * A record from an official register of marriages.
070         */
071        public static final ElectronicRecordType MARRIAGE_REGISTER = new ElectronicRecordType("marriage_register");
072        
073        
074        /**
075         * An authoritative record of a person having received specific
076         * education or has passed a test or series of tests.
077         */
078        public static final ElectronicRecordType EDUCATION = new ElectronicRecordType("education");
079        
080        
081        /**
082         * A military personnel record.
083         */
084        public static final ElectronicRecordType MILITARY = new ElectronicRecordType("military");
085        
086        
087        /**
088         * A record of a bank account from a recognized banking institution.
089         */
090        public static final ElectronicRecordType BANK_ACCOUNT = new ElectronicRecordType("bank_account");
091        
092        
093        /**
094         * A record of an account from a recognised utility provider.
095         */
096        public static final ElectronicRecordType UTILITY_ACCOUNT = new ElectronicRecordType("utility_account");
097        
098        
099        /**
100         * A record of a mortgage from a recognized mortgage provider.
101         */
102        public static final ElectronicRecordType MORTGAGE_ACCOUNT = new ElectronicRecordType("mortgage_account");
103        
104        
105        /**
106         * A record of a loan from a recognised loan provider.
107         */
108        public static final ElectronicRecordType LOAN_ACCOUNT = new ElectronicRecordType("loan_account");
109        
110        
111        /**
112         * A record from a country's tax authority.
113         */
114        public static final ElectronicRecordType TAX = new ElectronicRecordType("tax");
115        
116        
117        /**
118         * A record from a country's social security authority.
119         */
120        public static final ElectronicRecordType SOCIAL_SECURITY = new ElectronicRecordType("social_security");
121        
122        
123        /**
124         * A record from an institution or authority for the confinement of
125         * persons who have been deprived of their liberty following a criminal
126         * conviction by a judicial process.
127         */
128        public static final ElectronicRecordType PRISON_RECORD = new ElectronicRecordType("prison_record");
129        
130        
131        /**
132         * Creates a new electronic record type.
133         *
134         * @param value The electronic record type value. Must not be
135         *              {@code null}.
136         */
137        public ElectronicRecordType(final String value) {
138                super(value);
139        }
140        
141        
142        @Override
143        public boolean equals(final Object object) {
144                
145                return object instanceof ElectronicRecordType &&
146                        this.toString().equals(object.toString());
147        }
148}