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

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

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

public class Service2_method2_Sample2_RequestStruct2_SOAPBuilder implements SOAPInstanceBuilder {
    private com.nec.webotx.webservice.director.service2.Service2_method2_Sample2_RequestStruct2 _instance;
    private java.lang.String string_1;
    private static final int mySTRING_1_INDEX = 0;
    
    public Service2_method2_Sample2_RequestStruct2_SOAPBuilder() {
    }
    
    public void setString_1(java.lang.String string_1) {
        this.string_1 = string_1;
    }
    
    public int memberGateType(int memberIndex) {
        switch (memberIndex) {
            case mySTRING_1_INDEX:
                return GATES_INITIALIZATION | REQUIRES_CREATION;
            default:
                throw new IllegalArgumentException();
        }
    }
    
    public void construct() {
    }
    
    public void setMember(int index, Object memberValue) {
        try {
            switch(index) {
                case mySTRING_1_INDEX:
                    _instance.setString_1((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.service2.Service2_method2_Sample2_RequestStruct2)instance;
    }
    
    public Object getInstance() {
        return _instance;
    }
}
