Skip to content

Commit

Permalink
Update generated files with build 129590 [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Microsoft Graph DevX Tooling authored and Microsoft Graph DevX Tooling committed Nov 23, 2023
1 parent 058e35e commit 7bd94be
Show file tree
Hide file tree
Showing 13,149 changed files with 155,908 additions and 366,345 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
63 changes: 15 additions & 48 deletions src/admin/adminRequestBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { EdgeRequestBuilder } from './edge/edgeRequestBuilder';
import { PeopleRequestBuilder } from './people/peopleRequestBuilder';
import { ServiceAnnouncementRequestBuilder } from './serviceAnnouncement/serviceAnnouncementRequestBuilder';
import { SharepointRequestBuilder } from './sharepoint/sharepointRequestBuilder';
import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestOption } from '@microsoft/kiota-abstractions';
import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions';

export interface AdminRequestBuilderGetQueryParameters {
/**
Expand All @@ -20,30 +20,6 @@ export interface AdminRequestBuilderGetQueryParameters {
*/
select?: string[];
}
export interface AdminRequestBuilderGetRequestConfiguration {
/**
* Request headers
*/
headers?: Record<string, string[]>;
/**
* Request options
*/
options?: RequestOption[];
/**
* Request query parameters
*/
queryParameters?: AdminRequestBuilderGetQueryParameters;
}
export interface AdminRequestBuilderPatchRequestConfiguration {
/**
* Request headers
*/
headers?: Record<string, string[]>;
/**
* Request options
*/
options?: RequestOption[];
}
/**
* Provides operations to manage the admin singleton.
*/
Expand Down Expand Up @@ -85,7 +61,7 @@ export class AdminRequestBuilder extends BaseRequestBuilder {
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a Promise of Admin
*/
public get(requestConfiguration?: AdminRequestBuilderGetRequestConfiguration | undefined) : Promise<Admin | undefined> {
public get(requestConfiguration?: RequestConfiguration<AdminRequestBuilderGetQueryParameters> | undefined) : Promise<Admin | undefined> {
const requestInfo = this.toGetRequestInformation(
requestConfiguration
);
Expand All @@ -101,7 +77,7 @@ export class AdminRequestBuilder extends BaseRequestBuilder {
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a Promise of Admin
*/
public patch(body: Admin, requestConfiguration?: AdminRequestBuilderPatchRequestConfiguration | undefined) : Promise<Admin | undefined> {
public patch(body: Admin, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<Admin | undefined> {
const requestInfo = this.toPatchRequestInformation(
body, requestConfiguration
);
Expand All @@ -116,17 +92,10 @@ export class AdminRequestBuilder extends BaseRequestBuilder {
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
*/
public toGetRequestInformation(requestConfiguration?: AdminRequestBuilderGetRequestConfiguration | undefined) : RequestInformation {
const requestInfo = new RequestInformation();
if (requestConfiguration) {
requestInfo.addRequestHeaders(requestConfiguration.headers);
requestInfo.setQueryStringParametersFromRawObject(requestConfiguration.queryParameters);
requestInfo.addRequestOptions(requestConfiguration.options);
}
requestInfo.urlTemplate = this.urlTemplate;
requestInfo.pathParameters = this.pathParameters;
requestInfo.httpMethod = HttpMethod.GET;
requestInfo.tryAddRequestHeaders("Accept", "application/json;q=1");
public toGetRequestInformation(requestConfiguration?: RequestConfiguration<AdminRequestBuilderGetQueryParameters> | undefined) : RequestInformation {
const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters);
requestInfo.configure(requestConfiguration, adminRequestBuilderGetQueryParametersMapper);
requestInfo.headers.tryAdd("Accept", "application/json");
return requestInfo;
};
/**
Expand All @@ -135,17 +104,11 @@ export class AdminRequestBuilder extends BaseRequestBuilder {
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
*/
public toPatchRequestInformation(body: Admin, requestConfiguration?: AdminRequestBuilderPatchRequestConfiguration | undefined) : RequestInformation {
public toPatchRequestInformation(body: Admin, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation {
if(!body) throw new Error("body cannot be undefined");
const requestInfo = new RequestInformation();
if (requestConfiguration) {
requestInfo.addRequestHeaders(requestConfiguration.headers);
requestInfo.addRequestOptions(requestConfiguration.options);
}
requestInfo.urlTemplate = this.urlTemplate;
requestInfo.pathParameters = this.pathParameters;
requestInfo.httpMethod = HttpMethod.PATCH;
requestInfo.tryAddRequestHeaders("Accept", "application/json;q=1");
const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters);
requestInfo.configure(requestConfiguration);
requestInfo.headers.tryAdd("Accept", "application/json");
requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeAdmin);
return requestInfo;
};
Expand All @@ -159,5 +122,9 @@ export class AdminRequestBuilder extends BaseRequestBuilder {
return new AdminRequestBuilder(rawUrl, this.requestAdapter);
};
}
const adminRequestBuilderGetQueryParametersMapper: Record<string, string> = {
"expand": "%24expand",
"select": "%24select",
};
// tslint:enable
// eslint-enable
89 changes: 20 additions & 69 deletions src/admin/edge/edgeRequestBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,8 @@ import { createEdgeFromDiscriminatorValue, deserializeIntoEdge, serializeEdge, t
import { type ODataError } from '../../models/oDataErrors/';
import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError } from '../../models/oDataErrors/oDataError';
import { InternetExplorerModeRequestBuilder } from './internetExplorerMode/internetExplorerModeRequestBuilder';
import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestOption } from '@microsoft/kiota-abstractions';
import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions';

export interface EdgeRequestBuilderDeleteRequestConfiguration {
/**
* Request headers
*/
headers?: Record<string, string[]>;
/**
* Request options
*/
options?: RequestOption[];
}
export interface EdgeRequestBuilderGetQueryParameters {
/**
* Expand related entities
Expand All @@ -27,30 +17,6 @@ export interface EdgeRequestBuilderGetQueryParameters {
*/
select?: string[];
}
export interface EdgeRequestBuilderGetRequestConfiguration {
/**
* Request headers
*/
headers?: Record<string, string[]>;
/**
* Request options
*/
options?: RequestOption[];
/**
* Request query parameters
*/
queryParameters?: EdgeRequestBuilderGetQueryParameters;
}
export interface EdgeRequestBuilderPatchRequestConfiguration {
/**
* Request headers
*/
headers?: Record<string, string[]>;
/**
* Request options
*/
options?: RequestOption[];
}
/**
* Provides operations to manage the edge property of the microsoft.graph.admin entity.
*/
Expand All @@ -73,7 +39,7 @@ export class EdgeRequestBuilder extends BaseRequestBuilder {
* Delete navigation property edge for admin
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
*/
public delete(requestConfiguration?: EdgeRequestBuilderDeleteRequestConfiguration | undefined) : Promise<void> {
public delete(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<void> {
const requestInfo = this.toDeleteRequestInformation(
requestConfiguration
);
Expand All @@ -88,7 +54,7 @@ export class EdgeRequestBuilder extends BaseRequestBuilder {
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a Promise of Edge
*/
public get(requestConfiguration?: EdgeRequestBuilderGetRequestConfiguration | undefined) : Promise<Edge | undefined> {
public get(requestConfiguration?: RequestConfiguration<EdgeRequestBuilderGetQueryParameters> | undefined) : Promise<Edge | undefined> {
const requestInfo = this.toGetRequestInformation(
requestConfiguration
);
Expand All @@ -104,7 +70,7 @@ export class EdgeRequestBuilder extends BaseRequestBuilder {
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a Promise of Edge
*/
public patch(body: Edge, requestConfiguration?: EdgeRequestBuilderPatchRequestConfiguration | undefined) : Promise<Edge | undefined> {
public patch(body: Edge, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<Edge | undefined> {
const requestInfo = this.toPatchRequestInformation(
body, requestConfiguration
);
Expand All @@ -119,34 +85,21 @@ export class EdgeRequestBuilder extends BaseRequestBuilder {
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
*/
public toDeleteRequestInformation(requestConfiguration?: EdgeRequestBuilderDeleteRequestConfiguration | undefined) : RequestInformation {
const requestInfo = new RequestInformation();
if (requestConfiguration) {
requestInfo.addRequestHeaders(requestConfiguration.headers);
requestInfo.addRequestOptions(requestConfiguration.options);
}
requestInfo.urlTemplate = this.urlTemplate;
requestInfo.pathParameters = this.pathParameters;
requestInfo.httpMethod = HttpMethod.DELETE;
requestInfo.tryAddRequestHeaders("Accept", "application/json, application/json");
public toDeleteRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation {
const requestInfo = new RequestInformation(HttpMethod.DELETE, this.urlTemplate, this.pathParameters);
requestInfo.configure(requestConfiguration);
requestInfo.headers.tryAdd("Accept", "application/json");
return requestInfo;
};
/**
* A container for Microsoft Edge resources. Read-only.
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
*/
public toGetRequestInformation(requestConfiguration?: EdgeRequestBuilderGetRequestConfiguration | undefined) : RequestInformation {
const requestInfo = new RequestInformation();
if (requestConfiguration) {
requestInfo.addRequestHeaders(requestConfiguration.headers);
requestInfo.setQueryStringParametersFromRawObject(requestConfiguration.queryParameters);
requestInfo.addRequestOptions(requestConfiguration.options);
}
requestInfo.urlTemplate = this.urlTemplate;
requestInfo.pathParameters = this.pathParameters;
requestInfo.httpMethod = HttpMethod.GET;
requestInfo.tryAddRequestHeaders("Accept", "application/json;q=1");
public toGetRequestInformation(requestConfiguration?: RequestConfiguration<EdgeRequestBuilderGetQueryParameters> | undefined) : RequestInformation {
const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters);
requestInfo.configure(requestConfiguration, edgeRequestBuilderGetQueryParametersMapper);
requestInfo.headers.tryAdd("Accept", "application/json");
return requestInfo;
};
/**
Expand All @@ -155,17 +108,11 @@ export class EdgeRequestBuilder extends BaseRequestBuilder {
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @returns a RequestInformation
*/
public toPatchRequestInformation(body: Edge, requestConfiguration?: EdgeRequestBuilderPatchRequestConfiguration | undefined) : RequestInformation {
public toPatchRequestInformation(body: Edge, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation {
if(!body) throw new Error("body cannot be undefined");
const requestInfo = new RequestInformation();
if (requestConfiguration) {
requestInfo.addRequestHeaders(requestConfiguration.headers);
requestInfo.addRequestOptions(requestConfiguration.options);
}
requestInfo.urlTemplate = this.urlTemplate;
requestInfo.pathParameters = this.pathParameters;
requestInfo.httpMethod = HttpMethod.PATCH;
requestInfo.tryAddRequestHeaders("Accept", "application/json;q=1");
const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters);
requestInfo.configure(requestConfiguration);
requestInfo.headers.tryAdd("Accept", "application/json");
requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializeEdge);
return requestInfo;
};
Expand All @@ -179,5 +126,9 @@ export class EdgeRequestBuilder extends BaseRequestBuilder {
return new EdgeRequestBuilder(rawUrl, this.requestAdapter);
};
}
const edgeRequestBuilderGetQueryParametersMapper: Record<string, string> = {
"expand": "%24expand",
"select": "%24select",
};
// tslint:enable
// eslint-enable
Loading

0 comments on commit 7bd94be

Please sign in to comment.