@shi-corp/sdk-data-gateway
Version:
SDK client used to interface with the SHI Data Gateway service.
38 lines (37 loc) • 2.02 kB
JavaScript
import { createRecordDataFromDiscriminatorValue } from '../../../models/tenantDetails/index.js';
export function createWithTenantPatchRequestBodyFromDiscriminatorValue(parseNode) {
return deserializeIntoWithTenantPatchRequestBody;
}
export function deserializeIntoWithTenantPatchRequestBody(withTenantPatchRequestBody = {}) {
return {
"authorizedPrincipalList": n => { withTenantPatchRequestBody.authorizedPrincipalList = n.getCollectionOfPrimitiveValues(); },
"displayName": n => { withTenantPatchRequestBody.displayName = n.getStringValue(); },
"parentId": n => { withTenantPatchRequestBody.parentId = n.getGuidValue(); },
};
}
export function serializeWithTenantPatchRequestBody(writer, withTenantPatchRequestBody = {}) {
if (withTenantPatchRequestBody) {
writer.writeCollectionOfPrimitiveValues("authorizedPrincipalList", withTenantPatchRequestBody.authorizedPrincipalList);
writer.writeStringValue("displayName", withTenantPatchRequestBody.displayName);
writer.writeGuidValue("parentId", withTenantPatchRequestBody.parentId);
writer.writeAdditionalData(withTenantPatchRequestBody.additionalData);
}
}
export const WithTenantItemRequestBuilderUriTemplate = "{+baseurl}/Api/Tenant/{tenantId}{?parentId*}";
export const WithTenantItemRequestBuilderRequestsMetadata = {
get: {
uriTemplate: WithTenantItemRequestBuilderUriTemplate,
responseBodyContentType: "application/json",
adapterMethodName: "send",
responseBodyFactory: createRecordDataFromDiscriminatorValue,
},
patch: {
uriTemplate: WithTenantItemRequestBuilderUriTemplate,
responseBodyContentType: "application/json",
adapterMethodName: "send",
responseBodyFactory: createRecordDataFromDiscriminatorValue,
requestBodyContentType: "application/json",
requestBodySerializer: serializeWithTenantPatchRequestBody,
requestInformationContentSetMethod: "setContentFromParsable",
},
};