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

com.hp.autonomy.hod.client.util.Request Maven / Gradle / Ivy

There is a newer version: 0.25.3
Show newest version
/*
 * Copyright 2015-2016 Hewlett-Packard Development Company, L.P.
 * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
 */

package com.hp.autonomy.hod.client.util;

import lombok.Data;

import java.util.List;
import java.util.Map;

/**
 * Represents a request to HP Haven OnDemand.
 */
@Data
public class Request {
    private final Verb verb;
    private final String path;
    private final Map> queryParameters;
    private final Map> body;

    public Request(final Verb verb, final String path, final Map> queryParameters, final Map> body) {
        if (verb == null || path == null) {
            throw new IllegalArgumentException("Verb and path are mandatory");
        }

        this.verb = verb;
        this.path = path;
        this.queryParameters = queryParameters;
        this.body = body;
    }

    public enum Verb {
        // These must be uppercase or HMAC signing will fail
        GET, POST, PUT, DELETE
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy