forge-dashboard-sdk-php

SettingsRequest implements ModelInterface, ArrayAccess, JsonSerializable

SettingsRequest Class Doc Comment

Tags
category

Class

description

Replaces the signed-in user's saved GitHub/Forgejo configuration. A blank `githubToken` or `forgejoToken` keeps whatever token is already saved for that forge rather than clearing it — this is the only way to update the username fields without having to resubmit a token you don't want to re-paste. githubAppInstallationId is different: a plain replace like githubUsername, not coalesced — 0 or omitted really does disconnect the App. Rejected (400) if the server has no GitHub App configured (see SettingsResponse.githubAppConfigured). Theme isn't settable here at all — see PUT /api/settings/theme.

author

OpenAPI Generator team

link
https://openapi-generator.tech
implements

Table of Contents

Interfaces

ModelInterface
Interface abstracting model access.
ArrayAccess
JsonSerializable

Constants

DISCRIMINATOR  : mixed = null

Properties

$attributeMap  : array<string|int, string>
Array of attributes where the key is the local name, and the value is the original name
$container  : array<string|int, mixed>
Associative array for storing property values
$getters  : array<string|int, string>
Array of attributes to getter functions (for serialization of requests)
$openAPIFormats  : array<string|int, string>
Array of property to format mappings. Used for (de)serialization
$openAPIModelName  : string
The original name of the model.
$openAPINullables  : array<string|int, bool>
Array of nullable properties. Used for (de)serialization
$openAPINullablesSetToNull  : array<string|int, bool>
If a nullable field gets set to null, insert it here
$openAPITypes  : array<string|int, string>
Array of property to type mappings. Used for (de)serialization
$setters  : array<string|int, string>
Array of attributes to setter functions (for deserialization of responses)

Methods

__construct()  : mixed
Constructor
__toString()  : string
Gets the string presentation of the object
attributeMap()  : array<string|int, mixed>
Array of attributes where the key is the local name, and the value is the original name
getForgejoToken()  : string|null
Gets forgejo_token
getForgejoUrl()  : string|null
Gets forgejo_url
getForgejoUsername()  : string|null
Gets forgejo_username
getGithubAppInstallationId()  : int|null
Gets github_app_installation_id
getGithubToken()  : string|null
Gets github_token
getGithubUsername()  : string|null
Gets github_username
getModelName()  : string
The original name of the model.
getRenovateRebaseLabel()  : string|null
Gets renovate_rebase_label
getters()  : array<string|int, mixed>
Array of attributes to getter functions (for serialization of requests)
isNullable()  : bool
Checks if a property is nullable
isNullableSetToNull()  : bool
Checks if a nullable property is set to null.
jsonSerialize()  : mixed
Serializes the object to a value that can be serialized natively by json_encode().
listInvalidProperties()  : array<string|int, mixed>
Show all the invalid properties with reasons.
offsetExists()  : bool
Returns true if offset exists. False otherwise.
offsetGet()  : mixed|null
Gets offset.
offsetSet()  : void
Sets value based on offset.
offsetUnset()  : void
Unsets offset.
openAPIFormats()  : array<string|int, mixed>
Array of property to format mappings. Used for (de)serialization
openAPITypes()  : array<string|int, mixed>
Array of property to type mappings. Used for (de)serialization
setForgejoToken()  : self
Sets forgejo_token
setForgejoUrl()  : self
Sets forgejo_url
setForgejoUsername()  : self
Sets forgejo_username
setGithubAppInstallationId()  : self
Sets github_app_installation_id
setGithubToken()  : self
Sets github_token
setGithubUsername()  : self
Sets github_username
setRenovateRebaseLabel()  : self
Sets renovate_rebase_label
setters()  : array<string|int, mixed>
Array of attributes to setter functions (for deserialization of responses)
toHeaderValue()  : string
Gets a header-safe presentation of the object
valid()  : bool
Validate all the properties in the model return true if all passed
openAPINullables()  : array<string|int, mixed>
Array of nullable properties
getOpenAPINullablesSetToNull()  : array<string|int, bool>
Array of nullable field names deliberately set to null
setIfExists()  : void
Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the $this->openAPINullablesSetToNull array
setOpenAPINullablesSetToNull()  : void
Setter - Array of nullable field names deliberately set to null

Constants

Properties

