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

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 Api5RequestsArgs {

    @Expose
    private Method method;
    @SerializedName("params_api5_requests")
    @Expose
    private ParamsApi5Requests paramsApi5Requests;

    public Method getMethod() {
        return method;
    }

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

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

    public ParamsApi5Requests getParamsApi5Requests() {
        return paramsApi5Requests;
    }

    public void setParamsApi5Requests(ParamsApi5Requests paramsApi5Requests) {
        this.paramsApi5Requests = paramsApi5Requests;
    }

    public Api5RequestsArgs withParamsApi5Requests(ParamsApi5Requests paramsApi5Requests) {
        this.paramsApi5Requests = paramsApi5Requests;
        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"),
        GET("get");
        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;
            }
        }

    }

}
