All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mercadopago.insight.dto.TrafficLightRequest Maven / Gradle / Ivy

There is a newer version: 1.8.0
Show newest version
package com.mercadopago.insight.dto;



import com.google.gson.annotations.SerializedName;

import java.io.Serializable;

public final class TrafficLightRequest implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 1L;
    /**
     * Since we use Builder pattern, we can use public final class attributes
     */
    @SerializedName("client-info")
    public final ClientInfo clientInfo;

    /**
     * Constructor must be private to enforce Builder pattern usage
     *
     * @param builder the {@link Builder} used to gather {@link TrafficLightRequest} data
     */
    private TrafficLightRequest(Builder builder) {
        this.clientInfo = builder.clientInfo;
    }

    public Builder newBuilder() {
        Builder builder = new Builder();

        builder.clientInfo = this.clientInfo;

        return builder;
    }

    /**
     * The {@link TrafficLightRequest} Builder
     */
    public static class Builder {

        private ClientInfo clientInfo;

        public Builder withClientInfo(ClientInfo clientInfo) {
            this.clientInfo = clientInfo;
            return this;
        }

        public TrafficLightRequest build() {
            return new TrafficLightRequest(this);
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy