From 837ff79722ab53996b7d496b00bd78bac9446c51 Mon Sep 17 00:00:00 2001 From: ctran88 <10686030+ctran88@users.noreply.github.com> Date: Thu, 19 Dec 2024 18:38:14 +0000 Subject: [PATCH] chore: updates codegen to match latest API spec --- docs/Model/AppInfo.md | 49 - docs/Model/AppResponse.md | 9 - docs/Model/AuthMethods.md | 11 - docs/Model/ElementCustomization.md | 28 - docs/Model/FontFamily.md | 8 - docs/Model/LayoutConfig.md | 13 - docs/Model/Layouts.md | 10 - docs/Model/MagicLinkAuthMethod.md | 11 - docs/Model/OtpAuthMethod.md | 11 - docs/Model/PasskeysAuthMethod.md | 9 - docs/Model/Technologies.md | 8 - docs/Model/ThemeType.md | 8 - docs/Model/TtlDisplayUnit.md | 8 - docs/Model/UserMetadataField.md | 14 - docs/Model/UserMetadataFieldType.md | 8 - generated/.openapi-generator/FILES | 48 - generated/README.md | 23 +- generated/lib/Api/AppsApi.php | 561 ----- generated/lib/Api/MagicLinksApi.php | 8 +- generated/lib/Api/TokensApi.php | 8 +- generated/lib/Api/UserDevicesApi.php | 8 +- generated/lib/Api/UsersApi.php | 118 +- generated/lib/Configuration.php | 2 +- generated/lib/Model/AppInfo.php | 1921 ----------------- generated/lib/Model/AppResponse.php | 413 ---- .../lib/Model/AppleUserSocialConnection.php | 4 +- generated/lib/Model/AuthMethods.php | 488 ----- .../lib/Model/CreateMagicLinkRequest.php | 4 +- generated/lib/Model/CreateUserRequest.php | 4 +- generated/lib/Model/ElementCustomization.php | 1056 --------- generated/lib/Model/FontFamily.php | 118 - .../lib/Model/GithubUserSocialConnection.php | 4 +- .../lib/Model/GoogleUserSocialConnection.php | 4 +- generated/lib/Model/LayoutConfig.php | 561 ----- generated/lib/Model/Layouts.php | 450 ---- generated/lib/Model/Link.php | 4 +- generated/lib/Model/ListDevicesResponse.php | 4 +- .../lib/Model/ListPaginatedUsersItem.php | 4 +- .../lib/Model/ListPaginatedUsersResponse.php | 4 +- generated/lib/Model/MagicLink.php | 4 +- generated/lib/Model/MagicLinkAuthMethod.php | 498 ----- generated/lib/Model/MagicLinkResponse.php | 4 +- generated/lib/Model/Model400Error.php | 4 +- generated/lib/Model/Model401Error.php | 4 +- generated/lib/Model/Model403Error.php | 4 +- generated/lib/Model/Model404Error.php | 4 +- generated/lib/Model/Model500Error.php | 4 +- generated/lib/Model/Nonce.php | 4 +- generated/lib/Model/OtpAuthMethod.php | 498 ----- generated/lib/Model/PaginatedLinks.php | 4 +- generated/lib/Model/PasskeysAuthMethod.php | 413 ---- generated/lib/Model/Technologies.php | 81 - generated/lib/Model/ThemeType.php | 66 - generated/lib/Model/TtlDisplayUnit.php | 70 - generated/lib/Model/UpdateUserRequest.php | 4 +- generated/lib/Model/UserInfo.php | 4 +- generated/lib/Model/UserMetadataField.php | 598 ----- generated/lib/Model/UserMetadataFieldType.php | 75 - generated/lib/Model/UserRecentEvent.php | 4 +- generated/lib/Model/UserResponse.php | 4 +- generated/lib/Model/UserSocialConnections.php | 4 +- generated/lib/Model/WebAuthnDevices.php | 4 +- generated/lib/Model/WebAuthnIcons.php | 4 +- generated/lib/ObjectSerializer.php | 6 +- generated/test/Api/AppsApiTest.php | 86 - generated/test/Model/AppInfoTest.php | 451 ---- generated/test/Model/AppResponseTest.php | 91 - generated/test/Model/AuthMethodsTest.php | 109 - .../test/Model/ElementCustomizationTest.php | 262 --- generated/test/Model/FontFamilyTest.php | 82 - generated/test/Model/LayoutConfigTest.php | 127 -- generated/test/Model/LayoutsTest.php | 100 - .../test/Model/MagicLinkAuthMethodTest.php | 109 - generated/test/Model/OtpAuthMethodTest.php | 109 - .../test/Model/PasskeysAuthMethodTest.php | 91 - generated/test/Model/TechnologiesTest.php | 82 - generated/test/Model/ThemeTypeTest.php | 82 - generated/test/Model/TtlDisplayUnitTest.php | 82 - .../test/Model/UserMetadataFieldTest.php | 136 -- .../test/Model/UserMetadataFieldTypeTest.php | 82 - 80 files changed, 129 insertions(+), 10345 deletions(-) delete mode 100644 docs/Model/AppInfo.md delete mode 100644 docs/Model/AppResponse.md delete mode 100644 docs/Model/AuthMethods.md delete mode 100644 docs/Model/ElementCustomization.md delete mode 100644 docs/Model/FontFamily.md delete mode 100644 docs/Model/LayoutConfig.md delete mode 100644 docs/Model/Layouts.md delete mode 100644 docs/Model/MagicLinkAuthMethod.md delete mode 100644 docs/Model/OtpAuthMethod.md delete mode 100644 docs/Model/PasskeysAuthMethod.md delete mode 100644 docs/Model/Technologies.md delete mode 100644 docs/Model/ThemeType.md delete mode 100644 docs/Model/TtlDisplayUnit.md delete mode 100644 docs/Model/UserMetadataField.md delete mode 100644 docs/Model/UserMetadataFieldType.md delete mode 100644 generated/lib/Api/AppsApi.php delete mode 100644 generated/lib/Model/AppInfo.php delete mode 100644 generated/lib/Model/AppResponse.php delete mode 100644 generated/lib/Model/AuthMethods.php delete mode 100644 generated/lib/Model/ElementCustomization.php delete mode 100644 generated/lib/Model/FontFamily.php delete mode 100644 generated/lib/Model/LayoutConfig.php delete mode 100644 generated/lib/Model/Layouts.php delete mode 100644 generated/lib/Model/MagicLinkAuthMethod.php delete mode 100644 generated/lib/Model/OtpAuthMethod.php delete mode 100644 generated/lib/Model/PasskeysAuthMethod.php delete mode 100644 generated/lib/Model/Technologies.php delete mode 100644 generated/lib/Model/ThemeType.php delete mode 100644 generated/lib/Model/TtlDisplayUnit.php delete mode 100644 generated/lib/Model/UserMetadataField.php delete mode 100644 generated/lib/Model/UserMetadataFieldType.php delete mode 100644 generated/test/Api/AppsApiTest.php delete mode 100644 generated/test/Model/AppInfoTest.php delete mode 100644 generated/test/Model/AppResponseTest.php delete mode 100644 generated/test/Model/AuthMethodsTest.php delete mode 100644 generated/test/Model/ElementCustomizationTest.php delete mode 100644 generated/test/Model/FontFamilyTest.php delete mode 100644 generated/test/Model/LayoutConfigTest.php delete mode 100644 generated/test/Model/LayoutsTest.php delete mode 100644 generated/test/Model/MagicLinkAuthMethodTest.php delete mode 100644 generated/test/Model/OtpAuthMethodTest.php delete mode 100644 generated/test/Model/PasskeysAuthMethodTest.php delete mode 100644 generated/test/Model/TechnologiesTest.php delete mode 100644 generated/test/Model/ThemeTypeTest.php delete mode 100644 generated/test/Model/TtlDisplayUnitTest.php delete mode 100644 generated/test/Model/UserMetadataFieldTest.php delete mode 100644 generated/test/Model/UserMetadataFieldTypeTest.php diff --git a/docs/Model/AppInfo.md b/docs/Model/AppInfo.md deleted file mode 100644 index de7ae44..0000000 --- a/docs/Model/AppInfo.md +++ /dev/null @@ -1,49 +0,0 @@ -# # AppInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**additional_auth_origins** | **string[]** | | -**allowed_callback_urls** | **string[]** | The valid URLs where users can be redirected after authentication. | -**allowed_identifier** | **string** | | -**allowed_logout_urls** | **string[]** | The valid URLs where users can be redirected after logging out. | -**application_login_uri** | **string** | A route within your application that redirects to the Authorization URL endpoint. | -**auth_fallback_method** | **string** | Deprecated Property. Please refer to `auth_methods` to view settings for individual authentication methods. | -**auth_fallback_method_ttl** | **int** | Deprecated Property. Please refer to `auth_methods` to view settings for individual authentication methods. | -**auth_methods** | [**\OpenAPI\Client\Model\AuthMethods**](AuthMethods.md) | | -**auth_origin** | **string** | | -**auto_theme_enabled** | **bool** | Deprecated Property. Please use `hosted_theme` to set hosted page theming instead. | -**created_at** | **\DateTime** | | -**default_language** | **string** | | -**id** | **string** | | -**layouts** | [**\OpenAPI\Client\Model\Layouts**](Layouts.md) | | -**login_url** | **string** | | -**light_logo_url** | **string** | | [optional] -**dark_logo_url** | **string** | | [optional] -**name** | **string** | | -**hosted** | **bool** | whether or not the app's login page is hosted by Passage | -**hosted_subdomain** | **string** | the subdomain of the app's hosted login page | -**hosted_theme** | [**\OpenAPI\Client\Model\ThemeType**](ThemeType.md) | | -**id_token_lifetime** | **int** | | [optional] -**passage_branding** | **bool** | | -**profile_management** | **bool** | | -**public_signup** | **bool** | | -**redirect_url** | **string** | | -**refresh_absolute_lifetime** | **int** | | -**refresh_enabled** | **bool** | | -**refresh_inactivity_lifetime** | **int** | | -**require_email_verification** | **bool** | | -**require_identifier_verification** | **bool** | | -**required_identifier** | **string** | | -**role** | **string** | | -**rsa_public_key** | **string** | | -**secret** | **string** | can only be retrieved by an app admin | [optional] -**session_timeout_length** | **int** | | -**type** | **string** | | -**user_metadata_schema** | [**\OpenAPI\Client\Model\UserMetadataField[]**](UserMetadataField.md) | | -**technologies** | [**\OpenAPI\Client\Model\Technologies[]**](Technologies.md) | | -**element_customization** | [**\OpenAPI\Client\Model\ElementCustomization**](ElementCustomization.md) | | -**element_customization_dark** | [**\OpenAPI\Client\Model\ElementCustomization**](ElementCustomization.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AppResponse.md b/docs/Model/AppResponse.md deleted file mode 100644 index 268b7e9..0000000 --- a/docs/Model/AppResponse.md +++ /dev/null @@ -1,9 +0,0 @@ -# # AppResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app** | [**\OpenAPI\Client\Model\AppInfo**](AppInfo.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AuthMethods.md b/docs/Model/AuthMethods.md deleted file mode 100644 index 5f7b85b..0000000 --- a/docs/Model/AuthMethods.md +++ /dev/null @@ -1,11 +0,0 @@ -# # AuthMethods - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**passkeys** | [**\OpenAPI\Client\Model\PasskeysAuthMethod**](PasskeysAuthMethod.md) | | -**otp** | [**\OpenAPI\Client\Model\OtpAuthMethod**](OtpAuthMethod.md) | | -**magic_link** | [**\OpenAPI\Client\Model\MagicLinkAuthMethod**](MagicLinkAuthMethod.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ElementCustomization.md b/docs/Model/ElementCustomization.md deleted file mode 100644 index 26ffc75..0000000 --- a/docs/Model/ElementCustomization.md +++ /dev/null @@ -1,28 +0,0 @@ -# # ElementCustomization - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**passage_container_background_color** | **string** | Container background color in hex. Default is `#ffffff` in light mode & `#383838` in dark mode. | [optional] -**passage_container_max_width** | **int** | Maximum width of container (px) | [optional] [default to 300] -**passage_input_box_background_color** | **string** | Input box background color in hex. Default is `#ffffff` in light mode & `#4b4b4b` in dark mode. | [optional] -**passage_input_box_border_radius** | **int** | Input box border radius (px) | [optional] [default to 5] -**passage_header_font_family** | [**\OpenAPI\Client\Model\FontFamily**](FontFamily.md) | | [optional] -**passage_body_font_family** | [**\OpenAPI\Client\Model\FontFamily**](FontFamily.md) | | [optional] -**passage_header_text_color** | **string** | Header text color in hex. Default is `#222222` in light mode & `#f3f3f3` in dark mode. | [optional] -**passage_body_text_color** | **string** | Body text color in hex. Default is `#222222` in light mode & `#f3f3f3` in dark mode. | [optional] -**passage_primary_button_background_color** | **string** | Primary button background colour (hex) | [optional] [default to '#121212'] -**passage_primary_button_text_color** | **string** | Primary button font colour (hex) | [optional] [default to '#f3f3f3'] -**passage_primary_button_hover_color** | **string** | Primary button background on hover (hex) | [optional] [default to '#4d4d4d'] -**passage_primary_button_border_radius** | **int** | Primary button border radius (px) | [optional] [default to 5] -**passage_primary_button_border_color** | **string** | Primary button border color | [optional] [default to '#121212'] -**passage_primary_button_border_width** | **int** | Primary button border width (px) | [optional] [default to 0] -**passage_secondary_button_background_color** | **string** | Secondary button background colour (hex) | [optional] [default to '#ffffff'] -**passage_secondary_button_text_color** | **string** | Secondary button font colour (hex) | [optional] [default to '#222222'] -**passage_secondary_button_hover_color** | **string** | Secondary button background on hover (hex) | [optional] [default to '#d7d7d7'] -**passage_secondary_button_border_radius** | **int** | Secondary button border radius (px) | [optional] [default to 5] -**passage_secondary_button_border_color** | **string** | Secondary button border color | [optional] [default to '#d7d7d7'] -**passage_secondary_button_border_width** | **int** | Secondary button border width (px) | [optional] [default to 1] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FontFamily.md b/docs/Model/FontFamily.md deleted file mode 100644 index 01deba5..0000000 --- a/docs/Model/FontFamily.md +++ /dev/null @@ -1,8 +0,0 @@ -# # FontFamily - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LayoutConfig.md b/docs/Model/LayoutConfig.md deleted file mode 100644 index 3109af3..0000000 --- a/docs/Model/LayoutConfig.md +++ /dev/null @@ -1,13 +0,0 @@ -# # LayoutConfig - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**h** | **int** | | -**id** | **string** | | -**w** | **int** | | -**x** | **int** | | -**y** | **int** | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Layouts.md b/docs/Model/Layouts.md deleted file mode 100644 index 9717790..0000000 --- a/docs/Model/Layouts.md +++ /dev/null @@ -1,10 +0,0 @@ -# # Layouts - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**profile** | [**\OpenAPI\Client\Model\LayoutConfig[]**](LayoutConfig.md) | | -**registration** | [**\OpenAPI\Client\Model\LayoutConfig[]**](LayoutConfig.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MagicLinkAuthMethod.md b/docs/Model/MagicLinkAuthMethod.md deleted file mode 100644 index 569523b..0000000 --- a/docs/Model/MagicLinkAuthMethod.md +++ /dev/null @@ -1,11 +0,0 @@ -# # MagicLinkAuthMethod - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enabled** | **bool** | | -**ttl** | **int** | Maximum time (IN SECONDS) for the auth to expire. | [default to 300] -**ttl_display_unit** | [**\OpenAPI\Client\Model\TtlDisplayUnit**](TtlDisplayUnit.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OtpAuthMethod.md b/docs/Model/OtpAuthMethod.md deleted file mode 100644 index 6d8d173..0000000 --- a/docs/Model/OtpAuthMethod.md +++ /dev/null @@ -1,11 +0,0 @@ -# # OtpAuthMethod - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enabled** | **bool** | | -**ttl** | **int** | Maximum time (IN SECONDS) for the auth to expire. | [default to 300] -**ttl_display_unit** | [**\OpenAPI\Client\Model\TtlDisplayUnit**](TtlDisplayUnit.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PasskeysAuthMethod.md b/docs/Model/PasskeysAuthMethod.md deleted file mode 100644 index e553096..0000000 --- a/docs/Model/PasskeysAuthMethod.md +++ /dev/null @@ -1,9 +0,0 @@ -# # PasskeysAuthMethod - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enabled** | **bool** | | [default to true] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Technologies.md b/docs/Model/Technologies.md deleted file mode 100644 index 72501ee..0000000 --- a/docs/Model/Technologies.md +++ /dev/null @@ -1,8 +0,0 @@ -# # Technologies - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ThemeType.md b/docs/Model/ThemeType.md deleted file mode 100644 index 737a588..0000000 --- a/docs/Model/ThemeType.md +++ /dev/null @@ -1,8 +0,0 @@ -# # ThemeType - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TtlDisplayUnit.md b/docs/Model/TtlDisplayUnit.md deleted file mode 100644 index 328d0c3..0000000 --- a/docs/Model/TtlDisplayUnit.md +++ /dev/null @@ -1,8 +0,0 @@ -# # TtlDisplayUnit - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UserMetadataField.md b/docs/Model/UserMetadataField.md deleted file mode 100644 index d908850..0000000 --- a/docs/Model/UserMetadataField.md +++ /dev/null @@ -1,14 +0,0 @@ -# # UserMetadataField - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**field_name** | **string** | | -**friendly_name** | **string** | | -**id** | **string** | | -**profile** | **bool** | | -**registration** | **bool** | | -**type** | [**\OpenAPI\Client\Model\UserMetadataFieldType**](UserMetadataFieldType.md) | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UserMetadataFieldType.md b/docs/Model/UserMetadataFieldType.md deleted file mode 100644 index 3c2e297..0000000 --- a/docs/Model/UserMetadataFieldType.md +++ /dev/null @@ -1,8 +0,0 @@ -# # UserMetadataFieldType - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/generated/.openapi-generator/FILES b/generated/.openapi-generator/FILES index 77df141..4af981e 100644 --- a/generated/.openapi-generator/FILES +++ b/generated/.openapi-generator/FILES @@ -4,29 +4,20 @@ .travis.yml README.md composer.json -docs/Api/AppsApi.md docs/Api/MagicLinksApi.md docs/Api/TokensApi.md docs/Api/UserDevicesApi.md docs/Api/UsersApi.md -docs/Model/AppInfo.md -docs/Model/AppResponse.md docs/Model/AppleUserSocialConnection.md -docs/Model/AuthMethods.md docs/Model/CreateMagicLinkRequest.md docs/Model/CreateUserRequest.md -docs/Model/ElementCustomization.md -docs/Model/FontFamily.md docs/Model/GithubUserSocialConnection.md docs/Model/GoogleUserSocialConnection.md -docs/Model/LayoutConfig.md -docs/Model/Layouts.md docs/Model/Link.md docs/Model/ListDevicesResponse.md docs/Model/ListPaginatedUsersItem.md docs/Model/ListPaginatedUsersResponse.md docs/Model/MagicLink.md -docs/Model/MagicLinkAuthMethod.md docs/Model/MagicLinkChannel.md docs/Model/MagicLinkResponse.md docs/Model/MagicLinkType.md @@ -36,19 +27,12 @@ docs/Model/Model403Error.md docs/Model/Model404Error.md docs/Model/Model500Error.md docs/Model/Nonce.md -docs/Model/OtpAuthMethod.md docs/Model/PaginatedLinks.md -docs/Model/PasskeysAuthMethod.md docs/Model/SocialConnectionType.md -docs/Model/Technologies.md -docs/Model/ThemeType.md -docs/Model/TtlDisplayUnit.md docs/Model/UpdateUserRequest.md docs/Model/UserEventAction.md docs/Model/UserEventStatus.md docs/Model/UserInfo.md -docs/Model/UserMetadataField.md -docs/Model/UserMetadataFieldType.md docs/Model/UserRecentEvent.md docs/Model/UserResponse.md docs/Model/UserSocialConnections.md @@ -57,7 +41,6 @@ docs/Model/WebAuthnDevices.md docs/Model/WebAuthnIcons.md docs/Model/WebAuthnType.md git_push.sh -lib/Api/AppsApi.php lib/Api/MagicLinksApi.php lib/Api/TokensApi.php lib/Api/UserDevicesApi.php @@ -65,24 +48,16 @@ lib/Api/UsersApi.php lib/ApiException.php lib/Configuration.php lib/HeaderSelector.php -lib/Model/AppInfo.php -lib/Model/AppResponse.php lib/Model/AppleUserSocialConnection.php -lib/Model/AuthMethods.php lib/Model/CreateMagicLinkRequest.php lib/Model/CreateUserRequest.php -lib/Model/ElementCustomization.php -lib/Model/FontFamily.php lib/Model/GithubUserSocialConnection.php lib/Model/GoogleUserSocialConnection.php -lib/Model/LayoutConfig.php -lib/Model/Layouts.php lib/Model/Link.php lib/Model/ListDevicesResponse.php lib/Model/ListPaginatedUsersItem.php lib/Model/ListPaginatedUsersResponse.php lib/Model/MagicLink.php -lib/Model/MagicLinkAuthMethod.php lib/Model/MagicLinkChannel.php lib/Model/MagicLinkResponse.php lib/Model/MagicLinkType.php @@ -93,19 +68,12 @@ lib/Model/Model404Error.php lib/Model/Model500Error.php lib/Model/ModelInterface.php lib/Model/Nonce.php -lib/Model/OtpAuthMethod.php lib/Model/PaginatedLinks.php -lib/Model/PasskeysAuthMethod.php lib/Model/SocialConnectionType.php -lib/Model/Technologies.php -lib/Model/ThemeType.php -lib/Model/TtlDisplayUnit.php lib/Model/UpdateUserRequest.php lib/Model/UserEventAction.php lib/Model/UserEventStatus.php lib/Model/UserInfo.php -lib/Model/UserMetadataField.php -lib/Model/UserMetadataFieldType.php lib/Model/UserRecentEvent.php lib/Model/UserResponse.php lib/Model/UserSocialConnections.php @@ -115,28 +83,19 @@ lib/Model/WebAuthnIcons.php lib/Model/WebAuthnType.php lib/ObjectSerializer.php phpunit.xml.dist -test/Api/AppsApiTest.php test/Api/MagicLinksApiTest.php test/Api/TokensApiTest.php test/Api/UserDevicesApiTest.php test/Api/UsersApiTest.php -test/Model/AppInfoTest.php -test/Model/AppResponseTest.php test/Model/AppleUserSocialConnectionTest.php -test/Model/AuthMethodsTest.php test/Model/CreateMagicLinkRequestTest.php test/Model/CreateUserRequestTest.php -test/Model/ElementCustomizationTest.php -test/Model/FontFamilyTest.php test/Model/GithubUserSocialConnectionTest.php test/Model/GoogleUserSocialConnectionTest.php -test/Model/LayoutConfigTest.php -test/Model/LayoutsTest.php test/Model/LinkTest.php test/Model/ListDevicesResponseTest.php test/Model/ListPaginatedUsersItemTest.php test/Model/ListPaginatedUsersResponseTest.php -test/Model/MagicLinkAuthMethodTest.php test/Model/MagicLinkChannelTest.php test/Model/MagicLinkResponseTest.php test/Model/MagicLinkTest.php @@ -147,19 +106,12 @@ test/Model/Model403ErrorTest.php test/Model/Model404ErrorTest.php test/Model/Model500ErrorTest.php test/Model/NonceTest.php -test/Model/OtpAuthMethodTest.php test/Model/PaginatedLinksTest.php -test/Model/PasskeysAuthMethodTest.php test/Model/SocialConnectionTypeTest.php -test/Model/TechnologiesTest.php -test/Model/ThemeTypeTest.php -test/Model/TtlDisplayUnitTest.php test/Model/UpdateUserRequestTest.php test/Model/UserEventActionTest.php test/Model/UserEventStatusTest.php test/Model/UserInfoTest.php -test/Model/UserMetadataFieldTest.php -test/Model/UserMetadataFieldTypeTest.php test/Model/UserRecentEventTest.php test/Model/UserResponseTest.php test/Model/UserSocialConnectionsTest.php diff --git a/generated/README.md b/generated/README.md index e2276da..142d494 100644 --- a/generated/README.md +++ b/generated/README.md @@ -54,19 +54,20 @@ require_once(__DIR__ . '/vendor/autoload.php'); $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\AppsApi( +$apiInstance = new OpenAPI\Client\Api\MagicLinksApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $app_id = 'app_id_example'; // string | App ID +$create_magic_link_request = new \OpenAPI\Client\Model\CreateMagicLinkRequest(); // \OpenAPI\Client\Model\CreateMagicLinkRequest | Request to create a magic link try { - $result = $apiInstance->getApp($app_id); + $result = $apiInstance->createMagicLink($app_id, $create_magic_link_request); print_r($result); } catch (Exception $e) { - echo 'Exception when calling AppsApi->getApp: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling MagicLinksApi->createMagicLink: ', $e->getMessage(), PHP_EOL; } ``` @@ -77,7 +78,6 @@ All URIs are relative to *https://api.passage.id/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AppsApi* | [**getApp**](docs/Api/AppsApi.md#getapp) | **GET** /apps/{app_id} | Get App *MagicLinksApi* | [**createMagicLink**](docs/Api/MagicLinksApi.md#createmagiclink) | **POST** /apps/{app_id}/magic-links | Create Embeddable Magic Link *TokensApi* | [**revokeUserRefreshTokens**](docs/Api/TokensApi.md#revokeuserrefreshtokens) | **DELETE** /apps/{app_id}/users/{user_id}/tokens | Revokes refresh tokens *UserDevicesApi* | [**deleteUserDevices**](docs/Api/UserDevicesApi.md#deleteuserdevices) | **DELETE** /apps/{app_id}/users/{user_id}/devices/{device_id} | Delete a device for a user @@ -92,24 +92,16 @@ Class | Method | HTTP request | Description ## Models -- [AppInfo](docs/Model/AppInfo.md) -- [AppResponse](docs/Model/AppResponse.md) - [AppleUserSocialConnection](docs/Model/AppleUserSocialConnection.md) -- [AuthMethods](docs/Model/AuthMethods.md) - [CreateMagicLinkRequest](docs/Model/CreateMagicLinkRequest.md) - [CreateUserRequest](docs/Model/CreateUserRequest.md) -- [ElementCustomization](docs/Model/ElementCustomization.md) -- [FontFamily](docs/Model/FontFamily.md) - [GithubUserSocialConnection](docs/Model/GithubUserSocialConnection.md) - [GoogleUserSocialConnection](docs/Model/GoogleUserSocialConnection.md) -- [LayoutConfig](docs/Model/LayoutConfig.md) -- [Layouts](docs/Model/Layouts.md) - [Link](docs/Model/Link.md) - [ListDevicesResponse](docs/Model/ListDevicesResponse.md) - [ListPaginatedUsersItem](docs/Model/ListPaginatedUsersItem.md) - [ListPaginatedUsersResponse](docs/Model/ListPaginatedUsersResponse.md) - [MagicLink](docs/Model/MagicLink.md) -- [MagicLinkAuthMethod](docs/Model/MagicLinkAuthMethod.md) - [MagicLinkChannel](docs/Model/MagicLinkChannel.md) - [MagicLinkResponse](docs/Model/MagicLinkResponse.md) - [MagicLinkType](docs/Model/MagicLinkType.md) @@ -119,19 +111,12 @@ Class | Method | HTTP request | Description - [Model404Error](docs/Model/Model404Error.md) - [Model500Error](docs/Model/Model500Error.md) - [Nonce](docs/Model/Nonce.md) -- [OtpAuthMethod](docs/Model/OtpAuthMethod.md) - [PaginatedLinks](docs/Model/PaginatedLinks.md) -- [PasskeysAuthMethod](docs/Model/PasskeysAuthMethod.md) - [SocialConnectionType](docs/Model/SocialConnectionType.md) -- [Technologies](docs/Model/Technologies.md) -- [ThemeType](docs/Model/ThemeType.md) -- [TtlDisplayUnit](docs/Model/TtlDisplayUnit.md) - [UpdateUserRequest](docs/Model/UpdateUserRequest.md) - [UserEventAction](docs/Model/UserEventAction.md) - [UserEventStatus](docs/Model/UserEventStatus.md) - [UserInfo](docs/Model/UserInfo.md) -- [UserMetadataField](docs/Model/UserMetadataField.md) -- [UserMetadataFieldType](docs/Model/UserMetadataFieldType.md) - [UserRecentEvent](docs/Model/UserRecentEvent.md) - [UserResponse](docs/Model/UserResponse.md) - [UserSocialConnections](docs/Model/UserSocialConnections.md) diff --git a/generated/lib/Api/AppsApi.php b/generated/lib/Api/AppsApi.php deleted file mode 100644 index 0503cca..0000000 --- a/generated/lib/Api/AppsApi.php +++ /dev/null @@ -1,561 +0,0 @@ - [ - 'application/json', - ], - ]; - - /** - * @param ClientInterface $client - * @param Configuration $config - * @param HeaderSelector $selector - * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec - */ - public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 - ) { - $this->client = $client ?: new Client(); - $this->config = $config ?: Configuration::getDefaultConfiguration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - $this->hostIndex = $hostIndex; - } - - /** - * Set the host index - * - * @param int $hostIndex Host index (required) - */ - public function setHostIndex($hostIndex): void - { - $this->hostIndex = $hostIndex; - } - - /** - * Get the host index - * - * @return int Host index - */ - public function getHostIndex() - { - return $this->hostIndex; - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Operation getApp - * - * Get App - * - * @param string $app_id App ID (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getApp'] to see the possible values for this operation - * - * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format - * @throws \InvalidArgumentException - * @return \OpenAPI\Client\Model\AppResponse|\OpenAPI\Client\Model\Model401Error|\OpenAPI\Client\Model\Model404Error|\OpenAPI\Client\Model\Model500Error - */ - public function getApp($app_id, string $contentType = self::contentTypes['getApp'][0]) - { - list($response) = $this->getAppWithHttpInfo($app_id, $contentType); - return $response; - } - - /** - * Operation getAppWithHttpInfo - * - * Get App - * - * @param string $app_id App ID (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getApp'] to see the possible values for this operation - * - * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format - * @throws \InvalidArgumentException - * @return array of \OpenAPI\Client\Model\AppResponse|\OpenAPI\Client\Model\Model401Error|\OpenAPI\Client\Model\Model404Error|\OpenAPI\Client\Model\Model500Error, HTTP status code, HTTP response headers (array of strings) - */ - public function getAppWithHttpInfo($app_id, string $contentType = self::contentTypes['getApp'][0]) - { - $request = $this->getAppRequest($app_id, $contentType); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - - switch($statusCode) { - case 200: - if ('\OpenAPI\Client\Model\AppResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\OpenAPI\Client\Model\AppResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\AppResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\OpenAPI\Client\Model\Model401Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\OpenAPI\Client\Model\Model401Error' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\Model401Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\OpenAPI\Client\Model\Model404Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\OpenAPI\Client\Model\Model404Error' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\Model404Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\OpenAPI\Client\Model\Model500Error' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\OpenAPI\Client\Model\Model500Error' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\Model500Error', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - $returnType = '\OpenAPI\Client\Model\AppResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\OpenAPI\Client\Model\AppResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\OpenAPI\Client\Model\Model401Error', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\OpenAPI\Client\Model\Model404Error', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\OpenAPI\Client\Model\Model500Error', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getAppAsync - * - * Get App - * - * @param string $app_id App ID (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getApp'] to see the possible values for this operation - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getAppAsync($app_id, string $contentType = self::contentTypes['getApp'][0]) - { - return $this->getAppAsyncWithHttpInfo($app_id, $contentType) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getAppAsyncWithHttpInfo - * - * Get App - * - * @param string $app_id App ID (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getApp'] to see the possible values for this operation - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getAppAsyncWithHttpInfo($app_id, string $contentType = self::contentTypes['getApp'][0]) - { - $returnType = '\OpenAPI\Client\Model\AppResponse'; - $request = $this->getAppRequest($app_id, $contentType); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getApp' - * - * @param string $app_id App ID (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getApp'] to see the possible values for this operation - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function getAppRequest($app_id, string $contentType = self::contentTypes['getApp'][0]) - { - - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling getApp' - ); - } - - - $resourcePath = '/apps/{app_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($app_id !== null) { - $resourcePath = str_replace( - '{' . 'app_id' . '}', - ObjectSerializer::toPathValue($app_id), - $resourcePath - ); - } - - - $headers = $this->headerSelector->selectHeaders( - ['application/json', ], - $contentType, - $multipart - ); - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } - - // this endpoint requires Bearer (JWT) authentication (access token) - if (!empty($this->config->getAccessToken())) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHost = $this->config->getHost(); - $query = ObjectSerializer::buildQuery($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/generated/lib/Api/MagicLinksApi.php b/generated/lib/Api/MagicLinksApi.php index 50d0e59..dcdb4d0 100644 --- a/generated/lib/Api/MagicLinksApi.php +++ b/generated/lib/Api/MagicLinksApi.php @@ -84,10 +84,10 @@ class MagicLinksApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { $this->client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); diff --git a/generated/lib/Api/TokensApi.php b/generated/lib/Api/TokensApi.php index c66a792..9a4bf9f 100644 --- a/generated/lib/Api/TokensApi.php +++ b/generated/lib/Api/TokensApi.php @@ -84,10 +84,10 @@ class TokensApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { $this->client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); diff --git a/generated/lib/Api/UserDevicesApi.php b/generated/lib/Api/UserDevicesApi.php index 8268420..6ec0f50 100644 --- a/generated/lib/Api/UserDevicesApi.php +++ b/generated/lib/Api/UserDevicesApi.php @@ -87,10 +87,10 @@ class UserDevicesApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { $this->client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); diff --git a/generated/lib/Api/UsersApi.php b/generated/lib/Api/UsersApi.php index ae44b39..db2a903 100644 --- a/generated/lib/Api/UsersApi.php +++ b/generated/lib/Api/UsersApi.php @@ -102,10 +102,10 @@ class UsersApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { $this->client = $client ?: new Client(); $this->config = $config ?: Configuration::getDefaultConfiguration(); @@ -2194,17 +2194,17 @@ public function getUserRequest($app_id, $user_id, string $contentType = self::co * List Users * * @param string $app_id App ID (required) - * @param int $page page to fetch (min=1) (optional) - * @param int $limit number of users to fetch per page (max=500) (optional) - * @param int $created_before Unix timestamp to anchor pagination results (fetches events that were created before the timestamp) (optional) - * @param string $order_by Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier` (optional) - * @param string $identifier search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>) (optional) - * @param string $id search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>) (optional) - * @param int $login_count search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>) (optional) - * @param string $status search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending) (optional) - * @param string $created_at search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) - * @param string $updated_at search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) - * @param string $last_login_at search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param int|null $page page to fetch (min=1) (optional) + * @param int|null $limit number of users to fetch per page (max=500) (optional) + * @param int|null $created_before Unix timestamp to anchor pagination results (fetches events that were created before the timestamp) (optional) + * @param string|null $order_by Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier` (optional) + * @param string|null $identifier search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>) (optional) + * @param string|null $id search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>) (optional) + * @param int|null $login_count search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>) (optional) + * @param string|null $status search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending) (optional) + * @param string|null $created_at search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string|null $updated_at search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string|null $last_login_at search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaginatedUsers'] to see the possible values for this operation * * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -2223,17 +2223,17 @@ public function listPaginatedUsers($app_id, $page = null, $limit = null, $create * List Users * * @param string $app_id App ID (required) - * @param int $page page to fetch (min=1) (optional) - * @param int $limit number of users to fetch per page (max=500) (optional) - * @param int $created_before Unix timestamp to anchor pagination results (fetches events that were created before the timestamp) (optional) - * @param string $order_by Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier` (optional) - * @param string $identifier search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>) (optional) - * @param string $id search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>) (optional) - * @param int $login_count search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>) (optional) - * @param string $status search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending) (optional) - * @param string $created_at search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) - * @param string $updated_at search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) - * @param string $last_login_at search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param int|null $page page to fetch (min=1) (optional) + * @param int|null $limit number of users to fetch per page (max=500) (optional) + * @param int|null $created_before Unix timestamp to anchor pagination results (fetches events that were created before the timestamp) (optional) + * @param string|null $order_by Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier` (optional) + * @param string|null $identifier search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>) (optional) + * @param string|null $id search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>) (optional) + * @param int|null $login_count search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>) (optional) + * @param string|null $status search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending) (optional) + * @param string|null $created_at search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string|null $updated_at search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string|null $last_login_at search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaginatedUsers'] to see the possible values for this operation * * @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format @@ -2499,17 +2499,17 @@ public function listPaginatedUsersWithHttpInfo($app_id, $page = null, $limit = n * List Users * * @param string $app_id App ID (required) - * @param int $page page to fetch (min=1) (optional) - * @param int $limit number of users to fetch per page (max=500) (optional) - * @param int $created_before Unix timestamp to anchor pagination results (fetches events that were created before the timestamp) (optional) - * @param string $order_by Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier` (optional) - * @param string $identifier search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>) (optional) - * @param string $id search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>) (optional) - * @param int $login_count search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>) (optional) - * @param string $status search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending) (optional) - * @param string $created_at search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) - * @param string $updated_at search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) - * @param string $last_login_at search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param int|null $page page to fetch (min=1) (optional) + * @param int|null $limit number of users to fetch per page (max=500) (optional) + * @param int|null $created_before Unix timestamp to anchor pagination results (fetches events that were created before the timestamp) (optional) + * @param string|null $order_by Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier` (optional) + * @param string|null $identifier search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>) (optional) + * @param string|null $id search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>) (optional) + * @param int|null $login_count search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>) (optional) + * @param string|null $status search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending) (optional) + * @param string|null $created_at search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string|null $updated_at search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string|null $last_login_at search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaginatedUsers'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2531,17 +2531,17 @@ function ($response) { * List Users * * @param string $app_id App ID (required) - * @param int $page page to fetch (min=1) (optional) - * @param int $limit number of users to fetch per page (max=500) (optional) - * @param int $created_before Unix timestamp to anchor pagination results (fetches events that were created before the timestamp) (optional) - * @param string $order_by Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier` (optional) - * @param string $identifier search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>) (optional) - * @param string $id search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>) (optional) - * @param int $login_count search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>) (optional) - * @param string $status search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending) (optional) - * @param string $created_at search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) - * @param string $updated_at search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) - * @param string $last_login_at search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param int|null $page page to fetch (min=1) (optional) + * @param int|null $limit number of users to fetch per page (max=500) (optional) + * @param int|null $created_before Unix timestamp to anchor pagination results (fetches events that were created before the timestamp) (optional) + * @param string|null $order_by Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier` (optional) + * @param string|null $identifier search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>) (optional) + * @param string|null $id search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>) (optional) + * @param int|null $login_count search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>) (optional) + * @param string|null $status search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending) (optional) + * @param string|null $created_at search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string|null $updated_at search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string|null $last_login_at search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaginatedUsers'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2592,17 +2592,17 @@ function ($exception) { * Create request for operation 'listPaginatedUsers' * * @param string $app_id App ID (required) - * @param int $page page to fetch (min=1) (optional) - * @param int $limit number of users to fetch per page (max=500) (optional) - * @param int $created_before Unix timestamp to anchor pagination results (fetches events that were created before the timestamp) (optional) - * @param string $order_by Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier` (optional) - * @param string $identifier search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>) (optional) - * @param string $id search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>) (optional) - * @param int $login_count search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>) (optional) - * @param string $status search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending) (optional) - * @param string $created_at search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) - * @param string $updated_at search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) - * @param string $last_login_at search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param int|null $page page to fetch (min=1) (optional) + * @param int|null $limit number of users to fetch per page (max=500) (optional) + * @param int|null $created_before Unix timestamp to anchor pagination results (fetches events that were created before the timestamp) (optional) + * @param string|null $order_by Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier` (optional) + * @param string|null $identifier search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>) (optional) + * @param string|null $id search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>) (optional) + * @param int|null $login_count search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>) (optional) + * @param string|null $status search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending) (optional) + * @param string|null $created_at search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string|null $updated_at search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string|null $last_login_at search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaginatedUsers'] to see the possible values for this operation * * @throws \InvalidArgumentException diff --git a/generated/lib/Configuration.php b/generated/lib/Configuration.php index efe009f..fbdc80b 100644 --- a/generated/lib/Configuration.php +++ b/generated/lib/Configuration.php @@ -487,7 +487,7 @@ public function getHostSettings() * @param array|null $variables hash of variable and the corresponding value (optional) * @return string URL based on host settings */ - public static function getHostString(array $hostSettings, $hostIndex, array $variables = null) + public static function getHostString(array $hostSettings, $hostIndex, ?array $variables = null) { if (null === $variables) { $variables = []; diff --git a/generated/lib/Model/AppInfo.php b/generated/lib/Model/AppInfo.php deleted file mode 100644 index ddf23e1..0000000 --- a/generated/lib/Model/AppInfo.php +++ /dev/null @@ -1,1921 +0,0 @@ - - */ -class AppInfo implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'AppInfo'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'additional_auth_origins' => 'string[]', - 'allowed_callback_urls' => 'string[]', - 'allowed_identifier' => 'string', - 'allowed_logout_urls' => 'string[]', - 'application_login_uri' => 'string', - 'auth_fallback_method' => 'string', - 'auth_fallback_method_ttl' => 'int', - 'auth_methods' => '\OpenAPI\Client\Model\AuthMethods', - 'auth_origin' => 'string', - 'auto_theme_enabled' => 'bool', - 'created_at' => '\DateTime', - 'default_language' => 'string', - 'id' => 'string', - 'layouts' => '\OpenAPI\Client\Model\Layouts', - 'login_url' => 'string', - 'light_logo_url' => 'string', - 'dark_logo_url' => 'string', - 'name' => 'string', - 'hosted' => 'bool', - 'hosted_subdomain' => 'string', - 'hosted_theme' => '\OpenAPI\Client\Model\ThemeType', - 'id_token_lifetime' => 'int', - 'passage_branding' => 'bool', - 'profile_management' => 'bool', - 'public_signup' => 'bool', - 'redirect_url' => 'string', - 'refresh_absolute_lifetime' => 'int', - 'refresh_enabled' => 'bool', - 'refresh_inactivity_lifetime' => 'int', - 'require_email_verification' => 'bool', - 'require_identifier_verification' => 'bool', - 'required_identifier' => 'string', - 'role' => 'string', - 'rsa_public_key' => 'string', - 'secret' => 'string', - 'session_timeout_length' => 'int', - 'type' => 'string', - 'user_metadata_schema' => '\OpenAPI\Client\Model\UserMetadataField[]', - 'technologies' => '\OpenAPI\Client\Model\Technologies[]', - 'element_customization' => '\OpenAPI\Client\Model\ElementCustomization', - 'element_customization_dark' => '\OpenAPI\Client\Model\ElementCustomization' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'additional_auth_origins' => null, - 'allowed_callback_urls' => null, - 'allowed_identifier' => null, - 'allowed_logout_urls' => null, - 'application_login_uri' => null, - 'auth_fallback_method' => null, - 'auth_fallback_method_ttl' => null, - 'auth_methods' => null, - 'auth_origin' => null, - 'auto_theme_enabled' => null, - 'created_at' => 'date-time', - 'default_language' => null, - 'id' => null, - 'layouts' => null, - 'login_url' => null, - 'light_logo_url' => null, - 'dark_logo_url' => null, - 'name' => null, - 'hosted' => null, - 'hosted_subdomain' => null, - 'hosted_theme' => null, - 'id_token_lifetime' => null, - 'passage_branding' => null, - 'profile_management' => null, - 'public_signup' => null, - 'redirect_url' => null, - 'refresh_absolute_lifetime' => null, - 'refresh_enabled' => null, - 'refresh_inactivity_lifetime' => null, - 'require_email_verification' => null, - 'require_identifier_verification' => null, - 'required_identifier' => null, - 'role' => null, - 'rsa_public_key' => null, - 'secret' => null, - 'session_timeout_length' => null, - 'type' => null, - 'user_metadata_schema' => null, - 'technologies' => null, - 'element_customization' => null, - 'element_customization_dark' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ - protected static array $openAPINullables = [ - 'additional_auth_origins' => false, - 'allowed_callback_urls' => false, - 'allowed_identifier' => false, - 'allowed_logout_urls' => false, - 'application_login_uri' => false, - 'auth_fallback_method' => false, - 'auth_fallback_method_ttl' => false, - 'auth_methods' => false, - 'auth_origin' => false, - 'auto_theme_enabled' => false, - 'created_at' => false, - 'default_language' => false, - 'id' => false, - 'layouts' => false, - 'login_url' => false, - 'light_logo_url' => false, - 'dark_logo_url' => false, - 'name' => false, - 'hosted' => false, - 'hosted_subdomain' => false, - 'hosted_theme' => false, - 'id_token_lifetime' => false, - 'passage_branding' => false, - 'profile_management' => false, - 'public_signup' => false, - 'redirect_url' => false, - 'refresh_absolute_lifetime' => false, - 'refresh_enabled' => false, - 'refresh_inactivity_lifetime' => false, - 'require_email_verification' => false, - 'require_identifier_verification' => false, - 'required_identifier' => false, - 'role' => false, - 'rsa_public_key' => false, - 'secret' => false, - 'session_timeout_length' => false, - 'type' => false, - 'user_metadata_schema' => false, - 'technologies' => false, - 'element_customization' => false, - 'element_customization_dark' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ - protected array $openAPINullablesSetToNull = []; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return boolean[] - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param boolean[] $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * Checks if a property is nullable - * - * @param string $property - * @return bool - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'additional_auth_origins' => 'additional_auth_origins', - 'allowed_callback_urls' => 'allowed_callback_urls', - 'allowed_identifier' => 'allowed_identifier', - 'allowed_logout_urls' => 'allowed_logout_urls', - 'application_login_uri' => 'application_login_uri', - 'auth_fallback_method' => 'auth_fallback_method', - 'auth_fallback_method_ttl' => 'auth_fallback_method_ttl', - 'auth_methods' => 'auth_methods', - 'auth_origin' => 'auth_origin', - 'auto_theme_enabled' => 'auto_theme_enabled', - 'created_at' => 'created_at', - 'default_language' => 'default_language', - 'id' => 'id', - 'layouts' => 'layouts', - 'login_url' => 'login_url', - 'light_logo_url' => 'light_logo_url', - 'dark_logo_url' => 'dark_logo_url', - 'name' => 'name', - 'hosted' => 'hosted', - 'hosted_subdomain' => 'hosted_subdomain', - 'hosted_theme' => 'hosted_theme', - 'id_token_lifetime' => 'id_token_lifetime', - 'passage_branding' => 'passage_branding', - 'profile_management' => 'profile_management', - 'public_signup' => 'public_signup', - 'redirect_url' => 'redirect_url', - 'refresh_absolute_lifetime' => 'refresh_absolute_lifetime', - 'refresh_enabled' => 'refresh_enabled', - 'refresh_inactivity_lifetime' => 'refresh_inactivity_lifetime', - 'require_email_verification' => 'require_email_verification', - 'require_identifier_verification' => 'require_identifier_verification', - 'required_identifier' => 'required_identifier', - 'role' => 'role', - 'rsa_public_key' => 'rsa_public_key', - 'secret' => 'secret', - 'session_timeout_length' => 'session_timeout_length', - 'type' => 'type', - 'user_metadata_schema' => 'user_metadata_schema', - 'technologies' => 'technologies', - 'element_customization' => 'element_customization', - 'element_customization_dark' => 'element_customization_dark' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'additional_auth_origins' => 'setAdditionalAuthOrigins', - 'allowed_callback_urls' => 'setAllowedCallbackUrls', - 'allowed_identifier' => 'setAllowedIdentifier', - 'allowed_logout_urls' => 'setAllowedLogoutUrls', - 'application_login_uri' => 'setApplicationLoginUri', - 'auth_fallback_method' => 'setAuthFallbackMethod', - 'auth_fallback_method_ttl' => 'setAuthFallbackMethodTtl', - 'auth_methods' => 'setAuthMethods', - 'auth_origin' => 'setAuthOrigin', - 'auto_theme_enabled' => 'setAutoThemeEnabled', - 'created_at' => 'setCreatedAt', - 'default_language' => 'setDefaultLanguage', - 'id' => 'setId', - 'layouts' => 'setLayouts', - 'login_url' => 'setLoginUrl', - 'light_logo_url' => 'setLightLogoUrl', - 'dark_logo_url' => 'setDarkLogoUrl', - 'name' => 'setName', - 'hosted' => 'setHosted', - 'hosted_subdomain' => 'setHostedSubdomain', - 'hosted_theme' => 'setHostedTheme', - 'id_token_lifetime' => 'setIdTokenLifetime', - 'passage_branding' => 'setPassageBranding', - 'profile_management' => 'setProfileManagement', - 'public_signup' => 'setPublicSignup', - 'redirect_url' => 'setRedirectUrl', - 'refresh_absolute_lifetime' => 'setRefreshAbsoluteLifetime', - 'refresh_enabled' => 'setRefreshEnabled', - 'refresh_inactivity_lifetime' => 'setRefreshInactivityLifetime', - 'require_email_verification' => 'setRequireEmailVerification', - 'require_identifier_verification' => 'setRequireIdentifierVerification', - 'required_identifier' => 'setRequiredIdentifier', - 'role' => 'setRole', - 'rsa_public_key' => 'setRsaPublicKey', - 'secret' => 'setSecret', - 'session_timeout_length' => 'setSessionTimeoutLength', - 'type' => 'setType', - 'user_metadata_schema' => 'setUserMetadataSchema', - 'technologies' => 'setTechnologies', - 'element_customization' => 'setElementCustomization', - 'element_customization_dark' => 'setElementCustomizationDark' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'additional_auth_origins' => 'getAdditionalAuthOrigins', - 'allowed_callback_urls' => 'getAllowedCallbackUrls', - 'allowed_identifier' => 'getAllowedIdentifier', - 'allowed_logout_urls' => 'getAllowedLogoutUrls', - 'application_login_uri' => 'getApplicationLoginUri', - 'auth_fallback_method' => 'getAuthFallbackMethod', - 'auth_fallback_method_ttl' => 'getAuthFallbackMethodTtl', - 'auth_methods' => 'getAuthMethods', - 'auth_origin' => 'getAuthOrigin', - 'auto_theme_enabled' => 'getAutoThemeEnabled', - 'created_at' => 'getCreatedAt', - 'default_language' => 'getDefaultLanguage', - 'id' => 'getId', - 'layouts' => 'getLayouts', - 'login_url' => 'getLoginUrl', - 'light_logo_url' => 'getLightLogoUrl', - 'dark_logo_url' => 'getDarkLogoUrl', - 'name' => 'getName', - 'hosted' => 'getHosted', - 'hosted_subdomain' => 'getHostedSubdomain', - 'hosted_theme' => 'getHostedTheme', - 'id_token_lifetime' => 'getIdTokenLifetime', - 'passage_branding' => 'getPassageBranding', - 'profile_management' => 'getProfileManagement', - 'public_signup' => 'getPublicSignup', - 'redirect_url' => 'getRedirectUrl', - 'refresh_absolute_lifetime' => 'getRefreshAbsoluteLifetime', - 'refresh_enabled' => 'getRefreshEnabled', - 'refresh_inactivity_lifetime' => 'getRefreshInactivityLifetime', - 'require_email_verification' => 'getRequireEmailVerification', - 'require_identifier_verification' => 'getRequireIdentifierVerification', - 'required_identifier' => 'getRequiredIdentifier', - 'role' => 'getRole', - 'rsa_public_key' => 'getRsaPublicKey', - 'secret' => 'getSecret', - 'session_timeout_length' => 'getSessionTimeoutLength', - 'type' => 'getType', - 'user_metadata_schema' => 'getUserMetadataSchema', - 'technologies' => 'getTechnologies', - 'element_customization' => 'getElementCustomization', - 'element_customization_dark' => 'getElementCustomizationDark' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const TYPE_COMPLETE = 'complete'; - public const TYPE_FLEX = 'flex'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE_COMPLETE, - self::TYPE_FLEX, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->setIfExists('additional_auth_origins', $data ?? [], null); - $this->setIfExists('allowed_callback_urls', $data ?? [], null); - $this->setIfExists('allowed_identifier', $data ?? [], null); - $this->setIfExists('allowed_logout_urls', $data ?? [], null); - $this->setIfExists('application_login_uri', $data ?? [], null); - $this->setIfExists('auth_fallback_method', $data ?? [], null); - $this->setIfExists('auth_fallback_method_ttl', $data ?? [], null); - $this->setIfExists('auth_methods', $data ?? [], null); - $this->setIfExists('auth_origin', $data ?? [], null); - $this->setIfExists('auto_theme_enabled', $data ?? [], null); - $this->setIfExists('created_at', $data ?? [], null); - $this->setIfExists('default_language', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('layouts', $data ?? [], null); - $this->setIfExists('login_url', $data ?? [], null); - $this->setIfExists('light_logo_url', $data ?? [], null); - $this->setIfExists('dark_logo_url', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('hosted', $data ?? [], null); - $this->setIfExists('hosted_subdomain', $data ?? [], null); - $this->setIfExists('hosted_theme', $data ?? [], null); - $this->setIfExists('id_token_lifetime', $data ?? [], null); - $this->setIfExists('passage_branding', $data ?? [], null); - $this->setIfExists('profile_management', $data ?? [], null); - $this->setIfExists('public_signup', $data ?? [], null); - $this->setIfExists('redirect_url', $data ?? [], null); - $this->setIfExists('refresh_absolute_lifetime', $data ?? [], null); - $this->setIfExists('refresh_enabled', $data ?? [], null); - $this->setIfExists('refresh_inactivity_lifetime', $data ?? [], null); - $this->setIfExists('require_email_verification', $data ?? [], null); - $this->setIfExists('require_identifier_verification', $data ?? [], null); - $this->setIfExists('required_identifier', $data ?? [], null); - $this->setIfExists('role', $data ?? [], null); - $this->setIfExists('rsa_public_key', $data ?? [], null); - $this->setIfExists('secret', $data ?? [], null); - $this->setIfExists('session_timeout_length', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('user_metadata_schema', $data ?? [], null); - $this->setIfExists('technologies', $data ?? [], null); - $this->setIfExists('element_customization', $data ?? [], null); - $this->setIfExists('element_customization_dark', $data ?? [], null); - } - - /** - * 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 - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['additional_auth_origins'] === null) { - $invalidProperties[] = "'additional_auth_origins' can't be null"; - } - if ($this->container['allowed_callback_urls'] === null) { - $invalidProperties[] = "'allowed_callback_urls' can't be null"; - } - if ($this->container['allowed_identifier'] === null) { - $invalidProperties[] = "'allowed_identifier' can't be null"; - } - if ($this->container['allowed_logout_urls'] === null) { - $invalidProperties[] = "'allowed_logout_urls' can't be null"; - } - if ($this->container['application_login_uri'] === null) { - $invalidProperties[] = "'application_login_uri' can't be null"; - } - if ($this->container['auth_fallback_method'] === null) { - $invalidProperties[] = "'auth_fallback_method' can't be null"; - } - if ($this->container['auth_fallback_method_ttl'] === null) { - $invalidProperties[] = "'auth_fallback_method_ttl' can't be null"; - } - if ($this->container['auth_methods'] === null) { - $invalidProperties[] = "'auth_methods' can't be null"; - } - if ($this->container['auth_origin'] === null) { - $invalidProperties[] = "'auth_origin' can't be null"; - } - if ($this->container['auto_theme_enabled'] === null) { - $invalidProperties[] = "'auto_theme_enabled' can't be null"; - } - if ($this->container['created_at'] === null) { - $invalidProperties[] = "'created_at' can't be null"; - } - if ($this->container['default_language'] === null) { - $invalidProperties[] = "'default_language' can't be null"; - } - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - if ($this->container['layouts'] === null) { - $invalidProperties[] = "'layouts' can't be null"; - } - if ($this->container['login_url'] === null) { - $invalidProperties[] = "'login_url' can't be null"; - } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['hosted'] === null) { - $invalidProperties[] = "'hosted' can't be null"; - } - if ($this->container['hosted_subdomain'] === null) { - $invalidProperties[] = "'hosted_subdomain' can't be null"; - } - if ($this->container['hosted_theme'] === null) { - $invalidProperties[] = "'hosted_theme' can't be null"; - } - if ($this->container['passage_branding'] === null) { - $invalidProperties[] = "'passage_branding' can't be null"; - } - if ($this->container['profile_management'] === null) { - $invalidProperties[] = "'profile_management' can't be null"; - } - if ($this->container['public_signup'] === null) { - $invalidProperties[] = "'public_signup' can't be null"; - } - if ($this->container['redirect_url'] === null) { - $invalidProperties[] = "'redirect_url' can't be null"; - } - if ($this->container['refresh_absolute_lifetime'] === null) { - $invalidProperties[] = "'refresh_absolute_lifetime' can't be null"; - } - if ($this->container['refresh_enabled'] === null) { - $invalidProperties[] = "'refresh_enabled' can't be null"; - } - if ($this->container['refresh_inactivity_lifetime'] === null) { - $invalidProperties[] = "'refresh_inactivity_lifetime' can't be null"; - } - if ($this->container['require_email_verification'] === null) { - $invalidProperties[] = "'require_email_verification' can't be null"; - } - if ($this->container['require_identifier_verification'] === null) { - $invalidProperties[] = "'require_identifier_verification' can't be null"; - } - if ($this->container['required_identifier'] === null) { - $invalidProperties[] = "'required_identifier' can't be null"; - } - if ($this->container['role'] === null) { - $invalidProperties[] = "'role' can't be null"; - } - if ($this->container['rsa_public_key'] === null) { - $invalidProperties[] = "'rsa_public_key' can't be null"; - } - if ($this->container['session_timeout_length'] === null) { - $invalidProperties[] = "'session_timeout_length' can't be null"; - } - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['user_metadata_schema'] === null) { - $invalidProperties[] = "'user_metadata_schema' can't be null"; - } - if ($this->container['technologies'] === null) { - $invalidProperties[] = "'technologies' can't be null"; - } - if ($this->container['element_customization'] === null) { - $invalidProperties[] = "'element_customization' can't be null"; - } - if ($this->container['element_customization_dark'] === null) { - $invalidProperties[] = "'element_customization_dark' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets additional_auth_origins - * - * @return string[] - */ - public function getAdditionalAuthOrigins() - { - return $this->container['additional_auth_origins']; - } - - /** - * Sets additional_auth_origins - * - * @param string[] $additional_auth_origins additional_auth_origins - * - * @return self - */ - public function setAdditionalAuthOrigins($additional_auth_origins) - { - if (is_null($additional_auth_origins)) { - throw new \InvalidArgumentException('non-nullable additional_auth_origins cannot be null'); - } - $this->container['additional_auth_origins'] = $additional_auth_origins; - - return $this; - } - - /** - * Gets allowed_callback_urls - * - * @return string[] - */ - public function getAllowedCallbackUrls() - { - return $this->container['allowed_callback_urls']; - } - - /** - * Sets allowed_callback_urls - * - * @param string[] $allowed_callback_urls The valid URLs where users can be redirected after authentication. - * - * @return self - */ - public function setAllowedCallbackUrls($allowed_callback_urls) - { - if (is_null($allowed_callback_urls)) { - throw new \InvalidArgumentException('non-nullable allowed_callback_urls cannot be null'); - } - $this->container['allowed_callback_urls'] = $allowed_callback_urls; - - return $this; - } - - /** - * Gets allowed_identifier - * - * @return string - */ - public function getAllowedIdentifier() - { - return $this->container['allowed_identifier']; - } - - /** - * Sets allowed_identifier - * - * @param string $allowed_identifier allowed_identifier - * - * @return self - */ - public function setAllowedIdentifier($allowed_identifier) - { - if (is_null($allowed_identifier)) { - throw new \InvalidArgumentException('non-nullable allowed_identifier cannot be null'); - } - $this->container['allowed_identifier'] = $allowed_identifier; - - return $this; - } - - /** - * Gets allowed_logout_urls - * - * @return string[] - */ - public function getAllowedLogoutUrls() - { - return $this->container['allowed_logout_urls']; - } - - /** - * Sets allowed_logout_urls - * - * @param string[] $allowed_logout_urls The valid URLs where users can be redirected after logging out. - * - * @return self - */ - public function setAllowedLogoutUrls($allowed_logout_urls) - { - if (is_null($allowed_logout_urls)) { - throw new \InvalidArgumentException('non-nullable allowed_logout_urls cannot be null'); - } - $this->container['allowed_logout_urls'] = $allowed_logout_urls; - - return $this; - } - - /** - * Gets application_login_uri - * - * @return string - */ - public function getApplicationLoginUri() - { - return $this->container['application_login_uri']; - } - - /** - * Sets application_login_uri - * - * @param string $application_login_uri A route within your application that redirects to the Authorization URL endpoint. - * - * @return self - */ - public function setApplicationLoginUri($application_login_uri) - { - if (is_null($application_login_uri)) { - throw new \InvalidArgumentException('non-nullable application_login_uri cannot be null'); - } - $this->container['application_login_uri'] = $application_login_uri; - - return $this; - } - - /** - * Gets auth_fallback_method - * - * @return string - * @deprecated - */ - public function getAuthFallbackMethod() - { - return $this->container['auth_fallback_method']; - } - - /** - * Sets auth_fallback_method - * - * @param string $auth_fallback_method Deprecated Property. Please refer to `auth_methods` to view settings for individual authentication methods. - * - * @return self - * @deprecated - */ - public function setAuthFallbackMethod($auth_fallback_method) - { - if (is_null($auth_fallback_method)) { - throw new \InvalidArgumentException('non-nullable auth_fallback_method cannot be null'); - } - $this->container['auth_fallback_method'] = $auth_fallback_method; - - return $this; - } - - /** - * Gets auth_fallback_method_ttl - * - * @return int - * @deprecated - */ - public function getAuthFallbackMethodTtl() - { - return $this->container['auth_fallback_method_ttl']; - } - - /** - * Sets auth_fallback_method_ttl - * - * @param int $auth_fallback_method_ttl Deprecated Property. Please refer to `auth_methods` to view settings for individual authentication methods. - * - * @return self - * @deprecated - */ - public function setAuthFallbackMethodTtl($auth_fallback_method_ttl) - { - if (is_null($auth_fallback_method_ttl)) { - throw new \InvalidArgumentException('non-nullable auth_fallback_method_ttl cannot be null'); - } - $this->container['auth_fallback_method_ttl'] = $auth_fallback_method_ttl; - - return $this; - } - - /** - * Gets auth_methods - * - * @return \OpenAPI\Client\Model\AuthMethods - */ - public function getAuthMethods() - { - return $this->container['auth_methods']; - } - - /** - * Sets auth_methods - * - * @param \OpenAPI\Client\Model\AuthMethods $auth_methods auth_methods - * - * @return self - */ - public function setAuthMethods($auth_methods) - { - if (is_null($auth_methods)) { - throw new \InvalidArgumentException('non-nullable auth_methods cannot be null'); - } - $this->container['auth_methods'] = $auth_methods; - - return $this; - } - - /** - * Gets auth_origin - * - * @return string - */ - public function getAuthOrigin() - { - return $this->container['auth_origin']; - } - - /** - * Sets auth_origin - * - * @param string $auth_origin auth_origin - * - * @return self - */ - public function setAuthOrigin($auth_origin) - { - if (is_null($auth_origin)) { - throw new \InvalidArgumentException('non-nullable auth_origin cannot be null'); - } - $this->container['auth_origin'] = $auth_origin; - - return $this; - } - - /** - * Gets auto_theme_enabled - * - * @return bool - * @deprecated - */ - public function getAutoThemeEnabled() - { - return $this->container['auto_theme_enabled']; - } - - /** - * Sets auto_theme_enabled - * - * @param bool $auto_theme_enabled Deprecated Property. Please use `hosted_theme` to set hosted page theming instead. - * - * @return self - * @deprecated - */ - public function setAutoThemeEnabled($auto_theme_enabled) - { - if (is_null($auto_theme_enabled)) { - throw new \InvalidArgumentException('non-nullable auto_theme_enabled cannot be null'); - } - $this->container['auto_theme_enabled'] = $auto_theme_enabled; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime $created_at created_at - * - * @return self - */ - public function setCreatedAt($created_at) - { - if (is_null($created_at)) { - throw new \InvalidArgumentException('non-nullable created_at cannot be null'); - } - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets default_language - * - * @return string - */ - public function getDefaultLanguage() - { - return $this->container['default_language']; - } - - /** - * Sets default_language - * - * @param string $default_language default_language - * - * @return self - */ - public function setDefaultLanguage($default_language) - { - if (is_null($default_language)) { - throw new \InvalidArgumentException('non-nullable default_language cannot be null'); - } - $this->container['default_language'] = $default_language; - - return $this; - } - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id id - * - * @return self - */ - public function setId($id) - { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets layouts - * - * @return \OpenAPI\Client\Model\Layouts - */ - public function getLayouts() - { - return $this->container['layouts']; - } - - /** - * Sets layouts - * - * @param \OpenAPI\Client\Model\Layouts $layouts layouts - * - * @return self - */ - public function setLayouts($layouts) - { - if (is_null($layouts)) { - throw new \InvalidArgumentException('non-nullable layouts cannot be null'); - } - $this->container['layouts'] = $layouts; - - return $this; - } - - /** - * Gets login_url - * - * @return string - */ - public function getLoginUrl() - { - return $this->container['login_url']; - } - - /** - * Sets login_url - * - * @param string $login_url login_url - * - * @return self - */ - public function setLoginUrl($login_url) - { - if (is_null($login_url)) { - throw new \InvalidArgumentException('non-nullable login_url cannot be null'); - } - $this->container['login_url'] = $login_url; - - return $this; - } - - /** - * Gets light_logo_url - * - * @return string|null - */ - public function getLightLogoUrl() - { - return $this->container['light_logo_url']; - } - - /** - * Sets light_logo_url - * - * @param string|null $light_logo_url light_logo_url - * - * @return self - */ - public function setLightLogoUrl($light_logo_url) - { - if (is_null($light_logo_url)) { - throw new \InvalidArgumentException('non-nullable light_logo_url cannot be null'); - } - $this->container['light_logo_url'] = $light_logo_url; - - return $this; - } - - /** - * Gets dark_logo_url - * - * @return string|null - */ - public function getDarkLogoUrl() - { - return $this->container['dark_logo_url']; - } - - /** - * Sets dark_logo_url - * - * @param string|null $dark_logo_url dark_logo_url - * - * @return self - */ - public function setDarkLogoUrl($dark_logo_url) - { - if (is_null($dark_logo_url)) { - throw new \InvalidArgumentException('non-nullable dark_logo_url cannot be null'); - } - $this->container['dark_logo_url'] = $dark_logo_url; - - return $this; - } - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets hosted - * - * @return bool - */ - public function getHosted() - { - return $this->container['hosted']; - } - - /** - * Sets hosted - * - * @param bool $hosted whether or not the app's login page is hosted by Passage - * - * @return self - */ - public function setHosted($hosted) - { - if (is_null($hosted)) { - throw new \InvalidArgumentException('non-nullable hosted cannot be null'); - } - $this->container['hosted'] = $hosted; - - return $this; - } - - /** - * Gets hosted_subdomain - * - * @return string - */ - public function getHostedSubdomain() - { - return $this->container['hosted_subdomain']; - } - - /** - * Sets hosted_subdomain - * - * @param string $hosted_subdomain the subdomain of the app's hosted login page - * - * @return self - */ - public function setHostedSubdomain($hosted_subdomain) - { - if (is_null($hosted_subdomain)) { - throw new \InvalidArgumentException('non-nullable hosted_subdomain cannot be null'); - } - $this->container['hosted_subdomain'] = $hosted_subdomain; - - return $this; - } - - /** - * Gets hosted_theme - * - * @return \OpenAPI\Client\Model\ThemeType - */ - public function getHostedTheme() - { - return $this->container['hosted_theme']; - } - - /** - * Sets hosted_theme - * - * @param \OpenAPI\Client\Model\ThemeType $hosted_theme hosted_theme - * - * @return self - */ - public function setHostedTheme($hosted_theme) - { - if (is_null($hosted_theme)) { - throw new \InvalidArgumentException('non-nullable hosted_theme cannot be null'); - } - $this->container['hosted_theme'] = $hosted_theme; - - return $this; - } - - /** - * Gets id_token_lifetime - * - * @return int|null - */ - public function getIdTokenLifetime() - { - return $this->container['id_token_lifetime']; - } - - /** - * Sets id_token_lifetime - * - * @param int|null $id_token_lifetime id_token_lifetime - * - * @return self - */ - public function setIdTokenLifetime($id_token_lifetime) - { - if (is_null($id_token_lifetime)) { - throw new \InvalidArgumentException('non-nullable id_token_lifetime cannot be null'); - } - $this->container['id_token_lifetime'] = $id_token_lifetime; - - return $this; - } - - /** - * Gets passage_branding - * - * @return bool - */ - public function getPassageBranding() - { - return $this->container['passage_branding']; - } - - /** - * Sets passage_branding - * - * @param bool $passage_branding passage_branding - * - * @return self - */ - public function setPassageBranding($passage_branding) - { - if (is_null($passage_branding)) { - throw new \InvalidArgumentException('non-nullable passage_branding cannot be null'); - } - $this->container['passage_branding'] = $passage_branding; - - return $this; - } - - /** - * Gets profile_management - * - * @return bool - */ - public function getProfileManagement() - { - return $this->container['profile_management']; - } - - /** - * Sets profile_management - * - * @param bool $profile_management profile_management - * - * @return self - */ - public function setProfileManagement($profile_management) - { - if (is_null($profile_management)) { - throw new \InvalidArgumentException('non-nullable profile_management cannot be null'); - } - $this->container['profile_management'] = $profile_management; - - return $this; - } - - /** - * Gets public_signup - * - * @return bool - */ - public function getPublicSignup() - { - return $this->container['public_signup']; - } - - /** - * Sets public_signup - * - * @param bool $public_signup public_signup - * - * @return self - */ - public function setPublicSignup($public_signup) - { - if (is_null($public_signup)) { - throw new \InvalidArgumentException('non-nullable public_signup cannot be null'); - } - $this->container['public_signup'] = $public_signup; - - return $this; - } - - /** - * Gets redirect_url - * - * @return string - */ - public function getRedirectUrl() - { - return $this->container['redirect_url']; - } - - /** - * Sets redirect_url - * - * @param string $redirect_url redirect_url - * - * @return self - */ - public function setRedirectUrl($redirect_url) - { - if (is_null($redirect_url)) { - throw new \InvalidArgumentException('non-nullable redirect_url cannot be null'); - } - $this->container['redirect_url'] = $redirect_url; - - return $this; - } - - /** - * Gets refresh_absolute_lifetime - * - * @return int - */ - public function getRefreshAbsoluteLifetime() - { - return $this->container['refresh_absolute_lifetime']; - } - - /** - * Sets refresh_absolute_lifetime - * - * @param int $refresh_absolute_lifetime refresh_absolute_lifetime - * - * @return self - */ - public function setRefreshAbsoluteLifetime($refresh_absolute_lifetime) - { - if (is_null($refresh_absolute_lifetime)) { - throw new \InvalidArgumentException('non-nullable refresh_absolute_lifetime cannot be null'); - } - $this->container['refresh_absolute_lifetime'] = $refresh_absolute_lifetime; - - return $this; - } - - /** - * Gets refresh_enabled - * - * @return bool - */ - public function getRefreshEnabled() - { - return $this->container['refresh_enabled']; - } - - /** - * Sets refresh_enabled - * - * @param bool $refresh_enabled refresh_enabled - * - * @return self - */ - public function setRefreshEnabled($refresh_enabled) - { - if (is_null($refresh_enabled)) { - throw new \InvalidArgumentException('non-nullable refresh_enabled cannot be null'); - } - $this->container['refresh_enabled'] = $refresh_enabled; - - return $this; - } - - /** - * Gets refresh_inactivity_lifetime - * - * @return int - */ - public function getRefreshInactivityLifetime() - { - return $this->container['refresh_inactivity_lifetime']; - } - - /** - * Sets refresh_inactivity_lifetime - * - * @param int $refresh_inactivity_lifetime refresh_inactivity_lifetime - * - * @return self - */ - public function setRefreshInactivityLifetime($refresh_inactivity_lifetime) - { - if (is_null($refresh_inactivity_lifetime)) { - throw new \InvalidArgumentException('non-nullable refresh_inactivity_lifetime cannot be null'); - } - $this->container['refresh_inactivity_lifetime'] = $refresh_inactivity_lifetime; - - return $this; - } - - /** - * Gets require_email_verification - * - * @return bool - */ - public function getRequireEmailVerification() - { - return $this->container['require_email_verification']; - } - - /** - * Sets require_email_verification - * - * @param bool $require_email_verification require_email_verification - * - * @return self - */ - public function setRequireEmailVerification($require_email_verification) - { - if (is_null($require_email_verification)) { - throw new \InvalidArgumentException('non-nullable require_email_verification cannot be null'); - } - $this->container['require_email_verification'] = $require_email_verification; - - return $this; - } - - /** - * Gets require_identifier_verification - * - * @return bool - */ - public function getRequireIdentifierVerification() - { - return $this->container['require_identifier_verification']; - } - - /** - * Sets require_identifier_verification - * - * @param bool $require_identifier_verification require_identifier_verification - * - * @return self - */ - public function setRequireIdentifierVerification($require_identifier_verification) - { - if (is_null($require_identifier_verification)) { - throw new \InvalidArgumentException('non-nullable require_identifier_verification cannot be null'); - } - $this->container['require_identifier_verification'] = $require_identifier_verification; - - return $this; - } - - /** - * Gets required_identifier - * - * @return string - */ - public function getRequiredIdentifier() - { - return $this->container['required_identifier']; - } - - /** - * Sets required_identifier - * - * @param string $required_identifier required_identifier - * - * @return self - */ - public function setRequiredIdentifier($required_identifier) - { - if (is_null($required_identifier)) { - throw new \InvalidArgumentException('non-nullable required_identifier cannot be null'); - } - $this->container['required_identifier'] = $required_identifier; - - return $this; - } - - /** - * Gets role - * - * @return string - */ - public function getRole() - { - return $this->container['role']; - } - - /** - * Sets role - * - * @param string $role role - * - * @return self - */ - public function setRole($role) - { - if (is_null($role)) { - throw new \InvalidArgumentException('non-nullable role cannot be null'); - } - $this->container['role'] = $role; - - return $this; - } - - /** - * Gets rsa_public_key - * - * @return string - */ - public function getRsaPublicKey() - { - return $this->container['rsa_public_key']; - } - - /** - * Sets rsa_public_key - * - * @param string $rsa_public_key rsa_public_key - * - * @return self - */ - public function setRsaPublicKey($rsa_public_key) - { - if (is_null($rsa_public_key)) { - throw new \InvalidArgumentException('non-nullable rsa_public_key cannot be null'); - } - $this->container['rsa_public_key'] = $rsa_public_key; - - return $this; - } - - /** - * Gets secret - * - * @return string|null - */ - public function getSecret() - { - return $this->container['secret']; - } - - /** - * Sets secret - * - * @param string|null $secret can only be retrieved by an app admin - * - * @return self - */ - public function setSecret($secret) - { - if (is_null($secret)) { - throw new \InvalidArgumentException('non-nullable secret cannot be null'); - } - $this->container['secret'] = $secret; - - return $this; - } - - /** - * Gets session_timeout_length - * - * @return int - */ - public function getSessionTimeoutLength() - { - return $this->container['session_timeout_length']; - } - - /** - * Sets session_timeout_length - * - * @param int $session_timeout_length session_timeout_length - * - * @return self - */ - public function setSessionTimeoutLength($session_timeout_length) - { - if (is_null($session_timeout_length)) { - throw new \InvalidArgumentException('non-nullable session_timeout_length cannot be null'); - } - $this->container['session_timeout_length'] = $session_timeout_length; - - return $this; - } - - /** - * Gets type - * - * @return string - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string $type type - * - * @return self - */ - public function setType($type) - { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } - $allowedValues = $this->getTypeAllowableValues(); - if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets user_metadata_schema - * - * @return \OpenAPI\Client\Model\UserMetadataField[] - */ - public function getUserMetadataSchema() - { - return $this->container['user_metadata_schema']; - } - - /** - * Sets user_metadata_schema - * - * @param \OpenAPI\Client\Model\UserMetadataField[] $user_metadata_schema user_metadata_schema - * - * @return self - */ - public function setUserMetadataSchema($user_metadata_schema) - { - if (is_null($user_metadata_schema)) { - throw new \InvalidArgumentException('non-nullable user_metadata_schema cannot be null'); - } - $this->container['user_metadata_schema'] = $user_metadata_schema; - - return $this; - } - - /** - * Gets technologies - * - * @return \OpenAPI\Client\Model\Technologies[] - */ - public function getTechnologies() - { - return $this->container['technologies']; - } - - /** - * Sets technologies - * - * @param \OpenAPI\Client\Model\Technologies[] $technologies technologies - * - * @return self - */ - public function setTechnologies($technologies) - { - if (is_null($technologies)) { - throw new \InvalidArgumentException('non-nullable technologies cannot be null'); - } - $this->container['technologies'] = $technologies; - - return $this; - } - - /** - * Gets element_customization - * - * @return \OpenAPI\Client\Model\ElementCustomization - */ - public function getElementCustomization() - { - return $this->container['element_customization']; - } - - /** - * Sets element_customization - * - * @param \OpenAPI\Client\Model\ElementCustomization $element_customization element_customization - * - * @return self - */ - public function setElementCustomization($element_customization) - { - if (is_null($element_customization)) { - throw new \InvalidArgumentException('non-nullable element_customization cannot be null'); - } - $this->container['element_customization'] = $element_customization; - - return $this; - } - - /** - * Gets element_customization_dark - * - * @return \OpenAPI\Client\Model\ElementCustomization - */ - public function getElementCustomizationDark() - { - return $this->container['element_customization_dark']; - } - - /** - * Sets element_customization_dark - * - * @param \OpenAPI\Client\Model\ElementCustomization $element_customization_dark element_customization_dark - * - * @return self - */ - public function setElementCustomizationDark($element_customization_dark) - { - if (is_null($element_customization_dark)) { - throw new \InvalidArgumentException('non-nullable element_customization_dark cannot be null'); - } - $this->container['element_customization_dark'] = $element_customization_dark; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/generated/lib/Model/AppResponse.php b/generated/lib/Model/AppResponse.php deleted file mode 100644 index f5e535b..0000000 --- a/generated/lib/Model/AppResponse.php +++ /dev/null @@ -1,413 +0,0 @@ - - */ -class AppResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'AppResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'app' => '\OpenAPI\Client\Model\AppInfo' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'app' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ - protected static array $openAPINullables = [ - 'app' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ - protected array $openAPINullablesSetToNull = []; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return boolean[] - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param boolean[] $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * Checks if a property is nullable - * - * @param string $property - * @return bool - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'app' => 'app' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'app' => 'setApp' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'app' => 'getApp' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->setIfExists('app', $data ?? [], null); - } - - /** - * 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 - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['app'] === null) { - $invalidProperties[] = "'app' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets app - * - * @return \OpenAPI\Client\Model\AppInfo - */ - public function getApp() - { - return $this->container['app']; - } - - /** - * Sets app - * - * @param \OpenAPI\Client\Model\AppInfo $app app - * - * @return self - */ - public function setApp($app) - { - if (is_null($app)) { - throw new \InvalidArgumentException('non-nullable app cannot be null'); - } - $this->container['app'] = $app; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/generated/lib/Model/AppleUserSocialConnection.php b/generated/lib/Model/AppleUserSocialConnection.php index 547c037..266bc29 100644 --- a/generated/lib/Model/AppleUserSocialConnection.php +++ b/generated/lib/Model/AppleUserSocialConnection.php @@ -258,10 +258,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('provider_id', $data ?? [], null); $this->setIfExists('created_at', $data ?? [], null); diff --git a/generated/lib/Model/AuthMethods.php b/generated/lib/Model/AuthMethods.php deleted file mode 100644 index f38441c..0000000 --- a/generated/lib/Model/AuthMethods.php +++ /dev/null @@ -1,488 +0,0 @@ - - */ -class AuthMethods implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'AuthMethods'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'passkeys' => '\OpenAPI\Client\Model\PasskeysAuthMethod', - 'otp' => '\OpenAPI\Client\Model\OtpAuthMethod', - 'magic_link' => '\OpenAPI\Client\Model\MagicLinkAuthMethod' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'passkeys' => null, - 'otp' => null, - 'magic_link' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ - protected static array $openAPINullables = [ - 'passkeys' => false, - 'otp' => false, - 'magic_link' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ - protected array $openAPINullablesSetToNull = []; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return boolean[] - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param boolean[] $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * Checks if a property is nullable - * - * @param string $property - * @return bool - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'passkeys' => 'passkeys', - 'otp' => 'otp', - 'magic_link' => 'magic_link' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'passkeys' => 'setPasskeys', - 'otp' => 'setOtp', - 'magic_link' => 'setMagicLink' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'passkeys' => 'getPasskeys', - 'otp' => 'getOtp', - 'magic_link' => 'getMagicLink' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->setIfExists('passkeys', $data ?? [], null); - $this->setIfExists('otp', $data ?? [], null); - $this->setIfExists('magic_link', $data ?? [], null); - } - - /** - * 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 - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['passkeys'] === null) { - $invalidProperties[] = "'passkeys' can't be null"; - } - if ($this->container['otp'] === null) { - $invalidProperties[] = "'otp' can't be null"; - } - if ($this->container['magic_link'] === null) { - $invalidProperties[] = "'magic_link' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets passkeys - * - * @return \OpenAPI\Client\Model\PasskeysAuthMethod - */ - public function getPasskeys() - { - return $this->container['passkeys']; - } - - /** - * Sets passkeys - * - * @param \OpenAPI\Client\Model\PasskeysAuthMethod $passkeys passkeys - * - * @return self - */ - public function setPasskeys($passkeys) - { - if (is_null($passkeys)) { - throw new \InvalidArgumentException('non-nullable passkeys cannot be null'); - } - $this->container['passkeys'] = $passkeys; - - return $this; - } - - /** - * Gets otp - * - * @return \OpenAPI\Client\Model\OtpAuthMethod - */ - public function getOtp() - { - return $this->container['otp']; - } - - /** - * Sets otp - * - * @param \OpenAPI\Client\Model\OtpAuthMethod $otp otp - * - * @return self - */ - public function setOtp($otp) - { - if (is_null($otp)) { - throw new \InvalidArgumentException('non-nullable otp cannot be null'); - } - $this->container['otp'] = $otp; - - return $this; - } - - /** - * Gets magic_link - * - * @return \OpenAPI\Client\Model\MagicLinkAuthMethod - */ - public function getMagicLink() - { - return $this->container['magic_link']; - } - - /** - * Sets magic_link - * - * @param \OpenAPI\Client\Model\MagicLinkAuthMethod $magic_link magic_link - * - * @return self - */ - public function setMagicLink($magic_link) - { - if (is_null($magic_link)) { - throw new \InvalidArgumentException('non-nullable magic_link cannot be null'); - } - $this->container['magic_link'] = $magic_link; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/generated/lib/Model/CreateMagicLinkRequest.php b/generated/lib/Model/CreateMagicLinkRequest.php index f670af5..027fba8 100644 --- a/generated/lib/Model/CreateMagicLinkRequest.php +++ b/generated/lib/Model/CreateMagicLinkRequest.php @@ -294,10 +294,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('channel', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); diff --git a/generated/lib/Model/CreateUserRequest.php b/generated/lib/Model/CreateUserRequest.php index 6177bc9..218ea00 100644 --- a/generated/lib/Model/CreateUserRequest.php +++ b/generated/lib/Model/CreateUserRequest.php @@ -252,10 +252,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('email', $data ?? [], null); $this->setIfExists('phone', $data ?? [], null); diff --git a/generated/lib/Model/ElementCustomization.php b/generated/lib/Model/ElementCustomization.php deleted file mode 100644 index 32e58a8..0000000 --- a/generated/lib/Model/ElementCustomization.php +++ /dev/null @@ -1,1056 +0,0 @@ - - */ -class ElementCustomization implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ElementCustomization'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'passage_container_background_color' => 'string', - 'passage_container_max_width' => 'int', - 'passage_input_box_background_color' => 'string', - 'passage_input_box_border_radius' => 'int', - 'passage_header_font_family' => '\OpenAPI\Client\Model\FontFamily', - 'passage_body_font_family' => '\OpenAPI\Client\Model\FontFamily', - 'passage_header_text_color' => 'string', - 'passage_body_text_color' => 'string', - 'passage_primary_button_background_color' => 'string', - 'passage_primary_button_text_color' => 'string', - 'passage_primary_button_hover_color' => 'string', - 'passage_primary_button_border_radius' => 'int', - 'passage_primary_button_border_color' => 'string', - 'passage_primary_button_border_width' => 'int', - 'passage_secondary_button_background_color' => 'string', - 'passage_secondary_button_text_color' => 'string', - 'passage_secondary_button_hover_color' => 'string', - 'passage_secondary_button_border_radius' => 'int', - 'passage_secondary_button_border_color' => 'string', - 'passage_secondary_button_border_width' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'passage_container_background_color' => null, - 'passage_container_max_width' => null, - 'passage_input_box_background_color' => null, - 'passage_input_box_border_radius' => null, - 'passage_header_font_family' => null, - 'passage_body_font_family' => null, - 'passage_header_text_color' => null, - 'passage_body_text_color' => null, - 'passage_primary_button_background_color' => null, - 'passage_primary_button_text_color' => null, - 'passage_primary_button_hover_color' => null, - 'passage_primary_button_border_radius' => null, - 'passage_primary_button_border_color' => null, - 'passage_primary_button_border_width' => null, - 'passage_secondary_button_background_color' => null, - 'passage_secondary_button_text_color' => null, - 'passage_secondary_button_hover_color' => null, - 'passage_secondary_button_border_radius' => null, - 'passage_secondary_button_border_color' => null, - 'passage_secondary_button_border_width' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ - protected static array $openAPINullables = [ - 'passage_container_background_color' => false, - 'passage_container_max_width' => false, - 'passage_input_box_background_color' => false, - 'passage_input_box_border_radius' => false, - 'passage_header_font_family' => false, - 'passage_body_font_family' => false, - 'passage_header_text_color' => false, - 'passage_body_text_color' => false, - 'passage_primary_button_background_color' => false, - 'passage_primary_button_text_color' => false, - 'passage_primary_button_hover_color' => false, - 'passage_primary_button_border_radius' => false, - 'passage_primary_button_border_color' => false, - 'passage_primary_button_border_width' => false, - 'passage_secondary_button_background_color' => false, - 'passage_secondary_button_text_color' => false, - 'passage_secondary_button_hover_color' => false, - 'passage_secondary_button_border_radius' => false, - 'passage_secondary_button_border_color' => false, - 'passage_secondary_button_border_width' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ - protected array $openAPINullablesSetToNull = []; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return boolean[] - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param boolean[] $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * Checks if a property is nullable - * - * @param string $property - * @return bool - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'passage_container_background_color' => 'passage_container_background_color', - 'passage_container_max_width' => 'passage_container_max_width', - 'passage_input_box_background_color' => 'passage_input_box_background_color', - 'passage_input_box_border_radius' => 'passage_input_box_border_radius', - 'passage_header_font_family' => 'passage_header_font_family', - 'passage_body_font_family' => 'passage_body_font_family', - 'passage_header_text_color' => 'passage_header_text_color', - 'passage_body_text_color' => 'passage_body_text_color', - 'passage_primary_button_background_color' => 'passage_primary_button_background_color', - 'passage_primary_button_text_color' => 'passage_primary_button_text_color', - 'passage_primary_button_hover_color' => 'passage_primary_button_hover_color', - 'passage_primary_button_border_radius' => 'passage_primary_button_border_radius', - 'passage_primary_button_border_color' => 'passage_primary_button_border_color', - 'passage_primary_button_border_width' => 'passage_primary_button_border_width', - 'passage_secondary_button_background_color' => 'passage_secondary_button_background_color', - 'passage_secondary_button_text_color' => 'passage_secondary_button_text_color', - 'passage_secondary_button_hover_color' => 'passage_secondary_button_hover_color', - 'passage_secondary_button_border_radius' => 'passage_secondary_button_border_radius', - 'passage_secondary_button_border_color' => 'passage_secondary_button_border_color', - 'passage_secondary_button_border_width' => 'passage_secondary_button_border_width' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'passage_container_background_color' => 'setPassageContainerBackgroundColor', - 'passage_container_max_width' => 'setPassageContainerMaxWidth', - 'passage_input_box_background_color' => 'setPassageInputBoxBackgroundColor', - 'passage_input_box_border_radius' => 'setPassageInputBoxBorderRadius', - 'passage_header_font_family' => 'setPassageHeaderFontFamily', - 'passage_body_font_family' => 'setPassageBodyFontFamily', - 'passage_header_text_color' => 'setPassageHeaderTextColor', - 'passage_body_text_color' => 'setPassageBodyTextColor', - 'passage_primary_button_background_color' => 'setPassagePrimaryButtonBackgroundColor', - 'passage_primary_button_text_color' => 'setPassagePrimaryButtonTextColor', - 'passage_primary_button_hover_color' => 'setPassagePrimaryButtonHoverColor', - 'passage_primary_button_border_radius' => 'setPassagePrimaryButtonBorderRadius', - 'passage_primary_button_border_color' => 'setPassagePrimaryButtonBorderColor', - 'passage_primary_button_border_width' => 'setPassagePrimaryButtonBorderWidth', - 'passage_secondary_button_background_color' => 'setPassageSecondaryButtonBackgroundColor', - 'passage_secondary_button_text_color' => 'setPassageSecondaryButtonTextColor', - 'passage_secondary_button_hover_color' => 'setPassageSecondaryButtonHoverColor', - 'passage_secondary_button_border_radius' => 'setPassageSecondaryButtonBorderRadius', - 'passage_secondary_button_border_color' => 'setPassageSecondaryButtonBorderColor', - 'passage_secondary_button_border_width' => 'setPassageSecondaryButtonBorderWidth' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'passage_container_background_color' => 'getPassageContainerBackgroundColor', - 'passage_container_max_width' => 'getPassageContainerMaxWidth', - 'passage_input_box_background_color' => 'getPassageInputBoxBackgroundColor', - 'passage_input_box_border_radius' => 'getPassageInputBoxBorderRadius', - 'passage_header_font_family' => 'getPassageHeaderFontFamily', - 'passage_body_font_family' => 'getPassageBodyFontFamily', - 'passage_header_text_color' => 'getPassageHeaderTextColor', - 'passage_body_text_color' => 'getPassageBodyTextColor', - 'passage_primary_button_background_color' => 'getPassagePrimaryButtonBackgroundColor', - 'passage_primary_button_text_color' => 'getPassagePrimaryButtonTextColor', - 'passage_primary_button_hover_color' => 'getPassagePrimaryButtonHoverColor', - 'passage_primary_button_border_radius' => 'getPassagePrimaryButtonBorderRadius', - 'passage_primary_button_border_color' => 'getPassagePrimaryButtonBorderColor', - 'passage_primary_button_border_width' => 'getPassagePrimaryButtonBorderWidth', - 'passage_secondary_button_background_color' => 'getPassageSecondaryButtonBackgroundColor', - 'passage_secondary_button_text_color' => 'getPassageSecondaryButtonTextColor', - 'passage_secondary_button_hover_color' => 'getPassageSecondaryButtonHoverColor', - 'passage_secondary_button_border_radius' => 'getPassageSecondaryButtonBorderRadius', - 'passage_secondary_button_border_color' => 'getPassageSecondaryButtonBorderColor', - 'passage_secondary_button_border_width' => 'getPassageSecondaryButtonBorderWidth' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->setIfExists('passage_container_background_color', $data ?? [], null); - $this->setIfExists('passage_container_max_width', $data ?? [], 300); - $this->setIfExists('passage_input_box_background_color', $data ?? [], null); - $this->setIfExists('passage_input_box_border_radius', $data ?? [], 5); - $this->setIfExists('passage_header_font_family', $data ?? [], null); - $this->setIfExists('passage_body_font_family', $data ?? [], null); - $this->setIfExists('passage_header_text_color', $data ?? [], null); - $this->setIfExists('passage_body_text_color', $data ?? [], null); - $this->setIfExists('passage_primary_button_background_color', $data ?? [], '#121212'); - $this->setIfExists('passage_primary_button_text_color', $data ?? [], '#f3f3f3'); - $this->setIfExists('passage_primary_button_hover_color', $data ?? [], '#4d4d4d'); - $this->setIfExists('passage_primary_button_border_radius', $data ?? [], 5); - $this->setIfExists('passage_primary_button_border_color', $data ?? [], '#121212'); - $this->setIfExists('passage_primary_button_border_width', $data ?? [], 0); - $this->setIfExists('passage_secondary_button_background_color', $data ?? [], '#ffffff'); - $this->setIfExists('passage_secondary_button_text_color', $data ?? [], '#222222'); - $this->setIfExists('passage_secondary_button_hover_color', $data ?? [], '#d7d7d7'); - $this->setIfExists('passage_secondary_button_border_radius', $data ?? [], 5); - $this->setIfExists('passage_secondary_button_border_color', $data ?? [], '#d7d7d7'); - $this->setIfExists('passage_secondary_button_border_width', $data ?? [], 1); - } - - /** - * 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 - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets passage_container_background_color - * - * @return string|null - */ - public function getPassageContainerBackgroundColor() - { - return $this->container['passage_container_background_color']; - } - - /** - * Sets passage_container_background_color - * - * @param string|null $passage_container_background_color Container background color in hex. Default is `#ffffff` in light mode & `#383838` in dark mode. - * - * @return self - */ - public function setPassageContainerBackgroundColor($passage_container_background_color) - { - if (is_null($passage_container_background_color)) { - throw new \InvalidArgumentException('non-nullable passage_container_background_color cannot be null'); - } - $this->container['passage_container_background_color'] = $passage_container_background_color; - - return $this; - } - - /** - * Gets passage_container_max_width - * - * @return int|null - */ - public function getPassageContainerMaxWidth() - { - return $this->container['passage_container_max_width']; - } - - /** - * Sets passage_container_max_width - * - * @param int|null $passage_container_max_width Maximum width of container (px) - * - * @return self - */ - public function setPassageContainerMaxWidth($passage_container_max_width) - { - if (is_null($passage_container_max_width)) { - throw new \InvalidArgumentException('non-nullable passage_container_max_width cannot be null'); - } - $this->container['passage_container_max_width'] = $passage_container_max_width; - - return $this; - } - - /** - * Gets passage_input_box_background_color - * - * @return string|null - */ - public function getPassageInputBoxBackgroundColor() - { - return $this->container['passage_input_box_background_color']; - } - - /** - * Sets passage_input_box_background_color - * - * @param string|null $passage_input_box_background_color Input box background color in hex. Default is `#ffffff` in light mode & `#4b4b4b` in dark mode. - * - * @return self - */ - public function setPassageInputBoxBackgroundColor($passage_input_box_background_color) - { - if (is_null($passage_input_box_background_color)) { - throw new \InvalidArgumentException('non-nullable passage_input_box_background_color cannot be null'); - } - $this->container['passage_input_box_background_color'] = $passage_input_box_background_color; - - return $this; - } - - /** - * Gets passage_input_box_border_radius - * - * @return int|null - */ - public function getPassageInputBoxBorderRadius() - { - return $this->container['passage_input_box_border_radius']; - } - - /** - * Sets passage_input_box_border_radius - * - * @param int|null $passage_input_box_border_radius Input box border radius (px) - * - * @return self - */ - public function setPassageInputBoxBorderRadius($passage_input_box_border_radius) - { - if (is_null($passage_input_box_border_radius)) { - throw new \InvalidArgumentException('non-nullable passage_input_box_border_radius cannot be null'); - } - $this->container['passage_input_box_border_radius'] = $passage_input_box_border_radius; - - return $this; - } - - /** - * Gets passage_header_font_family - * - * @return \OpenAPI\Client\Model\FontFamily|null - */ - public function getPassageHeaderFontFamily() - { - return $this->container['passage_header_font_family']; - } - - /** - * Sets passage_header_font_family - * - * @param \OpenAPI\Client\Model\FontFamily|null $passage_header_font_family passage_header_font_family - * - * @return self - */ - public function setPassageHeaderFontFamily($passage_header_font_family) - { - if (is_null($passage_header_font_family)) { - throw new \InvalidArgumentException('non-nullable passage_header_font_family cannot be null'); - } - $this->container['passage_header_font_family'] = $passage_header_font_family; - - return $this; - } - - /** - * Gets passage_body_font_family - * - * @return \OpenAPI\Client\Model\FontFamily|null - */ - public function getPassageBodyFontFamily() - { - return $this->container['passage_body_font_family']; - } - - /** - * Sets passage_body_font_family - * - * @param \OpenAPI\Client\Model\FontFamily|null $passage_body_font_family passage_body_font_family - * - * @return self - */ - public function setPassageBodyFontFamily($passage_body_font_family) - { - if (is_null($passage_body_font_family)) { - throw new \InvalidArgumentException('non-nullable passage_body_font_family cannot be null'); - } - $this->container['passage_body_font_family'] = $passage_body_font_family; - - return $this; - } - - /** - * Gets passage_header_text_color - * - * @return string|null - */ - public function getPassageHeaderTextColor() - { - return $this->container['passage_header_text_color']; - } - - /** - * Sets passage_header_text_color - * - * @param string|null $passage_header_text_color Header text color in hex. Default is `#222222` in light mode & `#f3f3f3` in dark mode. - * - * @return self - */ - public function setPassageHeaderTextColor($passage_header_text_color) - { - if (is_null($passage_header_text_color)) { - throw new \InvalidArgumentException('non-nullable passage_header_text_color cannot be null'); - } - $this->container['passage_header_text_color'] = $passage_header_text_color; - - return $this; - } - - /** - * Gets passage_body_text_color - * - * @return string|null - */ - public function getPassageBodyTextColor() - { - return $this->container['passage_body_text_color']; - } - - /** - * Sets passage_body_text_color - * - * @param string|null $passage_body_text_color Body text color in hex. Default is `#222222` in light mode & `#f3f3f3` in dark mode. - * - * @return self - */ - public function setPassageBodyTextColor($passage_body_text_color) - { - if (is_null($passage_body_text_color)) { - throw new \InvalidArgumentException('non-nullable passage_body_text_color cannot be null'); - } - $this->container['passage_body_text_color'] = $passage_body_text_color; - - return $this; - } - - /** - * Gets passage_primary_button_background_color - * - * @return string|null - */ - public function getPassagePrimaryButtonBackgroundColor() - { - return $this->container['passage_primary_button_background_color']; - } - - /** - * Sets passage_primary_button_background_color - * - * @param string|null $passage_primary_button_background_color Primary button background colour (hex) - * - * @return self - */ - public function setPassagePrimaryButtonBackgroundColor($passage_primary_button_background_color) - { - if (is_null($passage_primary_button_background_color)) { - throw new \InvalidArgumentException('non-nullable passage_primary_button_background_color cannot be null'); - } - $this->container['passage_primary_button_background_color'] = $passage_primary_button_background_color; - - return $this; - } - - /** - * Gets passage_primary_button_text_color - * - * @return string|null - */ - public function getPassagePrimaryButtonTextColor() - { - return $this->container['passage_primary_button_text_color']; - } - - /** - * Sets passage_primary_button_text_color - * - * @param string|null $passage_primary_button_text_color Primary button font colour (hex) - * - * @return self - */ - public function setPassagePrimaryButtonTextColor($passage_primary_button_text_color) - { - if (is_null($passage_primary_button_text_color)) { - throw new \InvalidArgumentException('non-nullable passage_primary_button_text_color cannot be null'); - } - $this->container['passage_primary_button_text_color'] = $passage_primary_button_text_color; - - return $this; - } - - /** - * Gets passage_primary_button_hover_color - * - * @return string|null - */ - public function getPassagePrimaryButtonHoverColor() - { - return $this->container['passage_primary_button_hover_color']; - } - - /** - * Sets passage_primary_button_hover_color - * - * @param string|null $passage_primary_button_hover_color Primary button background on hover (hex) - * - * @return self - */ - public function setPassagePrimaryButtonHoverColor($passage_primary_button_hover_color) - { - if (is_null($passage_primary_button_hover_color)) { - throw new \InvalidArgumentException('non-nullable passage_primary_button_hover_color cannot be null'); - } - $this->container['passage_primary_button_hover_color'] = $passage_primary_button_hover_color; - - return $this; - } - - /** - * Gets passage_primary_button_border_radius - * - * @return int|null - */ - public function getPassagePrimaryButtonBorderRadius() - { - return $this->container['passage_primary_button_border_radius']; - } - - /** - * Sets passage_primary_button_border_radius - * - * @param int|null $passage_primary_button_border_radius Primary button border radius (px) - * - * @return self - */ - public function setPassagePrimaryButtonBorderRadius($passage_primary_button_border_radius) - { - if (is_null($passage_primary_button_border_radius)) { - throw new \InvalidArgumentException('non-nullable passage_primary_button_border_radius cannot be null'); - } - $this->container['passage_primary_button_border_radius'] = $passage_primary_button_border_radius; - - return $this; - } - - /** - * Gets passage_primary_button_border_color - * - * @return string|null - */ - public function getPassagePrimaryButtonBorderColor() - { - return $this->container['passage_primary_button_border_color']; - } - - /** - * Sets passage_primary_button_border_color - * - * @param string|null $passage_primary_button_border_color Primary button border color - * - * @return self - */ - public function setPassagePrimaryButtonBorderColor($passage_primary_button_border_color) - { - if (is_null($passage_primary_button_border_color)) { - throw new \InvalidArgumentException('non-nullable passage_primary_button_border_color cannot be null'); - } - $this->container['passage_primary_button_border_color'] = $passage_primary_button_border_color; - - return $this; - } - - /** - * Gets passage_primary_button_border_width - * - * @return int|null - */ - public function getPassagePrimaryButtonBorderWidth() - { - return $this->container['passage_primary_button_border_width']; - } - - /** - * Sets passage_primary_button_border_width - * - * @param int|null $passage_primary_button_border_width Primary button border width (px) - * - * @return self - */ - public function setPassagePrimaryButtonBorderWidth($passage_primary_button_border_width) - { - if (is_null($passage_primary_button_border_width)) { - throw new \InvalidArgumentException('non-nullable passage_primary_button_border_width cannot be null'); - } - $this->container['passage_primary_button_border_width'] = $passage_primary_button_border_width; - - return $this; - } - - /** - * Gets passage_secondary_button_background_color - * - * @return string|null - */ - public function getPassageSecondaryButtonBackgroundColor() - { - return $this->container['passage_secondary_button_background_color']; - } - - /** - * Sets passage_secondary_button_background_color - * - * @param string|null $passage_secondary_button_background_color Secondary button background colour (hex) - * - * @return self - */ - public function setPassageSecondaryButtonBackgroundColor($passage_secondary_button_background_color) - { - if (is_null($passage_secondary_button_background_color)) { - throw new \InvalidArgumentException('non-nullable passage_secondary_button_background_color cannot be null'); - } - $this->container['passage_secondary_button_background_color'] = $passage_secondary_button_background_color; - - return $this; - } - - /** - * Gets passage_secondary_button_text_color - * - * @return string|null - */ - public function getPassageSecondaryButtonTextColor() - { - return $this->container['passage_secondary_button_text_color']; - } - - /** - * Sets passage_secondary_button_text_color - * - * @param string|null $passage_secondary_button_text_color Secondary button font colour (hex) - * - * @return self - */ - public function setPassageSecondaryButtonTextColor($passage_secondary_button_text_color) - { - if (is_null($passage_secondary_button_text_color)) { - throw new \InvalidArgumentException('non-nullable passage_secondary_button_text_color cannot be null'); - } - $this->container['passage_secondary_button_text_color'] = $passage_secondary_button_text_color; - - return $this; - } - - /** - * Gets passage_secondary_button_hover_color - * - * @return string|null - */ - public function getPassageSecondaryButtonHoverColor() - { - return $this->container['passage_secondary_button_hover_color']; - } - - /** - * Sets passage_secondary_button_hover_color - * - * @param string|null $passage_secondary_button_hover_color Secondary button background on hover (hex) - * - * @return self - */ - public function setPassageSecondaryButtonHoverColor($passage_secondary_button_hover_color) - { - if (is_null($passage_secondary_button_hover_color)) { - throw new \InvalidArgumentException('non-nullable passage_secondary_button_hover_color cannot be null'); - } - $this->container['passage_secondary_button_hover_color'] = $passage_secondary_button_hover_color; - - return $this; - } - - /** - * Gets passage_secondary_button_border_radius - * - * @return int|null - */ - public function getPassageSecondaryButtonBorderRadius() - { - return $this->container['passage_secondary_button_border_radius']; - } - - /** - * Sets passage_secondary_button_border_radius - * - * @param int|null $passage_secondary_button_border_radius Secondary button border radius (px) - * - * @return self - */ - public function setPassageSecondaryButtonBorderRadius($passage_secondary_button_border_radius) - { - if (is_null($passage_secondary_button_border_radius)) { - throw new \InvalidArgumentException('non-nullable passage_secondary_button_border_radius cannot be null'); - } - $this->container['passage_secondary_button_border_radius'] = $passage_secondary_button_border_radius; - - return $this; - } - - /** - * Gets passage_secondary_button_border_color - * - * @return string|null - */ - public function getPassageSecondaryButtonBorderColor() - { - return $this->container['passage_secondary_button_border_color']; - } - - /** - * Sets passage_secondary_button_border_color - * - * @param string|null $passage_secondary_button_border_color Secondary button border color - * - * @return self - */ - public function setPassageSecondaryButtonBorderColor($passage_secondary_button_border_color) - { - if (is_null($passage_secondary_button_border_color)) { - throw new \InvalidArgumentException('non-nullable passage_secondary_button_border_color cannot be null'); - } - $this->container['passage_secondary_button_border_color'] = $passage_secondary_button_border_color; - - return $this; - } - - /** - * Gets passage_secondary_button_border_width - * - * @return int|null - */ - public function getPassageSecondaryButtonBorderWidth() - { - return $this->container['passage_secondary_button_border_width']; - } - - /** - * Sets passage_secondary_button_border_width - * - * @param int|null $passage_secondary_button_border_width Secondary button border width (px) - * - * @return self - */ - public function setPassageSecondaryButtonBorderWidth($passage_secondary_button_border_width) - { - if (is_null($passage_secondary_button_border_width)) { - throw new \InvalidArgumentException('non-nullable passage_secondary_button_border_width cannot be null'); - } - $this->container['passage_secondary_button_border_width'] = $passage_secondary_button_border_width; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/generated/lib/Model/FontFamily.php b/generated/lib/Model/FontFamily.php deleted file mode 100644 index c45ed55..0000000 --- a/generated/lib/Model/FontFamily.php +++ /dev/null @@ -1,118 +0,0 @@ -setIfExists('provider_id', $data ?? [], null); $this->setIfExists('created_at', $data ?? [], null); diff --git a/generated/lib/Model/GoogleUserSocialConnection.php b/generated/lib/Model/GoogleUserSocialConnection.php index f36c905..2744ae9 100644 --- a/generated/lib/Model/GoogleUserSocialConnection.php +++ b/generated/lib/Model/GoogleUserSocialConnection.php @@ -258,10 +258,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('provider_id', $data ?? [], null); $this->setIfExists('created_at', $data ?? [], null); diff --git a/generated/lib/Model/LayoutConfig.php b/generated/lib/Model/LayoutConfig.php deleted file mode 100644 index 6bb9d7a..0000000 --- a/generated/lib/Model/LayoutConfig.php +++ /dev/null @@ -1,561 +0,0 @@ - - */ -class LayoutConfig implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'LayoutConfig'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'h' => 'int', - 'id' => 'string', - 'w' => 'int', - 'x' => 'int', - 'y' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'h' => null, - 'id' => null, - 'w' => null, - 'x' => null, - 'y' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ - protected static array $openAPINullables = [ - 'h' => false, - 'id' => false, - 'w' => false, - 'x' => false, - 'y' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ - protected array $openAPINullablesSetToNull = []; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return boolean[] - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param boolean[] $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * Checks if a property is nullable - * - * @param string $property - * @return bool - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'h' => 'h', - 'id' => 'id', - 'w' => 'w', - 'x' => 'x', - 'y' => 'y' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'h' => 'setH', - 'id' => 'setId', - 'w' => 'setW', - 'x' => 'setX', - 'y' => 'setY' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'h' => 'getH', - 'id' => 'getId', - 'w' => 'getW', - 'x' => 'getX', - 'y' => 'getY' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->setIfExists('h', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('w', $data ?? [], null); - $this->setIfExists('x', $data ?? [], null); - $this->setIfExists('y', $data ?? [], null); - } - - /** - * 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 - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['h'] === null) { - $invalidProperties[] = "'h' can't be null"; - } - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - if ($this->container['w'] === null) { - $invalidProperties[] = "'w' can't be null"; - } - if ($this->container['x'] === null) { - $invalidProperties[] = "'x' can't be null"; - } - if ($this->container['y'] === null) { - $invalidProperties[] = "'y' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets h - * - * @return int - */ - public function getH() - { - return $this->container['h']; - } - - /** - * Sets h - * - * @param int $h h - * - * @return self - */ - public function setH($h) - { - if (is_null($h)) { - throw new \InvalidArgumentException('non-nullable h cannot be null'); - } - $this->container['h'] = $h; - - return $this; - } - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id id - * - * @return self - */ - public function setId($id) - { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets w - * - * @return int - */ - public function getW() - { - return $this->container['w']; - } - - /** - * Sets w - * - * @param int $w w - * - * @return self - */ - public function setW($w) - { - if (is_null($w)) { - throw new \InvalidArgumentException('non-nullable w cannot be null'); - } - $this->container['w'] = $w; - - return $this; - } - - /** - * Gets x - * - * @return int - */ - public function getX() - { - return $this->container['x']; - } - - /** - * Sets x - * - * @param int $x x - * - * @return self - */ - public function setX($x) - { - if (is_null($x)) { - throw new \InvalidArgumentException('non-nullable x cannot be null'); - } - $this->container['x'] = $x; - - return $this; - } - - /** - * Gets y - * - * @return int - */ - public function getY() - { - return $this->container['y']; - } - - /** - * Sets y - * - * @param int $y y - * - * @return self - */ - public function setY($y) - { - if (is_null($y)) { - throw new \InvalidArgumentException('non-nullable y cannot be null'); - } - $this->container['y'] = $y; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/generated/lib/Model/Layouts.php b/generated/lib/Model/Layouts.php deleted file mode 100644 index dbc047d..0000000 --- a/generated/lib/Model/Layouts.php +++ /dev/null @@ -1,450 +0,0 @@ - - */ -class Layouts implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Layouts'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'profile' => '\OpenAPI\Client\Model\LayoutConfig[]', - 'registration' => '\OpenAPI\Client\Model\LayoutConfig[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'profile' => null, - 'registration' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ - protected static array $openAPINullables = [ - 'profile' => false, - 'registration' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ - protected array $openAPINullablesSetToNull = []; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return boolean[] - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param boolean[] $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * Checks if a property is nullable - * - * @param string $property - * @return bool - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'profile' => 'profile', - 'registration' => 'registration' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'profile' => 'setProfile', - 'registration' => 'setRegistration' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'profile' => 'getProfile', - 'registration' => 'getRegistration' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->setIfExists('profile', $data ?? [], null); - $this->setIfExists('registration', $data ?? [], null); - } - - /** - * 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 - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['profile'] === null) { - $invalidProperties[] = "'profile' can't be null"; - } - if ($this->container['registration'] === null) { - $invalidProperties[] = "'registration' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets profile - * - * @return \OpenAPI\Client\Model\LayoutConfig[] - */ - public function getProfile() - { - return $this->container['profile']; - } - - /** - * Sets profile - * - * @param \OpenAPI\Client\Model\LayoutConfig[] $profile profile - * - * @return self - */ - public function setProfile($profile) - { - if (is_null($profile)) { - throw new \InvalidArgumentException('non-nullable profile cannot be null'); - } - $this->container['profile'] = $profile; - - return $this; - } - - /** - * Gets registration - * - * @return \OpenAPI\Client\Model\LayoutConfig[] - */ - public function getRegistration() - { - return $this->container['registration']; - } - - /** - * Sets registration - * - * @param \OpenAPI\Client\Model\LayoutConfig[] $registration registration - * - * @return self - */ - public function setRegistration($registration) - { - if (is_null($registration)) { - throw new \InvalidArgumentException('non-nullable registration cannot be null'); - } - $this->container['registration'] = $registration; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/generated/lib/Model/Link.php b/generated/lib/Model/Link.php index c84b011..fb25e58 100644 --- a/generated/lib/Model/Link.php +++ b/generated/lib/Model/Link.php @@ -240,10 +240,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('href', $data ?? [], null); } diff --git a/generated/lib/Model/ListDevicesResponse.php b/generated/lib/Model/ListDevicesResponse.php index d783a8c..4026594 100644 --- a/generated/lib/Model/ListDevicesResponse.php +++ b/generated/lib/Model/ListDevicesResponse.php @@ -240,10 +240,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('devices', $data ?? [], null); } diff --git a/generated/lib/Model/ListPaginatedUsersItem.php b/generated/lib/Model/ListPaginatedUsersItem.php index 1f42e30..9089000 100644 --- a/generated/lib/Model/ListPaginatedUsersItem.php +++ b/generated/lib/Model/ListPaginatedUsersItem.php @@ -306,10 +306,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('created_at', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); diff --git a/generated/lib/Model/ListPaginatedUsersResponse.php b/generated/lib/Model/ListPaginatedUsersResponse.php index 3fe5318..4bddd25 100644 --- a/generated/lib/Model/ListPaginatedUsersResponse.php +++ b/generated/lib/Model/ListPaginatedUsersResponse.php @@ -270,10 +270,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('_links', $data ?? [], null); $this->setIfExists('created_before', $data ?? [], null); diff --git a/generated/lib/Model/MagicLink.php b/generated/lib/Model/MagicLink.php index 94845bf..b5dd861 100644 --- a/generated/lib/Model/MagicLink.php +++ b/generated/lib/Model/MagicLink.php @@ -294,10 +294,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('activated', $data ?? [], null); $this->setIfExists('app_id', $data ?? [], null); diff --git a/generated/lib/Model/MagicLinkAuthMethod.php b/generated/lib/Model/MagicLinkAuthMethod.php deleted file mode 100644 index 73fd6d2..0000000 --- a/generated/lib/Model/MagicLinkAuthMethod.php +++ /dev/null @@ -1,498 +0,0 @@ - - */ -class MagicLinkAuthMethod implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'MagicLinkAuthMethod'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'enabled' => 'bool', - 'ttl' => 'int', - 'ttl_display_unit' => '\OpenAPI\Client\Model\TtlDisplayUnit' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'enabled' => null, - 'ttl' => null, - 'ttl_display_unit' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ - protected static array $openAPINullables = [ - 'enabled' => false, - 'ttl' => false, - 'ttl_display_unit' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ - protected array $openAPINullablesSetToNull = []; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return boolean[] - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param boolean[] $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * Checks if a property is nullable - * - * @param string $property - * @return bool - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'enabled' => 'enabled', - 'ttl' => 'ttl', - 'ttl_display_unit' => 'ttl_display_unit' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'enabled' => 'setEnabled', - 'ttl' => 'setTtl', - 'ttl_display_unit' => 'setTtlDisplayUnit' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'enabled' => 'getEnabled', - 'ttl' => 'getTtl', - 'ttl_display_unit' => 'getTtlDisplayUnit' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->setIfExists('enabled', $data ?? [], null); - $this->setIfExists('ttl', $data ?? [], 300); - $this->setIfExists('ttl_display_unit', $data ?? [], null); - } - - /** - * 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 - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['enabled'] === null) { - $invalidProperties[] = "'enabled' can't be null"; - } - if ($this->container['ttl'] === null) { - $invalidProperties[] = "'ttl' can't be null"; - } - if (($this->container['ttl'] < 60)) { - $invalidProperties[] = "invalid value for 'ttl', must be bigger than or equal to 60."; - } - - if ($this->container['ttl_display_unit'] === null) { - $invalidProperties[] = "'ttl_display_unit' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets enabled - * - * @return bool - */ - public function getEnabled() - { - return $this->container['enabled']; - } - - /** - * Sets enabled - * - * @param bool $enabled enabled - * - * @return self - */ - public function setEnabled($enabled) - { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); - } - $this->container['enabled'] = $enabled; - - return $this; - } - - /** - * Gets ttl - * - * @return int - */ - public function getTtl() - { - return $this->container['ttl']; - } - - /** - * Sets ttl - * - * @param int $ttl Maximum time (IN SECONDS) for the auth to expire. - * - * @return self - */ - public function setTtl($ttl) - { - if (is_null($ttl)) { - throw new \InvalidArgumentException('non-nullable ttl cannot be null'); - } - - if (($ttl < 60)) { - throw new \InvalidArgumentException('invalid value for $ttl when calling MagicLinkAuthMethod., must be bigger than or equal to 60.'); - } - - $this->container['ttl'] = $ttl; - - return $this; - } - - /** - * Gets ttl_display_unit - * - * @return \OpenAPI\Client\Model\TtlDisplayUnit - * @deprecated - */ - public function getTtlDisplayUnit() - { - return $this->container['ttl_display_unit']; - } - - /** - * Sets ttl_display_unit - * - * @param \OpenAPI\Client\Model\TtlDisplayUnit $ttl_display_unit ttl_display_unit - * - * @return self - * @deprecated - */ - public function setTtlDisplayUnit($ttl_display_unit) - { - if (is_null($ttl_display_unit)) { - throw new \InvalidArgumentException('non-nullable ttl_display_unit cannot be null'); - } - $this->container['ttl_display_unit'] = $ttl_display_unit; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/generated/lib/Model/MagicLinkResponse.php b/generated/lib/Model/MagicLinkResponse.php index 7f70ca5..4869073 100644 --- a/generated/lib/Model/MagicLinkResponse.php +++ b/generated/lib/Model/MagicLinkResponse.php @@ -240,10 +240,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('magic_link', $data ?? [], null); } diff --git a/generated/lib/Model/Model400Error.php b/generated/lib/Model/Model400Error.php index 03d616b..c36cada 100644 --- a/generated/lib/Model/Model400Error.php +++ b/generated/lib/Model/Model400Error.php @@ -261,10 +261,10 @@ public function getCodeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('code', $data ?? [], null); $this->setIfExists('error', $data ?? [], null); diff --git a/generated/lib/Model/Model401Error.php b/generated/lib/Model/Model401Error.php index 1a65a24..65e2534 100644 --- a/generated/lib/Model/Model401Error.php +++ b/generated/lib/Model/Model401Error.php @@ -261,10 +261,10 @@ public function getCodeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('code', $data ?? [], null); $this->setIfExists('error', $data ?? [], null); diff --git a/generated/lib/Model/Model403Error.php b/generated/lib/Model/Model403Error.php index a61e47e..ab35e8e 100644 --- a/generated/lib/Model/Model403Error.php +++ b/generated/lib/Model/Model403Error.php @@ -269,10 +269,10 @@ public function getCodeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('code', $data ?? [], null); $this->setIfExists('error', $data ?? [], null); diff --git a/generated/lib/Model/Model404Error.php b/generated/lib/Model/Model404Error.php index c54258e..5981f4c 100644 --- a/generated/lib/Model/Model404Error.php +++ b/generated/lib/Model/Model404Error.php @@ -295,10 +295,10 @@ public function getCodeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('code', $data ?? [], null); $this->setIfExists('error', $data ?? [], null); diff --git a/generated/lib/Model/Model500Error.php b/generated/lib/Model/Model500Error.php index e5c8f78..df7eae6 100644 --- a/generated/lib/Model/Model500Error.php +++ b/generated/lib/Model/Model500Error.php @@ -259,10 +259,10 @@ public function getCodeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('code', $data ?? [], null); $this->setIfExists('error', $data ?? [], null); diff --git a/generated/lib/Model/Nonce.php b/generated/lib/Model/Nonce.php index aad9413..391e590 100644 --- a/generated/lib/Model/Nonce.php +++ b/generated/lib/Model/Nonce.php @@ -241,10 +241,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('nonce', $data ?? [], null); } diff --git a/generated/lib/Model/OtpAuthMethod.php b/generated/lib/Model/OtpAuthMethod.php deleted file mode 100644 index ad3c57f..0000000 --- a/generated/lib/Model/OtpAuthMethod.php +++ /dev/null @@ -1,498 +0,0 @@ - - */ -class OtpAuthMethod implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'OtpAuthMethod'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'enabled' => 'bool', - 'ttl' => 'int', - 'ttl_display_unit' => '\OpenAPI\Client\Model\TtlDisplayUnit' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'enabled' => null, - 'ttl' => null, - 'ttl_display_unit' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ - protected static array $openAPINullables = [ - 'enabled' => false, - 'ttl' => false, - 'ttl_display_unit' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ - protected array $openAPINullablesSetToNull = []; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return boolean[] - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param boolean[] $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * Checks if a property is nullable - * - * @param string $property - * @return bool - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'enabled' => 'enabled', - 'ttl' => 'ttl', - 'ttl_display_unit' => 'ttl_display_unit' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'enabled' => 'setEnabled', - 'ttl' => 'setTtl', - 'ttl_display_unit' => 'setTtlDisplayUnit' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'enabled' => 'getEnabled', - 'ttl' => 'getTtl', - 'ttl_display_unit' => 'getTtlDisplayUnit' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->setIfExists('enabled', $data ?? [], null); - $this->setIfExists('ttl', $data ?? [], 300); - $this->setIfExists('ttl_display_unit', $data ?? [], null); - } - - /** - * 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 - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['enabled'] === null) { - $invalidProperties[] = "'enabled' can't be null"; - } - if ($this->container['ttl'] === null) { - $invalidProperties[] = "'ttl' can't be null"; - } - if (($this->container['ttl'] < 60)) { - $invalidProperties[] = "invalid value for 'ttl', must be bigger than or equal to 60."; - } - - if ($this->container['ttl_display_unit'] === null) { - $invalidProperties[] = "'ttl_display_unit' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets enabled - * - * @return bool - */ - public function getEnabled() - { - return $this->container['enabled']; - } - - /** - * Sets enabled - * - * @param bool $enabled enabled - * - * @return self - */ - public function setEnabled($enabled) - { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); - } - $this->container['enabled'] = $enabled; - - return $this; - } - - /** - * Gets ttl - * - * @return int - */ - public function getTtl() - { - return $this->container['ttl']; - } - - /** - * Sets ttl - * - * @param int $ttl Maximum time (IN SECONDS) for the auth to expire. - * - * @return self - */ - public function setTtl($ttl) - { - if (is_null($ttl)) { - throw new \InvalidArgumentException('non-nullable ttl cannot be null'); - } - - if (($ttl < 60)) { - throw new \InvalidArgumentException('invalid value for $ttl when calling OtpAuthMethod., must be bigger than or equal to 60.'); - } - - $this->container['ttl'] = $ttl; - - return $this; - } - - /** - * Gets ttl_display_unit - * - * @return \OpenAPI\Client\Model\TtlDisplayUnit - * @deprecated - */ - public function getTtlDisplayUnit() - { - return $this->container['ttl_display_unit']; - } - - /** - * Sets ttl_display_unit - * - * @param \OpenAPI\Client\Model\TtlDisplayUnit $ttl_display_unit ttl_display_unit - * - * @return self - * @deprecated - */ - public function setTtlDisplayUnit($ttl_display_unit) - { - if (is_null($ttl_display_unit)) { - throw new \InvalidArgumentException('non-nullable ttl_display_unit cannot be null'); - } - $this->container['ttl_display_unit'] = $ttl_display_unit; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/generated/lib/Model/PaginatedLinks.php b/generated/lib/Model/PaginatedLinks.php index b2c9087..901e4ec 100644 --- a/generated/lib/Model/PaginatedLinks.php +++ b/generated/lib/Model/PaginatedLinks.php @@ -264,10 +264,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('first', $data ?? [], null); $this->setIfExists('last', $data ?? [], null); diff --git a/generated/lib/Model/PasskeysAuthMethod.php b/generated/lib/Model/PasskeysAuthMethod.php deleted file mode 100644 index fad3a08..0000000 --- a/generated/lib/Model/PasskeysAuthMethod.php +++ /dev/null @@ -1,413 +0,0 @@ - - */ -class PasskeysAuthMethod implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'PasskeysAuthMethod'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'enabled' => 'bool' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'enabled' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ - protected static array $openAPINullables = [ - 'enabled' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ - protected array $openAPINullablesSetToNull = []; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return boolean[] - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param boolean[] $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * Checks if a property is nullable - * - * @param string $property - * @return bool - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'enabled' => 'enabled' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'enabled' => 'setEnabled' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'enabled' => 'getEnabled' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->setIfExists('enabled', $data ?? [], true); - } - - /** - * 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 - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['enabled'] === null) { - $invalidProperties[] = "'enabled' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets enabled - * - * @return bool - */ - public function getEnabled() - { - return $this->container['enabled']; - } - - /** - * Sets enabled - * - * @param bool $enabled enabled - * - * @return self - */ - public function setEnabled($enabled) - { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); - } - $this->container['enabled'] = $enabled; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/generated/lib/Model/Technologies.php b/generated/lib/Model/Technologies.php deleted file mode 100644 index f6523ce..0000000 --- a/generated/lib/Model/Technologies.php +++ /dev/null @@ -1,81 +0,0 @@ -setIfExists('email', $data ?? [], null); $this->setIfExists('phone', $data ?? [], null); diff --git a/generated/lib/Model/UserInfo.php b/generated/lib/Model/UserInfo.php index 4a3ba00..a0e3b5a 100644 --- a/generated/lib/Model/UserInfo.php +++ b/generated/lib/Model/UserInfo.php @@ -336,10 +336,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('created_at', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); diff --git a/generated/lib/Model/UserMetadataField.php b/generated/lib/Model/UserMetadataField.php deleted file mode 100644 index a2179eb..0000000 --- a/generated/lib/Model/UserMetadataField.php +++ /dev/null @@ -1,598 +0,0 @@ - - */ -class UserMetadataField implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'UserMetadataField'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'field_name' => 'string', - 'friendly_name' => 'string', - 'id' => 'string', - 'profile' => 'bool', - 'registration' => 'bool', - 'type' => '\OpenAPI\Client\Model\UserMetadataFieldType' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'field_name' => null, - 'friendly_name' => null, - 'id' => null, - 'profile' => null, - 'registration' => null, - 'type' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ - protected static array $openAPINullables = [ - 'field_name' => false, - 'friendly_name' => false, - 'id' => false, - 'profile' => false, - 'registration' => false, - 'type' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ - protected array $openAPINullablesSetToNull = []; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return boolean[] - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param boolean[] $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * Checks if a property is nullable - * - * @param string $property - * @return bool - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'field_name' => 'field_name', - 'friendly_name' => 'friendly_name', - 'id' => 'id', - 'profile' => 'profile', - 'registration' => 'registration', - 'type' => 'type' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'field_name' => 'setFieldName', - 'friendly_name' => 'setFriendlyName', - 'id' => 'setId', - 'profile' => 'setProfile', - 'registration' => 'setRegistration', - 'type' => 'setType' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'field_name' => 'getFieldName', - 'friendly_name' => 'getFriendlyName', - 'id' => 'getId', - 'profile' => 'getProfile', - 'registration' => 'getRegistration', - 'type' => 'getType' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->setIfExists('field_name', $data ?? [], null); - $this->setIfExists('friendly_name', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('profile', $data ?? [], null); - $this->setIfExists('registration', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); - } - - /** - * 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 - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['field_name'] === null) { - $invalidProperties[] = "'field_name' can't be null"; - } - if ($this->container['friendly_name'] === null) { - $invalidProperties[] = "'friendly_name' can't be null"; - } - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - if ($this->container['profile'] === null) { - $invalidProperties[] = "'profile' can't be null"; - } - if ($this->container['registration'] === null) { - $invalidProperties[] = "'registration' can't be null"; - } - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets field_name - * - * @return string - */ - public function getFieldName() - { - return $this->container['field_name']; - } - - /** - * Sets field_name - * - * @param string $field_name field_name - * - * @return self - */ - public function setFieldName($field_name) - { - if (is_null($field_name)) { - throw new \InvalidArgumentException('non-nullable field_name cannot be null'); - } - $this->container['field_name'] = $field_name; - - return $this; - } - - /** - * Gets friendly_name - * - * @return string - */ - public function getFriendlyName() - { - return $this->container['friendly_name']; - } - - /** - * Sets friendly_name - * - * @param string $friendly_name friendly_name - * - * @return self - */ - public function setFriendlyName($friendly_name) - { - if (is_null($friendly_name)) { - throw new \InvalidArgumentException('non-nullable friendly_name cannot be null'); - } - $this->container['friendly_name'] = $friendly_name; - - return $this; - } - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id id - * - * @return self - */ - public function setId($id) - { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets profile - * - * @return bool - */ - public function getProfile() - { - return $this->container['profile']; - } - - /** - * Sets profile - * - * @param bool $profile profile - * - * @return self - */ - public function setProfile($profile) - { - if (is_null($profile)) { - throw new \InvalidArgumentException('non-nullable profile cannot be null'); - } - $this->container['profile'] = $profile; - - return $this; - } - - /** - * Gets registration - * - * @return bool - */ - public function getRegistration() - { - return $this->container['registration']; - } - - /** - * Sets registration - * - * @param bool $registration registration - * - * @return self - */ - public function setRegistration($registration) - { - if (is_null($registration)) { - throw new \InvalidArgumentException('non-nullable registration cannot be null'); - } - $this->container['registration'] = $registration; - - return $this; - } - - /** - * Gets type - * - * @return \OpenAPI\Client\Model\UserMetadataFieldType - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \OpenAPI\Client\Model\UserMetadataFieldType $type type - * - * @return self - */ - public function setType($type) - { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } - $this->container['type'] = $type; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/generated/lib/Model/UserMetadataFieldType.php b/generated/lib/Model/UserMetadataFieldType.php deleted file mode 100644 index 451f636..0000000 --- a/generated/lib/Model/UserMetadataFieldType.php +++ /dev/null @@ -1,75 +0,0 @@ -setIfExists('created_at', $data ?? [], null); $this->setIfExists('completed_at', $data ?? [], null); diff --git a/generated/lib/Model/UserResponse.php b/generated/lib/Model/UserResponse.php index bfc6298..0355ada 100644 --- a/generated/lib/Model/UserResponse.php +++ b/generated/lib/Model/UserResponse.php @@ -240,10 +240,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('user', $data ?? [], null); } diff --git a/generated/lib/Model/UserSocialConnections.php b/generated/lib/Model/UserSocialConnections.php index 4528e60..db197f0 100644 --- a/generated/lib/Model/UserSocialConnections.php +++ b/generated/lib/Model/UserSocialConnections.php @@ -252,10 +252,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('apple', $data ?? [], null); $this->setIfExists('github', $data ?? [], null); diff --git a/generated/lib/Model/WebAuthnDevices.php b/generated/lib/Model/WebAuthnDevices.php index 231f5b4..298f2df 100644 --- a/generated/lib/Model/WebAuthnDevices.php +++ b/generated/lib/Model/WebAuthnDevices.php @@ -288,10 +288,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('created_at', $data ?? [], null); $this->setIfExists('cred_id', $data ?? [], null); diff --git a/generated/lib/Model/WebAuthnIcons.php b/generated/lib/Model/WebAuthnIcons.php index 10f77e6..0bc4f10 100644 --- a/generated/lib/Model/WebAuthnIcons.php +++ b/generated/lib/Model/WebAuthnIcons.php @@ -247,10 +247,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('light', $data ?? [], null); $this->setIfExists('dark', $data ?? [], null); diff --git a/generated/lib/ObjectSerializer.php b/generated/lib/ObjectSerializer.php index 602795d..13a424c 100644 --- a/generated/lib/ObjectSerializer.php +++ b/generated/lib/ObjectSerializer.php @@ -59,8 +59,8 @@ public static function setDateTimeFormat($format) * Serialize data * * @param mixed $data the data to serialize - * @param string $type the OpenAPIToolsType of the data - * @param string $format the format of the OpenAPITools type of the data + * @param string|null $type the OpenAPIToolsType of the data + * @param string|null $format the format of the OpenAPITools type of the data * * @return scalar|object|array|null serialized form of $data */ @@ -405,7 +405,7 @@ public static function serializeCollection(array $collection, $style, $allowColl * * @param mixed $data object or primitive to be deserialized * @param string $class class name is passed as a string - * @param string[] $httpHeaders HTTP headers + * @param string[]|null $httpHeaders HTTP headers * * @return object|array|null a single or an array of $class instances */ diff --git a/generated/test/Api/AppsApiTest.php b/generated/test/Api/AppsApiTest.php deleted file mode 100644 index 5515713..0000000 --- a/generated/test/Api/AppsApiTest.php +++ /dev/null @@ -1,86 +0,0 @@ -