Skip to content

Commit bb61bcd

Browse files
authored
Merge pull request #81 from microsoftgraph/dev
2.0.0-RC6
2 parents 2624eac + c91d363 commit bb61bcd

File tree

9 files changed

+666
-4
lines changed

9 files changed

+666
-4
lines changed

.github/workflows/pr-validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
validate-pull-request:
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v3.1.0
22+
- uses: actions/checkout@v3.3.0
2323
with:
2424
submodules: 'true'
2525
- name: Setup PHP and Xdebug for Code Coverage report

.github/workflows/tag-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
create-tag:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v3.1.0
21+
- uses: actions/checkout@v3.3.0
2222

2323
- name: Get SDK version and set environment variable
2424
run: |

.github/workflows/update-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
run-php-documentor:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v3.1.0
18+
- uses: actions/checkout@v3.3.0
1919
with:
2020
ref: ${{ github.ref }}
2121

phpstan.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ parameters:
44
polluteScopeWithLoopInitialAssignments: false
55
paths:
66
- src
7-
- tests

phpunit.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
<include>
1111
<directory suffix=".php">src</directory>
1212
</include>
13+
<exclude>
14+
<directory suffix=".php">src/Models</directory>
15+
<directory suffix=".php">src/Errors</directory>
16+
</exclude>
1317
<report>
1418
<html outputDirectory="coverage"/>
1519
</report>
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Core\Models;
4+
5+
use Microsoft\Kiota\Abstractions\Serialization\AdditionalDataHolder;
6+
use Microsoft\Kiota\Abstractions\Serialization\Parsable;
7+
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter;
8+
use Microsoft\Kiota\Abstractions\Store\BackedModel;
9+
use Microsoft\Kiota\Abstractions\Store\BackingStore;
10+
use Microsoft\Kiota\Abstractions\Store\BackingStoreFactorySingleton;
11+
12+
class LargeFileUploadCreateSessionBody implements Parsable, AdditionalDataHolder, BackedModel
13+
{
14+
private BackingStore $backingStore;
15+
16+
17+
public function __construct() {
18+
$this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();
19+
$this->setAdditionalData([]);
20+
}
21+
22+
/**
23+
* @inheritDoc
24+
*/
25+
public function getAdditionalData(): ?array {
26+
return $this->backingStore->get('additionalData');
27+
}
28+
29+
/**
30+
* @inheritDoc
31+
*/
32+
public function setAdditionalData(array $value): void {
33+
$this->backingStore->set('additionalData', $value);
34+
}
35+
36+
/**
37+
* @inheritDoc
38+
*/
39+
public function getFieldDeserializers(): array {
40+
return [];
41+
}
42+
43+
/**
44+
* @inheritDoc
45+
*/
46+
public function serialize(SerializationWriter $writer): void {
47+
$writer->writeAdditionalData($this->getAdditionalData());
48+
}
49+
50+
/**
51+
* @inheritDoc
52+
*/
53+
public function getBackingStore(): ?BackingStore {
54+
return $this->backingStore;
55+
}
56+
}

src/Models/LargeFileUploadSession.php

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
<?php
2+
namespace Microsoft\Graph\Core\Models;
3+
4+
use DateTime;
5+
use Microsoft\Kiota\Abstractions\Serialization\AdditionalDataHolder;
6+
use Microsoft\Kiota\Abstractions\Serialization\Parsable;
7+
use Microsoft\Kiota\Abstractions\Serialization\ParseNode;
8+
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter;
9+
10+
class LargeFileUploadSession implements Parsable, AdditionalDataHolder
11+
{
12+
private ?string $uploadUrl = null;
13+
private ?DateTime $expirationDateTime = null;
14+
private array $additionalData = [];
15+
private bool $isCancelled = false;
16+
private array $nextExpectedRanges = [];
17+
18+
/**
19+
* @param DateTime|null $expirationDateTime
20+
*/
21+
public function setExpirationDateTime(?DateTime $expirationDateTime): void {
22+
$this->expirationDateTime = $expirationDateTime;
23+
}
24+
25+
/**
26+
* @param string $uploadUrl
27+
*/
28+
public function setUploadUrl(string $uploadUrl): void {
29+
$this->uploadUrl = $uploadUrl;
30+
}
31+
32+
/**
33+
* @param array $nextExpectedRanges
34+
*/
35+
public function setNextExpectedRanges(array $nextExpectedRanges): void {
36+
$this->nextExpectedRanges = $nextExpectedRanges;
37+
}
38+
39+
/**
40+
* @return array
41+
*/
42+
public function getNextExpectedRanges(): array {
43+
return $this->nextExpectedRanges;
44+
}
45+
46+
/**
47+
* @return DateTime|null
48+
*/
49+
public function getExpirationDateTime(): ?DateTime{
50+
return $this->expirationDateTime;
51+
}
52+
53+
/**
54+
* @return string|null
55+
*/
56+
public function getUploadUrl(): ?string
57+
{
58+
return $this->uploadUrl;
59+
}
60+
61+
/**
62+
* @param bool $isCancelled
63+
*/
64+
public function setIsCancelled(bool $isCancelled): void {
65+
$this->isCancelled = $isCancelled;
66+
}
67+
68+
public function getAdditionalData(): array {
69+
return $this->additionalData;
70+
}
71+
72+
/**
73+
* @param array $value
74+
*/
75+
public function setAdditionalData(array $value): void {
76+
$this->additionalData = $value;
77+
}
78+
79+
/**
80+
* @param ParseNode $parseNode
81+
* @return LargeFileUploadSession
82+
*/
83+
public static function createFromDiscriminatorValue(ParseNode $parseNode): LargeFileUploadSession {
84+
return new LargeFileUploadSession();
85+
}
86+
87+
/**
88+
* @return bool
89+
*/
90+
public function getIsCancelled(): bool {
91+
return $this->isCancelled;
92+
}
93+
94+
95+
public function serialize(SerializationWriter $writer): void {
96+
$writer->writeStringValue('uploadUrl', $this->uploadUrl);
97+
$writer->writeDateTimeValue('expirationDateTime', $this->expirationDateTime);
98+
$writer->writeBooleanValue('isCancelled', $this->isCancelled);
99+
$writer->writeCollectionOfPrimitiveValues('nextExpectedRanges', $this->nextExpectedRanges);
100+
$writer->writeAdditionalData($this->additionalData);
101+
}
102+
103+
public function getFieldDeserializers(): array {
104+
return [
105+
'uploadUrl' => fn (ParseNode $parseNode) => $this->setUploadUrl($parseNode->getStringValue()),
106+
'expirationDateTime' => fn (ParseNode $parseNode) => $this->setExpirationDateTime($parseNode->getDateTimeValue()),
107+
'isCancelled' => fn (ParseNode $parseNode) => $this->setIsCancelled($parseNode->getBooleanValue()),
108+
'nextExpectedRanges' => fn (ParseNode $parseNode) => $this->setNextExpectedRanges($parseNode->getCollectionOfPrimitiveValues('string'))];
109+
}
110+
}

0 commit comments

Comments
 (0)