/**
 * Do not edit.
 *
 * This file was auto-generated
 * by the Web Service Director Eclipse Plugin Edition.
 */

package com.nec.webotx.webservice.director.service1;

import com.nec.webotx.webservice.xml.rpc.encoding.*;
import com.nec.webotx.webservice.xml.rpc.util.exception.LocalizableExceptionAdapter;

public class Service1_method1_Sample1_ResponseStruct2_SOAPBuilder implements SOAPInstanceBuilder {
    private com.nec.webotx.webservice.director.service1.Service1_method1_Sample1_ResponseStruct2 _instance;
    private java.lang.String result;
    private static final int myRESULT_INDEX = 0;
    
    public Service1_method1_Sample1_ResponseStruct2_SOAPBuilder() {
    }
    
    public void setResult(java.lang.String result) {
        this.result = result;
    }
    
    public int memberGateType(int memberIndex) {
        switch (memberIndex) {
            case myRESULT_INDEX:
                return GATES_INITIALIZATION | REQUIRES_CREATION;
            default:
                throw new IllegalArgumentException();
        }
    }
    
    public void construct() {
    }
    
    public void setMember(int index, Object memberValue) {
        try {
            switch(index) {
                case myRESULT_INDEX:
                    _instance.setResult((java.lang.String)memberValue);
                    break;
                default:
                    throw new IllegalArgumentException();
            }
        }
        catch (RuntimeException e) {
            throw e;
        }
        catch (Exception e) {
            throw new DeserializationException(new LocalizableExceptionAdapter(e));
        }
    }
    
    public void initialize() {
    }
    
    public void setInstance(Object instance) {
        _instance = (com.nec.webotx.webservice.director.service1.Service1_method1_Sample1_ResponseStruct2)instance;
    }
    
    public Object getInstance() {
        return _instance;
    }
}
