-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(generation): update request builders and models
Update generated files with build 175190
- Loading branch information
Microsoft Graph DevX Tooling
authored and
Microsoft Graph DevX Tooling
committed
Dec 31, 2024
1 parent
340d420
commit 43a031f
Showing
136 changed files
with
4,137 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
src/Generated/Chats/Item/Members/Remove/RemovePostRequestBody.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
<?php | ||
|
||
namespace Microsoft\Graph\Generated\Chats\Item\Members\Remove; | ||
|
||
use Microsoft\Graph\Generated\Models\ConversationMember; | ||
use Microsoft\Kiota\Abstractions\Serialization\AdditionalDataHolder; | ||
use Microsoft\Kiota\Abstractions\Serialization\Parsable; | ||
use Microsoft\Kiota\Abstractions\Serialization\ParseNode; | ||
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter; | ||
use Microsoft\Kiota\Abstractions\Store\BackedModel; | ||
use Microsoft\Kiota\Abstractions\Store\BackingStore; | ||
use Microsoft\Kiota\Abstractions\Store\BackingStoreFactorySingleton; | ||
use Microsoft\Kiota\Abstractions\Types\TypeUtils; | ||
|
||
class RemovePostRequestBody implements AdditionalDataHolder, BackedModel, Parsable | ||
{ | ||
/** | ||
* @var BackingStore $backingStore Stores model information. | ||
*/ | ||
private BackingStore $backingStore; | ||
|
||
/** | ||
* Instantiates a new RemovePostRequestBody and sets the default values. | ||
*/ | ||
public function __construct() { | ||
$this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore(); | ||
$this->setAdditionalData([]); | ||
} | ||
|
||
/** | ||
* Creates a new instance of the appropriate class based on discriminator value | ||
* @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object | ||
* @return RemovePostRequestBody | ||
*/ | ||
public static function createFromDiscriminatorValue(ParseNode $parseNode): RemovePostRequestBody { | ||
return new RemovePostRequestBody(); | ||
} | ||
|
||
/** | ||
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. | ||
* @return array<string, mixed>|null | ||
*/ | ||
public function getAdditionalData(): ?array { | ||
$val = $this->getBackingStore()->get('additionalData'); | ||
if (is_null($val) || is_array($val)) { | ||
/** @var array<string, mixed>|null $val */ | ||
return $val; | ||
} | ||
throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'"); | ||
} | ||
|
||
/** | ||
* Gets the BackingStore property value. Stores model information. | ||
* @return BackingStore | ||
*/ | ||
public function getBackingStore(): BackingStore { | ||
return $this->backingStore; | ||
} | ||
|
||
/** | ||
* The deserialization information for the current model | ||
* @return array<string, callable(ParseNode): void> | ||
*/ | ||
public function getFieldDeserializers(): array { | ||
$o = $this; | ||
return [ | ||
'values' => fn(ParseNode $n) => $o->setValues($n->getCollectionOfObjectValues([ConversationMember::class, 'createFromDiscriminatorValue'])), | ||
]; | ||
} | ||
|
||
/** | ||
* Gets the values property value. The values property | ||
* @return array<ConversationMember>|null | ||
*/ | ||
public function getValues(): ?array { | ||
$val = $this->getBackingStore()->get('values'); | ||
if (is_array($val) || is_null($val)) { | ||
TypeUtils::validateCollectionValues($val, ConversationMember::class); | ||
/** @var array<ConversationMember>|null $val */ | ||
return $val; | ||
} | ||
throw new \UnexpectedValueException("Invalid type found in backing store for 'values'"); | ||
} | ||
|
||
/** | ||
* Serializes information the current object | ||
* @param SerializationWriter $writer Serialization writer to use to serialize this model | ||
*/ | ||
public function serialize(SerializationWriter $writer): void { | ||
$writer->writeCollectionOfObjectValues('values', $this->getValues()); | ||
$writer->writeAdditionalData($this->getAdditionalData()); | ||
} | ||
|
||
/** | ||
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. | ||
* @param array<string,mixed> $value Value to set for the AdditionalData property. | ||
*/ | ||
public function setAdditionalData(?array $value): void { | ||
$this->getBackingStore()->set('additionalData', $value); | ||
} | ||
|
||
/** | ||
* Sets the BackingStore property value. Stores model information. | ||
* @param BackingStore $value Value to set for the BackingStore property. | ||
*/ | ||
public function setBackingStore(BackingStore $value): void { | ||
$this->backingStore = $value; | ||
} | ||
|
||
/** | ||
* Sets the values property value. The values property | ||
* @param array<ConversationMember>|null $value Value to set for the values property. | ||
*/ | ||
public function setValues(?array $value): void { | ||
$this->getBackingStore()->set('values', $value); | ||
} | ||
|
||
} |
72 changes: 72 additions & 0 deletions
72
src/Generated/Chats/Item/Members/Remove/RemovePostResponse.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?php | ||
|
||
namespace Microsoft\Graph\Generated\Chats\Item\Members\Remove; | ||
|
||
use Microsoft\Graph\Generated\Models\ActionResultPart; | ||
use Microsoft\Graph\Generated\Models\BaseCollectionPaginationCountResponse; | ||
use Microsoft\Kiota\Abstractions\Serialization\Parsable; | ||
use Microsoft\Kiota\Abstractions\Serialization\ParseNode; | ||
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter; | ||
use Microsoft\Kiota\Abstractions\Types\TypeUtils; | ||
|
||
class RemovePostResponse extends BaseCollectionPaginationCountResponse implements Parsable | ||
{ | ||
/** | ||
* Instantiates a new RemovePostResponse and sets the default values. | ||
*/ | ||
public function __construct() { | ||
parent::__construct(); | ||
} | ||
|
||
/** | ||
* Creates a new instance of the appropriate class based on discriminator value | ||
* @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object | ||
* @return RemovePostResponse | ||
*/ | ||
public static function createFromDiscriminatorValue(ParseNode $parseNode): RemovePostResponse { | ||
return new RemovePostResponse(); | ||
} | ||
|
||
/** | ||
* The deserialization information for the current model | ||
* @return array<string, callable(ParseNode): void> | ||
*/ | ||
public function getFieldDeserializers(): array { | ||
$o = $this; | ||
return array_merge(parent::getFieldDeserializers(), [ | ||
'value' => fn(ParseNode $n) => $o->setValue($n->getCollectionOfObjectValues([ActionResultPart::class, 'createFromDiscriminatorValue'])), | ||
]); | ||
} | ||
|
||
/** | ||
* Gets the value property value. The value property | ||
* @return array<ActionResultPart>|null | ||
*/ | ||
public function getValue(): ?array { | ||
$val = $this->getBackingStore()->get('value'); | ||
if (is_array($val) || is_null($val)) { | ||
TypeUtils::validateCollectionValues($val, ActionResultPart::class); | ||
/** @var array<ActionResultPart>|null $val */ | ||
return $val; | ||
} | ||
throw new \UnexpectedValueException("Invalid type found in backing store for 'value'"); | ||
} | ||
|
||
/** | ||
* Serializes information the current object | ||
* @param SerializationWriter $writer Serialization writer to use to serialize this model | ||
*/ | ||
public function serialize(SerializationWriter $writer): void { | ||
parent::serialize($writer); | ||
$writer->writeCollectionOfObjectValues('value', $this->getValue()); | ||
} | ||
|
||
/** | ||
* Sets the value property value. The value property | ||
* @param array<ActionResultPart>|null $value Value to set for the value property. | ||
*/ | ||
public function setValue(?array $value): void { | ||
$this->getBackingStore()->set('value', $value); | ||
} | ||
|
||
} |
77 changes: 77 additions & 0 deletions
77
src/Generated/Chats/Item/Members/Remove/RemoveRequestBuilder.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?php | ||
|
||
namespace Microsoft\Graph\Generated\Chats\Item\Members\Remove; | ||
|
||
use Exception; | ||
use Http\Promise\Promise; | ||
use Microsoft\Graph\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 call the remove method. | ||
*/ | ||
class RemoveRequestBuilder extends BaseRequestBuilder | ||
{ | ||
/** | ||
* Instantiates a new RemoveRequestBuilder 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}/chats/{chat%2Did}/members/remove'); | ||
if (is_array($pathParametersOrRawUrl)) { | ||
$this->pathParameters = $pathParametersOrRawUrl; | ||
} else { | ||
$this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; | ||
} | ||
} | ||
|
||
/** | ||
* Remove multiple members from a team in a single request. The response provides details about which memberships could and couldn't be removed. | ||
* @param RemovePostRequestBody $body The request body | ||
* @param RemoveRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. | ||
* @return Promise<RemovePostResponse|null> | ||
* @throws Exception | ||
* @link https://learn.microsoft.com/graph/api/conversationmember-remove?view=graph-rest-1.0 Find more info here | ||
*/ | ||
public function post(RemovePostRequestBody $body, ?RemoveRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise { | ||
$requestInfo = $this->toPostRequestInformation($body, $requestConfiguration); | ||
$errorMappings = [ | ||
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], | ||
]; | ||
return $this->requestAdapter->sendAsync($requestInfo, [RemovePostResponse::class, 'createFromDiscriminatorValue'], $errorMappings); | ||
} | ||
|
||
/** | ||
* Remove multiple members from a team in a single request. The response provides details about which memberships could and couldn't be removed. | ||
* @param RemovePostRequestBody $body The request body | ||
* @param RemoveRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. | ||
* @return RequestInformation | ||
*/ | ||
public function toPostRequestInformation(RemovePostRequestBody $body, ?RemoveRequestBuilderPostRequestConfiguration $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 RemoveRequestBuilder | ||
*/ | ||
public function withUrl(string $rawUrl): RemoveRequestBuilder { | ||
return new RemoveRequestBuilder($rawUrl, $this->requestAdapter); | ||
} | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
src/Generated/Chats/Item/Members/Remove/RemoveRequestBuilderPostRequestConfiguration.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Microsoft\Graph\Generated\Chats\Item\Members\Remove; | ||
|
||
use Microsoft\Kiota\Abstractions\BaseRequestConfiguration; | ||
use Microsoft\Kiota\Abstractions\RequestOption; | ||
|
||
/** | ||
* Configuration for the request such as headers, query parameters, and middleware options. | ||
*/ | ||
class RemoveRequestBuilderPostRequestConfiguration extends BaseRequestConfiguration | ||
{ | ||
/** | ||
* Instantiates a new RemoveRequestBuilderPostRequestConfiguration 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 ?? []); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.