ServiceResponse<T> クラス

  • java.lang.Object
    • com.microsoft.bot.restclient.ServiceResponse<T>

型パラメーター

T

応答の型

public class ServiceResponse

このクラスのインスタンスは、応答オブジェクトと生の REST 応答を保持します。

コンストラクターの概要

コンストラクター 説明
ServiceResponse(T body, Response<ResponseBody> response)

応答オブジェクトと生の REST 応答を使用して、ServiceResponse インスタンスをインスタンス化します。

ServiceResponse(Response<Void> headResponse)

HEAD 操作からの応答を使用して、ServiceResponse インスタンスをインスタンス化します。

メソッドの概要

修飾子と型 メソッドと説明
T body()

応答オブジェクトを取得します。

retrofit2.Response<java.lang.Void> headResponse()

HEAD 操作から生の REST 応答を取得します。

retrofit2.Response<okhttp3.ResponseBody> response()

生の REST 応答を取得します。

ServiceResponse<T> withBody(T body)

応答オブジェクトを設定します。

メソッドの継承元: java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

コンストラクターの詳細

ServiceResponse

public ServiceResponse(T body, Response response)

応答オブジェクトと生の REST 応答を使用して ServiceResponse インスタンスをインスタンス化します。

パラメーター:

body - 逆シリアル化された応答オブジェクト
response - 生の REST 応答

ServiceResponse

public ServiceResponse(Response headResponse)

HEAD 操作からの応答を使用して ServiceResponse インスタンスをインスタンス化します。

パラメーター:

headResponse - HEAD 操作からの生の REST 応答

メソッドの詳細

body

public T body()

応答オブジェクトを取得します。

戻り値:

応答オブジェクト。 存在しない場合は Null。

headResponse

public Response headResponse()

HEAD 操作から生の REST 応答を取得します。

戻り値:

HEAD 操作からの生の REST 応答。

response

public Response response()

生の REST 応答を取得します。

戻り値:

生の REST 応答。

withBody

public ServiceResponse withBody(T body)

応答オブジェクトを設定します。

パラメーター:

body - 応答オブジェクト。

戻り値:

ServiceResponse オブジェクト自体

適用対象