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

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

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

public class Aggregator_sampleAggregation_Aggregation_RequestStruct2_SOAPBuilder implements SOAPInstanceBuilder {
    private com.nec.webotx.webservice.director.aggregator.Aggregator_sampleAggregation_Aggregation_RequestStruct2 _instance;
    private java.lang.String string_1;
    private java.lang.String string_2;
    private java.lang.String string_3;
    private java.lang.String string_4;
    private static final int mySTRING_1_INDEX = 0;
    private static final int mySTRING_2_INDEX = 1;
    private static final int mySTRING_3_INDEX = 2;
    private static final int mySTRING_4_INDEX = 3;
    
    public Aggregator_sampleAggregation_Aggregation_RequestStruct2_SOAPBuilder() {
    }
    
    public void setString_1(java.lang.String string_1) {
        this.string_1 = string_1;
    }
    
    public void setString_2(java.lang.String string_2) {
        this.string_2 = string_2;
    }
    
    public void setString_3(java.lang.String string_3) {
        this.string_3 = string_3;
    }
    
    public void setString_4(java.lang.String string_4) {
        this.string_4 = string_4;
    }
    
    public int memberGateType(int memberIndex) {
        switch (memberIndex) {
            case mySTRING_1_INDEX:
                return GATES_INITIALIZATION | REQUIRES_CREATION;
            case mySTRING_2_INDEX:
                return GATES_INITIALIZATION | REQUIRES_CREATION;
            case mySTRING_3_INDEX:
                return GATES_INITIALIZATION | REQUIRES_CREATION;
            case mySTRING_4_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;
                case mySTRING_2_INDEX:
                    _instance.setString_2((java.lang.String)memberValue);
                    break;
                case mySTRING_3_INDEX:
                    _instance.setString_3((java.lang.String)memberValue);
                    break;
                case mySTRING_4_INDEX:
                    _instance.setString_4((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.aggregator.Aggregator_sampleAggregation_Aggregation_RequestStruct2)instance;
    }
    
    public Object getInstance() {
        return _instance;
    }
}
