Skip to content

Commit

Permalink
Add is early access and early access end date properties
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianVennen committed Sep 6, 2023
1 parent 7ea8ce7 commit 27aeb9d
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 0 deletions.
82 changes: 82 additions & 0 deletions lib/Model/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ class File implements ModelInterface, ArrayAccess, \JsonSerializable
'alternate_file_id' => 'int',
'is_server_pack' => 'bool',
'server_pack_file_id' => 'int',
'is_early_access_content' => 'bool',
'early_access_end_date' => '\DateTime',
'file_fingerprint' => 'int',
'modules' => '\Aternos\CurseForgeApi\Model\FileModule[]'
];
Expand Down Expand Up @@ -111,6 +113,8 @@ class File implements ModelInterface, ArrayAccess, \JsonSerializable
'alternate_file_id' => 'int32',
'is_server_pack' => null,
'server_pack_file_id' => 'int32',
'is_early_access_content' => null,
'early_access_end_date' => 'date-time',
'file_fingerprint' => 'int64',
'modules' => null
];
Expand Down Expand Up @@ -142,6 +146,8 @@ class File implements ModelInterface, ArrayAccess, \JsonSerializable
'alternate_file_id' => true,
'is_server_pack' => true,
'server_pack_file_id' => true,
'is_early_access_content' => true,
'early_access_end_date' => true,
'file_fingerprint' => false,
'modules' => false
];
Expand Down Expand Up @@ -253,6 +259,8 @@ public function isNullableSetToNull(string $property): bool
'alternate_file_id' => 'alternateFileId',
'is_server_pack' => 'isServerPack',
'server_pack_file_id' => 'serverPackFileId',
'is_early_access_content' => 'isEarlyAccessContent',
'early_access_end_date' => 'earlyAccessEndDate',
'file_fingerprint' => 'fileFingerprint',
'modules' => 'modules'
];
Expand Down Expand Up @@ -284,6 +292,8 @@ public function isNullableSetToNull(string $property): bool
'alternate_file_id' => 'setAlternateFileId',
'is_server_pack' => 'setIsServerPack',
'server_pack_file_id' => 'setServerPackFileId',
'is_early_access_content' => 'setIsEarlyAccessContent',
'early_access_end_date' => 'setEarlyAccessEndDate',
'file_fingerprint' => 'setFileFingerprint',
'modules' => 'setModules'
];
Expand Down Expand Up @@ -315,6 +325,8 @@ public function isNullableSetToNull(string $property): bool
'alternate_file_id' => 'getAlternateFileId',
'is_server_pack' => 'getIsServerPack',
'server_pack_file_id' => 'getServerPackFileId',
'is_early_access_content' => 'getIsEarlyAccessContent',
'early_access_end_date' => 'getEarlyAccessEndDate',
'file_fingerprint' => 'getFileFingerprint',
'modules' => 'getModules'
];
Expand Down Expand Up @@ -397,6 +409,8 @@ public function __construct(array $data = null)
$this->setIfExists('alternate_file_id', $data ?? [], null);
$this->setIfExists('is_server_pack', $data ?? [], null);
$this->setIfExists('server_pack_file_id', $data ?? [], null);
$this->setIfExists('is_early_access_content', $data ?? [], null);
$this->setIfExists('early_access_end_date', $data ?? [], null);
$this->setIfExists('file_fingerprint', $data ?? [], null);
$this->setIfExists('modules', $data ?? [], null);
}
Expand Down Expand Up @@ -1045,6 +1059,74 @@ public function setServerPackFileId($server_pack_file_id)
return $this;
}

/**
* Gets is_early_access_content
*
* @return bool|null
*/
public function getIsEarlyAccessContent()
{
return $this->container['is_early_access_content'];
}

/**
* Sets is_early_access_content
*
* @param bool|null $is_early_access_content is_early_access_content
*
* @return self
*/
public function setIsEarlyAccessContent($is_early_access_content)
{
if (is_null($is_early_access_content)) {
array_push($this->openAPINullablesSetToNull, 'is_early_access_content');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('is_early_access_content', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['is_early_access_content'] = $is_early_access_content;

return $this;
}

/**
* Gets early_access_end_date
*
* @return \DateTime|null
*/
public function getEarlyAccessEndDate()
{
return $this->container['early_access_end_date'];
}

/**
* Sets early_access_end_date
*
* @param \DateTime|null $early_access_end_date early_access_end_date
*
* @return self
*/
public function setEarlyAccessEndDate($early_access_end_date)
{
if (is_null($early_access_end_date)) {
array_push($this->openAPINullablesSetToNull, 'early_access_end_date');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('early_access_end_date', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['early_access_end_date'] = $early_access_end_date;

return $this;
}

/**
* Gets file_fingerprint
*
Expand Down
7 changes: 7 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,13 @@ components:
type: integer
format: int32
nullable: true
isEarlyAccessContent:
type: boolean
nullable: true
earlyAccessEndDate:
type: string
format: date-time
nullable: true
fileFingerprint:
type: integer
format: int64
Expand Down

0 comments on commit 27aeb9d

Please sign in to comment.