
package ru.yandex.autotests.mediaplan.datacontainersauto.api5_adgroups;

import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

@Generated("org.jsonschema2pojo")
public class Api5AdgroupsArgs {

    @Expose
    private Method method;
    @SerializedName("params_api5_adgroups")
    @Expose
    private ParamsApi5Adgroups paramsApi5Adgroups;

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    public Api5AdgroupsArgs withMethod(Method method) {
        this.method = method;
        return this;
    }

    public ParamsApi5Adgroups getParamsApi5Adgroups() {
        return paramsApi5Adgroups;
    }

    public void setParamsApi5Adgroups(ParamsApi5Adgroups paramsApi5Adgroups) {
        this.paramsApi5Adgroups = paramsApi5Adgroups;
    }

    public Api5AdgroupsArgs withParamsApi5Adgroups(ParamsApi5Adgroups paramsApi5Adgroups) {
        this.paramsApi5Adgroups = paramsApi5Adgroups;
        return this;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }

    @Override
    public int hashCode() {
        return HashCodeBuilder.reflectionHashCode(this);
    }

    @Override
    public boolean equals(Object other) {
        return EqualsBuilder.reflectionEquals(this, other);
    }

    @Generated("org.jsonschema2pojo")
    public static enum Method {

        ADD("add"),
        DELETE("delete"),
        UPDATE("update");
        private final String value;
        private static Map<String, Method> constants = new HashMap<String, Method>();

        static {
            for (Method c: Method.values()) {
                constants.put(c.value, c);
            }
        }

        private Method(String value) {
            this.value = value;
        }

        @Override
        public String toString() {
            return this.value;
        }

        public static Method fromValue(String value) {
            Method constant = constants.get(value);
            if (constant == null) {
                throw new IllegalArgumentException(value);
            } else {
                return constant;
            }
        }

    }

}
