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

com.networknt.aws.lambda.DefaultResponse Maven / Gradle / Ivy

There is a newer version: 2.1.37
Show newest version
package com.networknt.aws.lambda;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;

@JsonDeserialize(builder = DefaultResponse.Builder.class)
public class DefaultResponse {

    private int code;
    private String message;

    public DefaultResponse(DefaultResponse.Builder builder) {
        this.code = builder.code;
        this.message = builder.message;
    }

    public static DefaultResponse.Builder builder() {
        return new DefaultResponse.Builder();
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    @JsonPOJOBuilder(withPrefix = "")
    public static class Builder {
        private int code;
        private String message;

        public Builder() { }

        public DefaultResponse.Builder code(int code) {
            this.code = code;
            return this;
        }

        public DefaultResponse.Builder message(String message) {
            this.message = message;
            return this;
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy