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

io.aws.lambda.events.system.LoadBalancerRequest Maven / Gradle / Ivy

package io.aws.lambda.events.system;

import io.aws.lambda.events.BodyBase64Event;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jetbrains.annotations.NotNull;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;
import java.util.Map;

/**
 * Class to represent the request event from Application Load Balancer.
 * 
 * @see Using
 *      AWS Lambda with an Application Load Balancer
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class LoadBalancerRequest extends BodyBase64Event implements Serializable {

    private RequestContext requestContext;
    private String httpMethod;
    private String path;
    private Map queryStringParameters;
    private Map> multiValueQueryStringParameters;
    private Map headers;
    private Map> multiValueHeaders;

    public @NotNull Map getHeaders() {
        return headers == null ? Collections.emptyMap() : headers;
    }

    public @NotNull Map> getMultiValueHeaders() {
        return multiValueHeaders == null ? Collections.emptyMap() : multiValueHeaders;
    }

    public @NotNull Map getQueryStringParameters() {
        return queryStringParameters == null ? Collections.emptyMap() : queryStringParameters;
    }

    public @NotNull Map> getMultiValueQueryStringParameters() {
        return multiValueQueryStringParameters == null ? Collections.emptyMap() : multiValueQueryStringParameters;
    }

    @Data
    @Accessors(chain = true)
    public static class Elb implements Serializable {

        private String targetGroupArn;
    }

    @Data
    @Accessors(chain = true)
    public static class RequestContext implements Serializable {

        private Elb elb;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy