Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
<?php

namespace Microsoft\Graph\Beta\Generated\Admin\People\NamePronunciation;

use Exception;
use Http\Promise\Promise;
use Microsoft\Graph\Beta\Generated\Models\NamePronunciationSettings;
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 namePronunciation property of the microsoft.graph.peopleAdminSettings entity.
*/
class NamePronunciationRequestBuilder extends BaseRequestBuilder
{
/**
* Instantiates a new NamePronunciationRequestBuilder 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}/admin/people/namePronunciation{?%24expand,%24select}');
if (is_array($pathParametersOrRawUrl)) {
$this->pathParameters = $pathParametersOrRawUrl;
} else {
$this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl];
}
}

/**
* Delete navigation property namePronunciation for admin
* @param NamePronunciationRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<void|null>
* @throws Exception
*/
public function delete(?NamePronunciationRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toDeleteRequestInformation($requestConfiguration);
$errorMappings = [
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings);
}

/**
* Read the properties and relationships of a namePronunciationSettings object.
* @param NamePronunciationRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<NamePronunciationSettings|null>
* @throws Exception
* @link https://learn.microsoft.com/graph/api/namepronunciationsettings-get?view=graph-rest-beta Find more info here
*/
public function get(?NamePronunciationRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
$errorMappings = [
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [NamePronunciationSettings::class, 'createFromDiscriminatorValue'], $errorMappings);
}

/**
* Update the properties of a namePronunciationSettings object.
* @param NamePronunciationSettings $body The request body
* @param NamePronunciationRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<NamePronunciationSettings|null>
* @throws Exception
* @link https://learn.microsoft.com/graph/api/namepronunciationsettings-update?view=graph-rest-beta Find more info here
*/
public function patch(NamePronunciationSettings $body, ?NamePronunciationRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration);
$errorMappings = [
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [NamePronunciationSettings::class, 'createFromDiscriminatorValue'], $errorMappings);
}

/**
* Delete navigation property namePronunciation for admin
* @param NamePronunciationRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
*/
public function toDeleteRequestInformation(?NamePronunciationRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): RequestInformation {
$requestInfo = new RequestInformation();
$requestInfo->urlTemplate = $this->urlTemplate;
$requestInfo->pathParameters = $this->pathParameters;
$requestInfo->httpMethod = HttpMethod::DELETE;
if ($requestConfiguration !== null) {
$requestInfo->addHeaders($requestConfiguration->headers);
$requestInfo->addRequestOptions(...$requestConfiguration->options);
}
$requestInfo->tryAddHeader('Accept', "application/json");
return $requestInfo;
}

/**
* Read the properties and relationships of a namePronunciationSettings object.
* @param NamePronunciationRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
*/
public function toGetRequestInformation(?NamePronunciationRequestBuilderGetRequestConfiguration $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;
}

