// Code generated by openapi-nexus. DO NOT EDIT.
//
// Deeply Nested Inline Objects Test — 1.0.0
// Test case for three levels of nested inline objects
package com.example.sdk.apis;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.example.sdk.models.*;
import com.example.sdk.runtime.ApiClient;
import com.example.sdk.runtime.ApiException;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import okhttp3.Request;
import okhttp3.Response;
/**
* TestResponse carries the response from test.
*/
public class TestResponse {
private final int statusCode;
private final Response raw;
public TestResponse(int statusCode, Response raw) {
this.statusCode = statusCode;
this.raw = raw;
}
public int getStatusCode() {
return this.statusCode;
}
public Response getRaw() {
return this.raw;
}
}
/**
* DefaultApi groups operations under the default tag.
*/
public class DefaultApi {
private final ApiClient client;
private final Gson gson = new Gson();
public DefaultApi(ApiClient client) {
this.client = client;
}
/**
* Test endpoint
*/
public TestResponse test() throws IOException {
String path = "/test";
Request request = client.newRequest("GET", path, null, null);
Response response = client.execute(request);
if (!response.isSuccessful()) {
String errorBody = response.body() != null ? response.body().string() : "";
throw new ApiException(response.code(), response.message(), errorBody);
}
return new TestResponse(response.code(), response);
}
}