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

com.microsoft.rest.v2.BodyResponse Maven / Gradle / Ivy

/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 */

package com.microsoft.rest.v2;

import com.microsoft.rest.v2.http.HttpRequest;

import java.util.Map;

/**
 * A response to a REST call with a strongly-typed body specified.
 *
 * @param  The deserialized type of the response body.
 */
public final class BodyResponse extends RestResponse {
    /**
     * Creates a new BodyResponse object.
     *
     * @param request the request which resulted in this BodyResponse
     * @param statusCode the status code of the HTTP response
     * @param rawHeaders the raw headers of the HTTP response
     * @param body the deserialized body
     */
    public BodyResponse(HttpRequest request, int statusCode, Map rawHeaders, TBody body) {
        super(request, statusCode, null, rawHeaders, body);
    }

    // Used for uniform reflective creation in RestProxy.
    @SuppressWarnings("unused")
    BodyResponse(HttpRequest request, int statusCode, Void headers, Map rawHeaders, TBody body) {
        super(request, statusCode, headers, rawHeaders, body);
    }

    /**
     * @return the deserialized body of the HTTP response
     */
    public TBody body() {
        return super.body();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy