Skip to content

Commit

Permalink
Updates generation to the latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
andrueastman committed Apr 20, 2022
1 parent 61defb5 commit 9419eac
Show file tree
Hide file tree
Showing 156 changed files with 2,739 additions and 1,283 deletions.
20 changes: 10 additions & 10 deletions packages/test/generatedCode/models/microsoft/graph/index.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
export * from './entity'
export * from './outlookItem'
export * from './emailAddress'
export * from './followupFlag'
export * from './itemBody'
export * from './inferenceClassificationOverride'
export * from './messageRule'
export * from './dateTimeTimeZone'
export * from './message'
export * from './messageRulePredicates'
export * from './emailAddress'
export * from './messageRuleActions'
export * from './inferenceClassificationOverride'
export * from './sizeRange'
export * from './inferenceClassification'
export * from './messageRule'
export * from './attachment'
export * from './singleValueLegacyExtendedProperty'
export * from './itemBody'
export * from './followupFlag'
export * from './extension'
export * from './recipient'
export * from './internetMessageHeader'
export * from './sizeRange'
export * from './multiValueLegacyExtendedProperty'
export * from './mailFolder'
export * from './recipient'
export * from './messageRulePredicates'
export * from './dateTimeTimeZone'
export * from './extension'
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import {InferenceClassification} from '../../../models/microsoft/graph/';
import {createInferenceClassificationFromDiscriminatorValue} from '../../../models/microsoft/graph/createInferenceClassificationFromDiscriminatorValue';
import {InferenceClassificationRequestBuilderDeleteRequestConfiguration} from './inferenceClassificationRequestBuilderDeleteRequestConfiguration';
import {InferenceClassificationRequestBuilderGetRequestConfiguration} from './inferenceClassificationRequestBuilderGetRequestConfiguration';
import {InferenceClassificationRequestBuilderPatchRequestConfiguration} from './inferenceClassificationRequestBuilderPatchRequestConfiguration';
import {InferenceClassificationOverrideItemRequestBuilder} from './overrides/item/inferenceClassificationOverrideItemRequestBuilder';
import {OverridesRequestBuilder} from './overrides/overridesRequestBuilder';
import {getPathParameters, HttpMethod, Parsable, ParsableFactory, RequestAdapter, RequestInformation, RequestOption, ResponseHandler} from '@microsoft/kiota-abstractions';
Expand All @@ -24,88 +27,83 @@ export class InferenceClassificationRequestBuilder {
public constructor(pathParameters: Record<string, unknown> | string | undefined, requestAdapter: RequestAdapter) {
if(!pathParameters) throw new Error("pathParameters cannot be undefined");
if(!requestAdapter) throw new Error("requestAdapter cannot be undefined");
this.urlTemplate = "{+baseurl}/users/{user%2Did}/inferenceClassification{?select}";
this.urlTemplate = "{+baseurl}/users/{user%2Did}/inferenceClassification{?%24select}";
const urlTplParams = getPathParameters(pathParameters);
this.pathParameters = urlTplParams;
this.requestAdapter = requestAdapter;
};
/**
* Relevance classification of the user's messages based on explicit designations which override inferred relevance or importance.
* @param headers Request headers
* @param options Request options
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
*/
public createDeleteRequestInformation(headers?: Record<string, string> | undefined, options?: RequestOption[] | undefined) : RequestInformation {
public createDeleteRequestInformation(requestConfiguration?: InferenceClassificationRequestBuilderDeleteRequestConfiguration | undefined) : RequestInformation {
const requestInfo = new RequestInformation();
requestInfo.urlTemplate = this.urlTemplate;
requestInfo.pathParameters = this.pathParameters;
requestInfo.httpMethod = HttpMethod.DELETE;
if(headers) requestInfo.headers = headers;
options && requestInfo.addRequestOptions(...options);
if (requestConfiguration) {
requestInfo.addRequestHeaders(requestConfiguration.headers);
requestInfo.addRequestOptions(requestConfiguration.options);
}
return requestInfo;
};
/**
* Relevance classification of the user's messages based on explicit designations which override inferred relevance or importance.
* @param headers Request headers
* @param options Request options
* @param queryParameters Request query parameters
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
*/
public createGetRequestInformation(queryParameters?: {
select?: string[]
} | undefined, headers?: Record<string, string> | undefined, options?: RequestOption[] | undefined) : RequestInformation {
public createGetRequestInformation(requestConfiguration?: InferenceClassificationRequestBuilderGetRequestConfiguration | undefined) : RequestInformation {
const requestInfo = new RequestInformation();
requestInfo.urlTemplate = this.urlTemplate;
requestInfo.pathParameters = this.pathParameters;
requestInfo.httpMethod = HttpMethod.GET;
if(headers) requestInfo.headers = headers;
queryParameters && requestInfo.setQueryStringParametersFromRawObject(queryParameters);
options && requestInfo.addRequestOptions(...options);
if (requestConfiguration) {
requestInfo.addRequestHeaders(requestConfiguration.headers);
requestInfo.setQueryStringParametersFromRawObject(requestConfiguration.queryParameters);
requestInfo.addRequestOptions(requestConfiguration.options);
}
return requestInfo;
};
/**
* Relevance classification of the user's messages based on explicit designations which override inferred relevance or importance.
* @param body
* @param headers Request headers
* @param options Request options
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
*/
public createPatchRequestInformation(body: InferenceClassification | undefined, headers?: Record<string, string> | undefined, options?: RequestOption[] | undefined) : RequestInformation {
public createPatchRequestInformation(body: InferenceClassification | undefined, requestConfiguration?: InferenceClassificationRequestBuilderPatchRequestConfiguration | undefined) : RequestInformation {
if(!body) throw new Error("body cannot be undefined");
const requestInfo = new RequestInformation();
requestInfo.urlTemplate = this.urlTemplate;
requestInfo.pathParameters = this.pathParameters;
requestInfo.httpMethod = HttpMethod.PATCH;
if(headers) requestInfo.headers = headers;
if (requestConfiguration) {
requestInfo.addRequestHeaders(requestConfiguration.headers);
requestInfo.addRequestOptions(requestConfiguration.options);
}
requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body);
options && requestInfo.addRequestOptions(...options);
return requestInfo;
};
/**
* Relevance classification of the user's messages based on explicit designations which override inferred relevance or importance.
* @param headers Request headers
* @param options Request options
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
*/
public delete(headers?: Record<string, string> | undefined, options?: RequestOption[] | undefined, responseHandler?: ResponseHandler | undefined) : Promise<void> {
public delete(requestConfiguration?: InferenceClassificationRequestBuilderDeleteRequestConfiguration | undefined, responseHandler?: ResponseHandler | undefined) : Promise<void> {
const requestInfo = this.createDeleteRequestInformation(
headers, options
requestConfiguration
);
return this.requestAdapter?.sendNoResponseContentAsync(requestInfo, responseHandler, undefined) ?? Promise.reject(new Error('http core is null'));
};
/**
* Relevance classification of the user's messages based on explicit designations which override inferred relevance or importance.
* @param headers Request headers
* @param options Request options
* @param queryParameters Request query parameters
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
* @returns a Promise of InferenceClassification
*/
public get(queryParameters?: {
select?: string[]
} | undefined, headers?: Record<string, string> | undefined, options?: RequestOption[] | undefined, responseHandler?: ResponseHandler | undefined) : Promise<InferenceClassification | undefined> {
public get(requestConfiguration?: InferenceClassificationRequestBuilderGetRequestConfiguration | undefined, responseHandler?: ResponseHandler | undefined) : Promise<InferenceClassification | undefined> {
const requestInfo = this.createGetRequestInformation(
queryParameters, headers, options
requestConfiguration
);
return this.requestAdapter?.sendAsync<InferenceClassification>(requestInfo, createInferenceClassificationFromDiscriminatorValue, responseHandler, undefined) ?? Promise.reject(new Error('http core is null'));
};
Expand All @@ -117,20 +115,19 @@ export class InferenceClassificationRequestBuilder {
public overridesById(id: string) : InferenceClassificationOverrideItemRequestBuilder {
if(!id) throw new Error("id cannot be undefined");
const urlTplParams = getPathParameters(this.pathParameters);
urlTplParams["inferenceClassificationOverride_id"] = id
urlTplParams["inferenceClassificationOverride%2Did"] = id
return new InferenceClassificationOverrideItemRequestBuilder(urlTplParams, this.requestAdapter);
};
/**
* Relevance classification of the user's messages based on explicit designations which override inferred relevance or importance.
* @param body
* @param headers Request headers
* @param options Request options
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @param responseHandler Response handler to use in place of the default response handling provided by the core service
*/
public patch(body: InferenceClassification | undefined, headers?: Record<string, string> | undefined, options?: RequestOption[] | undefined, responseHandler?: ResponseHandler | undefined) : Promise<void> {
public patch(body: InferenceClassification | undefined, requestConfiguration?: InferenceClassificationRequestBuilderPatchRequestConfiguration | undefined, responseHandler?: ResponseHandler | undefined) : Promise<void> {
if(!body) throw new Error("body cannot be undefined");
const requestInfo = this.createPatchRequestInformation(
body, headers, options
body, requestConfiguration
);
return this.requestAdapter?.sendNoResponseContentAsync(requestInfo, responseHandler, undefined) ?? Promise.reject(new Error('http core is null'));
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {RequestOption} from '@microsoft/kiota-abstractions';

/** Configuration for the request such as headers, query parameters, and middleware options. */
export class InferenceClassificationRequestBuilderDeleteRequestConfiguration {
/** Request headers */
public headers?: Record<string, string> | undefined;
/** Request options */
public options?: RequestOption[] | undefined;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

/** Relevance classification of the user's messages based on explicit designations which override inferred relevance or importance. */
export class InferenceClassificationRequestBuilderGetQueryParameters {
/** Select properties to be returned */
public select?: string[] | undefined;
/**
* Maps the query parameters names to their encoded names for the URI template parsing.
* @param originalName The original query parameter name in the class.
* @returns a string
*/
public getQueryParameter(originalName: string | undefined) : string {
if(!originalName) throw new Error("originalName cannot be undefined");
switch(originalName) {
case "select": return "%24select";
default: return originalName;
}
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import {InferenceClassificationRequestBuilderGetQueryParameters} from './inferenceClassificationRequestBuilderGetQueryParameters';
import {RequestOption} from '@microsoft/kiota-abstractions';

/** Configuration for the request such as headers, query parameters, and middleware options. */
export class InferenceClassificationRequestBuilderGetRequestConfiguration {
/** Request headers */
public headers?: Record<string, string> | undefined;
/** Request options */
public options?: RequestOption[] | undefined;
/** Request query parameters */
public queryParameters?: InferenceClassificationRequestBuilderGetQueryParameters | undefined;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {RequestOption} from '@microsoft/kiota-abstractions';

/** Configuration for the request such as headers, query parameters, and middleware options. */
export class InferenceClassificationRequestBuilderPatchRequestConfiguration {
/** Request headers */
public headers?: Record<string, string> | undefined;
/** Request options */
public options?: RequestOption[] | undefined;
}
Loading

0 comments on commit 9419eac

Please sign in to comment.