com.smartsheet.api.internal.http.HttpResponse Maven / Gradle / Ivy
Show all versions of smartsheet-sdk-java Show documentation
/*
* Copyright (C) 2023 Smartsheet
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.smartsheet.api.internal.http;
/**
* This class represents an HTTP response.
*
* Thread Safety: This class is not thread safe since it's mutable.
*/
public class HttpResponse extends HttpMessage {
/**
* Represents the response status code.
*
* It has a pair of setter/getter (not shown on class diagram for brevity).
*/
private int statusCode;
private String statusText;
/**
* Gets the status code.
*
* @return the status code
*/
public int getStatusCode() {
return statusCode;
}
/**
* Gets the status text.
*
* @return the status text
*/
public String getStatusText() {
return statusText;
}
/**
* Sets the status code.
*
* @param statusCode the new status code
*/
public void setStatusCode(int statusCode) {
this.statusCode = statusCode;
}
/**
* Sets the status code and text.
*
* @param statusCode the new status code
* @param statusText the new status text
*/
public void setStatus(int statusCode, String statusText) {
this.statusCode = statusCode;
this.statusText = statusText;
}
}