|
| 1 | +/* tslint:disable */ |
| 2 | +/* eslint-disable */ |
| 3 | +// Generated by Microsoft Kiota |
| 4 | +// @ts-ignore |
| 5 | +import { ArtifactType, ArtifactTypeObject, createGetArtifactsResponseFromDiscriminatorValue, serializeGetArtifactsResponse, type GetArtifactsResponse } from '../../../../../../models/index.js'; |
| 6 | +// @ts-ignore |
| 7 | +import { createODataErrorFromDiscriminatorValue, type ODataError } from '../../../../../../models/oDataErrors/index.js'; |
| 8 | +// @ts-ignore |
| 9 | +import { type AdditionalDataHolder, type BackedModel, type BackingStore, type BaseRequestBuilder, type Parsable, type ParsableFactory, type ParseNode, type RequestConfiguration, type RequestInformation, type RequestsMetadata, type SerializationWriter } from '@microsoft/kiota-abstractions'; |
| 10 | + |
| 11 | +/** |
| 12 | + * Creates a new instance of the appropriate class based on discriminator value |
| 13 | + * @param parseNode The parse node to use to read the discriminator value and create the object |
| 14 | + * @returns {GetArtifactsPostRequestBody} |
| 15 | + */ |
| 16 | +// @ts-ignore |
| 17 | +export function createGetArtifactsPostRequestBodyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) { |
| 18 | + return deserializeIntoGetArtifactsPostRequestBody; |
| 19 | +} |
| 20 | +/** |
| 21 | + * The deserialization information for the current model |
| 22 | + * @param GetArtifactsPostRequestBody The instance to deserialize into. |
| 23 | + * @returns {Record<string, (node: ParseNode) => void>} |
| 24 | + */ |
| 25 | +// @ts-ignore |
| 26 | +export function deserializeIntoGetArtifactsPostRequestBody(getArtifactsPostRequestBody: Partial<GetArtifactsPostRequestBody> | undefined = {}) : Record<string, (node: ParseNode) => void> { |
| 27 | + return { |
| 28 | + "artifactTypes": n => { getArtifactsPostRequestBody.artifactTypes = n.getCollectionOfEnumValues<ArtifactType>(ArtifactTypeObject); }, |
| 29 | + "backingStoreEnabled": n => { getArtifactsPostRequestBody.backingStoreEnabled = true; }, |
| 30 | + "maxResults": n => { getArtifactsPostRequestBody.maxResults = n.getNumberValue(); }, |
| 31 | + "rangeInSec": n => { getArtifactsPostRequestBody.rangeInSec = n.getNumberValue(); }, |
| 32 | + "seedDateTime": n => { getArtifactsPostRequestBody.seedDateTime = n.getDateValue(); }, |
| 33 | + "userId": n => { getArtifactsPostRequestBody.userId = n.getStringValue(); }, |
| 34 | + } |
| 35 | +} |
| 36 | +export interface GetArtifactsPostRequestBody extends AdditionalDataHolder, BackedModel, Parsable { |
| 37 | + /** |
| 38 | + * The artifactTypes property |
| 39 | + */ |
| 40 | + artifactTypes?: ArtifactType[] | null; |
| 41 | + /** |
| 42 | + * Stores model information. |
| 43 | + */ |
| 44 | + backingStoreEnabled?: boolean | null; |
| 45 | + /** |
| 46 | + * The maxResults property |
| 47 | + */ |
| 48 | + maxResults?: number | null; |
| 49 | + /** |
| 50 | + * The rangeInSec property |
| 51 | + */ |
| 52 | + rangeInSec?: number | null; |
| 53 | + /** |
| 54 | + * The seedDateTime property |
| 55 | + */ |
| 56 | + seedDateTime?: Date | null; |
| 57 | + /** |
| 58 | + * The userId property |
| 59 | + */ |
| 60 | + userId?: string | null; |
| 61 | +} |
| 62 | +/** |
| 63 | + * Provides operations to call the getArtifacts method. |
| 64 | + */ |
| 65 | +export interface GetArtifactsRequestBuilder extends BaseRequestBuilder<GetArtifactsRequestBuilder> { |
| 66 | + /** |
| 67 | + * Invoke action getArtifacts |
| 68 | + * @param body The request body |
| 69 | + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
| 70 | + * @returns {Promise<GetArtifactsResponse>} |
| 71 | + * @throws {ODataError} error when the service returns a 4XX or 5XX status code |
| 72 | + */ |
| 73 | + post(body: GetArtifactsPostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<GetArtifactsResponse | undefined>; |
| 74 | + /** |
| 75 | + * Invoke action getArtifacts |
| 76 | + * @param body The request body |
| 77 | + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
| 78 | + * @returns {RequestInformation} |
| 79 | + */ |
| 80 | + toPostRequestInformation(body: GetArtifactsPostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation; |
| 81 | +} |
| 82 | +/** |
| 83 | + * Serializes information the current object |
| 84 | + * @param GetArtifactsPostRequestBody The instance to serialize from. |
| 85 | + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. |
| 86 | + * @param writer Serialization writer to use to serialize this model |
| 87 | + */ |
| 88 | +// @ts-ignore |
| 89 | +export function serializeGetArtifactsPostRequestBody(writer: SerializationWriter, getArtifactsPostRequestBody: Partial<GetArtifactsPostRequestBody> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { |
| 90 | + if (!getArtifactsPostRequestBody || isSerializingDerivedType) { return; } |
| 91 | + if(getArtifactsPostRequestBody.artifactTypes) |
| 92 | + writer.writeCollectionOfEnumValues<ArtifactType>("artifactTypes", getArtifactsPostRequestBody.artifactTypes); |
| 93 | + writer.writeNumberValue("maxResults", getArtifactsPostRequestBody.maxResults); |
| 94 | + writer.writeNumberValue("rangeInSec", getArtifactsPostRequestBody.rangeInSec); |
| 95 | + writer.writeDateValue("seedDateTime", getArtifactsPostRequestBody.seedDateTime); |
| 96 | + writer.writeStringValue("userId", getArtifactsPostRequestBody.userId); |
| 97 | + writer.writeAdditionalData(getArtifactsPostRequestBody.additionalData); |
| 98 | +} |
| 99 | +/** |
| 100 | + * Uri template for the request builder. |
| 101 | + */ |
| 102 | +export const GetArtifactsRequestBuilderUriTemplate = "{+baseurl}/copilot/communications/realtimeActivityFeed/multiActivitySubscriptions/{multiActivitySubscription%2Did}/getArtifacts"; |
| 103 | +/** |
| 104 | + * Metadata for all the requests in the request builder. |
| 105 | + */ |
| 106 | +export const GetArtifactsRequestBuilderRequestsMetadata: RequestsMetadata = { |
| 107 | + post: { |
| 108 | + uriTemplate: GetArtifactsRequestBuilderUriTemplate, |
| 109 | + responseBodyContentType: "application/json", |
| 110 | + errorMappings: { |
| 111 | + XXX: createODataErrorFromDiscriminatorValue as ParsableFactory<Parsable>, |
| 112 | + }, |
| 113 | + adapterMethodName: "send", |
| 114 | + responseBodyFactory: createGetArtifactsResponseFromDiscriminatorValue, |
| 115 | + requestBodyContentType: "application/json", |
| 116 | + requestBodySerializer: serializeGetArtifactsPostRequestBody, |
| 117 | + requestInformationContentSetMethod: "setContentFromParsable", |
| 118 | + }, |
| 119 | +}; |
| 120 | +/* tslint:enable */ |
| 121 | +/* eslint-enable */ |
0 commit comments