// DO NOT EDIT THIS FILE // This file has been generated by gen-api-models // tslint:disable:max-union-size // tslint:disable:no-identical-functions import * as t from "io-ts"; import * as r from "italia-ts-commons/lib/requests"; import { Service } from "./Service"; import { Logo } from "./Logo"; import { ProblemJson } from "./ProblemJson"; import { ServiceCollection } from "./ServiceCollection"; import { DevelopmentProfile } from "./DevelopmentProfile"; import { ExtendedProfile } from "./ExtendedProfile"; import { SubscriptionKeys } from "./SubscriptionKeys"; import { SubscriptionKeyTypePayload } from "./SubscriptionKeyTypePayload"; import { UserCollection } from "./UserCollection"; import { UserPayload } from "./UserPayload"; import { UserCreated } from "./UserCreated"; import { UserInfo } from "./UserInfo"; import { UserUpdatePayload } from "./UserUpdatePayload"; import { UserUpdated } from "./UserUpdated"; import { UserGroupsPayload } from "./UserGroupsPayload"; import { GroupCollection } from "./GroupCollection"; import { ProductNamePayload } from "./ProductNamePayload"; import { Subscription } from "./Subscription"; /**************************************************************** * getService */ // Request type definition export type GetServiceT = r.IGetApiRequestType< { readonly service_id: string; readonly SubscriptionKey: string }, "Ocp-Apim-Subscription-Key", never, | r.IResponseType<200, Service, never> | r.IResponseType<401, undefined, never> | r.IResponseType<404, undefined, never> >; export const getServiceDefaultResponses = { 200: Service, 401: t.undefined, 404: t.undefined }; export type GetServiceResponsesT< A0 = Service, C0 = Service, A1 = undefined, C1 = undefined, A2 = undefined, C2 = undefined > = { 200: t.Type; 401: t.Type; 404: t.Type; }; export function getServiceDecoder< A0 = Service, C0 = Service, A1 = undefined, C1 = undefined, A2 = undefined, C2 = undefined >( overrideTypes: | Partial> | t.Type | undefined = {} ): r.ResponseDecoder< | r.IResponseType<200, A0, never> | r.IResponseType<401, A1, never> | r.IResponseType<404, A2, never> > { const isDecoder = (d: any): d is t.Type => typeof d["_A"] !== "undefined"; const type = { ...((getServiceDefaultResponses as unknown) as GetServiceResponsesT< A0, C0, A1, C1, A2, C2 >), ...(isDecoder(overrideTypes) ? { 200: overrideTypes } : overrideTypes) }; const d200 = (type[200].name === "undefined" ? r.constantResponseDecoder(200, undefined) : r.ioResponseDecoder< 200, typeof type[200]["_A"], typeof type[200]["_O"], never >(200, type[200])) as r.ResponseDecoder>; const d401 = (type[401].name === "undefined" ? r.constantResponseDecoder(401, undefined) : r.ioResponseDecoder< 401, typeof type[401]["_A"], typeof type[401]["_O"], never >(401, type[401])) as r.ResponseDecoder>; const d404 = (type[404].name === "undefined" ? r.constantResponseDecoder(404, undefined) : r.ioResponseDecoder< 404, typeof type[404]["_A"], typeof type[404]["_O"], never >(404, type[404])) as r.ResponseDecoder>; return r.composeResponseDecoders(r.composeResponseDecoders(d200, d401), d404); } // Decodes the success response with the type defined in the specs export const getServiceDefaultDecoder = () => getServiceDecoder(); /**************************************************************** * updateService */ // Request type definition export type UpdateServiceT = r.IPutApiRequestType< { readonly service_id: string; readonly SubscriptionKey: string; readonly body?: Service; }, "Content-Type" | "Ocp-Apim-Subscription-Key", never, | r.IResponseType<200, Service, never> | r.IResponseType<401, undefined, never> | r.IResponseType<404, undefined, never> >; export const updateServiceDefaultResponses = { 200: Service, 401: t.undefined, 404: t.undefined }; export type UpdateServiceResponsesT< A0 = Service, C0 = Service, A1 = undefined, C1 = undefined, A2 = undefined, C2 = undefined > = { 200: t.Type; 401: t.Type; 404: t.Type; }; export function updateServiceDecoder< A0 = Service, C0 = Service, A1 = undefined, C1 = undefined, A2 = undefined, C2 = undefined >( overrideTypes: | Partial> | t.Type | undefined = {} ): r.ResponseDecoder< | r.IResponseType<200, A0, never> | r.IResponseType<401, A1, never> | r.IResponseType<404, A2, never> > { const isDecoder = (d: any): d is t.Type => typeof d["_A"] !== "undefined"; const type = { ...((updateServiceDefaultResponses as unknown) as UpdateServiceResponsesT< A0, C0, A1, C1, A2, C2 >), ...(isDecoder(overrideTypes) ? { 200: overrideTypes } : overrideTypes) }; const d200 = (type[200].name === "undefined" ? r.constantResponseDecoder(200, undefined) : r.ioResponseDecoder< 200, typeof type[200]["_A"], typeof type[200]["_O"], never >(200, type[200])) as r.ResponseDecoder>; const d401 = (type[401].name === "undefined" ? r.constantResponseDecoder(401, undefined) : r.ioResponseDecoder< 401, typeof type[401]["_A"], typeof type[401]["_O"], never >(401, type[401])) as r.ResponseDecoder>; const d404 = (type[404].name === "undefined" ? r.constantResponseDecoder(404, undefined) : r.ioResponseDecoder< 404, typeof type[404]["_A"], typeof type[404]["_O"], never >(404, type[404])) as r.ResponseDecoder>; return r.composeResponseDecoders(r.composeResponseDecoders(d200, d401), d404); } // Decodes the success response with the type defined in the specs export const updateServiceDefaultDecoder = () => updateServiceDecoder(); /**************************************************************** * uploadServiceLogo */ // Request type definition export type UploadServiceLogoT = r.IPutApiRequestType< { readonly service_id: string; readonly SubscriptionKey: string; readonly body: Logo; }, "Content-Type" | "Ocp-Apim-Subscription-Key", never, | r.IResponseType<201, undefined, "Location"> | r.IResponseType<400, ProblemJson, never> | r.IResponseType<401, undefined, never> | r.IResponseType<403, undefined, never> | r.IResponseType<404, undefined, never> | r.IResponseType<500, undefined, never> >; export const uploadServiceLogoDefaultResponses = { 201: t.undefined, 400: ProblemJson, 401: t.undefined, 403: t.undefined, 404: t.undefined, 500: t.undefined }; export type UploadServiceLogoResponsesT< A0 = undefined, C0 = undefined, A1 = ProblemJson, C1 = ProblemJson, A2 = undefined, C2 = undefined, A3 = undefined, C3 = undefined, A4 = undefined, C4 = undefined, A5 = undefined, C5 = undefined > = { 201: t.Type; 400: t.Type; 401: t.Type; 403: t.Type; 404: t.Type; 500: t.Type; }; export function uploadServiceLogoDecoder< A0 = undefined, C0 = undefined, A1 = ProblemJson, C1 = ProblemJson, A2 = undefined, C2 = undefined, A3 = undefined, C3 = undefined, A4 = undefined, C4 = undefined, A5 = undefined, C5 = undefined >( overrideTypes: | Partial< UploadServiceLogoResponsesT< A0, C0, A1, C1, A2, C2, A3, C3, A4, C4, A5, C5 > > | t.Type | undefined = {} ): r.ResponseDecoder< | r.IResponseType<201, A0, "Location"> | r.IResponseType<400, A1, never> | r.IResponseType<401, A2, never> | r.IResponseType<403, A3, never> | r.IResponseType<404, A4, never> | r.IResponseType<500, A5, never> > { const isDecoder = (d: any): d is t.Type => typeof d["_A"] !== "undefined"; const type = { ...((uploadServiceLogoDefaultResponses as unknown) as UploadServiceLogoResponsesT< A0, C0, A1, C1, A2, C2, A3, C3, A4, C4, A5, C5 >), ...(isDecoder(overrideTypes) ? { 201: overrideTypes } : overrideTypes) }; const d201 = (type[201].name === "undefined" ? r.constantResponseDecoder(201, undefined) : r.ioResponseDecoder< 201, typeof type[201]["_A"], typeof type[201]["_O"], "Location" >(201, type[201])) as r.ResponseDecoder< r.IResponseType<201, A0, "Location"> >; const d400 = (type[400].name === "undefined" ? r.constantResponseDecoder(400, undefined) : r.ioResponseDecoder< 400, typeof type[400]["_A"], typeof type[400]["_O"], never >(400, type[400])) as r.ResponseDecoder>; const d401 = (type[401].name === "undefined" ? r.constantResponseDecoder(401, undefined) : r.ioResponseDecoder< 401, typeof type[401]["_A"], typeof type[401]["_O"], never >(401, type[401])) as r.ResponseDecoder>; const d403 = (type[403].name === "undefined" ? r.constantResponseDecoder(403, undefined) : r.ioResponseDecoder< 403, typeof type[403]["_A"], typeof type[403]["_O"], never >(403, type[403])) as r.ResponseDecoder>; const d404 = (type[404].name === "undefined" ? r.constantResponseDecoder(404, undefined) : r.ioResponseDecoder< 404, typeof type[404]["_A"], typeof type[404]["_O"], never >(404, type[404])) as r.ResponseDecoder>; const d500 = (type[500].name === "undefined" ? r.constantResponseDecoder(500, undefined) : r.ioResponseDecoder< 500, typeof type[500]["_A"], typeof type[500]["_O"], never >(500, type[500])) as r.ResponseDecoder>; return r.composeResponseDecoders( r.composeResponseDecoders( r.composeResponseDecoders( r.composeResponseDecoders(r.composeResponseDecoders(d201, d400), d401), d403 ), d404 ), d500 ); } // Decodes the success response with the type defined in the specs export const uploadServiceLogoDefaultDecoder = () => uploadServiceLogoDecoder(); /**************************************************************** * getServices */ // Request type definition export type GetServicesT = r.IGetApiRequestType< { readonly SubscriptionKey: string }, "Ocp-Apim-Subscription-Key", never, | r.IResponseType<200, ServiceCollection, never> | r.IResponseType<500, undefined, never> >; export const getServicesDefaultResponses = { 200: ServiceCollection, 500: t.undefined }; export type GetServicesResponsesT< A0 = ServiceCollection, C0 = ServiceCollection, A1 = undefined, C1 = undefined > = { 200: t.Type; 500: t.Type; }; export function getServicesDecoder< A0 = ServiceCollection, C0 = ServiceCollection, A1 = undefined, C1 = undefined >( overrideTypes: | Partial> | t.Type | undefined = {} ): r.ResponseDecoder< r.IResponseType<200, A0, never> | r.IResponseType<500, A1, never> > { const isDecoder = (d: any): d is t.Type => typeof d["_A"] !== "undefined"; const type = { ...((getServicesDefaultResponses as unknown) as GetServicesResponsesT< A0, C0, A1, C1 >), ...(isDecoder(overrideTypes) ? { 200: overrideTypes } : overrideTypes) }; const d200 = (type[200].name === "undefined" ? r.constantResponseDecoder(200, undefined) : r.ioResponseDecoder< 200, typeof type[200]["_A"], typeof type[200]["_O"], never >(200, type[200])) as r.ResponseDecoder>; const d500 = (type[500].name === "undefined" ? r.constantResponseDecoder(500, undefined) : r.ioResponseDecoder< 500, typeof type[500]["_A"], typeof type[500]["_O"], never >(500, type[500])) as r.ResponseDecoder>; return r.composeResponseDecoders(d200, d500); } // Decodes the success response with the type defined in the specs export const getServicesDefaultDecoder = () => getServicesDecoder(); /**************************************************************** * createService */ // Request type definition export type CreateServiceT = r.IPostApiRequestType< { readonly SubscriptionKey: string; readonly body?: Service }, "Content-Type" | "Ocp-Apim-Subscription-Key", never, r.IResponseType<200, Service, never> | r.IResponseType<401, undefined, never> >; export const createServiceDefaultResponses = { 200: Service, 401: t.undefined }; export type CreateServiceResponsesT< A0 = Service, C0 = Service, A1 = undefined, C1 = undefined > = { 200: t.Type; 401: t.Type; }; export function createServiceDecoder< A0 = Service, C0 = Service, A1 = undefined, C1 = undefined >( overrideTypes: | Partial> | t.Type | undefined = {} ): r.ResponseDecoder< r.IResponseType<200, A0, never> | r.IResponseType<401, A1, never> > { const isDecoder = (d: any): d is t.Type => typeof d["_A"] !== "undefined"; const type = { ...((createServiceDefaultResponses as unknown) as CreateServiceResponsesT< A0, C0, A1, C1 >), ...(isDecoder(overrideTypes) ? { 200: overrideTypes } : overrideTypes) }; const d200 = (type[200].name === "undefined" ? r.constantResponseDecoder(200, undefined) : r.ioResponseDecoder< 200, typeof type[200]["_A"], typeof type[200]["_O"], never >(200, type[200])) as r.ResponseDecoder>; const d401 = (type[401].name === "undefined" ? r.constantResponseDecoder(401, undefined) : r.ioResponseDecoder< 401, typeof type[401]["_A"], typeof type[401]["_O"], never >(401, type[401])) as r.ResponseDecoder>; return r.composeResponseDecoders(d200, d401); } // Decodes the success response with the type defined in the specs export const createServiceDefaultDecoder = () => createServiceDecoder(); /**************************************************************** * uploadOrganizationLogo */ // Request type definition export type UploadOrganizationLogoT = r.IPutApiRequestType< { readonly organization_fiscal_code: string; readonly SubscriptionKey: string; readonly body: Logo; }, "Content-Type" | "Ocp-Apim-Subscription-Key", never, | r.IResponseType<201, undefined, "Location"> | r.IResponseType<400, ProblemJson, never> | r.IResponseType<401, undefined, never> | r.IResponseType<403, undefined, never> | r.IResponseType<500, undefined, never> >; export const uploadOrganizationLogoDefaultResponses = { 201: t.undefined, 400: ProblemJson, 401: t.undefined, 403: t.undefined, 500: t.undefined }; export type UploadOrganizationLogoResponsesT< A0 = undefined, C0 = undefined, A1 = ProblemJson, C1 = ProblemJson, A2 = undefined, C2 = undefined, A3 = undefined, C3 = undefined, A4 = undefined, C4 = undefined > = { 201: t.Type; 400: t.Type; 401: t.Type; 403: t.Type; 500: t.Type; }; export function uploadOrganizationLogoDecoder< A0 = undefined, C0 = undefined, A1 = ProblemJson, C1 = ProblemJson, A2 = undefined, C2 = undefined, A3 = undefined, C3 = undefined, A4 = undefined, C4 = undefined >( overrideTypes: | Partial< UploadOrganizationLogoResponsesT > | t.Type | undefined = {} ): r.ResponseDecoder< | r.IResponseType<201, A0, "Location"> | r.IResponseType<400, A1, never> | r.IResponseType<401, A2, never> | r.IResponseType<403, A3, never> | r.IResponseType<500, A4, never> > { const isDecoder = (d: any): d is t.Type => typeof d["_A"] !== "undefined"; const type = { ...((uploadOrganizationLogoDefaultResponses as unknown) as UploadOrganizationLogoResponsesT< A0, C0, A1, C1, A2, C2, A3, C3, A4, C4 >), ...(isDecoder(overrideTypes) ? { 201: overrideTypes } : overrideTypes) }; const d201 = (type[201].name === "undefined" ? r.constantResponseDecoder(201, undefined) : r.ioResponseDecoder< 201, typeof type[201]["_A"], typeof type[201]["_O"], "Location" >(201, type[201])) as r.ResponseDecoder< r.IResponseType<201, A0, "Location"> >; const d400 = (type[400].name === "undefined" ? r.constantResponseDecoder(400, undefined) : r.ioResponseDecoder< 400, typeof type[400]["_A"], typeof type[400]["_O"], never >(400, type[400])) as r.ResponseDecoder>; const d401 = (type[401].name === "undefined" ? r.constantResponseDecoder(401, undefined) : r.ioResponseDecoder< 401, typeof type[401]["_A"], typeof type[401]["_O"], never >(401, type[401])) as r.ResponseDecoder>; const d403 = (type[403].name === "undefined" ? r.constantResponseDecoder(403, undefined) : r.ioResponseDecoder< 403, typeof type[403]["_A"], typeof type[403]["_O"], never >(403, type[403])) as r.ResponseDecoder>; const d500 = (type[500].name === "undefined" ? r.constantResponseDecoder(500, undefined) : r.ioResponseDecoder< 500, typeof type[500]["_A"], typeof type[500]["_O"], never >(500, type[500])) as r.ResponseDecoder>; return r.composeResponseDecoders( r.composeResponseDecoders( r.composeResponseDecoders(r.composeResponseDecoders(d201, d400), d401), d403 ), d500 ); } // Decodes the success response with the type defined in the specs export const uploadOrganizationLogoDefaultDecoder = () => uploadOrganizationLogoDecoder(); /**************************************************************** * createDevelopmentProfile */ // Request type definition export type CreateDevelopmentProfileT = r.IPostApiRequestType< { readonly SubscriptionKey: string; readonly fiscal_code: string; readonly body?: DevelopmentProfile; }, "Content-Type" | "Ocp-Apim-Subscription-Key", never, | r.IResponseType<200, ExtendedProfile, never> | r.IResponseType<400, ProblemJson, never> | r.IResponseType<401, undefined, never> | r.IResponseType<409, ProblemJson, never> | r.IResponseType<429, undefined, never> >; export const createDevelopmentProfileDefaultResponses = { 200: ExtendedProfile, 400: ProblemJson, 401: t.undefined, 409: ProblemJson, 429: t.undefined }; export type CreateDevelopmentProfileResponsesT< A0 = ExtendedProfile, C0 = ExtendedProfile, A1 = ProblemJson, C1 = ProblemJson, A2 = undefined, C2 = undefined, A3 = ProblemJson, C3 = ProblemJson, A4 = undefined, C4 = undefined > = { 200: t.Type; 400: t.Type; 401: t.Type; 409: t.Type; 429: t.Type; }; export function createDevelopmentProfileDecoder< A0 = ExtendedProfile, C0 = ExtendedProfile, A1 = ProblemJson, C1 = ProblemJson, A2 = undefined, C2 = undefined, A3 = ProblemJson, C3 = ProblemJson, A4 = undefined, C4 = undefined >( overrideTypes: | Partial< CreateDevelopmentProfileResponsesT< A0, C0, A1, C1, A2, C2, A3, C3, A4, C4 > > | t.Type | undefined = {} ): r.ResponseDecoder< | r.IResponseType<200, A0, never> | r.IResponseType<400, A1, never> | r.IResponseType<401, A2, never> | r.IResponseType<409, A3, never> | r.IResponseType<429, A4, never> > { const isDecoder = (d: any): d is t.Type => typeof d["_A"] !== "undefined"; const type = { ...((createDevelopmentProfileDefaultResponses as unknown) as CreateDevelopmentProfileResponsesT< A0, C0, A1, C1, A2, C2, A3, C3, A4, C4 >), ...(isDecoder(overrideTypes) ? { 200: overrideTypes } : overrideTypes) }; const d200 = (type[200].name === "undefined" ? r.constantResponseDecoder(200, undefined) : r.ioResponseDecoder< 200, typeof type[200]["_A"], typeof type[200]["_O"], never >(200, type[200])) as r.ResponseDecoder>; const d400 = (type[400].name === "undefined" ? r.constantResponseDecoder(400, undefined) : r.ioResponseDecoder< 400, typeof type[400]["_A"], typeof type[400]["_O"], never >(400, type[400])) as r.ResponseDecoder>; const d401 = (type[401].name === "undefined" ? r.constantResponseDecoder(401, undefined) : r.ioResponseDecoder< 401, typeof type[401]["_A"], typeof type[401]["_O"], never >(401, type[401])) as r.ResponseDecoder>; const d409 = (type[409].name === "undefined" ? r.constantResponseDecoder(409, undefined) : r.ioResponseDecoder< 409, typeof type[409]["_A"], typeof type[409]["_O"], never >(409, type[409])) as r.ResponseDecoder>; const d429 = (type[429].name === "undefined" ? r.constantResponseDecoder(429, undefined) : r.ioResponseDecoder< 429, typeof type[429]["_A"], typeof type[429]["_O"], never >(429, type[429])) as r.ResponseDecoder>; return r.composeResponseDecoders( r.composeResponseDecoders( r.composeResponseDecoders(r.composeResponseDecoders(d200, d400), d401), d409 ), d429 ); } // Decodes the success response with the type defined in the specs export const createDevelopmentProfileDefaultDecoder = () => createDevelopmentProfileDecoder(); /**************************************************************** * getSubscriptionKeys */ // Request type definition export type GetSubscriptionKeysT = r.IGetApiRequestType< { readonly SubscriptionKey: string; readonly service_id: string }, "Ocp-Apim-Subscription-Key", never, | r.IResponseType<200, SubscriptionKeys, never> | r.IResponseType<400, undefined, never> | r.IResponseType<403, undefined, never> | r.IResponseType<404, undefined, never> | r.IResponseType<500, undefined, never> >; export const getSubscriptionKeysDefaultResponses = { 200: SubscriptionKeys, 400: t.undefined, 403: t.undefined, 404: t.undefined, 500: t.undefined }; export type GetSubscriptionKeysResponsesT< A0 = SubscriptionKeys, C0 = SubscriptionKeys, A1 = undefined, C1 = undefined, A2 = undefined, C2 = undefined, A3 = undefined, C3 = undefined, A4 = undefined, C4 = undefined > = { 200: t.Type; 400: t.Type; 403: t.Type; 404: t.Type; 500: t.Type; }; export function getSubscriptionKeysDecoder< A0 = SubscriptionKeys, C0 = SubscriptionKeys, A1 = undefined, C1 = undefined, A2 = undefined, C2 = undefined, A3 = undefined, C3 = undefined, A4 = undefined, C4 = undefined >( overrideTypes: | Partial< GetSubscriptionKeysResponsesT > | t.Type | undefined = {} ): r.ResponseDecoder< | r.IResponseType<200, A0, never> | r.IResponseType<400, A1, never> | r.IResponseType<403, A2, never> | r.IResponseType<404, A3, never> | r.IResponseType<500, A4, never> > { const isDecoder = (d: any): d is t.Type => typeof d["_A"] !== "undefined"; const type = { ...((getSubscriptionKeysDefaultResponses as unknown) as GetSubscriptionKeysResponsesT< A0, C0, A1, C1, A2, C2, A3, C3, A4, C4 >), ...(isDecoder(overrideTypes) ? { 200: overrideTypes } : overrideTypes) }; const d200 = (type[200].name === "undefined" ? r.constantResponseDecoder(200, undefined) : r.ioResponseDecoder< 200, typeof type[200]["_A"], typeof type[200]["_O"], never >(200, type[200])) as r.ResponseDecoder>; const d400 = (type[400].name === "undefined" ? r.constantResponseDecoder(400, undefined) : r.ioResponseDecoder< 400, typeof type[400]["_A"], typeof type[400]["_O"], never >(400, type[400])) as r.ResponseDecoder>; const d403 = (type[403].name === "undefined" ? r.constantResponseDecoder(403, undefined) : r.ioResponseDecoder< 403, typeof type[403]["_A"], typeof type[403]["_O"], never >(403, type[403])) as r.ResponseDecoder>; const d404 = (type[404].name === "undefined" ? r.constantResponseDecoder(404, undefined) : r.ioResponseDecoder< 404, typeof type[404]["_A"], typeof type[404]["_O"], never >(404, type[404])) as r.ResponseDecoder>; const d500 = (type[500].name === "undefined" ? r.constantResponseDecoder(500, undefined) : r.ioResponseDecoder< 500, typeof type[500]["_A"], typeof type[500]["_O"], never >(500, type[500])) as r.ResponseDecoder>; return r.composeResponseDecoders( r.composeResponseDecoders( r.composeResponseDecoders(r.composeResponseDecoders(d200, d400), d403), d404 ), d500 ); } // Decodes the success response with the type defined in the specs export const getSubscriptionKeysDefaultDecoder = () => getSubscriptionKeysDecoder(); /**************************************************************** * RegenerateSubscriptionKeys */ // Request type definition export type RegenerateSubscriptionKeysT = r.IPutApiRequestType< { readonly SubscriptionKey: string; readonly service_id: string; readonly body: SubscriptionKeyTypePayload; }, "Content-Type" | "Ocp-Apim-Subscription-Key", never, | r.IResponseType<200, SubscriptionKeys, never> | r.IResponseType<400, undefined, never> | r.IResponseType<403, undefined, never> | r.IResponseType<404, undefined, never> | r.IResponseType<500, undefined, never> >; export const regenerateSubscriptionKeysDefaultResponses = { 200: SubscriptionKeys, 400: t.undefined, 403: t.undefined, 404: t.undefined, 500: t.undefined }; export type RegenerateSubscriptionKeysResponsesT< A0 = SubscriptionKeys, C0 = SubscriptionKeys, A1 = undefined, C1 = undefined, A2 = undefined, C2 = undefined, A3 = undefined, C3 = undefined, A4 = undefined, C4 = undefined > = { 200: t.Type; 400: t.Type; 403: t.Type; 404: t.Type; 500: t.Type; }; export function RegenerateSubscriptionKeysDecoder< A0 = SubscriptionKeys, C0 = SubscriptionKeys, A1 = undefined, C1 = undefined, A2 = undefined, C2 = undefined, A3 = undefined, C3 = undefined, A4 = undefined, C4 = undefined >( overrideTypes: | Partial< RegenerateSubscriptionKeysResponsesT< A0, C0, A1, C1, A2, C2, A3, C3, A4, C4 > > | t.Type | undefined = {} ): r.ResponseDecoder< | r.IResponseType<200, A0, never> | r.IResponseType<400, A1, never> | r.IResponseType<403, A2, never> | r.IResponseType<404, A3, never> | r.IResponseType<500, A4, never> > { const isDecoder = (d: any): d is t.Type => typeof d["_A"] !== "undefined"; const type = { ...((regenerateSubscriptionKeysDefaultResponses as unknown) as RegenerateSubscriptionKeysResponsesT< A0, C0, A1, C1, A2, C2, A3, C3, A4, C4 >), ...(isDecoder(overrideTypes) ? { 200: overrideTypes } : overrideTypes) }; const d200 = (type[200].name === "undefined" ? r.constantResponseDecoder(200, undefined) : r.ioResponseDecoder< 200, typeof type[200]["_A"], typeof type[200]["_O"], never >(200, type[200])) as r.ResponseDecoder>; const d400 = (type[400].name === "undefined" ? r.constantResponseDecoder(400, undefined) : r.ioResponseDecoder< 400, typeof type[400]["_A"], typeof type[400]["_O"], never >(400, type[400])) as r.ResponseDecoder>; const d403 = (type[403].name === "undefined" ? r.constantResponseDecoder(403, undefined) : r.ioResponseDecoder< 403, typeof type[403]["_A"], typeof type[403]["_O"], never >(403, type[403])) as r.ResponseDecoder>; const d404 = (type[404].name === "undefined" ? r.constantResponseDecoder(404, undefined) : r.ioResponseDecoder< 404, typeof type[404]["_A"], typeof type[404]["_O"], never >(404, type[404])) as r.ResponseDecoder>; const d500 = (type[500].name === "undefined" ? r.constantResponseDecoder(500, undefined) : r.ioResponseDecoder< 500, typeof type[500]["_A"], typeof type[500]["_O"], never >(500, type[500])) as r.ResponseDecoder>; return r.composeResponseDecoders( r.composeResponseDecoders( r.composeResponseDecoders(r.composeResponseDecoders(d200, d400), d403), d404 ), d500 ); } // Decodes the success response with the type defined in the specs export const RegenerateSubscriptionKeysDefaultDecoder = () => RegenerateSubscriptionKeysDecoder(); /**************************************************************** * getUsers */ // Request type definition export type GetUsersT = r.IGetApiRequestType< { readonly SubscriptionKey: string; readonly cursor?: number }, "Ocp-Apim-Subscription-Key", never, r.IResponseType<200, UserCollection, never> >; export const getUsersDefaultResponses = { 200: UserCollection }; export type GetUsersResponsesT = { 200: t.Type; }; export function getUsersDecoder( overrideTypes: | Partial> | t.Type | undefined = {} ): r.ResponseDecoder> { const isDecoder = (d: any): d is t.Type => typeof d["_A"] !== "undefined"; const type = { ...((getUsersDefaultResponses as unknown) as GetUsersResponsesT), ...(isDecoder(overrideTypes) ? { 200: overrideTypes } : overrideTypes) }; const d200 = (type[200].name === "undefined" ? r.constantResponseDecoder(200, undefined) : r.ioResponseDecoder< 200, typeof type[200]["_A"], typeof type[200]["_O"], never >(200, type[200])) as r.ResponseDecoder>; return d200; } // Decodes the success response with the type defined in the specs export const getUsersDefaultDecoder = () => getUsersDecoder(); /**************************************************************** * createUser */ // Request type definition export type CreateUserT = r.IPostApiRequestType< { readonly SubscriptionKey: string; readonly body: UserPayload }, "Content-Type" | "Ocp-Apim-Subscription-Key", never, | r.IResponseType<200, UserCreated, never> | r.IResponseType<400, undefined, never> | r.IResponseType<403, undefined, never> | r.IResponseType<500, undefined, never> >; export const createUserDefaultResponses = { 200: UserCreated, 400: t.undefined, 403: t.undefined, 500: t.undefined }; export type CreateUserResponsesT< A0 = UserCreated, C0 = UserCreated, A1 = undefined, C1 = undefined, A2 = undefined, C2 = undefined, A3 = undefined, C3 = undefined > = { 200: t.Type; 400: t.Type; 403: t.Type; 500: t.Type; }; export function createUserDecoder< A0 = UserCreated, C0 = UserCreated, A1 = undefined, C1 = undefined, A2 = undefined, C2 = undefined, A3 = undefined, C3 = undefined >( overrideTypes: | Partial> | t.Type | undefined = {} ): r.ResponseDecoder< | r.IResponseType<200, A0, never> | r.IResponseType<400, A1, never> | r.IResponseType<403, A2, never> | r.IResponseType<500, A3, never> > { const isDecoder = (d: any): d is t.Type => typeof d["_A"] !== "undefined"; const type = { ...((createUserDefaultResponses as unknown) as CreateUserResponsesT< A0, C0, A1, C1, A2, C2, A3, C3 >), ...(isDecoder(overrideTypes) ? { 200: overrideTypes } : overrideTypes) }; const d200 = (type[200].name === "undefined" ? r.constantResponseDecoder(200, undefined) : r.ioResponseDecoder< 200, typeof type[200]["_A"], typeof type[200]["_O"], never >(200, type[200])) as r.ResponseDecoder>; const d400 = (type[400].name === "undefined" ? r.constantResponseDecoder(400, undefined) : r.ioResponseDecoder< 400, typeof type[400]["_A"], typeof type[400]["_O"], never >(400, type[400])) as r.ResponseDecoder>; const d403 = (type[403].name === "undefined" ? r.constantResponseDecoder(403, undefined) : r.ioResponseDecoder< 403, typeof type[403]["_A"], typeof type[403]["_O"], never >(403, type[403])) as r.ResponseDecoder>; const d500 = (type[500].name === "undefined" ? r.constantResponseDecoder(500, undefined) : r.ioResponseDecoder< 500, typeof type[500]["_A"], typeof type[500]["_O"], never >(500, type[500])) as r.ResponseDecoder>; return r.composeResponseDecoders( r.composeResponseDecoders(r.composeResponseDecoders(d200, d400), d403), d500 ); } // Decodes the success response with the type defined in the specs export const createUserDefaultDecoder = () => createUserDecoder(); /**************************************************************** * getUser */ // Request type definition export type GetUserT = r.IGetApiRequestType< { readonly SubscriptionKey: string; readonly email: string }, "Ocp-Apim-Subscription-Key", never, | r.IResponseType<200, UserInfo, never> | r.IResponseType<400, undefined, never> | r.IResponseType<401, undefined, never> | r.IResponseType<403, undefined, never> | r.IResponseType<404, undefined, never> | r.IResponseType<500, undefined, never> >; export const getUserDefaultResponses = { 200: UserInfo, 400: t.undefined, 401: t.undefined, 403: t.undefined, 404: t.undefined, 500: t.undefined }; export type GetUserResponsesT< A0 = UserInfo, C0 = UserInfo, A1 = undefined, C1 = undefined, A2 = undefined, C2 = undefined, A3 = undefined, C3 = undefined, A4 = undefined, C4 = undefined, A5 = undefined, C5 = undefined > = { 200: t.Type; 400: t.Type; 401: t.Type; 403: t.Type; 404: t.Type; 500: t.Type; }; export function getUserDecoder< A0 = UserInfo, C0 = UserInfo, A1 = undefined, C1 = undefined, A2 = undefined, C2 = undefined, A3 = undefined, C3 = undefined, A4 = undefined, C4 = undefined, A5 = undefined, C5 = undefined >( overrideTypes: | Partial> | t.Type | undefined = {} ): r.ResponseDecoder< | r.IResponseType<200, A0, never> | r.IResponseType<400, A1, never> | r.IResponseType<401, A2, never> | r.IResponseType<403, A3, never> | r.IResponseType<404, A4, never> | r.IResponseType<500, A5, never> > { const isDecoder = (d: any): d is t.Type => typeof d["_A"] !== "undefined"; const type = { ...((getUserDefaultResponses as unknown) as GetUserResponsesT< A0, C0, A1, C1, A2, C2, A3, C3, A4, C4, A5, C5 >), ...(isDecoder(overrideTypes) ? { 200: overrideTypes } : overrideTypes) }; const d200 = (type[200].name === "undefined" ? r.constantResponseDecoder(200, undefined) : r.ioResponseDecoder< 200, typeof type[200]["_A"], typeof type[200]["_O"], never >(200, type[200])) as r.ResponseDecoder>; const d400 = (type[400].name === "undefined" ? r.constantResponseDecoder(400, undefined) : r.ioResponseDecoder< 400, typeof type[400]["_A"], typeof type[400]["_O"], never >(400, type[400])) as r.ResponseDecoder>; const d401 = (type[401].name === "undefined" ? r.constantResponseDecoder(401, undefined) : r.ioResponseDecoder< 401, typeof type[401]["_A"], typeof type[401]["_O"], never >(401, type[401])) as r.ResponseDecoder>; const d403 = (type[403].name === "undefined" ? r.constantResponseDecoder(403, undefined) : r.ioResponseDecoder< 403, typeof type[403]["_A"], typeof type[403]["_O"], never >(403, type[403])) as r.ResponseDecoder>; const d404 = (type[404].name === "undefined" ? r.constantResponseDecoder(404, undefined) : r.ioResponseDecoder< 404, typeof type[404]["_A"], typeof type[404]["_O"], never >(404, type[404])) as r.ResponseDecoder>; const d500 = (type[500].name === "undefined" ? r.constantResponseDecoder(500, undefined) : r.ioResponseDecoder< 500, typeof type[500]["_A"], typeof type[500]["_O"], never >(500, type[500])) as r.ResponseDecoder>; return r.composeResponseDecoders( r.composeResponseDecoders( r.composeResponseDecoders( r.composeResponseDecoders(r.composeResponseDecoders(d200, d400), d401), d403 ), d404 ), d500 ); } // Decodes the success response with the type defined in the specs export const getUserDefaultDecoder = () => getUserDecoder(); /**************************************************************** * updateUser */ // Request type definition export type UpdateUserT = r.IPutApiRequestType< { readonly SubscriptionKey: string; readonly email: string; readonly body: UserUpdatePayload; }, "Content-Type" | "Ocp-Apim-Subscription-Key", never, | r.IResponseType<200, UserUpdated, never> | r.IResponseType<400, undefined, never> | r.IResponseType<403, undefined, never> | r.IResponseType<500, undefined, never> >; export const updateUserDefaultResponses = { 200: UserUpdated, 400: t.undefined, 403: t.undefined, 500: t.undefined }; export type UpdateUserResponsesT< A0 = UserUpdated, C0 = UserUpdated, A1 = undefined, C1 = undefined, A2 = undefined, C2 = undefined, A3 = undefined, C3 = undefined > = { 200: t.Type; 400: t.Type; 403: t.Type; 500: t.Type; }; export function updateUserDecoder< A0 = UserUpdated, C0 = UserUpdated, A1 = undefined, C1 = undefined, A2 = undefined, C2 = undefined, A3 = undefined, C3 = undefined >( overrideTypes: | Partial> | t.Type | undefined = {} ): r.ResponseDecoder< | r.IResponseType<200, A0, never> | r.IResponseType<400, A1, never> | r.IResponseType<403, A2, never> | r.IResponseType<500, A3, never> > { const isDecoder = (d: any): d is t.Type => typeof d["_A"] !== "undefined"; const type = { ...((updateUserDefaultResponses as unknown) as UpdateUserResponsesT< A0, C0, A1, C1, A2, C2, A3, C3 >), ...(isDecoder(overrideTypes) ? { 200: overrideTypes } : overrideTypes) }; const d200 = (type[200].name === "undefined" ? r.constantResponseDecoder(200, undefined) : r.ioResponseDecoder< 200, typeof type[200]["_A"], typeof type[200]["_O"], never >(200, type[200])) as r.ResponseDecoder>; const d400 = (type[400].name === "undefined" ? r.constantResponseDecoder(400, undefined) : r.ioResponseDecoder< 400, typeof type[400]["_A"], typeof type[400]["_O"], never >(400, type[400])) as r.ResponseDecoder>; const d403 = (type[403].name === "undefined" ? r.constantResponseDecoder(403, undefined) : r.ioResponseDecoder< 403, typeof type[403]["_A"], typeof type[403]["_O"], never >(403, type[403])) as r.ResponseDecoder>; const d500 = (type[500].name === "undefined" ? r.constantResponseDecoder(500, undefined) : r.ioResponseDecoder< 500, typeof type[500]["_A"], typeof type[500]["_O"], never >(500, type[500])) as r.ResponseDecoder>; return r.composeResponseDecoders( r.composeResponseDecoders(r.composeResponseDecoders(d200, d400), d403), d500 ); } // Decodes the success response with the type defined in the specs export const updateUserDefaultDecoder = () => updateUserDecoder(); /**************************************************************** * updateGroups */ // Request type definition export type UpdateGroupsT = r.IPutApiRequestType< { readonly SubscriptionKey: string; readonly email: string; readonly body: UserGroupsPayload; }, "Content-Type" | "Ocp-Apim-Subscription-Key", never, | r.IResponseType<200, GroupCollection, never> | r.IResponseType<400, undefined, never> | r.IResponseType<401, undefined, never> | r.IResponseType<403, undefined, never> | r.IResponseType<404, undefined, never> | r.IResponseType<500, undefined, never> >; export const updateGroupsDefaultResponses = { 200: GroupCollection, 400: t.undefined, 401: t.undefined, 403: t.undefined, 404: t.undefined, 500: t.undefined }; export type UpdateGroupsResponsesT< A0 = GroupCollection, C0 = GroupCollection, A1 = undefined, C1 = undefined, A2 = undefined, C2 = undefined, A3 = undefined, C3 = undefined, A4 = undefined, C4 = undefined, A5 = undefined, C5 = undefined > = { 200: t.Type; 400: t.Type; 401: t.Type; 403: t.Type; 404: t.Type; 500: t.Type; }; export function updateGroupsDecoder< A0 = GroupCollection, C0 = GroupCollection, A1 = undefined, C1 = undefined, A2 = undefined, C2 = undefined, A3 = undefined, C3 = undefined, A4 = undefined, C4 = undefined, A5 = undefined, C5 = undefined >( overrideTypes: | Partial< UpdateGroupsResponsesT > | t.Type | undefined = {} ): r.ResponseDecoder< | r.IResponseType<200, A0, never> | r.IResponseType<400, A1, never> | r.IResponseType<401, A2, never> | r.IResponseType<403, A3, never> | r.IResponseType<404, A4, never> | r.IResponseType<500, A5, never> > { const isDecoder = (d: any): d is t.Type => typeof d["_A"] !== "undefined"; const type = { ...((updateGroupsDefaultResponses as unknown) as UpdateGroupsResponsesT< A0, C0, A1, C1, A2, C2, A3, C3, A4, C4, A5, C5 >), ...(isDecoder(overrideTypes) ? { 200: overrideTypes } : overrideTypes) }; const d200 = (type[200].name === "undefined" ? r.constantResponseDecoder(200, undefined) : r.ioResponseDecoder< 200, typeof type[200]["_A"], typeof type[200]["_O"], never >(200, type[200])) as r.ResponseDecoder>; const d400 = (type[400].name === "undefined" ? r.constantResponseDecoder(400, undefined) : r.ioResponseDecoder< 400, typeof type[400]["_A"], typeof type[400]["_O"], never >(400, type[400])) as r.ResponseDecoder>; const d401 = (type[401].name === "undefined" ? r.constantResponseDecoder(401, undefined) : r.ioResponseDecoder< 401, typeof type[401]["_A"], typeof type[401]["_O"], never >(401, type[401])) as r.ResponseDecoder>; const d403 = (type[403].name === "undefined" ? r.constantResponseDecoder(403, undefined) : r.ioResponseDecoder< 403, typeof type[403]["_A"], typeof type[403]["_O"], never >(403, type[403])) as r.ResponseDecoder>; const d404 = (type[404].name === "undefined" ? r.constantResponseDecoder(404, undefined) : r.ioResponseDecoder< 404, typeof type[404]["_A"], typeof type[404]["_O"], never >(404, type[404])) as r.ResponseDecoder>; const d500 = (type[500].name === "undefined" ? r.constantResponseDecoder(500, undefined) : r.ioResponseDecoder< 500, typeof type[500]["_A"], typeof type[500]["_O"], never >(500, type[500])) as r.ResponseDecoder>; return r.composeResponseDecoders( r.composeResponseDecoders( r.composeResponseDecoders( r.composeResponseDecoders(r.composeResponseDecoders(d200, d400), d401), d403 ), d404 ), d500 ); } // Decodes the success response with the type defined in the specs export const updateGroupsDefaultDecoder = () => updateGroupsDecoder(); /**************************************************************** * createSubscription */ // Request type definition export type CreateSubscriptionT = r.IPutApiRequestType< { readonly SubscriptionKey: string; readonly email: string; readonly subscription_id: string; readonly body: ProductNamePayload; }, "Content-Type" | "Ocp-Apim-Subscription-Key", never, | r.IResponseType<200, Subscription, never> | r.IResponseType<400, undefined, never> | r.IResponseType<401, undefined, never> | r.IResponseType<403, undefined, never> | r.IResponseType<404, undefined, never> | r.IResponseType<500, undefined, never> >; export const createSubscriptionDefaultResponses = { 200: Subscription, 400: t.undefined, 401: t.undefined, 403: t.undefined, 404: t.undefined, 500: t.undefined }; export type CreateSubscriptionResponsesT< A0 = Subscription, C0 = Subscription, A1 = undefined, C1 = undefined, A2 = undefined, C2 = undefined, A3 = undefined, C3 = undefined, A4 = undefined, C4 = undefined, A5 = undefined, C5 = undefined > = { 200: t.Type; 400: t.Type; 401: t.Type; 403: t.Type; 404: t.Type; 500: t.Type; }; export function createSubscriptionDecoder< A0 = Subscription, C0 = Subscription, A1 = undefined, C1 = undefined, A2 = undefined, C2 = undefined, A3 = undefined, C3 = undefined, A4 = undefined, C4 = undefined, A5 = undefined, C5 = undefined >( overrideTypes: | Partial< CreateSubscriptionResponsesT< A0, C0, A1, C1, A2, C2, A3, C3, A4, C4, A5, C5 > > | t.Type | undefined = {} ): r.ResponseDecoder< | r.IResponseType<200, A0, never> | r.IResponseType<400, A1, never> | r.IResponseType<401, A2, never> | r.IResponseType<403, A3, never> | r.IResponseType<404, A4, never> | r.IResponseType<500, A5, never> > { const isDecoder = (d: any): d is t.Type => typeof d["_A"] !== "undefined"; const type = { ...((createSubscriptionDefaultResponses as unknown) as CreateSubscriptionResponsesT< A0, C0, A1, C1, A2, C2, A3, C3, A4, C4, A5, C5 >), ...(isDecoder(overrideTypes) ? { 200: overrideTypes } : overrideTypes) }; const d200 = (type[200].name === "undefined" ? r.constantResponseDecoder(200, undefined) : r.ioResponseDecoder< 200, typeof type[200]["_A"], typeof type[200]["_O"], never >(200, type[200])) as r.ResponseDecoder>; const d400 = (type[400].name === "undefined" ? r.constantResponseDecoder(400, undefined) : r.ioResponseDecoder< 400, typeof type[400]["_A"], typeof type[400]["_O"], never >(400, type[400])) as r.ResponseDecoder>; const d401 = (type[401].name === "undefined" ? r.constantResponseDecoder(401, undefined) : r.ioResponseDecoder< 401, typeof type[401]["_A"], typeof type[401]["_O"], never >(401, type[401])) as r.ResponseDecoder>; const d403 = (type[403].name === "undefined" ? r.constantResponseDecoder(403, undefined) : r.ioResponseDecoder< 403, typeof type[403]["_A"], typeof type[403]["_O"], never >(403, type[403])) as r.ResponseDecoder>; const d404 = (type[404].name === "undefined" ? r.constantResponseDecoder(404, undefined) : r.ioResponseDecoder< 404, typeof type[404]["_A"], typeof type[404]["_O"], never >(404, type[404])) as r.ResponseDecoder>; const d500 = (type[500].name === "undefined" ? r.constantResponseDecoder(500, undefined) : r.ioResponseDecoder< 500, typeof type[500]["_A"], typeof type[500]["_O"], never >(500, type[500])) as r.ResponseDecoder>; return r.composeResponseDecoders( r.composeResponseDecoders( r.composeResponseDecoders( r.composeResponseDecoders(r.composeResponseDecoders(d200, d400), d401), d403 ), d404 ), d500 ); } // Decodes the success response with the type defined in the specs export const createSubscriptionDefaultDecoder = () => createSubscriptionDecoder();