forge-dashboard-sdk-php

SettingsResponse implements ModelInterface, ArrayAccess, JsonSerializable

SettingsResponse Class Doc Comment

Tags
category

Class

description

The signed-in user's own GitHub/Forgejo configuration. Never includes a forge token's value — only whether one is currently saved, so the UI can show a "Configured" badge without the secret ever reaching the browser. webhookToken/webhookSecret are the exception: they're ours to hand back in the clear, since the user has to paste them into the forge's own webhook setup.

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
THEME_DARK  : mixed = 'dark'
THEME_EMPTY  : mixed = ''
THEME_LIGHT  : mixed = 'light'

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
getForgejoTokenSet()  : bool
Gets forgejo_token_set
getForgejoUrl()  : string
Gets forgejo_url
getForgejoUsername()  : string
Gets forgejo_username
getGithubAppConfigured()  : bool
Gets github_app_configured
getGithubAppInstallationId()  : int
Gets github_app_installation_id
getGithubTokenSet()  : bool
Gets github_token_set
getGithubUsername()  : string
Gets github_username
getModelName()  : string
The original name of the model.
getRenovateRebaseLabel()  : string
Gets renovate_rebase_label
getters()  : array<string|int, mixed>
Array of attributes to getter functions (for serialization of requests)
getTheme()  : string
Gets theme
getThemeAllowableValues()  : array<string|int, string>
Gets allowable values of the enum
getTimezone()  : string|null
Gets timezone
getWebhookSecret()  : string
Gets webhook_secret
getWebhookToken()  : string
Gets webhook_token
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
setForgejoTokenSet()  : self
Sets forgejo_token_set
setForgejoUrl()  : self
Sets forgejo_url
setForgejoUsername()  : self
Sets forgejo_username
setGithubAppConfigured()  : self
Sets github_app_configured
setGithubAppInstallationId()  : self
Sets github_app_installation_id
setGithubTokenSet()  : self
Sets github_token_set
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)
setTheme()  : self
Sets theme
setTimezone()  : self
Sets timezone
setWebhookSecret()  : self
Sets webhook_secret
setWebhookToken()  : self
Sets webhook_token
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_username' => 'githubUsername', 'github_token_set' => 'githubTokenSet', 'github_app_installation_id' => 'githubAppInstallationId', 'github_app_configured' => 'githubAppConfigured', 'forgejo_url' => 'forgejoUrl', 'forgejo_username' => 'forgejoUsername', 'forgejo_token_set' => 'forgejoTokenSet', 'webhook_token' => 'webhookToken', 'webhook_secret' => 'webhookSecret', 'renovate_rebase_label' => 'renovateRebaseLabel', 'theme' => 'theme', 'timezone' => 'timezone']

$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_username' => 'getGithubUsername', 'github_token_set' => 'getGithubTokenSet', 'github_app_installation_id' => 'getGithubAppInstallationId', 'github_app_configured' => 'getGithubAppConfigured', 'forgejo_url' => 'getForgejoUrl', 'forgejo_username' => 'getForgejoUsername', 'forgejo_token_set' => 'getForgejoTokenSet', 'webhook_token' => 'getWebhookToken', 'webhook_secret' => 'getWebhookSecret', 'renovate_rebase_label' => 'getRenovateRebaseLabel', 'theme' => 'getTheme', 'timezone' => 'getTimezone']

$openAPIFormats

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

protected static array<string|int, string> $openAPIFormats = ['github_username' => null, 'github_token_set' => null, 'github_app_installation_id' => 'int64', 'github_app_configured' => null, 'forgejo_url' => null, 'forgejo_username' => null, 'forgejo_token_set' => null, 'webhook_token' => null, 'webhook_secret' => null, 'renovate_rebase_label' => null, 'theme' => null, 'timezone' => 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 = 'SettingsResponse'

$openAPINullables

Array of nullable properties. Used for (de)serialization

protected static array<string|int, bool> $openAPINullables = ['github_username' => false, 'github_token_set' => false, 'github_app_installation_id' => false, 'github_app_configured' => false, 'forgejo_url' => false, 'forgejo_username' => false, 'forgejo_token_set' => false, 'webhook_token' => false, 'webhook_secret' => false, 'renovate_rebase_label' => false, 'theme' => false, 'timezone' => 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_username' => 'string', 'github_token_set' => 'bool', 'github_app_installation_id' => 'int', 'github_app_configured' => 'bool', 'forgejo_url' => 'string', 'forgejo_username' => 'string', 'forgejo_token_set' => 'bool', 'webhook_token' => 'string', 'webhook_secret' => 'string', 'renovate_rebase_label' => 'string', 'theme' => 'string', 'timezone' => 'string']

$setters

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

protected static array<string|int, string> $setters = ['github_username' => 'setGithubUsername', 'github_token_set' => 'setGithubTokenSet', 'github_app_installation_id' => 'setGithubAppInstallationId', 'github_app_configured' => 'setGithubAppConfigured', 'forgejo_url' => 'setForgejoUrl', 'forgejo_username' => 'setForgejoUsername', 'forgejo_token_set' => 'setForgejoTokenSet', 'webhook_token' => 'setWebhookToken', 'webhook_secret' => 'setWebhookSecret', 'renovate_rebase_label' => 'setRenovateRebaseLabel', 'theme' => 'setTheme', 'timezone' => 'setTimezone']

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>

getForgejoTokenSet()

Gets forgejo_token_set

public getForgejoTokenSet() : bool
Return values
bool

getForgejoUrl()

Gets forgejo_url

public getForgejoUrl() : string
Return values
string

getForgejoUsername()

Gets forgejo_username

public getForgejoUsername() : string
Return values
string

getGithubAppConfigured()

Gets github_app_configured

public getGithubAppConfigured() : bool
Return values
bool

getGithubAppInstallationId()

Gets github_app_installation_id

public getGithubAppInstallationId() : int
Return values
int

getGithubTokenSet()

Gets github_token_set

public getGithubTokenSet() : bool
Return values
bool

getGithubUsername()

Gets github_username

public getGithubUsername() : string
Return values
string

getModelName()

The original name of the model.

public getModelName() : string
Return values
string

getRenovateRebaseLabel()

Gets renovate_rebase_label

public getRenovateRebaseLabel() : string
Return values
string

getters()

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

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

getThemeAllowableValues()

Gets allowable values of the enum

public getThemeAllowableValues() : array<string|int, string>
Return values
array<string|int, string>

getTimezone()

Gets timezone

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

getWebhookSecret()

Gets webhook_secret

public getWebhookSecret() : string
Return values
string

getWebhookToken()

Gets webhook_token

public getWebhookToken() : string
Return values
string

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>

setForgejoTokenSet()

Sets forgejo_token_set

public setForgejoTokenSet(bool $forgejo_token_set) : self
Parameters
$forgejo_token_set : bool

Whether a Forgejo token is currently saved.

Return values
self

setForgejoUrl()

Sets forgejo_url

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

forgejo_url

Return values
self

setForgejoUsername()

Sets forgejo_username

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

Used as a token-free public-repos fallback when no Forgejo token is set.

Return values
self

setGithubAppConfigured()

Sets github_app_configured

public setGithubAppConfigured(bool $github_app_configured) : self
Parameters
$github_app_configured : bool

Whether this server has a GitHub App configured at all (server-wide GITHUB_APP_ID/GITHUB_APP_PRIVATE_KEY_BASE64 — not a per-user setting). The Settings page uses this to explain why githubAppInstallationId can't be saved when it's false.

Return values
self

setGithubAppInstallationId()

Sets github_app_installation_id

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

The installation ID of the alrayyes-automation GitHub App this user has connected, or 0 if none. Not a secret — it's an opaque integer GitHub already shows the user on its own installation settings page — so, unlike githubTokenSet, this round-trips as a plain value. Takes precedence over a saved githubToken whenever both are set and the server has an App configured (see githubAppConfigured).

Return values
self

setGithubTokenSet()

Sets github_token_set

public setGithubTokenSet(bool $github_token_set) : self
Parameters
$github_token_set : bool

Whether a GitHub token is currently saved.

Return values
self

setGithubUsername()

Sets github_username

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

Used as a token-free public-repos fallback when no GitHub token is set.

Return values
self

setRenovateRebaseLabel()

Sets renovate_rebase_label

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

The label Renovate's own rebase/retry trigger listens for on a repo (Renovate's own rebaseLabel config option — genuinely per-repo configurable, so this is a user-set override rather than a hardcoded constant). Empty means Renovate's own documented default, rebase.

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>

setTheme()

Sets theme

public setTheme(string $theme) : self
Parameters
$theme : string

The signed-in user's own theme preference. Empty means "system" — follow the browser's prefers-color-scheme rather than a saved choice. Set only from Settings; every other page reads it via the lightweight GET /api/settings/theme instead of this endpoint.

Return values
self

setTimezone()

Sets timezone

public setTimezone(string|null $timezone) : self
Parameters
$timezone : string|null

The signed-in user's own time zone as an IANA name such as Europe/Amsterdam. Empty means the browser's own zone. Set only from Settings (PUT /api/settings/timezone); every other page reads it via GET /api/settings/timezone.

Return values
self

setWebhookSecret()

Sets webhook_secret

public setWebhookSecret(string $webhook_secret) : self
Parameters
$webhook_secret : string

Pasted into the forge's own webhook "Secret" field, used to verify the signature header on incoming webhook deliveries (X-Hub-Signature-256 on GitHub, X-Forgejo-Signature on Forgejo). Never appears in the webhook URL itself.

Return values
self

setWebhookToken()

Sets webhook_token

public setWebhookToken(string $webhook_token) : self
Parameters
$webhook_token : string

Identifies this user in a webhook URL (/api/webhooks/{provider}/{webhookToken}). Generated on first visit to Settings and stable after that.

Return values
self

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