$attributeMap

Array of attributes where the key is the local name, and the value is the original name

protected static array<string|int, string> $attributeMap = ['github_token' => 'githubToken', 'github_username' => 'githubUsername', 'github_app_installation_id' => 'githubAppInstallationId', 'forgejo_url' => 'forgejoUrl', 'forgejo_token' => 'forgejoToken', 'forgejo_username' => 'forgejoUsername', 'renovate_rebase_label' => 'renovateRebaseLabel']

$container

Associative array for storing property values

protected array<string|int, mixed> $container = []

$getters

Array of attributes to getter functions (for serialization of requests)

protected static array<string|int, string> $getters = ['github_token' => 'getGithubToken', 'github_username' => 'getGithubUsername', 'github_app_installation_id' => 'getGithubAppInstallationId', 'forgejo_url' => 'getForgejoUrl', 'forgejo_token' => 'getForgejoToken', 'forgejo_username' => 'getForgejoUsername', 'renovate_rebase_label' => 'getRenovateRebaseLabel']

$openAPIFormats

Array of property to format mappings. Used for (de)serialization

protected static array<string|int, string> $openAPIFormats = ['github_token' => null, 'github_username' => null, 'github_app_installation_id' => 'int64', 'forgejo_url' => null, 'forgejo_token' => null, 'forgejo_username' => null, 'renovate_rebase_label' => null]
Tags
phpstan-var

array<string, string|null>

psalm-var

array<string, string|null>

$openAPIModelName

The original name of the model.

protected static string $openAPIModelName = 'SettingsRequest'

$openAPINullables

Array of nullable properties. Used for (de)serialization

protected static array<string|int, bool> $openAPINullables = ['github_token' => false, 'github_username' => false, 'github_app_installation_id' => false, 'forgejo_url' => false, 'forgejo_token' => false, 'forgejo_username' => false, 'renovate_rebase_label' => false]

$openAPINullablesSetToNull

If a nullable field gets set to null, insert it here

protected array<string|int, bool> $openAPINullablesSetToNull = []

$openAPITypes

Array of property to type mappings. Used for (de)serialization

protected static array<string|int, string> $openAPITypes = ['github_token' => 'string', 'github_username' => 'string', 'github_app_installation_id' => 'int', 'forgejo_url' => 'string', 'forgejo_token' => 'string', 'forgejo_username' => 'string', 'renovate_rebase_label' => 'string']

$setters

Array of attributes to setter functions (for deserialization of responses)

protected static array<string|int, string> $setters = ['github_token' => 'setGithubToken', 'github_username' => 'setGithubUsername', 'github_app_installation_id' => 'setGithubAppInstallationId', 'forgejo_url' => 'setForgejoUrl', 'forgejo_token' => 'setForgejoToken', 'forgejo_username' => 'setForgejoUsername', 'renovate_rebase_label' => 'setRenovateRebaseLabel']

Methods

__construct()

Constructor

public __construct([array<string|int, mixed>|null $data = null ]) : mixed
Parameters
$data : array<string|int, mixed>|null = null

Associated array of property values initializing the model

__toString()

Gets the string presentation of the object

public __toString() : string
Return values
string

attributeMap()

Array of attributes where the key is the local name, and the value is the original name

public static attributeMap() : array<string|int, mixed>
Return values
array<string|int, mixed>

getForgejoToken()

Gets forgejo_token

public getForgejoToken() : string|null
Return values
string|null

getForgejoUrl()

Gets forgejo_url

public getForgejoUrl() : string|null
Return values
string|null

getForgejoUsername()

Gets forgejo_username

public getForgejoUsername() : string|null
Return values
string|null

getGithubAppInstallationId()

Gets github_app_installation_id

public getGithubAppInstallationId() : int|null
Return values
int|null

getGithubToken()

Gets github_token

public getGithubToken() : string|null
Return values
string|null

getGithubUsername()

Gets github_username

public getGithubUsername() : string|null
Return values
string|null

getModelName()

The original name of the model.

public getModelName() : string
Return values
string

getRenovateRebaseLabel()

Gets renovate_rebase_label

public getRenovateRebaseLabel() : string|null
Return values
string|null

getters()

Array of attributes to getter functions (for serialization of requests)

public static getters() : array<string|int, mixed>
Return values
array<string|int, mixed>

isNullable()

Checks if a property is nullable

public static isNullable(string $property) : bool
Parameters
$property : string
Return values
bool

isNullableSetToNull()

Checks if a nullable property is set to null.

public isNullableSetToNull(string $property) : bool
Parameters
$property : string
Return values
bool

listInvalidProperties()

Show all the invalid properties with reasons.

public listInvalidProperties() : array<string|int, mixed>
Return values
array<string|int, mixed> —

invalid properties with reasons

offsetExists()

Returns true if offset exists. False otherwise.

public offsetExists(int|string $offset) : bool
Parameters
$offset : int|string

Offset

Return values
bool

offsetGet()

Gets offset.

public offsetGet(int|string $offset) : mixed|null
Parameters
$offset : int|string

Offset

Attributes
#[ReturnTypeWillChange]
Return values
mixed|null

offsetSet()

Sets value based on offset.

public offsetSet(int|null $offset, mixed $value) : void
Parameters
$offset : int|null

Offset

$value : mixed

Value to be set

offsetUnset()

Unsets offset.

public offsetUnset(int|string $offset) : void
Parameters
$offset : int|string

Offset

openAPIFormats()

Array of property to format mappings. Used for (de)serialization

public static openAPIFormats() : array<string|int, mixed>
Return values
array<string|int, mixed>

openAPITypes()

Array of property to type mappings. Used for (de)serialization

public static openAPITypes() : array<string|int, mixed>
Return values
array<string|int, mixed>

setForgejoToken()

Sets forgejo_token

public setForgejoToken(string|null $forgejo_token) : self
Parameters
$forgejo_token : string|null

forgejo_token

Return values
self

setForgejoUrl()

Sets forgejo_url

public setForgejoUrl(string|null $forgejo_url) : self
Parameters
$forgejo_url : string|null

Required, once the save is merged with what is already stored, whenever a Forgejo token or username is set. That depends on stored state, so a schema alone can't express it: a save that breaks it is a 400 naming forgejoUrl.

Return values
self

setForgejoUsername()

Sets forgejo_username

public setForgejoUsername(string|null $forgejo_username) : self
Parameters
$forgejo_username : string|null

forgejo_username

Return values
self

setGithubAppInstallationId()

Sets github_app_installation_id

public setGithubAppInstallationId(int|null $github_app_installation_id) : self
Parameters
$github_app_installation_id : int|null

0 means none. A negative or non-integer value is a 400 naming this field, as is any value on a server with no GitHub App configured.

Return values
self

setGithubToken()

Sets github_token

public setGithubToken(string|null $github_token) : self
Parameters
$github_token : string|null

github_token

Return values
self

setGithubUsername()

Sets github_username

public setGithubUsername(string|null $github_username) : self
Parameters
$github_username : string|null

github_username

Return values
self

setRenovateRebaseLabel()

Sets renovate_rebase_label

public setRenovateRebaseLabel(string|null $renovate_rebase_label) : self
Parameters
$renovate_rebase_label : string|null

renovate_rebase_label

Return values
self

setters()

Array of attributes to setter functions (for deserialization of responses)

public static setters() : array<string|int, mixed>
Return values
array<string|int, mixed>

toHeaderValue()

Gets a header-safe presentation of the object

public toHeaderValue() : string
Return values
string

valid()

Validate all the properties in the model return true if all passed

public valid() : bool
Return values
bool —

True if all properties are valid

openAPINullables()

Array of nullable properties

protected static openAPINullables() : array<string|int, mixed>
Return values
array<string|int, mixed>

getOpenAPINullablesSetToNull()

Array of nullable field names deliberately set to null

private getOpenAPINullablesSetToNull() : array<string|int, bool>
Return values
array<string|int, bool>

setIfExists()

Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the $this->openAPINullablesSetToNull array

private setIfExists(string $variableName, array<string|int, mixed> $fields, mixed $defaultValue) : void
Parameters
$variableName : string
$fields : array<string|int, mixed>
$defaultValue : mixed

setOpenAPINullablesSetToNull()

Setter - Array of nullable field names deliberately set to null

private setOpenAPINullablesSetToNull(array<string|int, bool> $openAPINullablesSetToNull) : void
Parameters
$openAPINullablesSetToNull : array<string|int, bool>
On this page

Search results