
package pokerth_protocol;
//
// This file was generated by the BinaryNotes compiler.
// See http://bnotes.sourceforge.net 
// Any modifications to this file will be lost upon recompilation of the source ASN.1. 
//

import org.bn.*;
import org.bn.annotations.*;
import org.bn.annotations.constraints.*;
import org.bn.coders.*;
import org.bn.types.*;




    @ASN1PreparedElement
    @ASN1BoxedType ( name = "InitMessage" )
    public class InitMessage implements IASN1PreparedElement {
                
        

       @ASN1PreparedElement
       @ASN1Sequence ( name = "InitMessage" , isSet = false )
       public static class InitMessageSequenceType implements IASN1PreparedElement {
                
        @ASN1Element ( name = "requestedVersion", isOptional =  false , hasTag =  false  , hasDefaultValue =  false  )
    
	private Version requestedVersion = null;
                
  @ASN1Integer( name = "" )
    
        @ASN1Element ( name = "buildId", isOptional =  false , hasTag =  false  , hasDefaultValue =  false  )
    
	private Long buildId = null;
                
  
        @ASN1Element ( name = "myLastSessionId", isOptional =  true , hasTag =  false  , hasDefaultValue =  false  )
    
	private Guid myLastSessionId = null;
                
  
    @ASN1String( name = "", 
        stringType = UniversalTag.UTF8String , isUCS = false )
    @ASN1ValueRangeConstraint ( 
		
		min = 1L, 
		
		max = 64L 
		
	   )
	   
        @ASN1Element ( name = "authServerPassword", isOptional =  true , hasTag =  false  , hasDefaultValue =  false  )
    
	private String authServerPassword = null;
                
  
        
    @ASN1PreparedElement
    @ASN1Choice ( name = "login" )
    public static class LoginChoiceType implements IASN1PreparedElement {
            
        @ASN1Element ( name = "guestLogin", isOptional =  false , hasTag =  true, tag = 0 , hasDefaultValue =  false  )
    
	private GuestLogin guestLogin = null;
                
  
        @ASN1Element ( name = "authenticatedLogin", isOptional =  false , hasTag =  true, tag = 1 , hasDefaultValue =  false  )
    
	private AuthenticatedLogin authenticatedLogin = null;
                
  
        @ASN1Element ( name = "unauthenticatedLogin", isOptional =  false , hasTag =  true, tag = 2 , hasDefaultValue =  false  )
    
	private UnauthenticatedLogin unauthenticatedLogin = null;
                
  
        
        public GuestLogin getGuestLogin () {
            return this.guestLogin;
        }

        public boolean isGuestLoginSelected () {
            return this.guestLogin != null;
        }

        private void setGuestLogin (GuestLogin value) {
            this.guestLogin = value;
        }

        
        public void selectGuestLogin (GuestLogin value) {
            this.guestLogin = value;
            
                    setAuthenticatedLogin(null);
                
                    setUnauthenticatedLogin(null);
                            
        }

        
  
        
        public AuthenticatedLogin getAuthenticatedLogin () {
            return this.authenticatedLogin;
        }

        public boolean isAuthenticatedLoginSelected () {
            return this.authenticatedLogin != null;
        }

        private void setAuthenticatedLogin (AuthenticatedLogin value) {
            this.authenticatedLogin = value;
        }

        
        public void selectAuthenticatedLogin (AuthenticatedLogin value) {
            this.authenticatedLogin = value;
            
                    setGuestLogin(null);
                
                    setUnauthenticatedLogin(null);
                            
        }

        
  
        
        public UnauthenticatedLogin getUnauthenticatedLogin () {
            return this.unauthenticatedLogin;
        }

        public boolean isUnauthenticatedLoginSelected () {
            return this.unauthenticatedLogin != null;
        }

        private void setUnauthenticatedLogin (UnauthenticatedLogin value) {
            this.unauthenticatedLogin = value;
        }

        
        public void selectUnauthenticatedLogin (UnauthenticatedLogin value) {
            this.unauthenticatedLogin = value;
            
                    setGuestLogin(null);
                
                    setAuthenticatedLogin(null);
                            
        }

        
  

	    public void initWithDefaults() {
	    }

        public IASN1PreparedElementData getPreparedData() {
            return preparedData_LoginChoiceType;
        }

        private static IASN1PreparedElementData preparedData_LoginChoiceType = CoderFactory.getInstance().newPreparedElementData(LoginChoiceType.class);

    }

                
        @ASN1Element ( name = "login", isOptional =  false , hasTag =  false  , hasDefaultValue =  false  )
    
	private LoginChoiceType login = null;
                
  
        
        public Version getRequestedVersion () {
            return this.requestedVersion;
        }

        

        public void setRequestedVersion (Version value) {
            this.requestedVersion = value;
        }
        
  
        
        public Long getBuildId () {
            return this.buildId;
        }

        

        public void setBuildId (Long value) {
            this.buildId = value;
        }
        
  
        
        public Guid getMyLastSessionId () {
            return this.myLastSessionId;
        }

        
        public boolean isMyLastSessionIdPresent () {
            return this.myLastSessionId != null;
        }
        

        public void setMyLastSessionId (Guid value) {
            this.myLastSessionId = value;
        }
        
  
        
        public String getAuthServerPassword () {
            return this.authServerPassword;
        }

        
        public boolean isAuthServerPasswordPresent () {
            return this.authServerPassword != null;
        }
        

        public void setAuthServerPassword (String value) {
            this.authServerPassword = value;
        }
        
  
        
        public LoginChoiceType getLogin () {
            return this.login;
        }

        

        public void setLogin (LoginChoiceType value) {
            this.login = value;
        }
        
  
                
                
        public void initWithDefaults() {
            
        }

        public IASN1PreparedElementData getPreparedData() {
            return preparedData_InitMessageSequenceType;
        }

       private static IASN1PreparedElementData preparedData_InitMessageSequenceType = CoderFactory.getInstance().newPreparedElementData(InitMessageSequenceType.class);
                
       }

       
                
        @ASN1Element ( name = "InitMessage", isOptional =  false , hasTag =  true, tag = 1, 
        tagClass =  TagClass.Application  , hasDefaultValue =  false  )
    
        private InitMessageSequenceType  value;        

        
        
        public InitMessage () {
        }
        
        
        
        public void setValue(InitMessageSequenceType value) {
            this.value = value;
        }
        
        
        
        public InitMessageSequenceType getValue() {
            return this.value;
        }            
        

	    public void initWithDefaults() {
	    }

        private static IASN1PreparedElementData preparedData = CoderFactory.getInstance().newPreparedElementData(InitMessage.class);
        public IASN1PreparedElementData getPreparedData() {
            return preparedData;
        }

            
    }
            