package ru.yandex.autotests.direct.api.campaigns.units;

import java.lang.reflect.InvocationTargetException;

import javax.xml.bind.annotation.XmlElement;

import com.yandex.direct.api.v5.campaigns.GetRequest;
import org.apache.commons.beanutils.BeanUtils;

class BadGetRequest extends GetRequest {

    @XmlElement(name = "ExtraFieldToProvokeError")
    private String extraField;

    BadGetRequest(GetRequest origin) {
        super();
        try {
            BeanUtils.copyProperties(this, origin);
            this.extraField = "someString";
        } catch (IllegalAccessException | InvocationTargetException e) {
            e.printStackTrace();
        }
    }

    public String getExtraField() {
        return extraField;
    }

    public void setExtraField(String extraField) {
        this.extraField = extraField;
    }

}
