Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.huaweicloud.sdk.osm.v2.OsmMeta Maven / Gradle / Ivy
package com.huaweicloud.sdk.osm.v2;
import com.huaweicloud.sdk.core.TypeCasts;
import com.huaweicloud.sdk.core.http.FieldExistence;
import com.huaweicloud.sdk.core.http.HttpMethod;
import com.huaweicloud.sdk.core.http.HttpRequestDef;
import com.huaweicloud.sdk.core.http.LocationType;
import com.huaweicloud.sdk.osm.v2.model.AccessoryJsonFormatReq;
import com.huaweicloud.sdk.osm.v2.model.AgreeTenantAuthorizationV2Req;
import com.huaweicloud.sdk.osm.v2.model.AskQuestionReq;
import com.huaweicloud.sdk.osm.v2.model.CheckHostsRequest;
import com.huaweicloud.sdk.osm.v2.model.CheckHostsResponse;
import com.huaweicloud.sdk.osm.v2.model.CheckNeedVerifyRequest;
import com.huaweicloud.sdk.osm.v2.model.CheckNeedVerifyResponse;
import com.huaweicloud.sdk.osm.v2.model.CheckVerifyCodesRequest;
import com.huaweicloud.sdk.osm.v2.model.CheckVerifyCodesResponse;
import com.huaweicloud.sdk.osm.v2.model.ConfirmAuthorizationsRequest;
import com.huaweicloud.sdk.osm.v2.model.ConfirmAuthorizationsResponse;
import com.huaweicloud.sdk.osm.v2.model.CreateAndDeletePrivilegeReq;
import com.huaweicloud.sdk.osm.v2.model.CreateAskQuestionRequest;
import com.huaweicloud.sdk.osm.v2.model.CreateAskQuestionResponse;
import com.huaweicloud.sdk.osm.v2.model.CreateCaseExtendsParamRequest;
import com.huaweicloud.sdk.osm.v2.model.CreateCaseExtendsParamResponse;
import com.huaweicloud.sdk.osm.v2.model.CreateCaseLabelsRequest;
import com.huaweicloud.sdk.osm.v2.model.CreateCaseLabelsResponse;
import com.huaweicloud.sdk.osm.v2.model.CreateCasesRequest;
import com.huaweicloud.sdk.osm.v2.model.CreateCasesResponse;
import com.huaweicloud.sdk.osm.v2.model.CreateDiagnoseFeedbackRequest;
import com.huaweicloud.sdk.osm.v2.model.CreateDiagnoseFeedbackResponse;
import com.huaweicloud.sdk.osm.v2.model.CreateDiagnoseJobRequest;
import com.huaweicloud.sdk.osm.v2.model.CreateDiagnoseJobResponse;
import com.huaweicloud.sdk.osm.v2.model.CreateEvaluateRequest;
import com.huaweicloud.sdk.osm.v2.model.CreateEvaluateResponse;
import com.huaweicloud.sdk.osm.v2.model.CreateFeedbackReq;
import com.huaweicloud.sdk.osm.v2.model.CreateFeedbackRequest;
import com.huaweicloud.sdk.osm.v2.model.CreateFeedbackResponse;
import com.huaweicloud.sdk.osm.v2.model.CreateFeedbackV2Req;
import com.huaweicloud.sdk.osm.v2.model.CreateLabelsReq;
import com.huaweicloud.sdk.osm.v2.model.CreateLabelsRequest;
import com.huaweicloud.sdk.osm.v2.model.CreateLabelsResponse;
import com.huaweicloud.sdk.osm.v2.model.CreateMessageV2Req;
import com.huaweicloud.sdk.osm.v2.model.CreateMessagesRequest;
import com.huaweicloud.sdk.osm.v2.model.CreateMessagesResponse;
import com.huaweicloud.sdk.osm.v2.model.CreateOrderIncidentV2Req;
import com.huaweicloud.sdk.osm.v2.model.CreatePrivilegesRequest;
import com.huaweicloud.sdk.osm.v2.model.CreatePrivilegesResponse;
import com.huaweicloud.sdk.osm.v2.model.CreateQaAskRequest;
import com.huaweicloud.sdk.osm.v2.model.CreateQaAskResponse;
import com.huaweicloud.sdk.osm.v2.model.CreateQaFeedbacksRequest;
import com.huaweicloud.sdk.osm.v2.model.CreateQaFeedbacksResponse;
import com.huaweicloud.sdk.osm.v2.model.CreateQuestionInSessionRequest;
import com.huaweicloud.sdk.osm.v2.model.CreateQuestionInSessionResponse;
import com.huaweicloud.sdk.osm.v2.model.CreateRelationsReq;
import com.huaweicloud.sdk.osm.v2.model.CreateRelationsRequest;
import com.huaweicloud.sdk.osm.v2.model.CreateRelationsResponse;
import com.huaweicloud.sdk.osm.v2.model.CreateScoreV2Req;
import com.huaweicloud.sdk.osm.v2.model.CreateScoresRequest;
import com.huaweicloud.sdk.osm.v2.model.CreateScoresResponse;
import com.huaweicloud.sdk.osm.v2.model.CreateSessionRequest;
import com.huaweicloud.sdk.osm.v2.model.CreateSessionResponse;
import com.huaweicloud.sdk.osm.v2.model.DeleteAccessoriesRequest;
import com.huaweicloud.sdk.osm.v2.model.DeleteAccessoriesResponse;
import com.huaweicloud.sdk.osm.v2.model.DeleteCaseLabelsRequest;
import com.huaweicloud.sdk.osm.v2.model.DeleteCaseLabelsResponse;
import com.huaweicloud.sdk.osm.v2.model.DeleteLabelsRequest;
import com.huaweicloud.sdk.osm.v2.model.DeleteLabelsResponse;
import com.huaweicloud.sdk.osm.v2.model.DeleteRelationRequest;
import com.huaweicloud.sdk.osm.v2.model.DeleteRelationResponse;
import com.huaweicloud.sdk.osm.v2.model.DeleteRelationsReq;
import com.huaweicloud.sdk.osm.v2.model.DownloadAccessoriesRequest;
import com.huaweicloud.sdk.osm.v2.model.DownloadAccessoriesResponse;
import com.huaweicloud.sdk.osm.v2.model.DownloadCasesRequest;
import com.huaweicloud.sdk.osm.v2.model.DownloadCasesResponse;
import com.huaweicloud.sdk.osm.v2.model.DownloadImagesRequest;
import com.huaweicloud.sdk.osm.v2.model.DownloadImagesResponse;
import com.huaweicloud.sdk.osm.v2.model.EvaluateRequestReq;
import com.huaweicloud.sdk.osm.v2.model.ListAccessoryAccessUrlsRequest;
import com.huaweicloud.sdk.osm.v2.model.ListAccessoryAccessUrlsResponse;
import com.huaweicloud.sdk.osm.v2.model.ListAgenciesRequest;
import com.huaweicloud.sdk.osm.v2.model.ListAgenciesResponse;
import com.huaweicloud.sdk.osm.v2.model.ListAreaCodesRequest;
import com.huaweicloud.sdk.osm.v2.model.ListAreaCodesResponse;
import com.huaweicloud.sdk.osm.v2.model.ListArticlesRequest;
import com.huaweicloud.sdk.osm.v2.model.ListArticlesResponse;
import com.huaweicloud.sdk.osm.v2.model.ListAuthorizationsRequest;
import com.huaweicloud.sdk.osm.v2.model.ListAuthorizationsResponse;
import com.huaweicloud.sdk.osm.v2.model.ListCaseCategoriesRequest;
import com.huaweicloud.sdk.osm.v2.model.ListCaseCategoriesResponse;
import com.huaweicloud.sdk.osm.v2.model.ListCaseCcEmailsRequest;
import com.huaweicloud.sdk.osm.v2.model.ListCaseCcEmailsResponse;
import com.huaweicloud.sdk.osm.v2.model.ListCaseCountsRequest;
import com.huaweicloud.sdk.osm.v2.model.ListCaseCountsResponse;
import com.huaweicloud.sdk.osm.v2.model.ListCaseLabelsRequest;
import com.huaweicloud.sdk.osm.v2.model.ListCaseLabelsResponse;
import com.huaweicloud.sdk.osm.v2.model.ListCaseLimitsRequest;
import com.huaweicloud.sdk.osm.v2.model.ListCaseLimitsResponse;
import com.huaweicloud.sdk.osm.v2.model.ListCaseOperateLogsRequest;
import com.huaweicloud.sdk.osm.v2.model.ListCaseOperateLogsResponse;
import com.huaweicloud.sdk.osm.v2.model.ListCaseQuotasRequest;
import com.huaweicloud.sdk.osm.v2.model.ListCaseQuotasResponse;
import com.huaweicloud.sdk.osm.v2.model.ListCaseTemplatesRequest;
import com.huaweicloud.sdk.osm.v2.model.ListCaseTemplatesResponse;
import com.huaweicloud.sdk.osm.v2.model.ListCasesRequest;
import com.huaweicloud.sdk.osm.v2.model.ListCasesResponse;
import com.huaweicloud.sdk.osm.v2.model.ListCustomersRegionsRequest;
import com.huaweicloud.sdk.osm.v2.model.ListCustomersRegionsResponse;
import com.huaweicloud.sdk.osm.v2.model.ListDiagnoseItemsRequest;
import com.huaweicloud.sdk.osm.v2.model.ListDiagnoseItemsResponse;
import com.huaweicloud.sdk.osm.v2.model.ListDiagnoseJobRequest;
import com.huaweicloud.sdk.osm.v2.model.ListDiagnoseJobResponse;
import com.huaweicloud.sdk.osm.v2.model.ListDiagnoseRecordsRequest;
import com.huaweicloud.sdk.osm.v2.model.ListDiagnoseRecordsResponse;
import com.huaweicloud.sdk.osm.v2.model.ListDiagnoseResourcesRequest;
import com.huaweicloud.sdk.osm.v2.model.ListDiagnoseResourcesResponse;
import com.huaweicloud.sdk.osm.v2.model.ListExtendsParamsRequest;
import com.huaweicloud.sdk.osm.v2.model.ListExtendsParamsResponse;
import com.huaweicloud.sdk.osm.v2.model.ListFeedbackOptionRequest;
import com.huaweicloud.sdk.osm.v2.model.ListFeedbackOptionResponse;
import com.huaweicloud.sdk.osm.v2.model.ListHasVerifiedContactsRequest;
import com.huaweicloud.sdk.osm.v2.model.ListHasVerifiedContactsResponse;
import com.huaweicloud.sdk.osm.v2.model.ListHistoryOperateLogsRequest;
import com.huaweicloud.sdk.osm.v2.model.ListHistoryOperateLogsResponse;
import com.huaweicloud.sdk.osm.v2.model.ListHistorySessionsRequest;
import com.huaweicloud.sdk.osm.v2.model.ListHistorySessionsResponse;
import com.huaweicloud.sdk.osm.v2.model.ListLabelsRequest;
import com.huaweicloud.sdk.osm.v2.model.ListLabelsResponse;
import com.huaweicloud.sdk.osm.v2.model.ListMessagesRequest;
import com.huaweicloud.sdk.osm.v2.model.ListMessagesResponse;
import com.huaweicloud.sdk.osm.v2.model.ListMoreInstantMessagesRequest;
import com.huaweicloud.sdk.osm.v2.model.ListMoreInstantMessagesResponse;
import com.huaweicloud.sdk.osm.v2.model.ListNewInstantMessagesRequest;
import com.huaweicloud.sdk.osm.v2.model.ListNewInstantMessagesResponse;
import com.huaweicloud.sdk.osm.v2.model.ListNoticesRequest;
import com.huaweicloud.sdk.osm.v2.model.ListNoticesResponse;
import com.huaweicloud.sdk.osm.v2.model.ListOrderIncidentRequest;
import com.huaweicloud.sdk.osm.v2.model.ListOrderIncidentResponse;
import com.huaweicloud.sdk.osm.v2.model.ListPrivilegesRequest;
import com.huaweicloud.sdk.osm.v2.model.ListPrivilegesResponse;
import com.huaweicloud.sdk.osm.v2.model.ListProblemTypesRequest;
import com.huaweicloud.sdk.osm.v2.model.ListProblemTypesResponse;
import com.huaweicloud.sdk.osm.v2.model.ListProductCategoriesRequest;
import com.huaweicloud.sdk.osm.v2.model.ListProductCategoriesResponse;
import com.huaweicloud.sdk.osm.v2.model.ListRecommendWordsRequest;
import com.huaweicloud.sdk.osm.v2.model.ListRecommendWordsResponse;
import com.huaweicloud.sdk.osm.v2.model.ListRegionsRequest;
import com.huaweicloud.sdk.osm.v2.model.ListRegionsResponse;
import com.huaweicloud.sdk.osm.v2.model.ListRelationRequest;
import com.huaweicloud.sdk.osm.v2.model.ListRelationResponse;
import com.huaweicloud.sdk.osm.v2.model.ListSatisfactionDimensionsRequest;
import com.huaweicloud.sdk.osm.v2.model.ListSatisfactionDimensionsResponse;
import com.huaweicloud.sdk.osm.v2.model.ListSeveritiesRequest;
import com.huaweicloud.sdk.osm.v2.model.ListSeveritiesResponse;
import com.huaweicloud.sdk.osm.v2.model.ListSubCustomersRequest;
import com.huaweicloud.sdk.osm.v2.model.ListSubCustomersResponse;
import com.huaweicloud.sdk.osm.v2.model.ListToolsRequest;
import com.huaweicloud.sdk.osm.v2.model.ListToolsResponse;
import com.huaweicloud.sdk.osm.v2.model.ListTransportHistoriesRequest;
import com.huaweicloud.sdk.osm.v2.model.ListTransportHistoriesResponse;
import com.huaweicloud.sdk.osm.v2.model.ListUnreadNewInstantMessagesRequest;
import com.huaweicloud.sdk.osm.v2.model.ListUnreadNewInstantMessagesResponse;
import com.huaweicloud.sdk.osm.v2.model.OperateAuthorizationV2Req;
import com.huaweicloud.sdk.osm.v2.model.PutCaseExtParamReq;
import com.huaweicloud.sdk.osm.v2.model.QaAskReq;
import com.huaweicloud.sdk.osm.v2.model.QaFeedbackReq;
import com.huaweicloud.sdk.osm.v2.model.QueryAssociatedQuestionReq;
import com.huaweicloud.sdk.osm.v2.model.QueryDiagnoseItemsReq;
import com.huaweicloud.sdk.osm.v2.model.QueryTscDiagnoseResourcesReq;
import com.huaweicloud.sdk.osm.v2.model.RevokeMessageRequest;
import com.huaweicloud.sdk.osm.v2.model.RevokeMessageResponse;
import com.huaweicloud.sdk.osm.v2.model.SearchArticlesReq;
import com.huaweicloud.sdk.osm.v2.model.SearchNoticesReq;
import com.huaweicloud.sdk.osm.v2.model.SearchQaPairsReq;
import com.huaweicloud.sdk.osm.v2.model.SearchToolsReq;
import com.huaweicloud.sdk.osm.v2.model.SendVerifyCodeReq;
import com.huaweicloud.sdk.osm.v2.model.SendVerifyCodesRequest;
import com.huaweicloud.sdk.osm.v2.model.SendVerifyCodesResponse;
import com.huaweicloud.sdk.osm.v2.model.SessionAskQuestionReq;
import com.huaweicloud.sdk.osm.v2.model.ShowAccessoryLimitsRequest;
import com.huaweicloud.sdk.osm.v2.model.ShowAccessoryLimitsResponse;
import com.huaweicloud.sdk.osm.v2.model.ShowAssociatedQuestionsRequest;
import com.huaweicloud.sdk.osm.v2.model.ShowAssociatedQuestionsResponse;
import com.huaweicloud.sdk.osm.v2.model.ShowAuthorizationDetailRequest;
import com.huaweicloud.sdk.osm.v2.model.ShowAuthorizationDetailResponse;
import com.huaweicloud.sdk.osm.v2.model.ShowCaseDetailRequest;
import com.huaweicloud.sdk.osm.v2.model.ShowCaseDetailResponse;
import com.huaweicloud.sdk.osm.v2.model.ShowCaseExtendsParamRequest;
import com.huaweicloud.sdk.osm.v2.model.ShowCaseExtendsParamResponse;
import com.huaweicloud.sdk.osm.v2.model.ShowCaseStatusRequest;
import com.huaweicloud.sdk.osm.v2.model.ShowCaseStatusResponse;
import com.huaweicloud.sdk.osm.v2.model.ShowConfigurationRequest;
import com.huaweicloud.sdk.osm.v2.model.ShowConfigurationResponse;
import com.huaweicloud.sdk.osm.v2.model.ShowCustomerPrivilegePolicyRequest;
import com.huaweicloud.sdk.osm.v2.model.ShowCustomerPrivilegePolicyResponse;
import com.huaweicloud.sdk.osm.v2.model.ShowDownloadAccessoryUrlRequest;
import com.huaweicloud.sdk.osm.v2.model.ShowDownloadAccessoryUrlResponse;
import com.huaweicloud.sdk.osm.v2.model.ShowLatestPublishedAgreementRequest;
import com.huaweicloud.sdk.osm.v2.model.ShowLatestPublishedAgreementResponse;
import com.huaweicloud.sdk.osm.v2.model.ShowLoginTypeRequest;
import com.huaweicloud.sdk.osm.v2.model.ShowLoginTypeResponse;
import com.huaweicloud.sdk.osm.v2.model.ShowPartnersCasesPrivilegeRequest;
import com.huaweicloud.sdk.osm.v2.model.ShowPartnersCasesPrivilegeResponse;
import com.huaweicloud.sdk.osm.v2.model.ShowPartnersServiceInfoRequest;
import com.huaweicloud.sdk.osm.v2.model.ShowPartnersServiceInfoResponse;
import com.huaweicloud.sdk.osm.v2.model.ShowQaPairDetailRequest;
import com.huaweicloud.sdk.osm.v2.model.ShowQaPairDetailResponse;
import com.huaweicloud.sdk.osm.v2.model.ShowQaPairsRequest;
import com.huaweicloud.sdk.osm.v2.model.ShowQaPairsResponse;
import com.huaweicloud.sdk.osm.v2.model.ShowSignedLatestPublishedAgreementRequest;
import com.huaweicloud.sdk.osm.v2.model.ShowSignedLatestPublishedAgreementResponse;
import com.huaweicloud.sdk.osm.v2.model.ShowThemeRequest;
import com.huaweicloud.sdk.osm.v2.model.ShowThemeResponse;
import com.huaweicloud.sdk.osm.v2.model.SignAgreementReq;
import com.huaweicloud.sdk.osm.v2.model.SignPublishedAgreementRequest;
import com.huaweicloud.sdk.osm.v2.model.SignPublishedAgreementResponse;
import com.huaweicloud.sdk.osm.v2.model.SubmitDiagnoseJobReq;
import com.huaweicloud.sdk.osm.v2.model.UpdateAuthorizationsRequest;
import com.huaweicloud.sdk.osm.v2.model.UpdateAuthorizationsResponse;
import com.huaweicloud.sdk.osm.v2.model.UpdateCaseContactInfoReq;
import com.huaweicloud.sdk.osm.v2.model.UpdateCaseContactInfoRequest;
import com.huaweicloud.sdk.osm.v2.model.UpdateCaseContactInfoResponse;
import com.huaweicloud.sdk.osm.v2.model.UpdateCasesRequest;
import com.huaweicloud.sdk.osm.v2.model.UpdateCasesResponse;
import com.huaweicloud.sdk.osm.v2.model.UpdateLabelsReq;
import com.huaweicloud.sdk.osm.v2.model.UpdateLabelsRequest;
import com.huaweicloud.sdk.osm.v2.model.UpdateLabelsResponse;
import com.huaweicloud.sdk.osm.v2.model.UpdateNewInstantMessagesReadRequest;
import com.huaweicloud.sdk.osm.v2.model.UpdateNewInstantMessagesReadResponse;
import com.huaweicloud.sdk.osm.v2.model.UpdateUnreadNewInstantMsgV2Req;
import com.huaweicloud.sdk.osm.v2.model.UploadJsonAccessoriesRequest;
import com.huaweicloud.sdk.osm.v2.model.UploadJsonAccessoriesResponse;
import com.huaweicloud.sdk.osm.v2.model.VerifyHostV2Req;
import com.huaweicloud.sdk.osm.v2.model.VerifyVerifyCodeV2Req;
import com.huaweicloud.sdk.osm.v2.model.WorkOrderOperateV2Req;
import java.util.List;
@SuppressWarnings("unchecked")
public class OsmMeta {
public static final HttpRequestDef checkHosts = genForCheckHosts();
private static HttpRequestDef genForCheckHosts() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.POST, CheckHostsRequest.class, CheckHostsResponse.class)
.withName("CheckHosts")
.withUri(
"/v2/servicerequest/authorizations/authorization-details/{authorization_detail_id}/verify-host")
.withContentType("application/json");
// requests
builder.withRequestField("authorization_detail_id",
LocationType.Path,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(Long.class),
f -> f.withMarshaller(CheckHostsRequest::getAuthorizationDetailId,
CheckHostsRequest::setAuthorizationDetailId));
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(CheckHostsRequest::getXSite, CheckHostsRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CheckHostsRequest::getXLanguage, CheckHostsRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CheckHostsRequest::getXTimeZone, CheckHostsRequest::setXTimeZone));
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(VerifyHostV2Req.class),
f -> f.withMarshaller(CheckHostsRequest::getBody, CheckHostsRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef checkNeedVerify =
genForCheckNeedVerify();
private static HttpRequestDef genForCheckNeedVerify() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.GET, CheckNeedVerifyRequest.class, CheckNeedVerifyResponse.class)
.withName("CheckNeedVerify")
.withUri("/v2/servicerequest/verifycodes/need-verify")
.withContentType("application/json");
// requests
builder.withRequestField("contact_value",
LocationType.Query,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CheckNeedVerifyRequest::getContactValue, CheckNeedVerifyRequest::setContactValue));
builder.withRequestField("contact_way",
LocationType.Query,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(CheckNeedVerifyRequest::getContactWay, CheckNeedVerifyRequest::setContactWay));
builder.withRequestField("area_code",
LocationType.Query,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CheckNeedVerifyRequest::getAreaCode, CheckNeedVerifyRequest::setAreaCode));
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(CheckNeedVerifyRequest::getXSite, CheckNeedVerifyRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CheckNeedVerifyRequest::getXLanguage, CheckNeedVerifyRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CheckNeedVerifyRequest::getXTimeZone, CheckNeedVerifyRequest::setXTimeZone));
// response
return builder.build();
}
public static final HttpRequestDef checkVerifyCodes =
genForCheckVerifyCodes();
private static HttpRequestDef genForCheckVerifyCodes() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.POST, CheckVerifyCodesRequest.class, CheckVerifyCodesResponse.class)
.withName("CheckVerifyCodes")
.withUri("/v2/servicerequest/verifycodes")
.withContentType("application/json");
// requests
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(CheckVerifyCodesRequest::getXSite, CheckVerifyCodesRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CheckVerifyCodesRequest::getXLanguage, CheckVerifyCodesRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CheckVerifyCodesRequest::getXTimeZone, CheckVerifyCodesRequest::setXTimeZone));
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(VerifyVerifyCodeV2Req.class),
f -> f.withMarshaller(CheckVerifyCodesRequest::getBody, CheckVerifyCodesRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef confirmAuthorizations =
genForConfirmAuthorizations();
private static HttpRequestDef genForConfirmAuthorizations() {
// basic
HttpRequestDef.Builder builder = HttpRequestDef
.builder(HttpMethod.PUT, ConfirmAuthorizationsRequest.class, ConfirmAuthorizationsResponse.class)
.withName("ConfirmAuthorizations")
.withUri("/v2/servicerequest/authorizations/{authorization_id}")
.withContentType("application/json");
// requests
builder.withRequestField("authorization_id",
LocationType.Path,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(ConfirmAuthorizationsRequest::getAuthorizationId,
ConfirmAuthorizationsRequest::setAuthorizationId));
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(ConfirmAuthorizationsRequest::getXSite, ConfirmAuthorizationsRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(ConfirmAuthorizationsRequest::getXLanguage,
ConfirmAuthorizationsRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(ConfirmAuthorizationsRequest::getXTimeZone,
ConfirmAuthorizationsRequest::setXTimeZone));
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(AgreeTenantAuthorizationV2Req.class),
f -> f.withMarshaller(ConfirmAuthorizationsRequest::getBody, ConfirmAuthorizationsRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef createAskQuestion =
genForCreateAskQuestion();
private static HttpRequestDef genForCreateAskQuestion() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.POST, CreateAskQuestionRequest.class, CreateAskQuestionResponse.class)
.withName("CreateAskQuestion")
.withUri("/v2/irobot/qapairs/ask")
.withContentType("application/json");
// requests
builder.withRequestField("x-service-key",
LocationType.Header,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateAskQuestionRequest::getXServiceKey, CreateAskQuestionRequest::setXServiceKey));
builder.withRequestField("x-site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateAskQuestionRequest::getXSite, CreateAskQuestionRequest::setXSite));
builder.withRequestField("x-language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateAskQuestionRequest::getXLanguage, CreateAskQuestionRequest::setXLanguage));
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(AskQuestionReq.class),
f -> f.withMarshaller(CreateAskQuestionRequest::getBody, CreateAskQuestionRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef createCaseExtendsParam =
genForCreateCaseExtendsParam();
private static HttpRequestDef genForCreateCaseExtendsParam() {
// basic
HttpRequestDef.Builder builder = HttpRequestDef
.builder(HttpMethod.POST, CreateCaseExtendsParamRequest.class, CreateCaseExtendsParamResponse.class)
.withName("CreateCaseExtendsParam")
.withUri("/v2/servicerequest/cases/{case_id}/extends-param")
.withContentType("application/json");
// requests
builder.withRequestField("case_id",
LocationType.Path,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateCaseExtendsParamRequest::getCaseId, CreateCaseExtendsParamRequest::setCaseId));
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(CreateCaseExtendsParamRequest::getXSite, CreateCaseExtendsParamRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateCaseExtendsParamRequest::getXLanguage,
CreateCaseExtendsParamRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateCaseExtendsParamRequest::getXTimeZone,
CreateCaseExtendsParamRequest::setXTimeZone));
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(PutCaseExtParamReq.class),
f -> f.withMarshaller(CreateCaseExtendsParamRequest::getBody, CreateCaseExtendsParamRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef createCaseLabels =
genForCreateCaseLabels();
private static HttpRequestDef genForCreateCaseLabels() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.POST, CreateCaseLabelsRequest.class, CreateCaseLabelsResponse.class)
.withName("CreateCaseLabels")
.withUri("/v2/servicerequest/cases/{case_id}/labels")
.withContentType("application/json");
// requests
builder.withRequestField("case_id",
LocationType.Path,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateCaseLabelsRequest::getCaseId, CreateCaseLabelsRequest::setCaseId));
builder.>withRequestField("label_ids",
LocationType.Query,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(List.class),
f -> f.withMarshaller(CreateCaseLabelsRequest::getLabelIds, CreateCaseLabelsRequest::setLabelIds));
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(CreateCaseLabelsRequest::getXSite, CreateCaseLabelsRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateCaseLabelsRequest::getXLanguage, CreateCaseLabelsRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateCaseLabelsRequest::getXTimeZone, CreateCaseLabelsRequest::setXTimeZone));
// response
return builder.build();
}
public static final HttpRequestDef createCases = genForCreateCases();
private static HttpRequestDef genForCreateCases() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.POST, CreateCasesRequest.class, CreateCasesResponse.class)
.withName("CreateCases")
.withUri("/v2/servicerequest/cases")
.withContentType("application/json");
// requests
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(CreateCasesRequest::getXSite, CreateCasesRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateCasesRequest::getXLanguage, CreateCasesRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateCasesRequest::getXTimeZone, CreateCasesRequest::setXTimeZone));
builder.withRequestField("x-phone-verifiedid",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateCasesRequest::getXPhoneVerifiedid, CreateCasesRequest::setXPhoneVerifiedid));
builder.withRequestField("x-email-verifiedid",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateCasesRequest::getXEmailVerifiedid, CreateCasesRequest::setXEmailVerifiedid));
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(CreateOrderIncidentV2Req.class),
f -> f.withMarshaller(CreateCasesRequest::getBody, CreateCasesRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef createDiagnoseFeedback =
genForCreateDiagnoseFeedback();
private static HttpRequestDef genForCreateDiagnoseFeedback() {
// basic
HttpRequestDef.Builder builder = HttpRequestDef
.builder(HttpMethod.POST, CreateDiagnoseFeedbackRequest.class, CreateDiagnoseFeedbackResponse.class)
.withName("CreateDiagnoseFeedback")
.withUri("/v2.0/servicerequest/diagnose/feedback")
.withContentType("application/json");
// requests
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(CreateFeedbackReq.class),
f -> f.withMarshaller(CreateDiagnoseFeedbackRequest::getBody, CreateDiagnoseFeedbackRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef createDiagnoseJob =
genForCreateDiagnoseJob();
private static HttpRequestDef genForCreateDiagnoseJob() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.POST, CreateDiagnoseJobRequest.class, CreateDiagnoseJobResponse.class)
.withName("CreateDiagnoseJob")
.withUri("/v2.0/servicerequest/diagnose/job/start")
.withContentType("application/json");
// requests
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(SubmitDiagnoseJobReq.class),
f -> f.withMarshaller(CreateDiagnoseJobRequest::getBody, CreateDiagnoseJobRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef createEvaluate =
genForCreateEvaluate();
private static HttpRequestDef genForCreateEvaluate() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.POST, CreateEvaluateRequest.class, CreateEvaluateResponse.class)
.withName("CreateEvaluate")
.withUri("/v2/irobot/sessions/{session_id}/{request_id}/evaluate")
.withContentType("application/json");
// requests
builder.withRequestField("session_id",
LocationType.Path,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateEvaluateRequest::getSessionId, CreateEvaluateRequest::setSessionId));
builder.withRequestField("request_id",
LocationType.Path,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateEvaluateRequest::getRequestId, CreateEvaluateRequest::setRequestId));
builder.withRequestField("x-service-key",
LocationType.Header,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateEvaluateRequest::getXServiceKey, CreateEvaluateRequest::setXServiceKey));
builder.withRequestField("x-site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateEvaluateRequest::getXSite, CreateEvaluateRequest::setXSite));
builder.withRequestField("x-language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateEvaluateRequest::getXLanguage, CreateEvaluateRequest::setXLanguage));
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(EvaluateRequestReq.class),
f -> f.withMarshaller(CreateEvaluateRequest::getBody, CreateEvaluateRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef createFeedback =
genForCreateFeedback();
private static HttpRequestDef genForCreateFeedback() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.POST, CreateFeedbackRequest.class, CreateFeedbackResponse.class)
.withName("CreateFeedback")
.withUri("/v2/servicerequest/feedbacks")
.withContentType("application/json");
// requests
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(CreateFeedbackV2Req.class),
f -> f.withMarshaller(CreateFeedbackRequest::getBody, CreateFeedbackRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef createLabels = genForCreateLabels();
private static HttpRequestDef genForCreateLabels() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.POST, CreateLabelsRequest.class, CreateLabelsResponse.class)
.withName("CreateLabels")
.withUri("/v2/servicerequest/labels")
.withContentType("application/json");
// requests
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(CreateLabelsRequest::getXSite, CreateLabelsRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateLabelsRequest::getXLanguage, CreateLabelsRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateLabelsRequest::getXTimeZone, CreateLabelsRequest::setXTimeZone));
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(CreateLabelsReq.class),
f -> f.withMarshaller(CreateLabelsRequest::getBody, CreateLabelsRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef createMessages =
genForCreateMessages();
private static HttpRequestDef genForCreateMessages() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.POST, CreateMessagesRequest.class, CreateMessagesResponse.class)
.withName("CreateMessages")
.withUri("/v2/servicerequest/cases/{case_id}/message")
.withContentType("application/json");
// requests
builder.withRequestField("case_id",
LocationType.Path,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateMessagesRequest::getCaseId, CreateMessagesRequest::setCaseId));
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(CreateMessagesRequest::getXSite, CreateMessagesRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateMessagesRequest::getXLanguage, CreateMessagesRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateMessagesRequest::getXTimeZone, CreateMessagesRequest::setXTimeZone));
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(CreateMessageV2Req.class),
f -> f.withMarshaller(CreateMessagesRequest::getBody, CreateMessagesRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef createPrivileges =
genForCreatePrivileges();
private static HttpRequestDef genForCreatePrivileges() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.POST, CreatePrivilegesRequest.class, CreatePrivilegesResponse.class)
.withName("CreatePrivileges")
.withUri("/v2/servicerequest/privileges")
.withContentType("application/json");
// requests
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(CreatePrivilegesRequest::getXSite, CreatePrivilegesRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreatePrivilegesRequest::getXLanguage, CreatePrivilegesRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreatePrivilegesRequest::getXTimeZone, CreatePrivilegesRequest::setXTimeZone));
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(CreateAndDeletePrivilegeReq.class),
f -> f.withMarshaller(CreatePrivilegesRequest::getBody, CreatePrivilegesRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef createQaAsk = genForCreateQaAsk();
private static HttpRequestDef genForCreateQaAsk() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.POST, CreateQaAskRequest.class, CreateQaAskResponse.class)
.withName("CreateQaAsk")
.withUri("/v2/irobot/ask")
.withContentType("application/json");
// requests
builder.withRequestField("x-service-key",
LocationType.Header,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateQaAskRequest::getXServiceKey, CreateQaAskRequest::setXServiceKey));
builder.withRequestField("x-site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateQaAskRequest::getXSite, CreateQaAskRequest::setXSite));
builder.withRequestField("x-language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateQaAskRequest::getXLanguage, CreateQaAskRequest::setXLanguage));
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(QaAskReq.class),
f -> f.withMarshaller(CreateQaAskRequest::getBody, CreateQaAskRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef createQaFeedbacks =
genForCreateQaFeedbacks();
private static HttpRequestDef genForCreateQaFeedbacks() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.POST, CreateQaFeedbacksRequest.class, CreateQaFeedbacksResponse.class)
.withName("CreateQaFeedbacks")
.withUri("/v2/irobot/feedbacks")
.withContentType("application/json");
// requests
builder.withRequestField("feedback_type",
LocationType.Query,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(CreateQaFeedbacksRequest.FeedbackTypeEnum.class),
f -> f.withMarshaller(CreateQaFeedbacksRequest::getFeedbackType,
CreateQaFeedbacksRequest::setFeedbackType));
builder.withRequestField("x-service-key",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateQaFeedbacksRequest::getXServiceKey, CreateQaFeedbacksRequest::setXServiceKey));
builder.withRequestField("x-site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateQaFeedbacksRequest::getXSite, CreateQaFeedbacksRequest::setXSite));
builder.withRequestField("x-language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateQaFeedbacksRequest::getXLanguage, CreateQaFeedbacksRequest::setXLanguage));
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(QaFeedbackReq.class),
f -> f.withMarshaller(CreateQaFeedbacksRequest::getBody, CreateQaFeedbacksRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef createQuestionInSession =
genForCreateQuestionInSession();
private static HttpRequestDef genForCreateQuestionInSession() {
// basic
HttpRequestDef.Builder builder = HttpRequestDef
.builder(HttpMethod.POST, CreateQuestionInSessionRequest.class, CreateQuestionInSessionResponse.class)
.withName("CreateQuestionInSession")
.withUri("/v2/irobot/sessions/{session_id}/ask")
.withContentType("application/json");
// requests
builder.withRequestField("session_id",
LocationType.Path,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateQuestionInSessionRequest::getSessionId,
CreateQuestionInSessionRequest::setSessionId));
builder.withRequestField("x-service-key",
LocationType.Header,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateQuestionInSessionRequest::getXServiceKey,
CreateQuestionInSessionRequest::setXServiceKey));
builder.withRequestField("x-site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateQuestionInSessionRequest::getXSite, CreateQuestionInSessionRequest::setXSite));
builder.withRequestField("x-language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateQuestionInSessionRequest::getXLanguage,
CreateQuestionInSessionRequest::setXLanguage));
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(SessionAskQuestionReq.class),
f -> f.withMarshaller(CreateQuestionInSessionRequest::getBody, CreateQuestionInSessionRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef createRelations =
genForCreateRelations();
private static HttpRequestDef genForCreateRelations() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.POST, CreateRelationsRequest.class, CreateRelationsResponse.class)
.withName("CreateRelations")
.withUri("/v2/servicerequest/cases/{case_id}/relations")
.withContentType("application/json");
// requests
builder.withRequestField("case_id",
LocationType.Path,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateRelationsRequest::getCaseId, CreateRelationsRequest::setCaseId));
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(CreateRelationsRequest::getXSite, CreateRelationsRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateRelationsRequest::getXLanguage, CreateRelationsRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateRelationsRequest::getXTimeZone, CreateRelationsRequest::setXTimeZone));
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(CreateRelationsReq.class),
f -> f.withMarshaller(CreateRelationsRequest::getBody, CreateRelationsRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef createScores = genForCreateScores();
private static HttpRequestDef genForCreateScores() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.POST, CreateScoresRequest.class, CreateScoresResponse.class)
.withName("CreateScores")
.withUri("/v2/servicerequest/cases/{case_id}/score")
.withContentType("application/json");
// requests
builder.withRequestField("case_id",
LocationType.Path,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateScoresRequest::getCaseId, CreateScoresRequest::setCaseId));
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(CreateScoresRequest::getXSite, CreateScoresRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateScoresRequest::getXLanguage, CreateScoresRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateScoresRequest::getXTimeZone, CreateScoresRequest::setXTimeZone));
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(CreateScoreV2Req.class),
f -> f.withMarshaller(CreateScoresRequest::getBody, CreateScoresRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef createSession =
genForCreateSession();
private static HttpRequestDef genForCreateSession() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.POST, CreateSessionRequest.class, CreateSessionResponse.class)
.withName("CreateSession")
.withUri("/v2/irobot/sessions")
.withContentType("application/json");
// requests
builder.withRequestField("x-service-key",
LocationType.Header,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateSessionRequest::getXServiceKey, CreateSessionRequest::setXServiceKey));
builder.withRequestField("x-site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateSessionRequest::getXSite, CreateSessionRequest::setXSite));
builder.withRequestField("x-language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(CreateSessionRequest::getXLanguage, CreateSessionRequest::setXLanguage));
// response
return builder.build();
}
public static final HttpRequestDef deleteAccessories =
genForDeleteAccessories();
private static HttpRequestDef genForDeleteAccessories() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.DELETE, DeleteAccessoriesRequest.class, DeleteAccessoriesResponse.class)
.withName("DeleteAccessories")
.withUri("/v2/servicerequest/accessorys/{accessory_id}")
.withContentType("application/json");
// requests
builder.withRequestField("accessory_id",
LocationType.Path,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DeleteAccessoriesRequest::getAccessoryId, DeleteAccessoriesRequest::setAccessoryId));
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(DeleteAccessoriesRequest::getXSite, DeleteAccessoriesRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DeleteAccessoriesRequest::getXLanguage, DeleteAccessoriesRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DeleteAccessoriesRequest::getXTimeZone, DeleteAccessoriesRequest::setXTimeZone));
// response
return builder.build();
}
public static final HttpRequestDef deleteCaseLabels =
genForDeleteCaseLabels();
private static HttpRequestDef genForDeleteCaseLabels() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.DELETE, DeleteCaseLabelsRequest.class, DeleteCaseLabelsResponse.class)
.withName("DeleteCaseLabels")
.withUri("/v2/servicerequest/cases/{case_id}/labels")
.withContentType("application/json");
// requests
builder.withRequestField("case_id",
LocationType.Path,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DeleteCaseLabelsRequest::getCaseId, DeleteCaseLabelsRequest::setCaseId));
builder.>withRequestField("label_ids",
LocationType.Query,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(List.class),
f -> f.withMarshaller(DeleteCaseLabelsRequest::getLabelIds, DeleteCaseLabelsRequest::setLabelIds));
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(DeleteCaseLabelsRequest::getXSite, DeleteCaseLabelsRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DeleteCaseLabelsRequest::getXLanguage, DeleteCaseLabelsRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DeleteCaseLabelsRequest::getXTimeZone, DeleteCaseLabelsRequest::setXTimeZone));
// response
return builder.build();
}
public static final HttpRequestDef deleteLabels = genForDeleteLabels();
private static HttpRequestDef genForDeleteLabels() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.DELETE, DeleteLabelsRequest.class, DeleteLabelsResponse.class)
.withName("DeleteLabels")
.withUri("/v2/servicerequest/labels/{label_id}")
.withContentType("application/json");
// requests
builder.withRequestField("label_id",
LocationType.Path,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(DeleteLabelsRequest::getLabelId, DeleteLabelsRequest::setLabelId));
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(DeleteLabelsRequest::getXSite, DeleteLabelsRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DeleteLabelsRequest::getXLanguage, DeleteLabelsRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DeleteLabelsRequest::getXTimeZone, DeleteLabelsRequest::setXTimeZone));
// response
return builder.build();
}
public static final HttpRequestDef deleteRelation =
genForDeleteRelation();
private static HttpRequestDef genForDeleteRelation() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.DELETE, DeleteRelationRequest.class, DeleteRelationResponse.class)
.withName("DeleteRelation")
.withUri("/v2/servicerequest/cases/{case_id}/relations")
.withContentType("application/json");
// requests
builder.withRequestField("case_id",
LocationType.Path,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DeleteRelationRequest::getCaseId, DeleteRelationRequest::setCaseId));
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(DeleteRelationRequest::getXSite, DeleteRelationRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DeleteRelationRequest::getXLanguage, DeleteRelationRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DeleteRelationRequest::getXTimeZone, DeleteRelationRequest::setXTimeZone));
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(DeleteRelationsReq.class),
f -> f.withMarshaller(DeleteRelationRequest::getBody, DeleteRelationRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef downloadAccessories =
genForDownloadAccessories();
private static HttpRequestDef genForDownloadAccessories() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.GET, DownloadAccessoriesRequest.class, DownloadAccessoriesResponse.class)
.withName("DownloadAccessories")
.withUri("/v2/servicerequest/accessorys/{accessory_id}")
.withContentType("application/json");
// requests
builder.withRequestField("accessory_id",
LocationType.Path,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DownloadAccessoriesRequest::getAccessoryId,
DownloadAccessoriesRequest::setAccessoryId));
builder.withRequestField("group_id",
LocationType.Query,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DownloadAccessoriesRequest::getGroupId, DownloadAccessoriesRequest::setGroupId));
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(DownloadAccessoriesRequest::getXSite, DownloadAccessoriesRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DownloadAccessoriesRequest::getXLanguage, DownloadAccessoriesRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DownloadAccessoriesRequest::getXTimeZone, DownloadAccessoriesRequest::setXTimeZone));
// response
return builder.build();
}
public static final HttpRequestDef downloadCases =
genForDownloadCases();
private static HttpRequestDef genForDownloadCases() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.GET, DownloadCasesRequest.class, DownloadCasesResponse.class)
.withName("DownloadCases")
.withUri("/v2/servicerequest/cases/export")
.withContentType("application/json");
// requests
builder.withRequestField("language",
LocationType.Query,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DownloadCasesRequest::getLanguage, DownloadCasesRequest::setLanguage));
builder.withRequestField("timezone",
LocationType.Query,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DownloadCasesRequest::getTimezone, DownloadCasesRequest::setTimezone));
builder.withRequestField("incident_id",
LocationType.Query,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DownloadCasesRequest::getIncidentId, DownloadCasesRequest::setIncidentId));
builder.withRequestField("query_start_time",
LocationType.Query,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DownloadCasesRequest::getQueryStartTime, DownloadCasesRequest::setQueryStartTime));
builder.withRequestField("query_end_time",
LocationType.Query,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DownloadCasesRequest::getQueryEndTime, DownloadCasesRequest::setQueryEndTime));
builder.withRequestField("x_customer_name",
LocationType.Query,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DownloadCasesRequest::getXCustomerName, DownloadCasesRequest::setXCustomerName));
builder.withRequestField("search_key",
LocationType.Query,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DownloadCasesRequest::getSearchKey, DownloadCasesRequest::setSearchKey));
builder.withRequestField("status",
LocationType.Query,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(DownloadCasesRequest::getStatus, DownloadCasesRequest::setStatus));
builder.withRequestField("customer_id",
LocationType.Query,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DownloadCasesRequest::getCustomerId, DownloadCasesRequest::setCustomerId));
builder.>withRequestField("tenant_source_id_list",
LocationType.Query,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(List.class),
f -> f.withMarshaller(DownloadCasesRequest::getTenantSourceIdList,
DownloadCasesRequest::setTenantSourceIdList));
builder.withRequestField("sub_customer_id",
LocationType.Query,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DownloadCasesRequest::getSubCustomerId, DownloadCasesRequest::setSubCustomerId));
builder.withRequestField("offset",
LocationType.Query,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(DownloadCasesRequest::getOffset, DownloadCasesRequest::setOffset));
builder.withRequestField("limit",
LocationType.Query,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(DownloadCasesRequest::getLimit, DownloadCasesRequest::setLimit));
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(DownloadCasesRequest::getXSite, DownloadCasesRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DownloadCasesRequest::getXLanguage, DownloadCasesRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DownloadCasesRequest::getXTimeZone, DownloadCasesRequest::setXTimeZone));
// response
return builder.build();
}
public static final HttpRequestDef downloadImages =
genForDownloadImages();
private static HttpRequestDef genForDownloadImages() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.GET, DownloadImagesRequest.class, DownloadImagesResponse.class)
.withName("DownloadImages")
.withUri("/v2/servicerequest/accessorys/{accessory_id}/image")
.withContentType("application/json");
// requests
builder.withRequestField("accessory_id",
LocationType.Path,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DownloadImagesRequest::getAccessoryId, DownloadImagesRequest::setAccessoryId));
builder.withRequestField("group_id",
LocationType.Query,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DownloadImagesRequest::getGroupId, DownloadImagesRequest::setGroupId));
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(DownloadImagesRequest::getXSite, DownloadImagesRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DownloadImagesRequest::getXLanguage, DownloadImagesRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(DownloadImagesRequest::getXTimeZone, DownloadImagesRequest::setXTimeZone));
// response
return builder.build();
}
public static final HttpRequestDef listAccessoryAccessUrls =
genForListAccessoryAccessUrls();
private static HttpRequestDef genForListAccessoryAccessUrls() {
// basic
HttpRequestDef.Builder builder = HttpRequestDef
.builder(HttpMethod.GET, ListAccessoryAccessUrlsRequest.class, ListAccessoryAccessUrlsResponse.class)
.withName("ListAccessoryAccessUrls")
.withUri("/v2/servicerequest/accessorys/access-urls")
.withContentType("application/json");
// requests
builder.withRequestField("group_id",
LocationType.Query,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(ListAccessoryAccessUrlsRequest::getGroupId,
ListAccessoryAccessUrlsRequest::setGroupId));
builder.>withRequestField("accessory_ids",
LocationType.Query,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(List.class),
f -> f.withMarshaller(ListAccessoryAccessUrlsRequest::getAccessoryIds,
ListAccessoryAccessUrlsRequest::setAccessoryIds));
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(ListAccessoryAccessUrlsRequest::getXSite, ListAccessoryAccessUrlsRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(ListAccessoryAccessUrlsRequest::getXLanguage,
ListAccessoryAccessUrlsRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(ListAccessoryAccessUrlsRequest::getXTimeZone,
ListAccessoryAccessUrlsRequest::setXTimeZone));
// response
return builder.build();
}
public static final HttpRequestDef listAgencies = genForListAgencies();
private static HttpRequestDef genForListAgencies() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.GET, ListAgenciesRequest.class, ListAgenciesResponse.class)
.withName("ListAgencies")
.withUri("/v2/servicerequest/agencies")
.withContentType("application/json");
// requests
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(ListAgenciesRequest::getXSite, ListAgenciesRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(ListAgenciesRequest::getXLanguage, ListAgenciesRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(ListAgenciesRequest::getXTimeZone, ListAgenciesRequest::setXTimeZone));
// response
return builder.build();
}
public static final HttpRequestDef listAreaCodes =
genForListAreaCodes();
private static HttpRequestDef genForListAreaCodes() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.GET, ListAreaCodesRequest.class, ListAreaCodesResponse.class)
.withName("ListAreaCodes")
.withUri("/v2/servicerequest/config/area-codes")
.withContentType("application/json");
// requests
builder.withRequestField("X-Site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(ListAreaCodesRequest::getXSite, ListAreaCodesRequest::setXSite));
builder.withRequestField("X-Language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(ListAreaCodesRequest::getXLanguage, ListAreaCodesRequest::setXLanguage));
builder.withRequestField("X-Time-Zone",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(ListAreaCodesRequest::getXTimeZone, ListAreaCodesRequest::setXTimeZone));
// response
return builder.build();
}
public static final HttpRequestDef listArticles = genForListArticles();
private static HttpRequestDef genForListArticles() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.POST, ListArticlesRequest.class, ListArticlesResponse.class)
.withName("ListArticles")
.withUri("/v2/irobot/articles/search")
.withContentType("application/json");
// requests
builder.withRequestField("search_type",
LocationType.Query,
FieldExistence.NON_NULL_NON_EMPTY,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(ListArticlesRequest::getSearchType, ListArticlesRequest::setSearchType));
builder.withRequestField("x-service-key",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(ListArticlesRequest::getXServiceKey, ListArticlesRequest::setXServiceKey));
builder.withRequestField("x-site",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(ListArticlesRequest::getXSite, ListArticlesRequest::setXSite));
builder.withRequestField("x-language",
LocationType.Header,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(ListArticlesRequest::getXLanguage, ListArticlesRequest::setXLanguage));
builder.withRequestField("body",
LocationType.Body,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(SearchArticlesReq.class),
f -> f.withMarshaller(ListArticlesRequest::getBody, ListArticlesRequest::setBody));
// response
return builder.build();
}
public static final HttpRequestDef listAuthorizations =
genForListAuthorizations();
private static HttpRequestDef genForListAuthorizations() {
// basic
HttpRequestDef.Builder builder =
HttpRequestDef.builder(HttpMethod.GET, ListAuthorizationsRequest.class, ListAuthorizationsResponse.class)
.withName("ListAuthorizations")
.withUri("/v2/servicerequest/authorizations")
.withContentType("application/json");
// requests
builder.withRequestField("sub_customer_name",
LocationType.Query,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(ListAuthorizationsRequest::getSubCustomerName,
ListAuthorizationsRequest::setSubCustomerName));
builder.withRequestField("incident_id",
LocationType.Query,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(String.class),
f -> f.withMarshaller(ListAuthorizationsRequest::getIncidentId, ListAuthorizationsRequest::setIncidentId));
builder.withRequestField("status",
LocationType.Query,
FieldExistence.NULL_IGNORE,
TypeCasts.uncheckedConversion(Integer.class),
f -> f.withMarshaller(ListAuthorizationsRequest::getStatus, ListAuthorizationsRequest::setStatus));
builder.