/**
* Update the properties of a namePronunciationSettings object.
* @param NamePronunciationSettings $body The request body
* @param NamePronunciationRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
*/
public function toPatchRequestInformation(NamePronunciationSettings $body, ?NamePronunciationRequestBuilderPatchRequestConfiguration $requestConfiguration = null): RequestInformation {
$requestInfo = new RequestInformation();
$requestInfo->urlTemplate = $this->urlTemplate;
$requestInfo->pathParameters = $this->pathParameters;
$requestInfo->httpMethod = HttpMethod::PATCH;
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 NamePronunciationRequestBuilder
*/
public function withUrl(string $rawUrl): NamePronunciationRequestBuilder {
return new NamePronunciationRequestBuilder($rawUrl, $this->requestAdapter);
}

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

namespace Microsoft\Graph\Beta\Generated\Admin\People\NamePronunciation;

use Microsoft\Kiota\Abstractions\BaseRequestConfiguration;
use Microsoft\Kiota\Abstractions\RequestOption;

/**
* Configuration for the request such as headers, query parameters, and middleware options.
*/
class NamePronunciationRequestBuilderDeleteRequestConfiguration extends BaseRequestConfiguration
{
/**
* Instantiates a new NamePronunciationRequestBuilderDeleteRequestConfiguration and sets the default values.
* @param array<string, array<string>|string>|null $headers Request headers
* @param array<RequestOption>|null $options Request options
*/
public function __construct(?array $headers = null, ?array $options = null) {
parent::__construct($headers ?? [], $options ?? []);
}

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

namespace Microsoft\Graph\Beta\Generated\Admin\People\NamePronunciation;

use Microsoft\Kiota\Abstractions\QueryParameter;

/**
* Read the properties and relationships of a namePronunciationSettings object.
*/
class NamePronunciationRequestBuilderGetQueryParameters
{
/**
* @QueryParameter("%24expand")
* @var array<string>|null $expand Expand related entities
*/
public ?array $expand = null;

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

/**
* Instantiates a new NamePronunciationRequestBuilderGetQueryParameters and sets the default values.
* @param array<string>|null $expand Expand related entities
* @param array<string>|null $select Select properties to be returned
*/
public function __construct(?array $expand = null, ?array $select = null) {
$this->expand = $expand;
$this->select = $select;
}

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

namespace Microsoft\Graph\Beta\Generated\Admin\People\NamePronunciation;

use Microsoft\Kiota\Abstractions\BaseRequestConfiguration;
use Microsoft\Kiota\Abstractions\RequestOption;

/**
* Configuration for the request such as headers, query parameters, and middleware options.
*/
class NamePronunciationRequestBuilderGetRequestConfiguration extends BaseRequestConfiguration
{
/**
* @var NamePronunciationRequestBuilderGetQueryParameters|null $queryParameters Request query parameters
*/
public ?NamePronunciationRequestBuilderGetQueryParameters $queryParameters = null;

/**
* Instantiates a new NamePronunciationRequestBuilderGetRequestConfiguration and sets the default values.
* @param array<string, array<string>|string>|null $headers Request headers
* @param array<RequestOption>|null $options Request options
* @param NamePronunciationRequestBuilderGetQueryParameters|null $queryParameters Request query parameters
*/
public function __construct(?array $headers = null, ?array $options = null, ?NamePronunciationRequestBuilderGetQueryParameters $queryParameters = null) {
parent::__construct($headers ?? [], $options ?? []);
$this->queryParameters = $queryParameters;
}

/**
* Instantiates a new NamePronunciationRequestBuilderGetQueryParameters.
* @param array<string>|null $expand Expand related entities
* @param array<string>|null $select Select properties to be returned
* @return NamePronunciationRequestBuilderGetQueryParameters
*/
public static function createQueryParameters(?array $expand = null, ?array $select = null): NamePronunciationRequestBuilderGetQueryParameters {
return new NamePronunciationRequestBuilderGetQueryParameters($expand, $select);
}

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

namespace Microsoft\Graph\Beta\Generated\Admin\People\NamePronunciation;

use Microsoft\Kiota\Abstractions\BaseRequestConfiguration;
use Microsoft\Kiota\Abstractions\RequestOption;

/**
* Configuration for the request such as headers, query parameters, and middleware options.
*/
class NamePronunciationRequestBuilderPatchRequestConfiguration extends BaseRequestConfiguration
{
/**
* Instantiates a new NamePronunciationRequestBuilderPatchRequestConfiguration and sets the default values.
* @param array<string, array<string>|string>|null $headers Request headers
* @param array<RequestOption>|null $options Request options
*/
public function __construct(?array $headers = null, ?array $options = null) {
parent::__construct($headers ?? [], $options ?? []);
}

}
8 changes: 8 additions & 0 deletions src/Generated/Admin/People/PeopleRequestBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Exception;
use Http\Promise\Promise;
use Microsoft\Graph\Beta\Generated\Admin\People\ItemInsights\ItemInsightsRequestBuilder;
use Microsoft\Graph\Beta\Generated\Admin\People\NamePronunciation\NamePronunciationRequestBuilder;
use Microsoft\Graph\Beta\Generated\Admin\People\ProfileCardProperties\ProfileCardPropertiesRequestBuilder;
use Microsoft\Graph\Beta\Generated\Admin\People\Pronouns\PronounsRequestBuilder;
use Microsoft\Graph\Beta\Generated\Models\ODataErrors\ODataError;
Expand All @@ -26,6 +27,13 @@ public function itemInsights(): ItemInsightsRequestBuilder {
return new ItemInsightsRequestBuilder($this->pathParameters, $this->requestAdapter);
}

/**
* Provides operations to manage the namePronunciation property of the microsoft.graph.peopleAdminSettings entity.
*/
public function namePronunciation(): NamePronunciationRequestBuilder {
return new NamePronunciationRequestBuilder($this->pathParameters, $this->requestAdapter);
}

/**
* Provides operations to manage the profileCardProperties property of the microsoft.graph.peopleAdminSettings entity.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap
}

/**
* Delete an operationalInsightsConnection object.
* Delete a resourceConnection 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-operationalinsightsconnection-delete?view=graph-rest-beta Find more info here
* @link https://learn.microsoft.com/graph/api/windowsupdates-resourceconnection-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 a resourceConnection object.
* Read the properties and relationships of an operationalInsightsConnection 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-resourceconnection-get?view=graph-rest-beta Find more info here
* @link https://learn.microsoft.com/graph/api/windowsupdates-operationalinsightsconnection-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 an operationalInsightsConnection object.
* Delete a resourceConnection 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 a resourceConnection object.
* Read the properties and relationships of an operationalInsightsConnection 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 a resourceConnection object.
* Read the properties and relationships of an operationalInsightsConnection object.
*/
class ResourceConnectionItemRequestBuilderGetQueryParameters
{
Expand Down
Loading