Skip to content

Commit

Permalink
Merge pull request #342 from microsoftgraph/kiota/beta/pipelinebuild/…
Browse files Browse the repository at this point in the history
…172840

Generated beta models and request builders
  • Loading branch information
Ndiritu authored Dec 4, 2024
2 parents b554306 + 0a4e317 commit 64363dd
Show file tree
Hide file tree
Showing 588 changed files with 23,396 additions and 477 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap
}

/**
* Delete a resourceConnection object.
* Delete an operationalInsightsConnection object.
* @param ResourceConnectionItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<void|null>
* @throws Exception
* @link https://learn.microsoft.com/graph/api/windowsupdates-resourceconnection-delete?view=graph-rest-beta Find more info here
* @link https://learn.microsoft.com/graph/api/windowsupdates-operationalinsightsconnection-delete?view=graph-rest-beta Find more info here
*/
public function delete(?ResourceConnectionItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toDeleteRequestInformation($requestConfiguration);
Expand All @@ -46,11 +46,11 @@ public function delete(?ResourceConnectionItemRequestBuilderDeleteRequestConfigu
}

/**
* Read the properties and relationships of an operationalInsightsConnection object.
* Read the properties and relationships of a resourceConnection object.
* @param ResourceConnectionItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<ResourceConnection|null>
* @throws Exception
* @link https://learn.microsoft.com/graph/api/windowsupdates-operationalinsightsconnection-get?view=graph-rest-beta Find more info here
* @link https://learn.microsoft.com/graph/api/windowsupdates-resourceconnection-get?view=graph-rest-beta Find more info here
*/
public function get(?ResourceConnectionItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
Expand All @@ -76,7 +76,7 @@ public function patch(ResourceConnection $body, ?ResourceConnectionItemRequestBu
}

/**
* Delete a resourceConnection object.
* Delete an operationalInsightsConnection object.
* @param ResourceConnectionItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
*/
Expand All @@ -94,7 +94,7 @@ public function toDeleteRequestInformation(?ResourceConnectionItemRequestBuilder
}

/**
* Read the properties and relationships of an operationalInsightsConnection object.
* Read the properties and relationships of a resourceConnection object.
* @param ResourceConnectionItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Microsoft\Kiota\Abstractions\QueryParameter;

/**
* Read the properties and relationships of an operationalInsightsConnection object.
* Read the properties and relationships of a resourceConnection object.
*/
class ResourceConnectionItemRequestBuilderGetQueryParameters
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap
}

/**
* Delete an azureADDevice object. When a Microsoft Entra device is deleted, it is unregistered and automatically unenrolled from management for all update categories, as well as removed from every deploymentAudience and updatableAssetGroup.
* Delete an updatableAssetGroup object. When an updatableAssetGroup object, its member updatableAsset objects are not deleted.
* @param UpdatableAssetItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<void|null>
* @throws Exception
* @link https://learn.microsoft.com/graph/api/windowsupdates-azureaddevice-delete?view=graph-rest-beta Find more info here
* @link https://learn.microsoft.com/graph/api/windowsupdates-updatableassetgroup-delete?view=graph-rest-beta Find more info here
*/
public function delete(?UpdatableAssetItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toDeleteRequestInformation($requestConfiguration);
Expand Down Expand Up @@ -108,7 +108,7 @@ public function patch(UpdatableAsset $body, ?UpdatableAssetItemRequestBuilderPat
}

/**
* Delete an azureADDevice object. When a Microsoft Entra device is deleted, it is unregistered and automatically unenrolled from management for all update categories, as well as removed from every deploymentAudience and updatableAssetGroup.
* Delete an updatableAssetGroup object. When an updatableAssetGroup object, its member updatableAsset objects are not deleted.
* @param UpdatableAssetItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap
}

/**
* Delete a contentApproval object.
* Delete a complianceChange object.
* @param ComplianceChangeItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<void|null>
* @throws Exception
* @link https://learn.microsoft.com/graph/api/windowsupdates-contentapproval-delete?view=graph-rest-beta Find more info here
* @link https://learn.microsoft.com/graph/api/windowsupdates-compliancechange-delete?view=graph-rest-beta Find more info here
*/
public function delete(?ComplianceChangeItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toDeleteRequestInformation($requestConfiguration);
Expand All @@ -69,12 +69,12 @@ public function get(?ComplianceChangeItemRequestBuilderGetRequestConfiguration $
}

/**
* Update the properties of a contentApproval object.
* Update the properties of a complianceChange object.
* @param ComplianceChange $body The request body
* @param ComplianceChangeItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<ComplianceChange|null>
* @throws Exception
* @link https://learn.microsoft.com/graph/api/windowsupdates-contentapproval-update?view=graph-rest-beta Find more info here
* @link https://learn.microsoft.com/graph/api/windowsupdates-compliancechange-update?view=graph-rest-beta Find more info here
*/
public function patch(ComplianceChange $body, ?ComplianceChangeItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration);
Expand All @@ -85,7 +85,7 @@ public function patch(ComplianceChange $body, ?ComplianceChangeItemRequestBuilde
}

/**
* Delete a contentApproval object.
* Delete a complianceChange object.
* @param ComplianceChangeItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
*/
Expand Down Expand Up @@ -124,7 +124,7 @@ public function toGetRequestInformation(?ComplianceChangeItemRequestBuilderGetRe
}

/**
* Update the properties of a contentApproval object.
* Update the properties of a complianceChange object.
* @param ComplianceChange $body The request body
* @param ComplianceChangeItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<?php

namespace Microsoft\Graph\Beta\Generated\AuthenticationMethodDevices;

use Exception;
use Http\Promise\Promise;
use Microsoft\Graph\Beta\Generated\AuthenticationMethodDevices\Count\CountRequestBuilder;
use Microsoft\Graph\Beta\Generated\AuthenticationMethodDevices\Item\AuthenticationMethodDeviceItemRequestBuilder;
use Microsoft\Graph\Beta\Generated\Models\AuthenticationMethodDevice;
use Microsoft\Graph\Beta\Generated\Models\AuthenticationMethodDeviceCollectionResponse;
use Microsoft\Graph\Beta\Generated\Models\ODataErrors\ODataError;
use Microsoft\Kiota\Abstractions\BaseRequestBuilder;
use Microsoft\Kiota\Abstractions\HttpMethod;
use Microsoft\Kiota\Abstractions\RequestAdapter;
use Microsoft\Kiota\Abstractions\RequestInformation;

/**
* Provides operations to manage the collection of authenticationMethodDevice entities.
*/
class AuthenticationMethodDevicesRequestBuilder extends BaseRequestBuilder
{
/**
* Provides operations to count the resources in the collection.
*/
public function count(): CountRequestBuilder {
return new CountRequestBuilder($this->pathParameters, $this->requestAdapter);
}

/**
* Provides operations to manage the collection of authenticationMethodDevice entities.
* @param string $authenticationMethodDeviceId The unique identifier of authenticationMethodDevice
* @return AuthenticationMethodDeviceItemRequestBuilder
*/
public function byAuthenticationMethodDeviceId(string $authenticationMethodDeviceId): AuthenticationMethodDeviceItemRequestBuilder {
$urlTplParams = $this->pathParameters;
$urlTplParams['authenticationMethodDevice%2Did'] = $authenticationMethodDeviceId;
return new AuthenticationMethodDeviceItemRequestBuilder($urlTplParams, $this->requestAdapter);
}

/**
* Instantiates a new AuthenticationMethodDevicesRequestBuilder and sets the default values.
* @param array<string, mixed>|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL.
* @param RequestAdapter $requestAdapter The request adapter to use to execute the requests.
*/
public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) {
parent::__construct($requestAdapter, [], '{+baseurl}/authenticationMethodDevices{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}');
if (is_array($pathParametersOrRawUrl)) {
$this->pathParameters = $pathParametersOrRawUrl;
} else {
$this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl];
}
}

/**
* Get entities from authenticationMethodDevices
* @param AuthenticationMethodDevicesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<AuthenticationMethodDeviceCollectionResponse|null>
* @throws Exception
*/
public function get(?AuthenticationMethodDevicesRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
$errorMappings = [
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [AuthenticationMethodDeviceCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings);
}

/**
* Add new entity to authenticationMethodDevices
* @param AuthenticationMethodDevice $body The request body
* @param AuthenticationMethodDevicesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<AuthenticationMethodDevice|null>
* @throws Exception
*/
public function post(AuthenticationMethodDevice $body, ?AuthenticationMethodDevicesRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toPostRequestInformation($body, $requestConfiguration);
$errorMappings = [
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [AuthenticationMethodDevice::class, 'createFromDiscriminatorValue'], $errorMappings);
}

/**
* Get entities from authenticationMethodDevices
* @param AuthenticationMethodDevicesRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
*/
public function toGetRequestInformation(?AuthenticationMethodDevicesRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation {
$requestInfo = new RequestInformation();
$requestInfo->urlTemplate = $this->urlTemplate;
$requestInfo->pathParameters = $this->pathParameters;
$requestInfo->httpMethod = HttpMethod::GET;
if ($requestConfiguration !== null) {
$requestInfo->addHeaders($requestConfiguration->headers);
if ($requestConfiguration->queryParameters !== null) {
$requestInfo->setQueryParameters($requestConfiguration->queryParameters);
}
$requestInfo->addRequestOptions(...$requestConfiguration->options);
}
$requestInfo->tryAddHeader('Accept', "application/json");
return $requestInfo;
}

/**
* Add new entity to authenticationMethodDevices
* @param AuthenticationMethodDevice $body The request body
* @param AuthenticationMethodDevicesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
*/
public function toPostRequestInformation(AuthenticationMethodDevice $body, ?AuthenticationMethodDevicesRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation {
$requestInfo = new RequestInformation();
$requestInfo->urlTemplate = $this->urlTemplate;
$requestInfo->pathParameters = $this->pathParameters;
$requestInfo->httpMethod = HttpMethod::POST;
if ($requestConfiguration !== null) {
$requestInfo->addHeaders($requestConfiguration->headers);
$requestInfo->addRequestOptions(...$requestConfiguration->options);
}
$requestInfo->tryAddHeader('Accept', "application/json");
$requestInfo->setContentFromParsable($this->requestAdapter, "application/json", $body);
return $requestInfo;
}

/**
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
* @param string $rawUrl The raw URL to use for the request builder.
* @return AuthenticationMethodDevicesRequestBuilder
*/
public function withUrl(string $rawUrl): AuthenticationMethodDevicesRequestBuilder {
return new AuthenticationMethodDevicesRequestBuilder($rawUrl, $this->requestAdapter);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?php

namespace Microsoft\Graph\Beta\Generated\AuthenticationMethodDevices;

use Microsoft\Kiota\Abstractions\QueryParameter;

/**
* Get entities from authenticationMethodDevices
*/
class AuthenticationMethodDevicesRequestBuilderGetQueryParameters
{
/**
* @QueryParameter("%24count")
* @var bool|null $count Include count of items
*/
public ?bool $count = null;

/**
* @QueryParameter("%24expand")
* @var array<string>|null $expand Expand related entities
*/
public ?array $expand = null;

/**
* @QueryParameter("%24filter")
* @var string|null $filter Filter items by property values
*/
public ?string $filter = null;

/**
* @QueryParameter("%24orderby")
* @var array<string>|null $orderby Order items by property values
*/
public ?array $orderby = null;

/**
* @QueryParameter("%24search")
* @var string|null $search Search items by search phrases
*/
public ?string $search = null;

/**
* @QueryParameter("%24select")
* @var array<string>|null $select Select properties to be returned
*/
public ?array $select = null;

/**
* @QueryParameter("%24skip")
* @var int|null $skip Skip the first n items
*/
public ?int $skip = null;

/**
* @QueryParameter("%24top")
* @var int|null $top Show only the first n items
*/
public ?int $top = null;

/**
* Instantiates a new AuthenticationMethodDevicesRequestBuilderGetQueryParameters and sets the default values.
* @param bool|null $count Include count of items
* @param array<string>|null $expand Expand related entities
* @param string|null $filter Filter items by property values
* @param array<string>|null $orderby Order items by property values
* @param string|null $search Search items by search phrases
* @param array<string>|null $select Select properties to be returned
* @param int|null $skip Skip the first n items
* @param int|null $top Show only the first n items
*/
public function __construct(?bool $count = null, ?array $expand = null, ?string $filter = null, ?array $orderby = null, ?string $search = null, ?array $select = null, ?int $skip = null, ?int $top = null) {
$this->count = $count;
$this->expand = $expand;
$this->filter = $filter;
$this->orderby = $orderby;
$this->search = $search;
$this->select = $select;
$this->skip = $skip;
$this->top = $top;
}

}
Loading

0 comments on commit 64363dd

Please sign in to comment.