public class ApiMock extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ApiMock.StatusCodeEnum
mock后端自定义状态码: \"200\": \"OK\", \"201\": \"Created\", \"202\": \"Accepted\", \"203\": \"NonAuthoritativeInformation\", \"204\": \"NoContent\", \"205\": \"ResetContent\", \"206\": \"PartialContent\", \"300\": \"MultipleChoices\", \"301\": \"MovedPermanently\", \"302\": \"Found\", \"303\": \"SeeOther\", \"304\": \"NotModified\", \"305\": \"UseProxy\", \"306\": \"Unused\", \"307\": \"TemporaryRedirect\", \"400\": \"BadRequest\", \"401\": \"Unauthorized\", \"402\": \"PaymentRequired\", \"403\": \"Forbidden\", \"404\": \"NotFound\", \"405\": \"MethodNotAllowed\", \"406\": \"NotAcceptable\", \"407\": \"ProxyAuthenticationRequired\", \"408\": \"RequestTimeout\", \"409\": \"Conflict\", \"410\": \"Gone\", \"411\": \"LengthRequired\", \"412\": \"PreconditionFailed\", \"413\": \"RequestEntityTooLarge\", \"414\": \"RequestURITooLong\", \"415\": \"UnsupportedMediaType\", \"416\": \"RequestedRangeNotSatisfiable\", \"417\": \"ExpectationFailed\", \"450\": \"ParameterRequried\", \"451\": \"MethodConnectException\", \"500\": \"InternalServerError\", \"501\": \"NotImplemented\", \"502\": \"BadGateway\", \"503\": \"ServiceUnavailable\", \"504\": \"GatewayTimeout\", \"505\": \"HTTPVersionNotSupported\",
|
static class |
ApiMock.StatusEnum
后端状态 - 1: 有效
|
| Constructor and Description |
|---|
ApiMock() |
| Modifier and Type | Method and Description |
|---|---|
ApiMock |
addHeaderItem(MockApiBaseInfoHeader headerItem) |
boolean |
equals(Object o) |
String |
getAuthorizerId()
后端自定义认证ID
|
List<MockApiBaseInfoHeader> |
getHeader()
mock后端自定义响应头header
|
String |
getId()
编号
|
java.time.OffsetDateTime |
getRegisterTime()
注册时间
|
String |
getRemark()
描述信息。 > 中文字符必须为UTF-8或者unicode编码。
|
String |
getResultContent()
返回结果
|
ApiMock.StatusEnum |
getStatus()
后端状态 - 1: 有效
|
ApiMock.StatusCodeEnum |
getStatusCode()
mock后端自定义状态码: \"200\": \"OK\", \"201\": \"Created\", \"202\": \"Accepted\", \"203\": \"NonAuthoritativeInformation\", \"204\": \"NoContent\", \"205\": \"ResetContent\", \"206\": \"PartialContent\", \"300\": \"MultipleChoices\", \"301\": \"MovedPermanently\", \"302\": \"Found\", \"303\": \"SeeOther\", \"304\": \"NotModified\", \"305\": \"UseProxy\", \"306\": \"Unused\", \"307\": \"TemporaryRedirect\", \"400\": \"BadRequest\", \"401\": \"Unauthorized\", \"402\": \"PaymentRequired\", \"403\": \"Forbidden\", \"404\": \"NotFound\", \"405\": \"MethodNotAllowed\", \"406\": \"NotAcceptable\", \"407\": \"ProxyAuthenticationRequired\", \"408\": \"RequestTimeout\", \"409\": \"Conflict\", \"410\": \"Gone\", \"411\": \"LengthRequired\", \"412\": \"PreconditionFailed\", \"413\": \"RequestEntityTooLarge\", \"414\": \"RequestURITooLong\", \"415\": \"UnsupportedMediaType\", \"416\": \"RequestedRangeNotSatisfiable\", \"417\": \"ExpectationFailed\", \"450\": \"ParameterRequried\", \"451\": \"MethodConnectException\", \"500\": \"InternalServerError\", \"501\": \"NotImplemented\", \"502\": \"BadGateway\", \"503\": \"ServiceUnavailable\", \"504\": \"GatewayTimeout\", \"505\": \"HTTPVersionNotSupported\",
|
java.time.OffsetDateTime |
getUpdateTime()
修改时间
|
String |
getVersion()
版本。字符长度不超过64
|
int |
hashCode() |
void |
setAuthorizerId(String authorizerId) |
void |
setHeader(List<MockApiBaseInfoHeader> header) |
void |
setId(String id) |
void |
setRegisterTime(java.time.OffsetDateTime registerTime) |
void |
setRemark(String remark) |
void |
setResultContent(String resultContent) |
void |
setStatus(ApiMock.StatusEnum status) |
void |
setStatusCode(ApiMock.StatusCodeEnum statusCode) |
void |
setUpdateTime(java.time.OffsetDateTime updateTime) |
void |
setVersion(String version) |
String |
toString() |
ApiMock |
withAuthorizerId(String authorizerId) |
ApiMock |
withHeader(java.util.function.Consumer<List<MockApiBaseInfoHeader>> headerSetter) |
ApiMock |
withHeader(List<MockApiBaseInfoHeader> header) |
ApiMock |
withId(String id) |
ApiMock |
withRegisterTime(java.time.OffsetDateTime registerTime) |
ApiMock |
withRemark(String remark) |
ApiMock |
withResultContent(String resultContent) |
ApiMock |
withStatus(ApiMock.StatusEnum status) |
ApiMock |
withStatusCode(ApiMock.StatusCodeEnum statusCode) |
ApiMock |
withUpdateTime(java.time.OffsetDateTime updateTime) |
ApiMock |
withVersion(String version) |
public String getRemark()
public void setRemark(String remark)
public String getResultContent()
public void setResultContent(String resultContent)
public String getVersion()
public void setVersion(String version)
public String getAuthorizerId()
public void setAuthorizerId(String authorizerId)
public ApiMock withStatusCode(ApiMock.StatusCodeEnum statusCode)
public ApiMock.StatusCodeEnum getStatusCode()
public void setStatusCode(ApiMock.StatusCodeEnum statusCode)
public ApiMock withHeader(List<MockApiBaseInfoHeader> header)
public ApiMock addHeaderItem(MockApiBaseInfoHeader headerItem)
public ApiMock withHeader(java.util.function.Consumer<List<MockApiBaseInfoHeader>> headerSetter)
public List<MockApiBaseInfoHeader> getHeader()
public void setHeader(List<MockApiBaseInfoHeader> header)
public String getId()
public void setId(String id)
public ApiMock withRegisterTime(java.time.OffsetDateTime registerTime)
public java.time.OffsetDateTime getRegisterTime()
public void setRegisterTime(java.time.OffsetDateTime registerTime)
public ApiMock withStatus(ApiMock.StatusEnum status)
public ApiMock.StatusEnum getStatus()
public void setStatus(ApiMock.StatusEnum status)
public ApiMock withUpdateTime(java.time.OffsetDateTime updateTime)
public java.time.OffsetDateTime getUpdateTime()
public void setUpdateTime(java.time.OffsetDateTime updateTime)
Copyright © 2022. All rights reserved.