Skip to content

Commit

Permalink
Update generated files with build 127996
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 1, 2023
1 parent f74f51f commit f2cc8f2
Show file tree
Hide file tree
Showing 7,935 changed files with 104,315 additions and 134,686 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
39 changes: 16 additions & 23 deletions src/Generated/Admin/AdminRequestBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Exception;
use Http\Promise\Promise;
use Http\Promise\RejectedPromise;
use Microsoft\Graph\Generated\Admin\Edge\EdgeRequestBuilder;
use Microsoft\Graph\Generated\Admin\People\PeopleRequestBuilder;
use Microsoft\Graph\Generated\Admin\ServiceAnnouncement\ServiceAnnouncementRequestBuilder;
Expand Down Expand Up @@ -66,38 +65,32 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap
/**
* Get admin
* @param AdminRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise
* @return Promise<Admin|null>
* @throws Exception
*/
public function get(?AdminRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
try {
$errorMappings = [
'4XX' => [ODataError::class, 'createFromDiscriminatorValue'],
'5XX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [Admin::class, 'createFromDiscriminatorValue'], $errorMappings);
} catch(Exception $ex) {
return new RejectedPromise($ex);
}
$errorMappings = [
'4XX' => [ODataError::class, 'createFromDiscriminatorValue'],
'5XX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [Admin::class, 'createFromDiscriminatorValue'], $errorMappings);
}

/**
* Update admin
* @param Admin $body The request body
* @param AdminRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise
* @return Promise<Admin|null>
* @throws Exception
*/
public function patch(Admin $body, ?AdminRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration);
try {
$errorMappings = [
'4XX' => [ODataError::class, 'createFromDiscriminatorValue'],
'5XX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [Admin::class, 'createFromDiscriminatorValue'], $errorMappings);
} catch(Exception $ex) {
return new RejectedPromise($ex);
}
$errorMappings = [
'4XX' => [ODataError::class, 'createFromDiscriminatorValue'],
'5XX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [Admin::class, 'createFromDiscriminatorValue'], $errorMappings);
}

/**
Expand All @@ -110,14 +103,14 @@ public function toGetRequestInformation(?AdminRequestBuilderGetRequestConfigurat
$requestInfo->urlTemplate = $this->urlTemplate;
$requestInfo->pathParameters = $this->pathParameters;
$requestInfo->httpMethod = HttpMethod::GET;
$requestInfo->addHeader('Accept', "application/json");
if ($requestConfiguration !== null) {
$requestInfo->addHeaders($requestConfiguration->headers);
if ($requestConfiguration->queryParameters !== null) {
$requestInfo->setQueryParameters($requestConfiguration->queryParameters);
}
$requestInfo->addRequestOptions(...$requestConfiguration->options);
}
$requestInfo->tryAddHeader('Accept', "application/json;q=1");
return $requestInfo;
}

Expand All @@ -132,11 +125,11 @@ public function toPatchRequestInformation(Admin $body, ?AdminRequestBuilderPatch
$requestInfo->urlTemplate = $this->urlTemplate;
$requestInfo->pathParameters = $this->pathParameters;
$requestInfo->httpMethod = HttpMethod::PATCH;
$requestInfo->addHeader('Accept', "application/json");
if ($requestConfiguration !== null) {
$requestInfo->addHeaders($requestConfiguration->headers);
$requestInfo->addRequestOptions(...$requestConfiguration->options);
}
$requestInfo->tryAddHeader('Accept', "application/json;q=1");
$requestInfo->setContentFromParsable($this->requestAdapter, "application/json", $body);
return $requestInfo;
}
Expand Down
57 changes: 24 additions & 33 deletions src/Generated/Admin/Edge/EdgeRequestBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Exception;
use Http\Promise\Promise;
use Http\Promise\RejectedPromise;
use Microsoft\Graph\Generated\Admin\Edge\InternetExplorerMode\InternetExplorerModeRequestBuilder;
use Microsoft\Graph\Generated\Models\Edge;
use Microsoft\Graph\Generated\Models\ODataErrors\ODataError;
Expand Down Expand Up @@ -42,56 +41,47 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap
/**
* Delete navigation property edge for admin
* @param EdgeRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise
* @return Promise<void|null>
* @throws Exception
*/
public function delete(?EdgeRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toDeleteRequestInformation($requestConfiguration);
try {
$errorMappings = [
'4XX' => [ODataError::class, 'createFromDiscriminatorValue'],
'5XX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings);
} catch(Exception $ex) {
return new RejectedPromise($ex);
}
$errorMappings = [
'4XX' => [ODataError::class, 'createFromDiscriminatorValue'],
'5XX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings);
}

/**
* A container for Microsoft Edge resources. Read-only.
* @param EdgeRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise
* @return Promise<Edge|null>
* @throws Exception
*/
public function get(?EdgeRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
try {
$errorMappings = [
'4XX' => [ODataError::class, 'createFromDiscriminatorValue'],
'5XX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [Edge::class, 'createFromDiscriminatorValue'], $errorMappings);
} catch(Exception $ex) {
return new RejectedPromise($ex);
}
$errorMappings = [
'4XX' => [ODataError::class, 'createFromDiscriminatorValue'],
'5XX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [Edge::class, 'createFromDiscriminatorValue'], $errorMappings);
}

/**
* Update the navigation property edge in admin
* @param Edge $body The request body
* @param EdgeRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise
* @return Promise<Edge|null>
* @throws Exception
*/
public function patch(Edge $body, ?EdgeRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration);
try {
$errorMappings = [
'4XX' => [ODataError::class, 'createFromDiscriminatorValue'],
'5XX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [Edge::class, 'createFromDiscriminatorValue'], $errorMappings);
} catch(Exception $ex) {
return new RejectedPromise($ex);
}
$errorMappings = [
'4XX' => [ODataError::class, 'createFromDiscriminatorValue'],
'5XX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [Edge::class, 'createFromDiscriminatorValue'], $errorMappings);
}

/**
Expand All @@ -108,6 +98,7 @@ public function toDeleteRequestInformation(?EdgeRequestBuilderDeleteRequestConfi
$requestInfo->addHeaders($requestConfiguration->headers);
$requestInfo->addRequestOptions(...$requestConfiguration->options);
}
$requestInfo->tryAddHeader('Accept', "application/json, application/json");
return $requestInfo;
}

Expand All @@ -121,14 +112,14 @@ public function toGetRequestInformation(?EdgeRequestBuilderGetRequestConfigurati
$requestInfo->urlTemplate = $this->urlTemplate;
$requestInfo->pathParameters = $this->pathParameters;
$requestInfo->httpMethod = HttpMethod::GET;
$requestInfo->addHeader('Accept', "application/json");
if ($requestConfiguration !== null) {
$requestInfo->addHeaders($requestConfiguration->headers);
if ($requestConfiguration->queryParameters !== null) {
$requestInfo->setQueryParameters($requestConfiguration->queryParameters);
}
$requestInfo->addRequestOptions(...$requestConfiguration->options);
}
$requestInfo->tryAddHeader('Accept', "application/json;q=1");
return $requestInfo;
}

Expand All @@ -143,11 +134,11 @@ public function toPatchRequestInformation(Edge $body, ?EdgeRequestBuilderPatchRe
$requestInfo->urlTemplate = $this->urlTemplate;
$requestInfo->pathParameters = $this->pathParameters;
$requestInfo->httpMethod = HttpMethod::PATCH;
$requestInfo->addHeader('Accept', "application/json");
if ($requestConfiguration !== null) {
$requestInfo->addHeaders($requestConfiguration->headers);
$requestInfo->addRequestOptions(...$requestConfiguration->options);
}
$requestInfo->tryAddHeader('Accept', "application/json;q=1");
$requestInfo->setContentFromParsable($this->requestAdapter, "application/json", $body);
return $requestInfo;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Exception;
use Http\Promise\Promise;
use Http\Promise\RejectedPromise;
use Microsoft\Graph\Generated\Admin\Edge\InternetExplorerMode\SiteLists\SiteListsRequestBuilder;
use Microsoft\Graph\Generated\Models\InternetExplorerMode;
use Microsoft\Graph\Generated\Models\ODataErrors\ODataError;
Expand Down Expand Up @@ -42,56 +41,47 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap
/**
* Delete navigation property internetExplorerMode for admin
* @param InternetExplorerModeRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise
* @return Promise<void|null>
* @throws Exception
*/
public function delete(?InternetExplorerModeRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toDeleteRequestInformation($requestConfiguration);
try {
$errorMappings = [
'4XX' => [ODataError::class, 'createFromDiscriminatorValue'],
'5XX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings);
} catch(Exception $ex) {
return new RejectedPromise($ex);
}
$errorMappings = [
'4XX' => [ODataError::class, 'createFromDiscriminatorValue'],
'5XX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings);
}

/**
* A container for Internet Explorer mode resources.
* @param InternetExplorerModeRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise
* @return Promise<InternetExplorerMode|null>
* @throws Exception
*/
public function get(?InternetExplorerModeRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
try {
$errorMappings = [
'4XX' => [ODataError::class, 'createFromDiscriminatorValue'],
'5XX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [InternetExplorerMode::class, 'createFromDiscriminatorValue'], $errorMappings);
} catch(Exception $ex) {
return new RejectedPromise($ex);
}
$errorMappings = [
'4XX' => [ODataError::class, 'createFromDiscriminatorValue'],
'5XX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [InternetExplorerMode::class, 'createFromDiscriminatorValue'], $errorMappings);
}

/**
* Update the navigation property internetExplorerMode in admin
* @param InternetExplorerMode $body The request body
* @param InternetExplorerModeRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise
* @return Promise<InternetExplorerMode|null>
* @throws Exception
*/
public function patch(InternetExplorerMode $body, ?InternetExplorerModeRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration);
try {
$errorMappings = [
'4XX' => [ODataError::class, 'createFromDiscriminatorValue'],
'5XX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [InternetExplorerMode::class, 'createFromDiscriminatorValue'], $errorMappings);
} catch(Exception $ex) {
return new RejectedPromise($ex);
}
$errorMappings = [
'4XX' => [ODataError::class, 'createFromDiscriminatorValue'],
'5XX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [InternetExplorerMode::class, 'createFromDiscriminatorValue'], $errorMappings);
}

/**
Expand All @@ -108,6 +98,7 @@ public function toDeleteRequestInformation(?InternetExplorerModeRequestBuilderDe
$requestInfo->addHeaders($requestConfiguration->headers);
$requestInfo->addRequestOptions(...$requestConfiguration->options);
}
$requestInfo->tryAddHeader('Accept', "application/json, application/json");
return $requestInfo;
}

Expand All @@ -121,14 +112,14 @@ public function toGetRequestInformation(?InternetExplorerModeRequestBuilderGetRe
$requestInfo->urlTemplate = $this->urlTemplate;
$requestInfo->pathParameters = $this->pathParameters;
$requestInfo->httpMethod = HttpMethod::GET;
$requestInfo->addHeader('Accept', "application/json");
if ($requestConfiguration !== null) {
$requestInfo->addHeaders($requestConfiguration->headers);
if ($requestConfiguration->queryParameters !== null) {
$requestInfo->setQueryParameters($requestConfiguration->queryParameters);
}
$requestInfo->addRequestOptions(...$requestConfiguration->options);
}
$requestInfo->tryAddHeader('Accept', "application/json;q=1");
return $requestInfo;
}

Expand All @@ -143,11 +134,11 @@ public function toPatchRequestInformation(InternetExplorerMode $body, ?InternetE
$requestInfo->urlTemplate = $this->urlTemplate;
$requestInfo->pathParameters = $this->pathParameters;
$requestInfo->httpMethod = HttpMethod::PATCH;
$requestInfo->addHeader('Accept', "application/json");
if ($requestConfiguration !== null) {
$requestInfo->addHeaders($requestConfiguration->headers);
$requestInfo->addRequestOptions(...$requestConfiguration->options);
}
$requestInfo->tryAddHeader('Accept', "application/json;q=1");
$requestInfo->setContentFromParsable($this->requestAdapter, "application/json", $body);
return $requestInfo;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Exception;
use Http\Promise\Promise;
use Http\Promise\RejectedPromise;
use Microsoft\Graph\Generated\Models\ODataErrors\ODataError;
use Microsoft\Kiota\Abstractions\BaseRequestBuilder;
use Microsoft\Kiota\Abstractions\HttpMethod;
Expand Down Expand Up @@ -33,19 +32,18 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap
/**
* Get the number of the resource
* @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise
* @return Promise<int|null>
* @throws Exception
*/
public function get(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
try {
$errorMappings = [
'4XX' => [ODataError::class, 'createFromDiscriminatorValue'],
'5XX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendPrimitiveAsync($requestInfo, 'int', $errorMappings);
} catch(Exception $ex) {
return new RejectedPromise($ex);
}
$errorMappings = [
'4XX' => [ODataError::class, 'createFromDiscriminatorValue'],
'5XX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
/** @var Promise<int|null> $result */
$result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, 'int', $errorMappings);
return $result;
}

/**
Expand All @@ -58,14 +56,14 @@ public function toGetRequestInformation(?CountRequestBuilderGetRequestConfigurat
$requestInfo->urlTemplate = $this->urlTemplate;
$requestInfo->pathParameters = $this->pathParameters;
$requestInfo->httpMethod = HttpMethod::GET;
$requestInfo->addHeader('Accept', "text/plain");
if ($requestConfiguration !== null) {
$requestInfo->addHeaders($requestConfiguration->headers);
if ($requestConfiguration->queryParameters !== null) {
$requestInfo->setQueryParameters($requestConfiguration->queryParameters);
}
$requestInfo->addRequestOptions(...$requestConfiguration->options);
}
$requestInfo->tryAddHeader('Accept', "text/plain;q=0.9");
return $requestInfo;
}

Expand Down
Loading

0 comments on commit f2cc8f2

Please sign in to comment.