snapshot of https://github.com/ory/kratos.git (master, 2026-09-15; blobs > 131072B omitted)
Some checks failed
CI / Run tests and lints (push) Failing after 29s
CI / Build CLI docs (push) Has been skipped
CI / Run Playwright end-to-end tests (mysql) (push) Failing after 3s
CI / Run Playwright end-to-end tests (postgres) (push) Failing after 2s
CI / Run Playwright end-to-end tests (sqlite) (push) Failing after 3s
CodeQL / Analyze (go) (push) Failing after 4s
CodeQL / Analyze (javascript) (push) Failing after 3s
Docker Image Scanners / scanners (push) Failing after 4s
Synchronize Issue Labels / Synchronize Issue Labels (push) Has been skipped
CI / Run end-to-end tests (postgres) (push) Failing after 19s
CI / Run end-to-end tests (sqlite) (push) Failing after 2s
CI / Run Playwright end-to-end tests (cockroach) (push) Failing after 2s
CI / Draft newsletter (push) Has been skipped
CI / Generate release (push) Has been skipped
CI / Pending approval Slack notification (push) Has been skipped
CI / Send newsletter (push) Has been skipped
Some checks failed
CI / Run tests and lints (push) Failing after 29s
CI / Build CLI docs (push) Has been skipped
CI / Run Playwright end-to-end tests (mysql) (push) Failing after 3s
CI / Run Playwright end-to-end tests (postgres) (push) Failing after 2s
CI / Run Playwright end-to-end tests (sqlite) (push) Failing after 3s
CodeQL / Analyze (go) (push) Failing after 4s
CodeQL / Analyze (javascript) (push) Failing after 3s
Docker Image Scanners / scanners (push) Failing after 4s
Synchronize Issue Labels / Synchronize Issue Labels (push) Has been skipped
CI / Run end-to-end tests (postgres) (push) Failing after 19s
CI / Run end-to-end tests (sqlite) (push) Failing after 2s
CI / Run Playwright end-to-end tests (cockroach) (push) Failing after 2s
CI / Draft newsletter (push) Has been skipped
CI / Generate release (push) Has been skipped
CI / Pending approval Slack notification (push) Has been skipped
CI / Send newsletter (push) Has been skipped
This commit is contained in:
24
pkg/httpclient/.gitignore
vendored
Normal file
24
pkg/httpclient/.gitignore
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
|
||||
# Folders
|
||||
_obj
|
||||
_test
|
||||
|
||||
# Architecture specific extensions/prefixes
|
||||
*.[568vq]
|
||||
[568vq].out
|
||||
|
||||
*.cgo1.go
|
||||
*.cgo2.c
|
||||
_cgo_defun.c
|
||||
_cgo_gotypes.go
|
||||
_cgo_export.*
|
||||
|
||||
_testmain.go
|
||||
|
||||
*.exe
|
||||
*.test
|
||||
*.prof
|
||||
23
pkg/httpclient/.openapi-generator-ignore
Normal file
23
pkg/httpclient/.openapi-generator-ignore
Normal file
@@ -0,0 +1,23 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
||||
352
pkg/httpclient/.openapi-generator/FILES
Normal file
352
pkg/httpclient/.openapi-generator/FILES
Normal file
@@ -0,0 +1,352 @@
|
||||
.gitignore
|
||||
.openapi-generator-ignore
|
||||
.travis.yml
|
||||
README.md
|
||||
api/openapi.yaml
|
||||
api_courier.go
|
||||
api_frontend.go
|
||||
api_identity.go
|
||||
api_metadata.go
|
||||
client.go
|
||||
configuration.go
|
||||
docs/AdminIdentityImportCredentialsLookupSecret.md
|
||||
docs/AdminIdentityImportCredentialsLookupSecretConfig.md
|
||||
docs/AuthenticatorAssuranceLevel.md
|
||||
docs/BatchPatchIdentitiesResponse.md
|
||||
docs/ConsistencyRequestParameters.md
|
||||
docs/ContinueWith.md
|
||||
docs/ContinueWithDeviceAuthnPinEntryUi.md
|
||||
docs/ContinueWithDeviceAuthnPinEntryUiData.md
|
||||
docs/ContinueWithRecoveryUi.md
|
||||
docs/ContinueWithRecoveryUiFlow.md
|
||||
docs/ContinueWithRedirectBrowserTo.md
|
||||
docs/ContinueWithSetOrySessionToken.md
|
||||
docs/ContinueWithSettingsUi.md
|
||||
docs/ContinueWithSettingsUiFlow.md
|
||||
docs/ContinueWithVerificationUi.md
|
||||
docs/ContinueWithVerificationUiFlow.md
|
||||
docs/CourierAPI.md
|
||||
docs/CourierMessageStatus.md
|
||||
docs/CourierMessageType.md
|
||||
docs/CreateFedcmFlowResponse.md
|
||||
docs/CreateIdentityBody.md
|
||||
docs/CreateRecoveryCodeForIdentityBody.md
|
||||
docs/CreateRecoveryLinkForIdentityBody.md
|
||||
docs/CreateTestLoginFlowBody.md
|
||||
docs/DeleteMySessionsCount.md
|
||||
docs/DeviceAuthnAndroidAuthorizationList.md
|
||||
docs/DeviceAuthnAndroidKeyDescription.md
|
||||
docs/DeviceAuthnAndroidRootOfTrust.md
|
||||
docs/DeviceAuthnAttestation.md
|
||||
docs/DeviceAuthnIOSAttStmt.md
|
||||
docs/DeviceAuthnIOSAttestation.md
|
||||
docs/DeviceAuthnKey.md
|
||||
docs/DeviceType.md
|
||||
docs/ErrorAuthenticatorAssuranceLevelNotSatisfied.md
|
||||
docs/ErrorBrowserLocationChangeRequired.md
|
||||
docs/ErrorFlowReplaced.md
|
||||
docs/ErrorGeneric.md
|
||||
docs/FlowError.md
|
||||
docs/FrontendAPI.md
|
||||
docs/GenericError.md
|
||||
docs/GetVersion200Response.md
|
||||
docs/HealthNotReadyStatus.md
|
||||
docs/HealthStatus.md
|
||||
docs/Identity.md
|
||||
docs/IdentityAPI.md
|
||||
docs/IdentityCredentials.md
|
||||
docs/IdentityCredentialsCode.md
|
||||
docs/IdentityCredentialsCodeAddress.md
|
||||
docs/IdentityCredentialsLookupSecretCode.md
|
||||
docs/IdentityCredentialsOidc.md
|
||||
docs/IdentityCredentialsOidcProvider.md
|
||||
docs/IdentityCredentialsPassword.md
|
||||
docs/IdentityCredentialsWebAuthn.md
|
||||
docs/IdentityCredentialsWebAuthnAttestation.md
|
||||
docs/IdentityCredentialsWebAuthnAuthenticator.md
|
||||
docs/IdentityCredentialsWebAuthnFlags.md
|
||||
docs/IdentityPatch.md
|
||||
docs/IdentityPatchResponse.md
|
||||
docs/IdentitySchemaContainer.md
|
||||
docs/IdentityWithCredentials.md
|
||||
docs/IdentityWithCredentialsOidc.md
|
||||
docs/IdentityWithCredentialsOidcConfig.md
|
||||
docs/IdentityWithCredentialsOidcConfigProvider.md
|
||||
docs/IdentityWithCredentialsPasskey.md
|
||||
docs/IdentityWithCredentialsPasskeyConfig.md
|
||||
docs/IdentityWithCredentialsPassword.md
|
||||
docs/IdentityWithCredentialsPasswordConfig.md
|
||||
docs/IdentityWithCredentialsSaml.md
|
||||
docs/IdentityWithCredentialsSamlConfig.md
|
||||
docs/IdentityWithCredentialsSamlConfigProvider.md
|
||||
docs/IdentityWithCredentialsTotp.md
|
||||
docs/IdentityWithCredentialsTotpConfig.md
|
||||
docs/IdentityWithCredentialsWebAuthn.md
|
||||
docs/IdentityWithCredentialsWebAuthnConfig.md
|
||||
docs/IsAlive200Response.md
|
||||
docs/IsReady503Response.md
|
||||
docs/JsonPatch.md
|
||||
docs/KeyState.md
|
||||
docs/LoginFlow.md
|
||||
docs/LoginFlowState.md
|
||||
docs/LoginFlowTestContext.md
|
||||
docs/LoginFlowTestDebugPayload.md
|
||||
docs/LoginFlowTestSchemaValidationError.md
|
||||
docs/LoginFlowTestStepError.md
|
||||
docs/LogoutFlow.md
|
||||
docs/ManageSessionsBody.md
|
||||
docs/ManageSessionsResponse.md
|
||||
docs/Message.md
|
||||
docs/MessageDispatch.md
|
||||
docs/MetadataAPI.md
|
||||
docs/NeedsPrivilegedSessionError.md
|
||||
docs/OAuth2Client.md
|
||||
docs/OAuth2ConsentRequestOpenIDConnectContext.md
|
||||
docs/OAuth2LoginRequest.md
|
||||
docs/PINConfig.md
|
||||
docs/PatchIdentitiesBody.md
|
||||
docs/PerformNativeLogoutBody.md
|
||||
docs/Provider.md
|
||||
docs/RecoveryCodeForIdentity.md
|
||||
docs/RecoveryFlow.md
|
||||
docs/RecoveryFlowState.md
|
||||
docs/RecoveryIdentityAddress.md
|
||||
docs/RecoveryLinkForIdentity.md
|
||||
docs/RegistrationFlow.md
|
||||
docs/RegistrationFlowState.md
|
||||
docs/SelfServiceFlowExpiredError.md
|
||||
docs/Session.md
|
||||
docs/SessionAuthenticationMethod.md
|
||||
docs/SessionDevice.md
|
||||
docs/SettingsFlow.md
|
||||
docs/SettingsFlowState.md
|
||||
docs/SuccessfulCodeExchangeResponse.md
|
||||
docs/SuccessfulNativeLogin.md
|
||||
docs/SuccessfulNativeRegistration.md
|
||||
docs/TokenPagination.md
|
||||
docs/TokenPaginationHeaders.md
|
||||
docs/UiContainer.md
|
||||
docs/UiNode.md
|
||||
docs/UiNodeAnchorAttributes.md
|
||||
docs/UiNodeAttributes.md
|
||||
docs/UiNodeDivisionAttributes.md
|
||||
docs/UiNodeImageAttributes.md
|
||||
docs/UiNodeInputAttributes.md
|
||||
docs/UiNodeInputAttributesOption.md
|
||||
docs/UiNodeMeta.md
|
||||
docs/UiNodeScriptAttributes.md
|
||||
docs/UiNodeTextAttributes.md
|
||||
docs/UiText.md
|
||||
docs/UpdateFedcmFlowBody.md
|
||||
docs/UpdateIdentityBody.md
|
||||
docs/UpdateLoginFlowBody.md
|
||||
docs/UpdateLoginFlowWithCodeMethod.md
|
||||
docs/UpdateLoginFlowWithIdentifierFirstMethod.md
|
||||
docs/UpdateLoginFlowWithLookupSecretMethod.md
|
||||
docs/UpdateLoginFlowWithOidcMethod.md
|
||||
docs/UpdateLoginFlowWithPasskeyMethod.md
|
||||
docs/UpdateLoginFlowWithPasswordMethod.md
|
||||
docs/UpdateLoginFlowWithSamlMethod.md
|
||||
docs/UpdateLoginFlowWithTotpMethod.md
|
||||
docs/UpdateLoginFlowWithWebAuthnMethod.md
|
||||
docs/UpdateRecoveryFlowBody.md
|
||||
docs/UpdateRecoveryFlowWithCodeMethod.md
|
||||
docs/UpdateRecoveryFlowWithLinkMethod.md
|
||||
docs/UpdateRegistrationFlowBody.md
|
||||
docs/UpdateRegistrationFlowWithCodeMethod.md
|
||||
docs/UpdateRegistrationFlowWithOidcMethod.md
|
||||
docs/UpdateRegistrationFlowWithPasskeyMethod.md
|
||||
docs/UpdateRegistrationFlowWithPasswordMethod.md
|
||||
docs/UpdateRegistrationFlowWithProfileMethod.md
|
||||
docs/UpdateRegistrationFlowWithSamlMethod.md
|
||||
docs/UpdateRegistrationFlowWithWebAuthnMethod.md
|
||||
docs/UpdateSettingsFlowBody.md
|
||||
docs/UpdateSettingsFlowWithLookupMethod.md
|
||||
docs/UpdateSettingsFlowWithOidcMethod.md
|
||||
docs/UpdateSettingsFlowWithPasskeyMethod.md
|
||||
docs/UpdateSettingsFlowWithPasswordMethod.md
|
||||
docs/UpdateSettingsFlowWithProfileMethod.md
|
||||
docs/UpdateSettingsFlowWithSamlMethod.md
|
||||
docs/UpdateSettingsFlowWithTotpMethod.md
|
||||
docs/UpdateSettingsFlowWithWebAuthnMethod.md
|
||||
docs/UpdateVerificationFlowBody.md
|
||||
docs/UpdateVerificationFlowWithCodeMethod.md
|
||||
docs/UpdateVerificationFlowWithLinkMethod.md
|
||||
docs/UserVerification.md
|
||||
docs/VerifiableIdentityAddress.md
|
||||
docs/VerificationFlow.md
|
||||
docs/VerificationFlowState.md
|
||||
docs/Version.md
|
||||
git_push.sh
|
||||
go.mod
|
||||
go.sum
|
||||
model_admin_identity_import_credentials_lookup_secret.go
|
||||
model_admin_identity_import_credentials_lookup_secret_config.go
|
||||
model_authenticator_assurance_level.go
|
||||
model_batch_patch_identities_response.go
|
||||
model_consistency_request_parameters.go
|
||||
model_continue_with.go
|
||||
model_continue_with_device_authn_pin_entry_ui.go
|
||||
model_continue_with_device_authn_pin_entry_ui_data.go
|
||||
model_continue_with_recovery_ui.go
|
||||
model_continue_with_recovery_ui_flow.go
|
||||
model_continue_with_redirect_browser_to.go
|
||||
model_continue_with_set_ory_session_token.go
|
||||
model_continue_with_settings_ui.go
|
||||
model_continue_with_settings_ui_flow.go
|
||||
model_continue_with_verification_ui.go
|
||||
model_continue_with_verification_ui_flow.go
|
||||
model_courier_message_status.go
|
||||
model_courier_message_type.go
|
||||
model_create_fedcm_flow_response.go
|
||||
model_create_identity_body.go
|
||||
model_create_recovery_code_for_identity_body.go
|
||||
model_create_recovery_link_for_identity_body.go
|
||||
model_create_test_login_flow_body.go
|
||||
model_delete_my_sessions_count.go
|
||||
model_device_authn_android_authorization_list.go
|
||||
model_device_authn_android_key_description.go
|
||||
model_device_authn_android_root_of_trust.go
|
||||
model_device_authn_attestation.go
|
||||
model_device_authn_ios_att_stmt.go
|
||||
model_device_authn_ios_attestation.go
|
||||
model_device_authn_key.go
|
||||
model_device_type.go
|
||||
model_error_authenticator_assurance_level_not_satisfied.go
|
||||
model_error_browser_location_change_required.go
|
||||
model_error_flow_replaced.go
|
||||
model_error_generic.go
|
||||
model_flow_error.go
|
||||
model_generic_error.go
|
||||
model_get_version_200_response.go
|
||||
model_health_not_ready_status.go
|
||||
model_health_status.go
|
||||
model_identity.go
|
||||
model_identity_credentials.go
|
||||
model_identity_credentials_code.go
|
||||
model_identity_credentials_code_address.go
|
||||
model_identity_credentials_lookup_secret_code.go
|
||||
model_identity_credentials_oidc.go
|
||||
model_identity_credentials_oidc_provider.go
|
||||
model_identity_credentials_password.go
|
||||
model_identity_credentials_web_authn.go
|
||||
model_identity_credentials_web_authn_attestation.go
|
||||
model_identity_credentials_web_authn_authenticator.go
|
||||
model_identity_credentials_web_authn_flags.go
|
||||
model_identity_patch.go
|
||||
model_identity_patch_response.go
|
||||
model_identity_schema_container.go
|
||||
model_identity_with_credentials.go
|
||||
model_identity_with_credentials_oidc.go
|
||||
model_identity_with_credentials_oidc_config.go
|
||||
model_identity_with_credentials_oidc_config_provider.go
|
||||
model_identity_with_credentials_passkey.go
|
||||
model_identity_with_credentials_passkey_config.go
|
||||
model_identity_with_credentials_password.go
|
||||
model_identity_with_credentials_password_config.go
|
||||
model_identity_with_credentials_saml.go
|
||||
model_identity_with_credentials_saml_config.go
|
||||
model_identity_with_credentials_saml_config_provider.go
|
||||
model_identity_with_credentials_totp.go
|
||||
model_identity_with_credentials_totp_config.go
|
||||
model_identity_with_credentials_web_authn.go
|
||||
model_identity_with_credentials_web_authn_config.go
|
||||
model_is_alive_200_response.go
|
||||
model_is_ready_503_response.go
|
||||
model_json_patch.go
|
||||
model_key_state.go
|
||||
model_login_flow.go
|
||||
model_login_flow_state.go
|
||||
model_login_flow_test_context.go
|
||||
model_login_flow_test_debug_payload.go
|
||||
model_login_flow_test_schema_validation_error.go
|
||||
model_login_flow_test_step_error.go
|
||||
model_logout_flow.go
|
||||
model_manage_sessions_body.go
|
||||
model_manage_sessions_response.go
|
||||
model_message.go
|
||||
model_message_dispatch.go
|
||||
model_needs_privileged_session_error.go
|
||||
model_o_auth2_client.go
|
||||
model_o_auth2_consent_request_open_id_connect_context.go
|
||||
model_o_auth2_login_request.go
|
||||
model_patch_identities_body.go
|
||||
model_perform_native_logout_body.go
|
||||
model_pin_config.go
|
||||
model_provider.go
|
||||
model_recovery_code_for_identity.go
|
||||
model_recovery_flow.go
|
||||
model_recovery_flow_state.go
|
||||
model_recovery_identity_address.go
|
||||
model_recovery_link_for_identity.go
|
||||
model_registration_flow.go
|
||||
model_registration_flow_state.go
|
||||
model_self_service_flow_expired_error.go
|
||||
model_session.go
|
||||
model_session_authentication_method.go
|
||||
model_session_device.go
|
||||
model_settings_flow.go
|
||||
model_settings_flow_state.go
|
||||
model_successful_code_exchange_response.go
|
||||
model_successful_native_login.go
|
||||
model_successful_native_registration.go
|
||||
model_token_pagination.go
|
||||
model_token_pagination_headers.go
|
||||
model_ui_container.go
|
||||
model_ui_node.go
|
||||
model_ui_node_anchor_attributes.go
|
||||
model_ui_node_attributes.go
|
||||
model_ui_node_division_attributes.go
|
||||
model_ui_node_image_attributes.go
|
||||
model_ui_node_input_attributes.go
|
||||
model_ui_node_input_attributes_option.go
|
||||
model_ui_node_meta.go
|
||||
model_ui_node_script_attributes.go
|
||||
model_ui_node_text_attributes.go
|
||||
model_ui_text.go
|
||||
model_update_fedcm_flow_body.go
|
||||
model_update_identity_body.go
|
||||
model_update_login_flow_body.go
|
||||
model_update_login_flow_with_code_method.go
|
||||
model_update_login_flow_with_identifier_first_method.go
|
||||
model_update_login_flow_with_lookup_secret_method.go
|
||||
model_update_login_flow_with_oidc_method.go
|
||||
model_update_login_flow_with_passkey_method.go
|
||||
model_update_login_flow_with_password_method.go
|
||||
model_update_login_flow_with_saml_method.go
|
||||
model_update_login_flow_with_totp_method.go
|
||||
model_update_login_flow_with_web_authn_method.go
|
||||
model_update_recovery_flow_body.go
|
||||
model_update_recovery_flow_with_code_method.go
|
||||
model_update_recovery_flow_with_link_method.go
|
||||
model_update_registration_flow_body.go
|
||||
model_update_registration_flow_with_code_method.go
|
||||
model_update_registration_flow_with_oidc_method.go
|
||||
model_update_registration_flow_with_passkey_method.go
|
||||
model_update_registration_flow_with_password_method.go
|
||||
model_update_registration_flow_with_profile_method.go
|
||||
model_update_registration_flow_with_saml_method.go
|
||||
model_update_registration_flow_with_web_authn_method.go
|
||||
model_update_settings_flow_body.go
|
||||
model_update_settings_flow_with_lookup_method.go
|
||||
model_update_settings_flow_with_oidc_method.go
|
||||
model_update_settings_flow_with_passkey_method.go
|
||||
model_update_settings_flow_with_password_method.go
|
||||
model_update_settings_flow_with_profile_method.go
|
||||
model_update_settings_flow_with_saml_method.go
|
||||
model_update_settings_flow_with_totp_method.go
|
||||
model_update_settings_flow_with_web_authn_method.go
|
||||
model_update_verification_flow_body.go
|
||||
model_update_verification_flow_with_code_method.go
|
||||
model_update_verification_flow_with_link_method.go
|
||||
model_user_verification.go
|
||||
model_verifiable_identity_address.go
|
||||
model_verification_flow.go
|
||||
model_verification_flow_state.go
|
||||
model_version.go
|
||||
response.go
|
||||
test/api_courier_test.go
|
||||
test/api_frontend_test.go
|
||||
test/api_identity_test.go
|
||||
test/api_metadata_test.go
|
||||
utils.go
|
||||
1
pkg/httpclient/.openapi-generator/VERSION
Normal file
1
pkg/httpclient/.openapi-generator/VERSION
Normal file
@@ -0,0 +1 @@
|
||||
7.12.0
|
||||
8
pkg/httpclient/.travis.yml
Normal file
8
pkg/httpclient/.travis.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
language: go
|
||||
|
||||
install:
|
||||
- go get -d -v .
|
||||
|
||||
script:
|
||||
- go build -v ./
|
||||
|
||||
357
pkg/httpclient/README.md
Normal file
357
pkg/httpclient/README.md
Normal file
@@ -0,0 +1,357 @@
|
||||
# Go API client for client
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
|
||||
## Overview
|
||||
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
|
||||
|
||||
- API version:
|
||||
- Package version: 1.0.0
|
||||
- Generator version: 7.12.0
|
||||
- Build package: org.openapitools.codegen.languages.GoClientCodegen
|
||||
|
||||
## Installation
|
||||
|
||||
Install the following dependencies:
|
||||
|
||||
```sh
|
||||
go get github.com/stretchr/testify/assert
|
||||
go get golang.org/x/net/context
|
||||
```
|
||||
|
||||
Put the package under your project folder and add the following in import:
|
||||
|
||||
```go
|
||||
import client "github.com/ory/client-go"
|
||||
```
|
||||
|
||||
To use a proxy, set the environment variable `HTTP_PROXY`:
|
||||
|
||||
```go
|
||||
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
|
||||
```
|
||||
|
||||
## Configuration of Server URL
|
||||
|
||||
Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification.
|
||||
|
||||
### Select Server Configuration
|
||||
|
||||
For using other server than the one defined on index 0 set context value `client.ContextServerIndex` of type `int`.
|
||||
|
||||
```go
|
||||
ctx := context.WithValue(context.Background(), client.ContextServerIndex, 1)
|
||||
```
|
||||
|
||||
### Templated Server URL
|
||||
|
||||
Templated server URL is formatted using default variables from configuration or from context value `client.ContextServerVariables` of type `map[string]string`.
|
||||
|
||||
```go
|
||||
ctx := context.WithValue(context.Background(), client.ContextServerVariables, map[string]string{
|
||||
"basePath": "v2",
|
||||
})
|
||||
```
|
||||
|
||||
Note, enum values are always validated and all unused variables are silently ignored.
|
||||
|
||||
### URLs Configuration per Operation
|
||||
|
||||
Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
|
||||
An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
|
||||
Similar rules for overriding default operation server index and variables applies by using `client.ContextOperationServerIndices` and `client.ContextOperationServerVariables` context maps.
|
||||
|
||||
```go
|
||||
ctx := context.WithValue(context.Background(), client.ContextOperationServerIndices, map[string]int{
|
||||
"{classname}Service.{nickname}": 2,
|
||||
})
|
||||
ctx = context.WithValue(context.Background(), client.ContextOperationServerVariables, map[string]map[string]string{
|
||||
"{classname}Service.{nickname}": {
|
||||
"port": "8443",
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*CourierAPI* | [**GetCourierMessage**](docs/CourierAPI.md#getcouriermessage) | **Get** /admin/courier/messages/{id} | Get a Message
|
||||
*CourierAPI* | [**ListCourierMessages**](docs/CourierAPI.md#listcouriermessages) | **Get** /admin/courier/messages | List Messages
|
||||
*FrontendAPI* | [**CreateBrowserLoginFlow**](docs/FrontendAPI.md#createbrowserloginflow) | **Get** /self-service/login/browser | Create Login Flow for Browsers
|
||||
*FrontendAPI* | [**CreateBrowserLogoutFlow**](docs/FrontendAPI.md#createbrowserlogoutflow) | **Get** /self-service/logout/browser | Create a Logout URL for Browsers
|
||||
*FrontendAPI* | [**CreateBrowserRecoveryFlow**](docs/FrontendAPI.md#createbrowserrecoveryflow) | **Get** /self-service/recovery/browser | Create Recovery Flow for Browsers
|
||||
*FrontendAPI* | [**CreateBrowserRegistrationFlow**](docs/FrontendAPI.md#createbrowserregistrationflow) | **Get** /self-service/registration/browser | Create Registration Flow for Browsers
|
||||
*FrontendAPI* | [**CreateBrowserSettingsFlow**](docs/FrontendAPI.md#createbrowsersettingsflow) | **Get** /self-service/settings/browser | Create Settings Flow for Browsers
|
||||
*FrontendAPI* | [**CreateBrowserVerificationFlow**](docs/FrontendAPI.md#createbrowserverificationflow) | **Get** /self-service/verification/browser | Create Verification Flow for Browser Clients
|
||||
*FrontendAPI* | [**CreateFedcmFlow**](docs/FrontendAPI.md#createfedcmflow) | **Get** /self-service/fed-cm/parameters | Get FedCM Parameters
|
||||
*FrontendAPI* | [**CreateNativeLoginFlow**](docs/FrontendAPI.md#createnativeloginflow) | **Get** /self-service/login/api | Create Login Flow for Native Apps
|
||||
*FrontendAPI* | [**CreateNativeRecoveryFlow**](docs/FrontendAPI.md#createnativerecoveryflow) | **Get** /self-service/recovery/api | Create Recovery Flow for Native Apps
|
||||
*FrontendAPI* | [**CreateNativeRegistrationFlow**](docs/FrontendAPI.md#createnativeregistrationflow) | **Get** /self-service/registration/api | Create Registration Flow for Native Apps
|
||||
*FrontendAPI* | [**CreateNativeSettingsFlow**](docs/FrontendAPI.md#createnativesettingsflow) | **Get** /self-service/settings/api | Create Settings Flow for Native Apps
|
||||
*FrontendAPI* | [**CreateNativeVerificationFlow**](docs/FrontendAPI.md#createnativeverificationflow) | **Get** /self-service/verification/api | Create Verification Flow for Native Apps
|
||||
*FrontendAPI* | [**DeleteTestLoginFlow**](docs/FrontendAPI.md#deletetestloginflow) | **Delete** /self-service/login/test | Delete a test OIDC login flow
|
||||
*FrontendAPI* | [**DisableMyOtherSessions**](docs/FrontendAPI.md#disablemyothersessions) | **Delete** /sessions | Disable my other sessions
|
||||
*FrontendAPI* | [**DisableMySession**](docs/FrontendAPI.md#disablemysession) | **Delete** /sessions/{id} | Disable one of my sessions
|
||||
*FrontendAPI* | [**ExchangeSessionToken**](docs/FrontendAPI.md#exchangesessiontoken) | **Get** /sessions/token-exchange | Exchange Session Token
|
||||
*FrontendAPI* | [**GetFlowError**](docs/FrontendAPI.md#getflowerror) | **Get** /self-service/errors | Get User-Flow Errors
|
||||
*FrontendAPI* | [**GetLoginFlow**](docs/FrontendAPI.md#getloginflow) | **Get** /self-service/login/flows | Get Login Flow
|
||||
*FrontendAPI* | [**GetRecoveryFlow**](docs/FrontendAPI.md#getrecoveryflow) | **Get** /self-service/recovery/flows | Get Recovery Flow
|
||||
*FrontendAPI* | [**GetRegistrationFlow**](docs/FrontendAPI.md#getregistrationflow) | **Get** /self-service/registration/flows | Get Registration Flow
|
||||
*FrontendAPI* | [**GetSettingsFlow**](docs/FrontendAPI.md#getsettingsflow) | **Get** /self-service/settings/flows | Get Settings Flow
|
||||
*FrontendAPI* | [**GetVerificationFlow**](docs/FrontendAPI.md#getverificationflow) | **Get** /self-service/verification/flows | Get Verification Flow
|
||||
*FrontendAPI* | [**GetWebAuthnJavaScript**](docs/FrontendAPI.md#getwebauthnjavascript) | **Get** /.well-known/ory/webauthn.js | Get WebAuthn JavaScript
|
||||
*FrontendAPI* | [**GetWellKnownChangePassword**](docs/FrontendAPI.md#getwellknownchangepassword) | **Get** /.well-known/change-password | Change Password URL
|
||||
*FrontendAPI* | [**ListMySessions**](docs/FrontendAPI.md#listmysessions) | **Get** /sessions | Get My Active Sessions
|
||||
*FrontendAPI* | [**PerformNativeLogout**](docs/FrontendAPI.md#performnativelogout) | **Delete** /self-service/logout/api | Perform Logout for Native Apps
|
||||
*FrontendAPI* | [**ToSession**](docs/FrontendAPI.md#tosession) | **Get** /sessions/whoami | Check Who the Current HTTP Session Belongs To
|
||||
*FrontendAPI* | [**UpdateFedcmFlow**](docs/FrontendAPI.md#updatefedcmflow) | **Post** /self-service/fed-cm/token | Submit a FedCM token
|
||||
*FrontendAPI* | [**UpdateLoginFlow**](docs/FrontendAPI.md#updateloginflow) | **Post** /self-service/login | Submit a Login Flow
|
||||
*FrontendAPI* | [**UpdateLogoutFlow**](docs/FrontendAPI.md#updatelogoutflow) | **Get** /self-service/logout | Update Logout Flow
|
||||
*FrontendAPI* | [**UpdateRecoveryFlow**](docs/FrontendAPI.md#updaterecoveryflow) | **Post** /self-service/recovery | Update Recovery Flow
|
||||
*FrontendAPI* | [**UpdateRegistrationFlow**](docs/FrontendAPI.md#updateregistrationflow) | **Post** /self-service/registration | Update Registration Flow
|
||||
*FrontendAPI* | [**UpdateSettingsFlow**](docs/FrontendAPI.md#updatesettingsflow) | **Post** /self-service/settings | Complete Settings Flow
|
||||
*FrontendAPI* | [**UpdateVerificationFlow**](docs/FrontendAPI.md#updateverificationflow) | **Post** /self-service/verification | Complete Verification Flow
|
||||
*IdentityAPI* | [**BatchPatchIdentities**](docs/IdentityAPI.md#batchpatchidentities) | **Patch** /admin/identities | Create multiple identities
|
||||
*IdentityAPI* | [**CreateIdentity**](docs/IdentityAPI.md#createidentity) | **Post** /admin/identities | Create an Identity
|
||||
*IdentityAPI* | [**CreateRecoveryCodeForIdentity**](docs/IdentityAPI.md#createrecoverycodeforidentity) | **Post** /admin/recovery/code | Create a Recovery Code
|
||||
*IdentityAPI* | [**CreateRecoveryLinkForIdentity**](docs/IdentityAPI.md#createrecoverylinkforidentity) | **Post** /admin/recovery/link | Create a Recovery Link
|
||||
*IdentityAPI* | [**CreateTestLoginFlow**](docs/IdentityAPI.md#createtestloginflow) | **Post** /admin/test-login-flows | Create a test OIDC login flow
|
||||
*IdentityAPI* | [**DeleteIdentity**](docs/IdentityAPI.md#deleteidentity) | **Delete** /admin/identities/{id} | Delete an Identity
|
||||
*IdentityAPI* | [**DeleteIdentityCredentials**](docs/IdentityAPI.md#deleteidentitycredentials) | **Delete** /admin/identities/{id}/credentials/{type} | Delete a credential for a specific identity
|
||||
*IdentityAPI* | [**DeleteIdentitySessions**](docs/IdentityAPI.md#deleteidentitysessions) | **Delete** /admin/identities/{id}/sessions | Delete & Invalidate an Identity's Sessions
|
||||
*IdentityAPI* | [**DisableSession**](docs/IdentityAPI.md#disablesession) | **Delete** /admin/sessions/{id} | Deactivate a Session
|
||||
*IdentityAPI* | [**ExtendSession**](docs/IdentityAPI.md#extendsession) | **Patch** /admin/sessions/{id}/extend | Extend a Session
|
||||
*IdentityAPI* | [**GetIdentity**](docs/IdentityAPI.md#getidentity) | **Get** /admin/identities/{id} | Get an Identity
|
||||
*IdentityAPI* | [**GetIdentityByExternalID**](docs/IdentityAPI.md#getidentitybyexternalid) | **Get** /admin/identities/by/external/{externalID} | Get an Identity by its External ID
|
||||
*IdentityAPI* | [**GetIdentitySchema**](docs/IdentityAPI.md#getidentityschema) | **Get** /schemas/{id} | Get Identity JSON Schema
|
||||
*IdentityAPI* | [**GetSession**](docs/IdentityAPI.md#getsession) | **Get** /admin/sessions/{id} | Get Session
|
||||
*IdentityAPI* | [**ListIdentities**](docs/IdentityAPI.md#listidentities) | **Get** /admin/identities | List Identities
|
||||
*IdentityAPI* | [**ListIdentitySchemas**](docs/IdentityAPI.md#listidentityschemas) | **Get** /schemas | Get all Identity Schemas
|
||||
*IdentityAPI* | [**ListIdentitySessions**](docs/IdentityAPI.md#listidentitysessions) | **Get** /admin/identities/{id}/sessions | List an Identity's Sessions
|
||||
*IdentityAPI* | [**ListSessions**](docs/IdentityAPI.md#listsessions) | **Get** /admin/sessions | List All Sessions
|
||||
*IdentityAPI* | [**ManageSessions**](docs/IdentityAPI.md#managesessions) | **Post** /admin/sessions | Manage sessions in bulk
|
||||
*IdentityAPI* | [**PatchIdentity**](docs/IdentityAPI.md#patchidentity) | **Patch** /admin/identities/{id} | Patch an Identity
|
||||
*IdentityAPI* | [**UpdateIdentity**](docs/IdentityAPI.md#updateidentity) | **Put** /admin/identities/{id} | Update an Identity
|
||||
*MetadataAPI* | [**GetVersion**](docs/MetadataAPI.md#getversion) | **Get** /version | Return Running Software Version.
|
||||
*MetadataAPI* | [**IsAlive**](docs/MetadataAPI.md#isalive) | **Get** /health/alive | Check HTTP Server Status
|
||||
*MetadataAPI* | [**IsReady**](docs/MetadataAPI.md#isready) | **Get** /health/ready | Check HTTP Server and Database Status
|
||||
|
||||
|
||||
## Documentation For Models
|
||||
|
||||
- [AdminIdentityImportCredentialsLookupSecret](docs/AdminIdentityImportCredentialsLookupSecret.md)
|
||||
- [AdminIdentityImportCredentialsLookupSecretConfig](docs/AdminIdentityImportCredentialsLookupSecretConfig.md)
|
||||
- [AuthenticatorAssuranceLevel](docs/AuthenticatorAssuranceLevel.md)
|
||||
- [BatchPatchIdentitiesResponse](docs/BatchPatchIdentitiesResponse.md)
|
||||
- [ConsistencyRequestParameters](docs/ConsistencyRequestParameters.md)
|
||||
- [ContinueWith](docs/ContinueWith.md)
|
||||
- [ContinueWithDeviceAuthnPinEntryUi](docs/ContinueWithDeviceAuthnPinEntryUi.md)
|
||||
- [ContinueWithDeviceAuthnPinEntryUiData](docs/ContinueWithDeviceAuthnPinEntryUiData.md)
|
||||
- [ContinueWithRecoveryUi](docs/ContinueWithRecoveryUi.md)
|
||||
- [ContinueWithRecoveryUiFlow](docs/ContinueWithRecoveryUiFlow.md)
|
||||
- [ContinueWithRedirectBrowserTo](docs/ContinueWithRedirectBrowserTo.md)
|
||||
- [ContinueWithSetOrySessionToken](docs/ContinueWithSetOrySessionToken.md)
|
||||
- [ContinueWithSettingsUi](docs/ContinueWithSettingsUi.md)
|
||||
- [ContinueWithSettingsUiFlow](docs/ContinueWithSettingsUiFlow.md)
|
||||
- [ContinueWithVerificationUi](docs/ContinueWithVerificationUi.md)
|
||||
- [ContinueWithVerificationUiFlow](docs/ContinueWithVerificationUiFlow.md)
|
||||
- [CourierMessageStatus](docs/CourierMessageStatus.md)
|
||||
- [CourierMessageType](docs/CourierMessageType.md)
|
||||
- [CreateFedcmFlowResponse](docs/CreateFedcmFlowResponse.md)
|
||||
- [CreateIdentityBody](docs/CreateIdentityBody.md)
|
||||
- [CreateRecoveryCodeForIdentityBody](docs/CreateRecoveryCodeForIdentityBody.md)
|
||||
- [CreateRecoveryLinkForIdentityBody](docs/CreateRecoveryLinkForIdentityBody.md)
|
||||
- [CreateTestLoginFlowBody](docs/CreateTestLoginFlowBody.md)
|
||||
- [DeleteMySessionsCount](docs/DeleteMySessionsCount.md)
|
||||
- [DeviceAuthnAndroidAuthorizationList](docs/DeviceAuthnAndroidAuthorizationList.md)
|
||||
- [DeviceAuthnAndroidKeyDescription](docs/DeviceAuthnAndroidKeyDescription.md)
|
||||
- [DeviceAuthnAndroidRootOfTrust](docs/DeviceAuthnAndroidRootOfTrust.md)
|
||||
- [DeviceAuthnAttestation](docs/DeviceAuthnAttestation.md)
|
||||
- [DeviceAuthnIOSAttStmt](docs/DeviceAuthnIOSAttStmt.md)
|
||||
- [DeviceAuthnIOSAttestation](docs/DeviceAuthnIOSAttestation.md)
|
||||
- [DeviceAuthnKey](docs/DeviceAuthnKey.md)
|
||||
- [DeviceType](docs/DeviceType.md)
|
||||
- [ErrorAuthenticatorAssuranceLevelNotSatisfied](docs/ErrorAuthenticatorAssuranceLevelNotSatisfied.md)
|
||||
- [ErrorBrowserLocationChangeRequired](docs/ErrorBrowserLocationChangeRequired.md)
|
||||
- [ErrorFlowReplaced](docs/ErrorFlowReplaced.md)
|
||||
- [ErrorGeneric](docs/ErrorGeneric.md)
|
||||
- [FlowError](docs/FlowError.md)
|
||||
- [GenericError](docs/GenericError.md)
|
||||
- [GetVersion200Response](docs/GetVersion200Response.md)
|
||||
- [HealthNotReadyStatus](docs/HealthNotReadyStatus.md)
|
||||
- [HealthStatus](docs/HealthStatus.md)
|
||||
- [Identity](docs/Identity.md)
|
||||
- [IdentityCredentials](docs/IdentityCredentials.md)
|
||||
- [IdentityCredentialsCode](docs/IdentityCredentialsCode.md)
|
||||
- [IdentityCredentialsCodeAddress](docs/IdentityCredentialsCodeAddress.md)
|
||||
- [IdentityCredentialsLookupSecretCode](docs/IdentityCredentialsLookupSecretCode.md)
|
||||
- [IdentityCredentialsOidc](docs/IdentityCredentialsOidc.md)
|
||||
- [IdentityCredentialsOidcProvider](docs/IdentityCredentialsOidcProvider.md)
|
||||
- [IdentityCredentialsPassword](docs/IdentityCredentialsPassword.md)
|
||||
- [IdentityCredentialsWebAuthn](docs/IdentityCredentialsWebAuthn.md)
|
||||
- [IdentityCredentialsWebAuthnAttestation](docs/IdentityCredentialsWebAuthnAttestation.md)
|
||||
- [IdentityCredentialsWebAuthnAuthenticator](docs/IdentityCredentialsWebAuthnAuthenticator.md)
|
||||
- [IdentityCredentialsWebAuthnFlags](docs/IdentityCredentialsWebAuthnFlags.md)
|
||||
- [IdentityPatch](docs/IdentityPatch.md)
|
||||
- [IdentityPatchResponse](docs/IdentityPatchResponse.md)
|
||||
- [IdentitySchemaContainer](docs/IdentitySchemaContainer.md)
|
||||
- [IdentityWithCredentials](docs/IdentityWithCredentials.md)
|
||||
- [IdentityWithCredentialsOidc](docs/IdentityWithCredentialsOidc.md)
|
||||
- [IdentityWithCredentialsOidcConfig](docs/IdentityWithCredentialsOidcConfig.md)
|
||||
- [IdentityWithCredentialsOidcConfigProvider](docs/IdentityWithCredentialsOidcConfigProvider.md)
|
||||
- [IdentityWithCredentialsPasskey](docs/IdentityWithCredentialsPasskey.md)
|
||||
- [IdentityWithCredentialsPasskeyConfig](docs/IdentityWithCredentialsPasskeyConfig.md)
|
||||
- [IdentityWithCredentialsPassword](docs/IdentityWithCredentialsPassword.md)
|
||||
- [IdentityWithCredentialsPasswordConfig](docs/IdentityWithCredentialsPasswordConfig.md)
|
||||
- [IdentityWithCredentialsSaml](docs/IdentityWithCredentialsSaml.md)
|
||||
- [IdentityWithCredentialsSamlConfig](docs/IdentityWithCredentialsSamlConfig.md)
|
||||
- [IdentityWithCredentialsSamlConfigProvider](docs/IdentityWithCredentialsSamlConfigProvider.md)
|
||||
- [IdentityWithCredentialsTotp](docs/IdentityWithCredentialsTotp.md)
|
||||
- [IdentityWithCredentialsTotpConfig](docs/IdentityWithCredentialsTotpConfig.md)
|
||||
- [IdentityWithCredentialsWebAuthn](docs/IdentityWithCredentialsWebAuthn.md)
|
||||
- [IdentityWithCredentialsWebAuthnConfig](docs/IdentityWithCredentialsWebAuthnConfig.md)
|
||||
- [IsAlive200Response](docs/IsAlive200Response.md)
|
||||
- [IsReady503Response](docs/IsReady503Response.md)
|
||||
- [JsonPatch](docs/JsonPatch.md)
|
||||
- [KeyState](docs/KeyState.md)
|
||||
- [LoginFlow](docs/LoginFlow.md)
|
||||
- [LoginFlowState](docs/LoginFlowState.md)
|
||||
- [LoginFlowTestContext](docs/LoginFlowTestContext.md)
|
||||
- [LoginFlowTestDebugPayload](docs/LoginFlowTestDebugPayload.md)
|
||||
- [LoginFlowTestSchemaValidationError](docs/LoginFlowTestSchemaValidationError.md)
|
||||
- [LoginFlowTestStepError](docs/LoginFlowTestStepError.md)
|
||||
- [LogoutFlow](docs/LogoutFlow.md)
|
||||
- [ManageSessionsBody](docs/ManageSessionsBody.md)
|
||||
- [ManageSessionsResponse](docs/ManageSessionsResponse.md)
|
||||
- [Message](docs/Message.md)
|
||||
- [MessageDispatch](docs/MessageDispatch.md)
|
||||
- [NeedsPrivilegedSessionError](docs/NeedsPrivilegedSessionError.md)
|
||||
- [OAuth2Client](docs/OAuth2Client.md)
|
||||
- [OAuth2ConsentRequestOpenIDConnectContext](docs/OAuth2ConsentRequestOpenIDConnectContext.md)
|
||||
- [OAuth2LoginRequest](docs/OAuth2LoginRequest.md)
|
||||
- [PINConfig](docs/PINConfig.md)
|
||||
- [PatchIdentitiesBody](docs/PatchIdentitiesBody.md)
|
||||
- [PerformNativeLogoutBody](docs/PerformNativeLogoutBody.md)
|
||||
- [Provider](docs/Provider.md)
|
||||
- [RecoveryCodeForIdentity](docs/RecoveryCodeForIdentity.md)
|
||||
- [RecoveryFlow](docs/RecoveryFlow.md)
|
||||
- [RecoveryFlowState](docs/RecoveryFlowState.md)
|
||||
- [RecoveryIdentityAddress](docs/RecoveryIdentityAddress.md)
|
||||
- [RecoveryLinkForIdentity](docs/RecoveryLinkForIdentity.md)
|
||||
- [RegistrationFlow](docs/RegistrationFlow.md)
|
||||
- [RegistrationFlowState](docs/RegistrationFlowState.md)
|
||||
- [SelfServiceFlowExpiredError](docs/SelfServiceFlowExpiredError.md)
|
||||
- [Session](docs/Session.md)
|
||||
- [SessionAuthenticationMethod](docs/SessionAuthenticationMethod.md)
|
||||
- [SessionDevice](docs/SessionDevice.md)
|
||||
- [SettingsFlow](docs/SettingsFlow.md)
|
||||
- [SettingsFlowState](docs/SettingsFlowState.md)
|
||||
- [SuccessfulCodeExchangeResponse](docs/SuccessfulCodeExchangeResponse.md)
|
||||
- [SuccessfulNativeLogin](docs/SuccessfulNativeLogin.md)
|
||||
- [SuccessfulNativeRegistration](docs/SuccessfulNativeRegistration.md)
|
||||
- [TokenPagination](docs/TokenPagination.md)
|
||||
- [TokenPaginationHeaders](docs/TokenPaginationHeaders.md)
|
||||
- [UiContainer](docs/UiContainer.md)
|
||||
- [UiNode](docs/UiNode.md)
|
||||
- [UiNodeAnchorAttributes](docs/UiNodeAnchorAttributes.md)
|
||||
- [UiNodeAttributes](docs/UiNodeAttributes.md)
|
||||
- [UiNodeDivisionAttributes](docs/UiNodeDivisionAttributes.md)
|
||||
- [UiNodeImageAttributes](docs/UiNodeImageAttributes.md)
|
||||
- [UiNodeInputAttributes](docs/UiNodeInputAttributes.md)
|
||||
- [UiNodeInputAttributesOption](docs/UiNodeInputAttributesOption.md)
|
||||
- [UiNodeMeta](docs/UiNodeMeta.md)
|
||||
- [UiNodeScriptAttributes](docs/UiNodeScriptAttributes.md)
|
||||
- [UiNodeTextAttributes](docs/UiNodeTextAttributes.md)
|
||||
- [UiText](docs/UiText.md)
|
||||
- [UpdateFedcmFlowBody](docs/UpdateFedcmFlowBody.md)
|
||||
- [UpdateIdentityBody](docs/UpdateIdentityBody.md)
|
||||
- [UpdateLoginFlowBody](docs/UpdateLoginFlowBody.md)
|
||||
- [UpdateLoginFlowWithCodeMethod](docs/UpdateLoginFlowWithCodeMethod.md)
|
||||
- [UpdateLoginFlowWithIdentifierFirstMethod](docs/UpdateLoginFlowWithIdentifierFirstMethod.md)
|
||||
- [UpdateLoginFlowWithLookupSecretMethod](docs/UpdateLoginFlowWithLookupSecretMethod.md)
|
||||
- [UpdateLoginFlowWithOidcMethod](docs/UpdateLoginFlowWithOidcMethod.md)
|
||||
- [UpdateLoginFlowWithPasskeyMethod](docs/UpdateLoginFlowWithPasskeyMethod.md)
|
||||
- [UpdateLoginFlowWithPasswordMethod](docs/UpdateLoginFlowWithPasswordMethod.md)
|
||||
- [UpdateLoginFlowWithSamlMethod](docs/UpdateLoginFlowWithSamlMethod.md)
|
||||
- [UpdateLoginFlowWithTotpMethod](docs/UpdateLoginFlowWithTotpMethod.md)
|
||||
- [UpdateLoginFlowWithWebAuthnMethod](docs/UpdateLoginFlowWithWebAuthnMethod.md)
|
||||
- [UpdateRecoveryFlowBody](docs/UpdateRecoveryFlowBody.md)
|
||||
- [UpdateRecoveryFlowWithCodeMethod](docs/UpdateRecoveryFlowWithCodeMethod.md)
|
||||
- [UpdateRecoveryFlowWithLinkMethod](docs/UpdateRecoveryFlowWithLinkMethod.md)
|
||||
- [UpdateRegistrationFlowBody](docs/UpdateRegistrationFlowBody.md)
|
||||
- [UpdateRegistrationFlowWithCodeMethod](docs/UpdateRegistrationFlowWithCodeMethod.md)
|
||||
- [UpdateRegistrationFlowWithOidcMethod](docs/UpdateRegistrationFlowWithOidcMethod.md)
|
||||
- [UpdateRegistrationFlowWithPasskeyMethod](docs/UpdateRegistrationFlowWithPasskeyMethod.md)
|
||||
- [UpdateRegistrationFlowWithPasswordMethod](docs/UpdateRegistrationFlowWithPasswordMethod.md)
|
||||
- [UpdateRegistrationFlowWithProfileMethod](docs/UpdateRegistrationFlowWithProfileMethod.md)
|
||||
- [UpdateRegistrationFlowWithSamlMethod](docs/UpdateRegistrationFlowWithSamlMethod.md)
|
||||
- [UpdateRegistrationFlowWithWebAuthnMethod](docs/UpdateRegistrationFlowWithWebAuthnMethod.md)
|
||||
- [UpdateSettingsFlowBody](docs/UpdateSettingsFlowBody.md)
|
||||
- [UpdateSettingsFlowWithLookupMethod](docs/UpdateSettingsFlowWithLookupMethod.md)
|
||||
- [UpdateSettingsFlowWithOidcMethod](docs/UpdateSettingsFlowWithOidcMethod.md)
|
||||
- [UpdateSettingsFlowWithPasskeyMethod](docs/UpdateSettingsFlowWithPasskeyMethod.md)
|
||||
- [UpdateSettingsFlowWithPasswordMethod](docs/UpdateSettingsFlowWithPasswordMethod.md)
|
||||
- [UpdateSettingsFlowWithProfileMethod](docs/UpdateSettingsFlowWithProfileMethod.md)
|
||||
- [UpdateSettingsFlowWithSamlMethod](docs/UpdateSettingsFlowWithSamlMethod.md)
|
||||
- [UpdateSettingsFlowWithTotpMethod](docs/UpdateSettingsFlowWithTotpMethod.md)
|
||||
- [UpdateSettingsFlowWithWebAuthnMethod](docs/UpdateSettingsFlowWithWebAuthnMethod.md)
|
||||
- [UpdateVerificationFlowBody](docs/UpdateVerificationFlowBody.md)
|
||||
- [UpdateVerificationFlowWithCodeMethod](docs/UpdateVerificationFlowWithCodeMethod.md)
|
||||
- [UpdateVerificationFlowWithLinkMethod](docs/UpdateVerificationFlowWithLinkMethod.md)
|
||||
- [UserVerification](docs/UserVerification.md)
|
||||
- [VerifiableIdentityAddress](docs/VerifiableIdentityAddress.md)
|
||||
- [VerificationFlow](docs/VerificationFlow.md)
|
||||
- [VerificationFlowState](docs/VerificationFlowState.md)
|
||||
- [Version](docs/Version.md)
|
||||
|
||||
|
||||
## Documentation For Authorization
|
||||
|
||||
|
||||
Authentication schemes defined for the API:
|
||||
### oryAccessToken
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: Authorization
|
||||
- **Location**: HTTP header
|
||||
|
||||
Note, each API key must be added to a map of `map[string]APIKey` where the key is: oryAccessToken and passed in as the auth context for each request.
|
||||
|
||||
Example
|
||||
|
||||
```go
|
||||
auth := context.WithValue(
|
||||
context.Background(),
|
||||
client.ContextAPIKeys,
|
||||
map[string]client.APIKey{
|
||||
"oryAccessToken": {Key: "API_KEY_STRING"},
|
||||
},
|
||||
)
|
||||
r, err := client.Service.Operation(auth, args)
|
||||
```
|
||||
|
||||
|
||||
## Documentation for Utility Methods
|
||||
|
||||
Due to the fact that model structure members are all pointers, this package contains
|
||||
a number of utility functions to easily obtain pointers to values of basic types.
|
||||
Each of these functions takes a value of the given basic type and returns a pointer to it:
|
||||
|
||||
* `PtrBool`
|
||||
* `PtrInt`
|
||||
* `PtrInt32`
|
||||
* `PtrInt64`
|
||||
* `PtrFloat`
|
||||
* `PtrFloat32`
|
||||
* `PtrFloat64`
|
||||
* `PtrString`
|
||||
* `PtrTime`
|
||||
|
||||
## Author
|
||||
|
||||
office@ory.sh
|
||||
|
||||
369
pkg/httpclient/api_courier.go
Normal file
369
pkg/httpclient/api_courier.go
Normal file
@@ -0,0 +1,369 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type CourierAPI interface {
|
||||
|
||||
/*
|
||||
GetCourierMessage Get a Message
|
||||
|
||||
Gets a specific messages by the given ID.
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@param id MessageID is the ID of the message.
|
||||
@return CourierAPIGetCourierMessageRequest
|
||||
*/
|
||||
GetCourierMessage(ctx context.Context, id string) CourierAPIGetCourierMessageRequest
|
||||
|
||||
// GetCourierMessageExecute executes the request
|
||||
// @return Message
|
||||
GetCourierMessageExecute(r CourierAPIGetCourierMessageRequest) (*Message, *http.Response, error)
|
||||
|
||||
/*
|
||||
ListCourierMessages List Messages
|
||||
|
||||
Lists all messages by given status and recipient.
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@return CourierAPIListCourierMessagesRequest
|
||||
*/
|
||||
ListCourierMessages(ctx context.Context) CourierAPIListCourierMessagesRequest
|
||||
|
||||
// ListCourierMessagesExecute executes the request
|
||||
// @return []Message
|
||||
ListCourierMessagesExecute(r CourierAPIListCourierMessagesRequest) ([]Message, *http.Response, error)
|
||||
}
|
||||
|
||||
// CourierAPIService CourierAPI service
|
||||
type CourierAPIService service
|
||||
|
||||
type CourierAPIGetCourierMessageRequest struct {
|
||||
ctx context.Context
|
||||
ApiService CourierAPI
|
||||
id string
|
||||
}
|
||||
|
||||
func (r CourierAPIGetCourierMessageRequest) Execute() (*Message, *http.Response, error) {
|
||||
return r.ApiService.GetCourierMessageExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
GetCourierMessage Get a Message
|
||||
|
||||
Gets a specific messages by the given ID.
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@param id MessageID is the ID of the message.
|
||||
@return CourierAPIGetCourierMessageRequest
|
||||
*/
|
||||
func (a *CourierAPIService) GetCourierMessage(ctx context.Context, id string) CourierAPIGetCourierMessageRequest {
|
||||
return CourierAPIGetCourierMessageRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
id: id,
|
||||
}
|
||||
}
|
||||
|
||||
// Execute executes the request
|
||||
//
|
||||
// @return Message
|
||||
func (a *CourierAPIService) GetCourierMessageExecute(r CourierAPIGetCourierMessageRequest) (*Message, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
formFiles []formFile
|
||||
localVarReturnValue *Message
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CourierAPIService.GetCourierMessage")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/admin/courier/messages/{id}"
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1)
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
if r.ctx != nil {
|
||||
// API Key Authentication
|
||||
if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
|
||||
if apiKey, ok := auth["oryAccessToken"]; ok {
|
||||
var key string
|
||||
if apiKey.Prefix != "" {
|
||||
key = apiKey.Prefix + " " + apiKey.Key
|
||||
} else {
|
||||
key = apiKey.Key
|
||||
}
|
||||
localVarHeaderParams["Authorization"] = key
|
||||
}
|
||||
}
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 400 {
|
||||
var v ErrorGeneric
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
var v ErrorGeneric
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type CourierAPIListCourierMessagesRequest struct {
|
||||
ctx context.Context
|
||||
ApiService CourierAPI
|
||||
pageSize *int64
|
||||
pageToken *string
|
||||
status *CourierMessageStatus
|
||||
recipient *string
|
||||
}
|
||||
|
||||
// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
|
||||
func (r CourierAPIListCourierMessagesRequest) PageSize(pageSize int64) CourierAPIListCourierMessagesRequest {
|
||||
r.pageSize = &pageSize
|
||||
return r
|
||||
}
|
||||
|
||||
// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).
|
||||
func (r CourierAPIListCourierMessagesRequest) PageToken(pageToken string) CourierAPIListCourierMessagesRequest {
|
||||
r.pageToken = &pageToken
|
||||
return r
|
||||
}
|
||||
|
||||
// Status filters out messages based on status. If no value is provided, it doesn't take effect on filter.
|
||||
func (r CourierAPIListCourierMessagesRequest) Status(status CourierMessageStatus) CourierAPIListCourierMessagesRequest {
|
||||
r.status = &status
|
||||
return r
|
||||
}
|
||||
|
||||
// Recipient filters out messages based on recipient. If no value is provided, it doesn't take effect on filter.
|
||||
func (r CourierAPIListCourierMessagesRequest) Recipient(recipient string) CourierAPIListCourierMessagesRequest {
|
||||
r.recipient = &recipient
|
||||
return r
|
||||
}
|
||||
|
||||
func (r CourierAPIListCourierMessagesRequest) Execute() ([]Message, *http.Response, error) {
|
||||
return r.ApiService.ListCourierMessagesExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
ListCourierMessages List Messages
|
||||
|
||||
Lists all messages by given status and recipient.
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@return CourierAPIListCourierMessagesRequest
|
||||
*/
|
||||
func (a *CourierAPIService) ListCourierMessages(ctx context.Context) CourierAPIListCourierMessagesRequest {
|
||||
return CourierAPIListCourierMessagesRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// Execute executes the request
|
||||
//
|
||||
// @return []Message
|
||||
func (a *CourierAPIService) ListCourierMessagesExecute(r CourierAPIListCourierMessagesRequest) ([]Message, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
formFiles []formFile
|
||||
localVarReturnValue []Message
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CourierAPIService.ListCourierMessages")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/admin/courier/messages"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
|
||||
if r.pageSize != nil {
|
||||
parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "")
|
||||
} else {
|
||||
var defaultValue int64 = 250
|
||||
r.pageSize = &defaultValue
|
||||
}
|
||||
if r.pageToken != nil {
|
||||
parameterAddToHeaderOrQuery(localVarQueryParams, "page_token", r.pageToken, "form", "")
|
||||
}
|
||||
if r.status != nil {
|
||||
parameterAddToHeaderOrQuery(localVarQueryParams, "status", r.status, "form", "")
|
||||
}
|
||||
if r.recipient != nil {
|
||||
parameterAddToHeaderOrQuery(localVarQueryParams, "recipient", r.recipient, "form", "")
|
||||
}
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
if r.ctx != nil {
|
||||
// API Key Authentication
|
||||
if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
|
||||
if apiKey, ok := auth["oryAccessToken"]; ok {
|
||||
var key string
|
||||
if apiKey.Prefix != "" {
|
||||
key = apiKey.Prefix + " " + apiKey.Key
|
||||
} else {
|
||||
key = apiKey.Key
|
||||
}
|
||||
localVarHeaderParams["Authorization"] = key
|
||||
}
|
||||
}
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 400 {
|
||||
var v ErrorGeneric
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
var v ErrorGeneric
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
435
pkg/httpclient/api_metadata.go
Normal file
435
pkg/httpclient/api_metadata.go
Normal file
@@ -0,0 +1,435 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
type MetadataAPI interface {
|
||||
|
||||
/*
|
||||
GetVersion Return Running Software Version.
|
||||
|
||||
This endpoint returns the version of Ory Kratos.
|
||||
|
||||
If the service supports TLS Edge Termination, this endpoint does not require the
|
||||
`X-Forwarded-Proto` header to be set.
|
||||
|
||||
Be aware that if you are running multiple nodes of this service, the version will never
|
||||
refer to the cluster state, only to a single instance.
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@return MetadataAPIGetVersionRequest
|
||||
*/
|
||||
GetVersion(ctx context.Context) MetadataAPIGetVersionRequest
|
||||
|
||||
// GetVersionExecute executes the request
|
||||
// @return GetVersion200Response
|
||||
GetVersionExecute(r MetadataAPIGetVersionRequest) (*GetVersion200Response, *http.Response, error)
|
||||
|
||||
/*
|
||||
IsAlive Check HTTP Server Status
|
||||
|
||||
This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming
|
||||
HTTP requests. This status does currently not include checks whether the database connection is working.
|
||||
|
||||
If the service supports TLS Edge Termination, this endpoint does not require the
|
||||
`X-Forwarded-Proto` header to be set.
|
||||
|
||||
Be aware that if you are running multiple nodes of this service, the health status will never
|
||||
refer to the cluster state, only to a single instance.
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@return MetadataAPIIsAliveRequest
|
||||
*/
|
||||
IsAlive(ctx context.Context) MetadataAPIIsAliveRequest
|
||||
|
||||
// IsAliveExecute executes the request
|
||||
// @return IsAlive200Response
|
||||
IsAliveExecute(r MetadataAPIIsAliveRequest) (*IsAlive200Response, *http.Response, error)
|
||||
|
||||
/*
|
||||
IsReady Check HTTP Server and Database Status
|
||||
|
||||
This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g.
|
||||
the database) are responsive as well.
|
||||
|
||||
If the service supports TLS Edge Termination, this endpoint does not require the
|
||||
`X-Forwarded-Proto` header to be set.
|
||||
|
||||
Be aware that if you are running multiple nodes of Ory Kratos, the health status will never
|
||||
refer to the cluster state, only to a single instance.
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@return MetadataAPIIsReadyRequest
|
||||
*/
|
||||
IsReady(ctx context.Context) MetadataAPIIsReadyRequest
|
||||
|
||||
// IsReadyExecute executes the request
|
||||
// @return IsAlive200Response
|
||||
IsReadyExecute(r MetadataAPIIsReadyRequest) (*IsAlive200Response, *http.Response, error)
|
||||
}
|
||||
|
||||
// MetadataAPIService MetadataAPI service
|
||||
type MetadataAPIService service
|
||||
|
||||
type MetadataAPIGetVersionRequest struct {
|
||||
ctx context.Context
|
||||
ApiService MetadataAPI
|
||||
}
|
||||
|
||||
func (r MetadataAPIGetVersionRequest) Execute() (*GetVersion200Response, *http.Response, error) {
|
||||
return r.ApiService.GetVersionExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
GetVersion Return Running Software Version.
|
||||
|
||||
This endpoint returns the version of Ory Kratos.
|
||||
|
||||
If the service supports TLS Edge Termination, this endpoint does not require the
|
||||
`X-Forwarded-Proto` header to be set.
|
||||
|
||||
Be aware that if you are running multiple nodes of this service, the version will never
|
||||
refer to the cluster state, only to a single instance.
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@return MetadataAPIGetVersionRequest
|
||||
*/
|
||||
func (a *MetadataAPIService) GetVersion(ctx context.Context) MetadataAPIGetVersionRequest {
|
||||
return MetadataAPIGetVersionRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// Execute executes the request
|
||||
//
|
||||
// @return GetVersion200Response
|
||||
func (a *MetadataAPIService) GetVersionExecute(r MetadataAPIGetVersionRequest) (*GetVersion200Response, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
formFiles []formFile
|
||||
localVarReturnValue *GetVersion200Response
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetadataAPIService.GetVersion")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/version"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type MetadataAPIIsAliveRequest struct {
|
||||
ctx context.Context
|
||||
ApiService MetadataAPI
|
||||
}
|
||||
|
||||
func (r MetadataAPIIsAliveRequest) Execute() (*IsAlive200Response, *http.Response, error) {
|
||||
return r.ApiService.IsAliveExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
IsAlive Check HTTP Server Status
|
||||
|
||||
This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming
|
||||
HTTP requests. This status does currently not include checks whether the database connection is working.
|
||||
|
||||
If the service supports TLS Edge Termination, this endpoint does not require the
|
||||
`X-Forwarded-Proto` header to be set.
|
||||
|
||||
Be aware that if you are running multiple nodes of this service, the health status will never
|
||||
refer to the cluster state, only to a single instance.
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@return MetadataAPIIsAliveRequest
|
||||
*/
|
||||
func (a *MetadataAPIService) IsAlive(ctx context.Context) MetadataAPIIsAliveRequest {
|
||||
return MetadataAPIIsAliveRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// Execute executes the request
|
||||
//
|
||||
// @return IsAlive200Response
|
||||
func (a *MetadataAPIService) IsAliveExecute(r MetadataAPIIsAliveRequest) (*IsAlive200Response, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
formFiles []formFile
|
||||
localVarReturnValue *IsAlive200Response
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetadataAPIService.IsAlive")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/health/alive"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
var v string
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type MetadataAPIIsReadyRequest struct {
|
||||
ctx context.Context
|
||||
ApiService MetadataAPI
|
||||
}
|
||||
|
||||
func (r MetadataAPIIsReadyRequest) Execute() (*IsAlive200Response, *http.Response, error) {
|
||||
return r.ApiService.IsReadyExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
IsReady Check HTTP Server and Database Status
|
||||
|
||||
This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g.
|
||||
the database) are responsive as well.
|
||||
|
||||
If the service supports TLS Edge Termination, this endpoint does not require the
|
||||
`X-Forwarded-Proto` header to be set.
|
||||
|
||||
Be aware that if you are running multiple nodes of Ory Kratos, the health status will never
|
||||
refer to the cluster state, only to a single instance.
|
||||
|
||||
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
@return MetadataAPIIsReadyRequest
|
||||
*/
|
||||
func (a *MetadataAPIService) IsReady(ctx context.Context) MetadataAPIIsReadyRequest {
|
||||
return MetadataAPIIsReadyRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// Execute executes the request
|
||||
//
|
||||
// @return IsAlive200Response
|
||||
func (a *MetadataAPIService) IsReadyExecute(r MetadataAPIIsReadyRequest) (*IsAlive200Response, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
formFiles []formFile
|
||||
localVarReturnValue *IsAlive200Response
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetadataAPIService.IsReady")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/health/ready"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 503 {
|
||||
var v IsReady503Response
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
var v string
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
665
pkg/httpclient/client.go
Normal file
665
pkg/httpclient/client.go
Normal file
@@ -0,0 +1,665 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"encoding/xml"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
)
|
||||
|
||||
var (
|
||||
JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`)
|
||||
XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`)
|
||||
queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`)
|
||||
queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]")
|
||||
)
|
||||
|
||||
// APIClient manages communication with the Ory Identities API API v
|
||||
// In most cases there should be only one, shared, APIClient.
|
||||
type APIClient struct {
|
||||
cfg *Configuration
|
||||
common service // Reuse a single struct instead of allocating one for each service on the heap.
|
||||
|
||||
// API Services
|
||||
|
||||
CourierAPI CourierAPI
|
||||
|
||||
FrontendAPI FrontendAPI
|
||||
|
||||
IdentityAPI IdentityAPI
|
||||
|
||||
MetadataAPI MetadataAPI
|
||||
}
|
||||
|
||||
type service struct {
|
||||
client *APIClient
|
||||
}
|
||||
|
||||
// NewAPIClient creates a new API client. Requires a userAgent string describing your application.
|
||||
// optionally a custom http.Client to allow for advanced features such as caching.
|
||||
func NewAPIClient(cfg *Configuration) *APIClient {
|
||||
if cfg.HTTPClient == nil {
|
||||
cfg.HTTPClient = http.DefaultClient
|
||||
}
|
||||
|
||||
c := &APIClient{}
|
||||
c.cfg = cfg
|
||||
c.common.client = c
|
||||
|
||||
// API Services
|
||||
c.CourierAPI = (*CourierAPIService)(&c.common)
|
||||
c.FrontendAPI = (*FrontendAPIService)(&c.common)
|
||||
c.IdentityAPI = (*IdentityAPIService)(&c.common)
|
||||
c.MetadataAPI = (*MetadataAPIService)(&c.common)
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
func atoi(in string) (int, error) {
|
||||
return strconv.Atoi(in)
|
||||
}
|
||||
|
||||
// selectHeaderContentType select a content type from the available list.
|
||||
func selectHeaderContentType(contentTypes []string) string {
|
||||
if len(contentTypes) == 0 {
|
||||
return ""
|
||||
}
|
||||
if contains(contentTypes, "application/json") {
|
||||
return "application/json"
|
||||
}
|
||||
return contentTypes[0] // use the first content type specified in 'consumes'
|
||||
}
|
||||
|
||||
// selectHeaderAccept join all accept types and return
|
||||
func selectHeaderAccept(accepts []string) string {
|
||||
if len(accepts) == 0 {
|
||||
return ""
|
||||
}
|
||||
|
||||
if contains(accepts, "application/json") {
|
||||
return "application/json"
|
||||
}
|
||||
|
||||
return strings.Join(accepts, ",")
|
||||
}
|
||||
|
||||
// contains is a case insensitive match, finding needle in a haystack
|
||||
func contains(haystack []string, needle string) bool {
|
||||
for _, a := range haystack {
|
||||
if strings.EqualFold(a, needle) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Verify optional parameters are of the correct type.
|
||||
func typeCheckParameter(obj interface{}, expected string, name string) error {
|
||||
// Make sure there is an object.
|
||||
if obj == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Check the type is as expected.
|
||||
if reflect.TypeOf(obj).String() != expected {
|
||||
return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func parameterValueToString(obj interface{}, key string) string {
|
||||
if reflect.TypeOf(obj).Kind() != reflect.Ptr {
|
||||
if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok {
|
||||
return fmt.Sprintf("%v", actualObj.GetActualInstanceValue())
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%v", obj)
|
||||
}
|
||||
var param, ok = obj.(MappedNullable)
|
||||
if !ok {
|
||||
return ""
|
||||
}
|
||||
dataMap, err := param.ToMap()
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
return fmt.Sprintf("%v", dataMap[key])
|
||||
}
|
||||
|
||||
// parameterAddToHeaderOrQuery adds the provided object to the request header or url query
|
||||
// supporting deep object syntax
|
||||
func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, style string, collectionType string) {
|
||||
var v = reflect.ValueOf(obj)
|
||||
var value = ""
|
||||
if v == reflect.ValueOf(nil) {
|
||||
value = "null"
|
||||
} else {
|
||||
switch v.Kind() {
|
||||
case reflect.Invalid:
|
||||
value = "invalid"
|
||||
|
||||
case reflect.Struct:
|
||||
if t, ok := obj.(MappedNullable); ok {
|
||||
dataMap, err := t.ToMap()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, style, collectionType)
|
||||
return
|
||||
}
|
||||
if t, ok := obj.(time.Time); ok {
|
||||
parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, collectionType)
|
||||
return
|
||||
}
|
||||
value = v.Type().String() + " value"
|
||||
case reflect.Slice:
|
||||
var indValue = reflect.ValueOf(obj)
|
||||
if indValue == reflect.ValueOf(nil) {
|
||||
return
|
||||
}
|
||||
var lenIndValue = indValue.Len()
|
||||
for i := 0; i < lenIndValue; i++ {
|
||||
var arrayValue = indValue.Index(i)
|
||||
var keyPrefixForCollectionType = keyPrefix
|
||||
if style == "deepObject" {
|
||||
keyPrefixForCollectionType = keyPrefix + "[" + strconv.Itoa(i) + "]"
|
||||
}
|
||||
parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefixForCollectionType, arrayValue.Interface(), style, collectionType)
|
||||
}
|
||||
return
|
||||
|
||||
case reflect.Map:
|
||||
var indValue = reflect.ValueOf(obj)
|
||||
if indValue == reflect.ValueOf(nil) {
|
||||
return
|
||||
}
|
||||
iter := indValue.MapRange()
|
||||
for iter.Next() {
|
||||
k, v := iter.Key(), iter.Value()
|
||||
parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), style, collectionType)
|
||||
}
|
||||
return
|
||||
|
||||
case reflect.Interface:
|
||||
fallthrough
|
||||
case reflect.Ptr:
|
||||
parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), style, collectionType)
|
||||
return
|
||||
|
||||
case reflect.Int, reflect.Int8, reflect.Int16,
|
||||
reflect.Int32, reflect.Int64:
|
||||
value = strconv.FormatInt(v.Int(), 10)
|
||||
case reflect.Uint, reflect.Uint8, reflect.Uint16,
|
||||
reflect.Uint32, reflect.Uint64, reflect.Uintptr:
|
||||
value = strconv.FormatUint(v.Uint(), 10)
|
||||
case reflect.Float32, reflect.Float64:
|
||||
value = strconv.FormatFloat(v.Float(), 'g', -1, 32)
|
||||
case reflect.Bool:
|
||||
value = strconv.FormatBool(v.Bool())
|
||||
case reflect.String:
|
||||
value = v.String()
|
||||
default:
|
||||
value = v.Type().String() + " value"
|
||||
}
|
||||
}
|
||||
|
||||
switch valuesMap := headerOrQueryParams.(type) {
|
||||
case url.Values:
|
||||
if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" {
|
||||
valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value)
|
||||
} else {
|
||||
valuesMap.Add(keyPrefix, value)
|
||||
}
|
||||
break
|
||||
case map[string]string:
|
||||
valuesMap[keyPrefix] = value
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// helper for converting interface{} parameters to json strings
|
||||
func parameterToJson(obj interface{}) (string, error) {
|
||||
jsonBuf, err := json.Marshal(obj)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return string(jsonBuf), err
|
||||
}
|
||||
|
||||
// callAPI do the request.
|
||||
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
|
||||
if c.cfg.Debug {
|
||||
dump, err := httputil.DumpRequestOut(request, true)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
log.Printf("\n%s\n", string(dump))
|
||||
}
|
||||
|
||||
resp, err := c.cfg.HTTPClient.Do(request)
|
||||
if err != nil {
|
||||
return resp, err
|
||||
}
|
||||
|
||||
if c.cfg.Debug {
|
||||
dump, err := httputil.DumpResponse(resp, true)
|
||||
if err != nil {
|
||||
return resp, err
|
||||
}
|
||||
log.Printf("\n%s\n", string(dump))
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
// Allow modification of underlying config for alternate implementations and testing
|
||||
// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
|
||||
func (c *APIClient) GetConfig() *Configuration {
|
||||
return c.cfg
|
||||
}
|
||||
|
||||
type formFile struct {
|
||||
fileBytes []byte
|
||||
fileName string
|
||||
formFileName string
|
||||
}
|
||||
|
||||
// prepareRequest build the request
|
||||
func (c *APIClient) prepareRequest(
|
||||
ctx context.Context,
|
||||
path string, method string,
|
||||
postBody interface{},
|
||||
headerParams map[string]string,
|
||||
queryParams url.Values,
|
||||
formParams url.Values,
|
||||
formFiles []formFile) (localVarRequest *http.Request, err error) {
|
||||
|
||||
var body *bytes.Buffer
|
||||
|
||||
// Detect postBody type and post.
|
||||
if postBody != nil {
|
||||
contentType := headerParams["Content-Type"]
|
||||
if contentType == "" {
|
||||
contentType = detectContentType(postBody)
|
||||
headerParams["Content-Type"] = contentType
|
||||
}
|
||||
|
||||
body, err = setBody(postBody, contentType)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
// add form parameters and file if available.
|
||||
if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) {
|
||||
if body != nil {
|
||||
return nil, errors.New("Cannot specify postBody and multipart form at the same time.")
|
||||
}
|
||||
body = &bytes.Buffer{}
|
||||
w := multipart.NewWriter(body)
|
||||
|
||||
for k, v := range formParams {
|
||||
for _, iv := range v {
|
||||
if strings.HasPrefix(k, "@") { // file
|
||||
err = addFile(w, k[1:], iv)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} else { // form value
|
||||
w.WriteField(k, iv)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, formFile := range formFiles {
|
||||
if len(formFile.fileBytes) > 0 && formFile.fileName != "" {
|
||||
w.Boundary()
|
||||
part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
_, err = part.Write(formFile.fileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set the Boundary in the Content-Type
|
||||
headerParams["Content-Type"] = w.FormDataContentType()
|
||||
|
||||
// Set Content-Length
|
||||
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
|
||||
w.Close()
|
||||
}
|
||||
|
||||
if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 {
|
||||
if body != nil {
|
||||
return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.")
|
||||
}
|
||||
body = &bytes.Buffer{}
|
||||
body.WriteString(formParams.Encode())
|
||||
// Set Content-Length
|
||||
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
|
||||
}
|
||||
|
||||
// Setup path and query parameters
|
||||
url, err := url.Parse(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Override request host, if applicable
|
||||
if c.cfg.Host != "" {
|
||||
url.Host = c.cfg.Host
|
||||
}
|
||||
|
||||
// Override request scheme, if applicable
|
||||
if c.cfg.Scheme != "" {
|
||||
url.Scheme = c.cfg.Scheme
|
||||
}
|
||||
|
||||
// Adding Query Param
|
||||
query := url.Query()
|
||||
for k, v := range queryParams {
|
||||
for _, iv := range v {
|
||||
query.Add(k, iv)
|
||||
}
|
||||
}
|
||||
|
||||
// Encode the parameters.
|
||||
url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string {
|
||||
pieces := strings.Split(s, "=")
|
||||
pieces[0] = queryDescape.Replace(pieces[0])
|
||||
return strings.Join(pieces, "=")
|
||||
})
|
||||
|
||||
// Generate a new request
|
||||
if body != nil {
|
||||
localVarRequest, err = http.NewRequest(method, url.String(), body)
|
||||
} else {
|
||||
localVarRequest, err = http.NewRequest(method, url.String(), nil)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// add header parameters, if any
|
||||
if len(headerParams) > 0 {
|
||||
headers := http.Header{}
|
||||
for h, v := range headerParams {
|
||||
headers[h] = []string{v}
|
||||
}
|
||||
localVarRequest.Header = headers
|
||||
}
|
||||
|
||||
// Add the user agent to the request.
|
||||
localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent)
|
||||
|
||||
if ctx != nil {
|
||||
// add context to the request
|
||||
localVarRequest = localVarRequest.WithContext(ctx)
|
||||
|
||||
// Walk through any authentication.
|
||||
|
||||
}
|
||||
|
||||
for header, value := range c.cfg.DefaultHeader {
|
||||
localVarRequest.Header.Add(header, value)
|
||||
}
|
||||
return localVarRequest, nil
|
||||
}
|
||||
|
||||
func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
|
||||
if len(b) == 0 {
|
||||
return nil
|
||||
}
|
||||
if s, ok := v.(*string); ok {
|
||||
*s = string(b)
|
||||
return nil
|
||||
}
|
||||
if f, ok := v.(*os.File); ok {
|
||||
f, err = os.CreateTemp("", "HttpClientFile")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, err = f.Write(b)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, err = f.Seek(0, io.SeekStart)
|
||||
return
|
||||
}
|
||||
if f, ok := v.(**os.File); ok {
|
||||
*f, err = os.CreateTemp("", "HttpClientFile")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, err = (*f).Write(b)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, err = (*f).Seek(0, io.SeekStart)
|
||||
return
|
||||
}
|
||||
if XmlCheck.MatchString(contentType) {
|
||||
if err = xml.Unmarshal(b, v); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
if JsonCheck.MatchString(contentType) {
|
||||
if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas
|
||||
if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined
|
||||
if err = unmarshalObj.UnmarshalJSON(b); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
|
||||
}
|
||||
} else if err = json.Unmarshal(b, v); err != nil { // simple model
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return errors.New("undefined response type")
|
||||
}
|
||||
|
||||
// Add a file to the multipart request
|
||||
func addFile(w *multipart.Writer, fieldName, path string) error {
|
||||
file, err := os.Open(filepath.Clean(path))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = file.Close()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
part, err := w.CreateFormFile(fieldName, filepath.Base(path))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = io.Copy(part, file)
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// Set request body from an interface{}
|
||||
func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) {
|
||||
if bodyBuf == nil {
|
||||
bodyBuf = &bytes.Buffer{}
|
||||
}
|
||||
|
||||
if reader, ok := body.(io.Reader); ok {
|
||||
_, err = bodyBuf.ReadFrom(reader)
|
||||
} else if fp, ok := body.(*os.File); ok {
|
||||
_, err = bodyBuf.ReadFrom(fp)
|
||||
} else if b, ok := body.([]byte); ok {
|
||||
_, err = bodyBuf.Write(b)
|
||||
} else if s, ok := body.(string); ok {
|
||||
_, err = bodyBuf.WriteString(s)
|
||||
} else if s, ok := body.(*string); ok {
|
||||
_, err = bodyBuf.WriteString(*s)
|
||||
} else if JsonCheck.MatchString(contentType) {
|
||||
err = json.NewEncoder(bodyBuf).Encode(body)
|
||||
} else if XmlCheck.MatchString(contentType) {
|
||||
var bs []byte
|
||||
bs, err = xml.Marshal(body)
|
||||
if err == nil {
|
||||
bodyBuf.Write(bs)
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if bodyBuf.Len() == 0 {
|
||||
err = fmt.Errorf("invalid body type %s\n", contentType)
|
||||
return nil, err
|
||||
}
|
||||
return bodyBuf, nil
|
||||
}
|
||||
|
||||
// detectContentType method is used to figure out `Request.Body` content type for request header
|
||||
func detectContentType(body interface{}) string {
|
||||
contentType := "text/plain; charset=utf-8"
|
||||
kind := reflect.TypeOf(body).Kind()
|
||||
|
||||
switch kind {
|
||||
case reflect.Struct, reflect.Map, reflect.Ptr:
|
||||
contentType = "application/json; charset=utf-8"
|
||||
case reflect.String:
|
||||
contentType = "text/plain; charset=utf-8"
|
||||
default:
|
||||
if b, ok := body.([]byte); ok {
|
||||
contentType = http.DetectContentType(b)
|
||||
} else if kind == reflect.Slice {
|
||||
contentType = "application/json; charset=utf-8"
|
||||
}
|
||||
}
|
||||
|
||||
return contentType
|
||||
}
|
||||
|
||||
// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go
|
||||
type cacheControl map[string]string
|
||||
|
||||
func parseCacheControl(headers http.Header) cacheControl {
|
||||
cc := cacheControl{}
|
||||
ccHeader := headers.Get("Cache-Control")
|
||||
for _, part := range strings.Split(ccHeader, ",") {
|
||||
part = strings.Trim(part, " ")
|
||||
if part == "" {
|
||||
continue
|
||||
}
|
||||
if strings.ContainsRune(part, '=') {
|
||||
keyval := strings.Split(part, "=")
|
||||
cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",")
|
||||
} else {
|
||||
cc[part] = ""
|
||||
}
|
||||
}
|
||||
return cc
|
||||
}
|
||||
|
||||
// CacheExpires helper function to determine remaining time before repeating a request.
|
||||
func CacheExpires(r *http.Response) time.Time {
|
||||
// Figure out when the cache expires.
|
||||
var expires time.Time
|
||||
now, err := time.Parse(time.RFC1123, r.Header.Get("date"))
|
||||
if err != nil {
|
||||
return time.Now()
|
||||
}
|
||||
respCacheControl := parseCacheControl(r.Header)
|
||||
|
||||
if maxAge, ok := respCacheControl["max-age"]; ok {
|
||||
lifetime, err := time.ParseDuration(maxAge + "s")
|
||||
if err != nil {
|
||||
expires = now
|
||||
} else {
|
||||
expires = now.Add(lifetime)
|
||||
}
|
||||
} else {
|
||||
expiresHeader := r.Header.Get("Expires")
|
||||
if expiresHeader != "" {
|
||||
expires, err = time.Parse(time.RFC1123, expiresHeader)
|
||||
if err != nil {
|
||||
expires = now
|
||||
}
|
||||
}
|
||||
}
|
||||
return expires
|
||||
}
|
||||
|
||||
func strlen(s string) int {
|
||||
return utf8.RuneCountInString(s)
|
||||
}
|
||||
|
||||
// GenericOpenAPIError Provides access to the body, error and model on returned errors.
|
||||
type GenericOpenAPIError struct {
|
||||
body []byte
|
||||
error string
|
||||
model interface{}
|
||||
}
|
||||
|
||||
// Error returns non-empty string if there was an error.
|
||||
func (e GenericOpenAPIError) Error() string {
|
||||
return e.error
|
||||
}
|
||||
|
||||
// Body returns the raw bytes of the response
|
||||
func (e GenericOpenAPIError) Body() []byte {
|
||||
return e.body
|
||||
}
|
||||
|
||||
// Model returns the unpacked model of the error
|
||||
func (e GenericOpenAPIError) Model() interface{} {
|
||||
return e.model
|
||||
}
|
||||
|
||||
// format error message using title and detail when model implements rfc7807
|
||||
func formatErrorMessage(status string, v interface{}) string {
|
||||
str := ""
|
||||
metaValue := reflect.ValueOf(v).Elem()
|
||||
|
||||
if metaValue.Kind() == reflect.Struct {
|
||||
field := metaValue.FieldByName("Title")
|
||||
if field != (reflect.Value{}) {
|
||||
str = fmt.Sprintf("%s", field.Interface())
|
||||
}
|
||||
|
||||
field = metaValue.FieldByName("Detail")
|
||||
if field != (reflect.Value{}) {
|
||||
str = fmt.Sprintf("%s (%s)", str, field.Interface())
|
||||
}
|
||||
}
|
||||
|
||||
return strings.TrimSpace(fmt.Sprintf("%s %s", status, str))
|
||||
}
|
||||
218
pkg/httpclient/configuration.go
Normal file
218
pkg/httpclient/configuration.go
Normal file
@@ -0,0 +1,218 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// contextKeys are used to identify the type of value in the context.
|
||||
// Since these are string, it is possible to get a short description of the
|
||||
// context key for logging and debugging using key.String().
|
||||
|
||||
type contextKey string
|
||||
|
||||
func (c contextKey) String() string {
|
||||
return "auth " + string(c)
|
||||
}
|
||||
|
||||
var (
|
||||
// ContextAPIKeys takes a string apikey as authentication for the request
|
||||
ContextAPIKeys = contextKey("apiKeys")
|
||||
|
||||
// ContextServerIndex uses a server configuration from the index.
|
||||
ContextServerIndex = contextKey("serverIndex")
|
||||
|
||||
// ContextOperationServerIndices uses a server configuration from the index mapping.
|
||||
ContextOperationServerIndices = contextKey("serverOperationIndices")
|
||||
|
||||
// ContextServerVariables overrides a server configuration variables.
|
||||
ContextServerVariables = contextKey("serverVariables")
|
||||
|
||||
// ContextOperationServerVariables overrides a server configuration variables using operation specific values.
|
||||
ContextOperationServerVariables = contextKey("serverOperationVariables")
|
||||
)
|
||||
|
||||
// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
|
||||
type BasicAuth struct {
|
||||
UserName string `json:"userName,omitempty"`
|
||||
Password string `json:"password,omitempty"`
|
||||
}
|
||||
|
||||
// APIKey provides API key based authentication to a request passed via context using ContextAPIKey
|
||||
type APIKey struct {
|
||||
Key string
|
||||
Prefix string
|
||||
}
|
||||
|
||||
// ServerVariable stores the information about a server variable
|
||||
type ServerVariable struct {
|
||||
Description string
|
||||
DefaultValue string
|
||||
EnumValues []string
|
||||
}
|
||||
|
||||
// ServerConfiguration stores the information about a server
|
||||
type ServerConfiguration struct {
|
||||
URL string
|
||||
Description string
|
||||
Variables map[string]ServerVariable
|
||||
}
|
||||
|
||||
// ServerConfigurations stores multiple ServerConfiguration items
|
||||
type ServerConfigurations []ServerConfiguration
|
||||
|
||||
// Configuration stores the configuration of the API client
|
||||
type Configuration struct {
|
||||
Host string `json:"host,omitempty"`
|
||||
Scheme string `json:"scheme,omitempty"`
|
||||
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
|
||||
UserAgent string `json:"userAgent,omitempty"`
|
||||
Debug bool `json:"debug,omitempty"`
|
||||
Servers ServerConfigurations
|
||||
OperationServers map[string]ServerConfigurations
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// NewConfiguration returns a new Configuration object
|
||||
func NewConfiguration() *Configuration {
|
||||
cfg := &Configuration{
|
||||
DefaultHeader: make(map[string]string),
|
||||
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||
Debug: false,
|
||||
Servers: ServerConfigurations{
|
||||
{
|
||||
URL: "",
|
||||
Description: "No description provided",
|
||||
},
|
||||
},
|
||||
OperationServers: map[string]ServerConfigurations{},
|
||||
}
|
||||
return cfg
|
||||
}
|
||||
|
||||
// AddDefaultHeader adds a new HTTP header to the default header in the request
|
||||
func (c *Configuration) AddDefaultHeader(key string, value string) {
|
||||
c.DefaultHeader[key] = value
|
||||
}
|
||||
|
||||
// URL formats template on a index using given variables
|
||||
func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) {
|
||||
if index < 0 || len(sc) <= index {
|
||||
return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1)
|
||||
}
|
||||
server := sc[index]
|
||||
url := server.URL
|
||||
|
||||
// go through variables and replace placeholders
|
||||
for name, variable := range server.Variables {
|
||||
if value, ok := variables[name]; ok {
|
||||
found := bool(len(variable.EnumValues) == 0)
|
||||
for _, enumValue := range variable.EnumValues {
|
||||
if value == enumValue {
|
||||
found = true
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues)
|
||||
}
|
||||
url = strings.Replace(url, "{"+name+"}", value, -1)
|
||||
} else {
|
||||
url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1)
|
||||
}
|
||||
}
|
||||
return url, nil
|
||||
}
|
||||
|
||||
// ServerURL returns URL based on server settings
|
||||
func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) {
|
||||
return c.Servers.URL(index, variables)
|
||||
}
|
||||
|
||||
func getServerIndex(ctx context.Context) (int, error) {
|
||||
si := ctx.Value(ContextServerIndex)
|
||||
if si != nil {
|
||||
if index, ok := si.(int); ok {
|
||||
return index, nil
|
||||
}
|
||||
return 0, reportError("Invalid type %T should be int", si)
|
||||
}
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) {
|
||||
osi := ctx.Value(ContextOperationServerIndices)
|
||||
if osi != nil {
|
||||
if operationIndices, ok := osi.(map[string]int); !ok {
|
||||
return 0, reportError("Invalid type %T should be map[string]int", osi)
|
||||
} else {
|
||||
index, ok := operationIndices[endpoint]
|
||||
if ok {
|
||||
return index, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
return getServerIndex(ctx)
|
||||
}
|
||||
|
||||
func getServerVariables(ctx context.Context) (map[string]string, error) {
|
||||
sv := ctx.Value(ContextServerVariables)
|
||||
if sv != nil {
|
||||
if variables, ok := sv.(map[string]string); ok {
|
||||
return variables, nil
|
||||
}
|
||||
return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) {
|
||||
osv := ctx.Value(ContextOperationServerVariables)
|
||||
if osv != nil {
|
||||
if operationVariables, ok := osv.(map[string]map[string]string); !ok {
|
||||
return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv)
|
||||
} else {
|
||||
variables, ok := operationVariables[endpoint]
|
||||
if ok {
|
||||
return variables, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
return getServerVariables(ctx)
|
||||
}
|
||||
|
||||
// ServerURLWithContext returns a new server URL given an endpoint
|
||||
func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) {
|
||||
sc, ok := c.OperationServers[endpoint]
|
||||
if !ok {
|
||||
sc = c.Servers
|
||||
}
|
||||
|
||||
if ctx == nil {
|
||||
return sc.URL(0, nil)
|
||||
}
|
||||
|
||||
index, err := getServerOperationIndex(ctx, endpoint)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
variables, err := getServerOperationVariables(ctx, endpoint)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return sc.URL(index, variables)
|
||||
}
|
||||
57
pkg/httpclient/git_push.sh
Normal file
57
pkg/httpclient/git_push.sh
Normal file
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
git_host=$4
|
||||
|
||||
if [ "$git_host" = "" ]; then
|
||||
git_host="github.com"
|
||||
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
||||
fi
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="ory"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="client-go"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=$(git remote)
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
||||
@@ -0,0 +1,154 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the AdminIdentityImportCredentialsLookupSecret type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &AdminIdentityImportCredentialsLookupSecret{}
|
||||
|
||||
// AdminIdentityImportCredentialsLookupSecret Create Identity and Import Lookup Secret Credentials
|
||||
type AdminIdentityImportCredentialsLookupSecret struct {
|
||||
Config *AdminIdentityImportCredentialsLookupSecretConfig `json:"config,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _AdminIdentityImportCredentialsLookupSecret AdminIdentityImportCredentialsLookupSecret
|
||||
|
||||
// NewAdminIdentityImportCredentialsLookupSecret instantiates a new AdminIdentityImportCredentialsLookupSecret object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewAdminIdentityImportCredentialsLookupSecret() *AdminIdentityImportCredentialsLookupSecret {
|
||||
this := AdminIdentityImportCredentialsLookupSecret{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewAdminIdentityImportCredentialsLookupSecretWithDefaults instantiates a new AdminIdentityImportCredentialsLookupSecret object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewAdminIdentityImportCredentialsLookupSecretWithDefaults() *AdminIdentityImportCredentialsLookupSecret {
|
||||
this := AdminIdentityImportCredentialsLookupSecret{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetConfig returns the Config field value if set, zero value otherwise.
|
||||
func (o *AdminIdentityImportCredentialsLookupSecret) GetConfig() AdminIdentityImportCredentialsLookupSecretConfig {
|
||||
if o == nil || IsNil(o.Config) {
|
||||
var ret AdminIdentityImportCredentialsLookupSecretConfig
|
||||
return ret
|
||||
}
|
||||
return *o.Config
|
||||
}
|
||||
|
||||
// GetConfigOk returns a tuple with the Config field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AdminIdentityImportCredentialsLookupSecret) GetConfigOk() (*AdminIdentityImportCredentialsLookupSecretConfig, bool) {
|
||||
if o == nil || IsNil(o.Config) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Config, true
|
||||
}
|
||||
|
||||
// HasConfig returns a boolean if a field has been set.
|
||||
func (o *AdminIdentityImportCredentialsLookupSecret) HasConfig() bool {
|
||||
if o != nil && !IsNil(o.Config) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetConfig gets a reference to the given AdminIdentityImportCredentialsLookupSecretConfig and assigns it to the Config field.
|
||||
func (o *AdminIdentityImportCredentialsLookupSecret) SetConfig(v AdminIdentityImportCredentialsLookupSecretConfig) {
|
||||
o.Config = &v
|
||||
}
|
||||
|
||||
func (o AdminIdentityImportCredentialsLookupSecret) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o AdminIdentityImportCredentialsLookupSecret) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Config) {
|
||||
toSerialize["config"] = o.Config
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *AdminIdentityImportCredentialsLookupSecret) UnmarshalJSON(data []byte) (err error) {
|
||||
varAdminIdentityImportCredentialsLookupSecret := _AdminIdentityImportCredentialsLookupSecret{}
|
||||
|
||||
err = json.Unmarshal(data, &varAdminIdentityImportCredentialsLookupSecret)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = AdminIdentityImportCredentialsLookupSecret(varAdminIdentityImportCredentialsLookupSecret)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "config")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableAdminIdentityImportCredentialsLookupSecret struct {
|
||||
value *AdminIdentityImportCredentialsLookupSecret
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableAdminIdentityImportCredentialsLookupSecret) Get() *AdminIdentityImportCredentialsLookupSecret {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableAdminIdentityImportCredentialsLookupSecret) Set(val *AdminIdentityImportCredentialsLookupSecret) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableAdminIdentityImportCredentialsLookupSecret) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableAdminIdentityImportCredentialsLookupSecret) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableAdminIdentityImportCredentialsLookupSecret(val *AdminIdentityImportCredentialsLookupSecret) *NullableAdminIdentityImportCredentialsLookupSecret {
|
||||
return &NullableAdminIdentityImportCredentialsLookupSecret{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableAdminIdentityImportCredentialsLookupSecret) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableAdminIdentityImportCredentialsLookupSecret) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the AdminIdentityImportCredentialsLookupSecretConfig type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &AdminIdentityImportCredentialsLookupSecretConfig{}
|
||||
|
||||
// AdminIdentityImportCredentialsLookupSecretConfig Create Identity and Import Lookup Secret Credentials Configuration
|
||||
type AdminIdentityImportCredentialsLookupSecretConfig struct {
|
||||
// Codes is a list of \"lookup secret\" codes configured for the user.
|
||||
Codes []IdentityCredentialsLookupSecretCode `json:"codes,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _AdminIdentityImportCredentialsLookupSecretConfig AdminIdentityImportCredentialsLookupSecretConfig
|
||||
|
||||
// NewAdminIdentityImportCredentialsLookupSecretConfig instantiates a new AdminIdentityImportCredentialsLookupSecretConfig object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewAdminIdentityImportCredentialsLookupSecretConfig() *AdminIdentityImportCredentialsLookupSecretConfig {
|
||||
this := AdminIdentityImportCredentialsLookupSecretConfig{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewAdminIdentityImportCredentialsLookupSecretConfigWithDefaults instantiates a new AdminIdentityImportCredentialsLookupSecretConfig object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewAdminIdentityImportCredentialsLookupSecretConfigWithDefaults() *AdminIdentityImportCredentialsLookupSecretConfig {
|
||||
this := AdminIdentityImportCredentialsLookupSecretConfig{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCodes returns the Codes field value if set, zero value otherwise.
|
||||
func (o *AdminIdentityImportCredentialsLookupSecretConfig) GetCodes() []IdentityCredentialsLookupSecretCode {
|
||||
if o == nil || IsNil(o.Codes) {
|
||||
var ret []IdentityCredentialsLookupSecretCode
|
||||
return ret
|
||||
}
|
||||
return o.Codes
|
||||
}
|
||||
|
||||
// GetCodesOk returns a tuple with the Codes field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AdminIdentityImportCredentialsLookupSecretConfig) GetCodesOk() ([]IdentityCredentialsLookupSecretCode, bool) {
|
||||
if o == nil || IsNil(o.Codes) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Codes, true
|
||||
}
|
||||
|
||||
// HasCodes returns a boolean if a field has been set.
|
||||
func (o *AdminIdentityImportCredentialsLookupSecretConfig) HasCodes() bool {
|
||||
if o != nil && !IsNil(o.Codes) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCodes gets a reference to the given []IdentityCredentialsLookupSecretCode and assigns it to the Codes field.
|
||||
func (o *AdminIdentityImportCredentialsLookupSecretConfig) SetCodes(v []IdentityCredentialsLookupSecretCode) {
|
||||
o.Codes = v
|
||||
}
|
||||
|
||||
func (o AdminIdentityImportCredentialsLookupSecretConfig) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o AdminIdentityImportCredentialsLookupSecretConfig) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Codes) {
|
||||
toSerialize["codes"] = o.Codes
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *AdminIdentityImportCredentialsLookupSecretConfig) UnmarshalJSON(data []byte) (err error) {
|
||||
varAdminIdentityImportCredentialsLookupSecretConfig := _AdminIdentityImportCredentialsLookupSecretConfig{}
|
||||
|
||||
err = json.Unmarshal(data, &varAdminIdentityImportCredentialsLookupSecretConfig)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = AdminIdentityImportCredentialsLookupSecretConfig(varAdminIdentityImportCredentialsLookupSecretConfig)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "codes")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableAdminIdentityImportCredentialsLookupSecretConfig struct {
|
||||
value *AdminIdentityImportCredentialsLookupSecretConfig
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableAdminIdentityImportCredentialsLookupSecretConfig) Get() *AdminIdentityImportCredentialsLookupSecretConfig {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableAdminIdentityImportCredentialsLookupSecretConfig) Set(val *AdminIdentityImportCredentialsLookupSecretConfig) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableAdminIdentityImportCredentialsLookupSecretConfig) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableAdminIdentityImportCredentialsLookupSecretConfig) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableAdminIdentityImportCredentialsLookupSecretConfig(val *AdminIdentityImportCredentialsLookupSecretConfig) *NullableAdminIdentityImportCredentialsLookupSecretConfig {
|
||||
return &NullableAdminIdentityImportCredentialsLookupSecretConfig{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableAdminIdentityImportCredentialsLookupSecretConfig) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableAdminIdentityImportCredentialsLookupSecretConfig) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
115
pkg/httpclient/model_authenticator_assurance_level.go
Normal file
115
pkg/httpclient/model_authenticator_assurance_level.go
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// AuthenticatorAssuranceLevel The authenticator assurance level can be one of \"aal1\", \"aal2\", or \"aal3\". A higher number means that it is harder for an attacker to compromise the account. Generally, \"aal1\" implies that one authentication factor was used while AAL2 implies that two factors (e.g. password + TOTP) have been used. To learn more about these levels please head over to: https://www.ory.com/kratos/docs/concepts/credentials
|
||||
type AuthenticatorAssuranceLevel string
|
||||
|
||||
// List of authenticatorAssuranceLevel
|
||||
const (
|
||||
AUTHENTICATORASSURANCELEVEL_AAL0 AuthenticatorAssuranceLevel = "aal0"
|
||||
AUTHENTICATORASSURANCELEVEL_AAL1 AuthenticatorAssuranceLevel = "aal1"
|
||||
AUTHENTICATORASSURANCELEVEL_AAL2 AuthenticatorAssuranceLevel = "aal2"
|
||||
AUTHENTICATORASSURANCELEVEL_AAL3 AuthenticatorAssuranceLevel = "aal3"
|
||||
)
|
||||
|
||||
// All allowed values of AuthenticatorAssuranceLevel enum
|
||||
var AllowedAuthenticatorAssuranceLevelEnumValues = []AuthenticatorAssuranceLevel{
|
||||
"aal0",
|
||||
"aal1",
|
||||
"aal2",
|
||||
"aal3",
|
||||
}
|
||||
|
||||
func (v *AuthenticatorAssuranceLevel) UnmarshalJSON(src []byte) error {
|
||||
var value string
|
||||
err := json.Unmarshal(src, &value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
enumTypeValue := AuthenticatorAssuranceLevel(value)
|
||||
for _, existing := range AllowedAuthenticatorAssuranceLevelEnumValues {
|
||||
if existing == enumTypeValue {
|
||||
*v = enumTypeValue
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("%+v is not a valid AuthenticatorAssuranceLevel", value)
|
||||
}
|
||||
|
||||
// NewAuthenticatorAssuranceLevelFromValue returns a pointer to a valid AuthenticatorAssuranceLevel
|
||||
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||
func NewAuthenticatorAssuranceLevelFromValue(v string) (*AuthenticatorAssuranceLevel, error) {
|
||||
ev := AuthenticatorAssuranceLevel(v)
|
||||
if ev.IsValid() {
|
||||
return &ev, nil
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid value '%v' for AuthenticatorAssuranceLevel: valid values are %v", v, AllowedAuthenticatorAssuranceLevelEnumValues)
|
||||
}
|
||||
}
|
||||
|
||||
// IsValid return true if the value is valid for the enum, false otherwise
|
||||
func (v AuthenticatorAssuranceLevel) IsValid() bool {
|
||||
for _, existing := range AllowedAuthenticatorAssuranceLevelEnumValues {
|
||||
if existing == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Ptr returns reference to authenticatorAssuranceLevel value
|
||||
func (v AuthenticatorAssuranceLevel) Ptr() *AuthenticatorAssuranceLevel {
|
||||
return &v
|
||||
}
|
||||
|
||||
type NullableAuthenticatorAssuranceLevel struct {
|
||||
value *AuthenticatorAssuranceLevel
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableAuthenticatorAssuranceLevel) Get() *AuthenticatorAssuranceLevel {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableAuthenticatorAssuranceLevel) Set(val *AuthenticatorAssuranceLevel) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableAuthenticatorAssuranceLevel) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableAuthenticatorAssuranceLevel) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableAuthenticatorAssuranceLevel(val *AuthenticatorAssuranceLevel) *NullableAuthenticatorAssuranceLevel {
|
||||
return &NullableAuthenticatorAssuranceLevel{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableAuthenticatorAssuranceLevel) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableAuthenticatorAssuranceLevel) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
155
pkg/httpclient/model_batch_patch_identities_response.go
Normal file
155
pkg/httpclient/model_batch_patch_identities_response.go
Normal file
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the BatchPatchIdentitiesResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &BatchPatchIdentitiesResponse{}
|
||||
|
||||
// BatchPatchIdentitiesResponse Patch identities response
|
||||
type BatchPatchIdentitiesResponse struct {
|
||||
// The patch responses for the individual identities.
|
||||
Identities []IdentityPatchResponse `json:"identities,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _BatchPatchIdentitiesResponse BatchPatchIdentitiesResponse
|
||||
|
||||
// NewBatchPatchIdentitiesResponse instantiates a new BatchPatchIdentitiesResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewBatchPatchIdentitiesResponse() *BatchPatchIdentitiesResponse {
|
||||
this := BatchPatchIdentitiesResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewBatchPatchIdentitiesResponseWithDefaults instantiates a new BatchPatchIdentitiesResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewBatchPatchIdentitiesResponseWithDefaults() *BatchPatchIdentitiesResponse {
|
||||
this := BatchPatchIdentitiesResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetIdentities returns the Identities field value if set, zero value otherwise.
|
||||
func (o *BatchPatchIdentitiesResponse) GetIdentities() []IdentityPatchResponse {
|
||||
if o == nil || IsNil(o.Identities) {
|
||||
var ret []IdentityPatchResponse
|
||||
return ret
|
||||
}
|
||||
return o.Identities
|
||||
}
|
||||
|
||||
// GetIdentitiesOk returns a tuple with the Identities field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BatchPatchIdentitiesResponse) GetIdentitiesOk() ([]IdentityPatchResponse, bool) {
|
||||
if o == nil || IsNil(o.Identities) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Identities, true
|
||||
}
|
||||
|
||||
// HasIdentities returns a boolean if a field has been set.
|
||||
func (o *BatchPatchIdentitiesResponse) HasIdentities() bool {
|
||||
if o != nil && !IsNil(o.Identities) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetIdentities gets a reference to the given []IdentityPatchResponse and assigns it to the Identities field.
|
||||
func (o *BatchPatchIdentitiesResponse) SetIdentities(v []IdentityPatchResponse) {
|
||||
o.Identities = v
|
||||
}
|
||||
|
||||
func (o BatchPatchIdentitiesResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o BatchPatchIdentitiesResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Identities) {
|
||||
toSerialize["identities"] = o.Identities
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *BatchPatchIdentitiesResponse) UnmarshalJSON(data []byte) (err error) {
|
||||
varBatchPatchIdentitiesResponse := _BatchPatchIdentitiesResponse{}
|
||||
|
||||
err = json.Unmarshal(data, &varBatchPatchIdentitiesResponse)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = BatchPatchIdentitiesResponse(varBatchPatchIdentitiesResponse)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "identities")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableBatchPatchIdentitiesResponse struct {
|
||||
value *BatchPatchIdentitiesResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableBatchPatchIdentitiesResponse) Get() *BatchPatchIdentitiesResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableBatchPatchIdentitiesResponse) Set(val *BatchPatchIdentitiesResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableBatchPatchIdentitiesResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableBatchPatchIdentitiesResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableBatchPatchIdentitiesResponse(val *BatchPatchIdentitiesResponse) *NullableBatchPatchIdentitiesResponse {
|
||||
return &NullableBatchPatchIdentitiesResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableBatchPatchIdentitiesResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableBatchPatchIdentitiesResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
155
pkg/httpclient/model_consistency_request_parameters.go
Normal file
155
pkg/httpclient/model_consistency_request_parameters.go
Normal file
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the ConsistencyRequestParameters type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ConsistencyRequestParameters{}
|
||||
|
||||
// ConsistencyRequestParameters Control API consistency guarantees
|
||||
type ConsistencyRequestParameters struct {
|
||||
// Read Consistency Level (preview) The read consistency level determines the consistency guarantee for reads: strong (slow): The read is guaranteed to return the most recent data committed at the start of the read. eventual (very fast): The result will return data that is about 4.8 seconds old. The default consistency guarantee can be changed in the Ory Network Console or using the Ory CLI with `ory patch project --replace '/previews/default_read_consistency_level=\"strong\"'`. Setting the default consistency level to `eventual` may cause regressions in the future as we add consistency controls to more APIs. Currently, the following APIs will be affected by this setting: `GET /admin/identities` This feature is in preview and only available in Ory Network. ConsistencyLevelUnset ConsistencyLevelUnset is the unset / default consistency level. strong ConsistencyLevelStrong ConsistencyLevelStrong is the strong consistency level. eventual ConsistencyLevelEventual ConsistencyLevelEventual is the eventual consistency level using follower read timestamps.
|
||||
Consistency *string `json:"consistency,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _ConsistencyRequestParameters ConsistencyRequestParameters
|
||||
|
||||
// NewConsistencyRequestParameters instantiates a new ConsistencyRequestParameters object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewConsistencyRequestParameters() *ConsistencyRequestParameters {
|
||||
this := ConsistencyRequestParameters{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewConsistencyRequestParametersWithDefaults instantiates a new ConsistencyRequestParameters object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewConsistencyRequestParametersWithDefaults() *ConsistencyRequestParameters {
|
||||
this := ConsistencyRequestParameters{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetConsistency returns the Consistency field value if set, zero value otherwise.
|
||||
func (o *ConsistencyRequestParameters) GetConsistency() string {
|
||||
if o == nil || IsNil(o.Consistency) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Consistency
|
||||
}
|
||||
|
||||
// GetConsistencyOk returns a tuple with the Consistency field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ConsistencyRequestParameters) GetConsistencyOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Consistency) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Consistency, true
|
||||
}
|
||||
|
||||
// HasConsistency returns a boolean if a field has been set.
|
||||
func (o *ConsistencyRequestParameters) HasConsistency() bool {
|
||||
if o != nil && !IsNil(o.Consistency) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetConsistency gets a reference to the given string and assigns it to the Consistency field.
|
||||
func (o *ConsistencyRequestParameters) SetConsistency(v string) {
|
||||
o.Consistency = &v
|
||||
}
|
||||
|
||||
func (o ConsistencyRequestParameters) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o ConsistencyRequestParameters) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Consistency) {
|
||||
toSerialize["consistency"] = o.Consistency
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *ConsistencyRequestParameters) UnmarshalJSON(data []byte) (err error) {
|
||||
varConsistencyRequestParameters := _ConsistencyRequestParameters{}
|
||||
|
||||
err = json.Unmarshal(data, &varConsistencyRequestParameters)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = ConsistencyRequestParameters(varConsistencyRequestParameters)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "consistency")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableConsistencyRequestParameters struct {
|
||||
value *ConsistencyRequestParameters
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableConsistencyRequestParameters) Get() *ConsistencyRequestParameters {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableConsistencyRequestParameters) Set(val *ConsistencyRequestParameters) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableConsistencyRequestParameters) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableConsistencyRequestParameters) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableConsistencyRequestParameters(val *ConsistencyRequestParameters) *NullableConsistencyRequestParameters {
|
||||
return &NullableConsistencyRequestParameters{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableConsistencyRequestParameters) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableConsistencyRequestParameters) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
354
pkg/httpclient/model_continue_with.go
Normal file
354
pkg/httpclient/model_continue_with.go
Normal file
@@ -0,0 +1,354 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// ContinueWith - struct for ContinueWith
|
||||
type ContinueWith struct {
|
||||
ContinueWithDeviceAuthnPinEntryUi *ContinueWithDeviceAuthnPinEntryUi
|
||||
ContinueWithRecoveryUi *ContinueWithRecoveryUi
|
||||
ContinueWithRedirectBrowserTo *ContinueWithRedirectBrowserTo
|
||||
ContinueWithSetOrySessionToken *ContinueWithSetOrySessionToken
|
||||
ContinueWithSettingsUi *ContinueWithSettingsUi
|
||||
ContinueWithVerificationUi *ContinueWithVerificationUi
|
||||
}
|
||||
|
||||
// ContinueWithDeviceAuthnPinEntryUiAsContinueWith is a convenience function that returns ContinueWithDeviceAuthnPinEntryUi wrapped in ContinueWith
|
||||
func ContinueWithDeviceAuthnPinEntryUiAsContinueWith(v *ContinueWithDeviceAuthnPinEntryUi) ContinueWith {
|
||||
return ContinueWith{
|
||||
ContinueWithDeviceAuthnPinEntryUi: v,
|
||||
}
|
||||
}
|
||||
|
||||
// ContinueWithRecoveryUiAsContinueWith is a convenience function that returns ContinueWithRecoveryUi wrapped in ContinueWith
|
||||
func ContinueWithRecoveryUiAsContinueWith(v *ContinueWithRecoveryUi) ContinueWith {
|
||||
return ContinueWith{
|
||||
ContinueWithRecoveryUi: v,
|
||||
}
|
||||
}
|
||||
|
||||
// ContinueWithRedirectBrowserToAsContinueWith is a convenience function that returns ContinueWithRedirectBrowserTo wrapped in ContinueWith
|
||||
func ContinueWithRedirectBrowserToAsContinueWith(v *ContinueWithRedirectBrowserTo) ContinueWith {
|
||||
return ContinueWith{
|
||||
ContinueWithRedirectBrowserTo: v,
|
||||
}
|
||||
}
|
||||
|
||||
// ContinueWithSetOrySessionTokenAsContinueWith is a convenience function that returns ContinueWithSetOrySessionToken wrapped in ContinueWith
|
||||
func ContinueWithSetOrySessionTokenAsContinueWith(v *ContinueWithSetOrySessionToken) ContinueWith {
|
||||
return ContinueWith{
|
||||
ContinueWithSetOrySessionToken: v,
|
||||
}
|
||||
}
|
||||
|
||||
// ContinueWithSettingsUiAsContinueWith is a convenience function that returns ContinueWithSettingsUi wrapped in ContinueWith
|
||||
func ContinueWithSettingsUiAsContinueWith(v *ContinueWithSettingsUi) ContinueWith {
|
||||
return ContinueWith{
|
||||
ContinueWithSettingsUi: v,
|
||||
}
|
||||
}
|
||||
|
||||
// ContinueWithVerificationUiAsContinueWith is a convenience function that returns ContinueWithVerificationUi wrapped in ContinueWith
|
||||
func ContinueWithVerificationUiAsContinueWith(v *ContinueWithVerificationUi) ContinueWith {
|
||||
return ContinueWith{
|
||||
ContinueWithVerificationUi: v,
|
||||
}
|
||||
}
|
||||
|
||||
// Unmarshal JSON data into one of the pointers in the struct
|
||||
func (dst *ContinueWith) UnmarshalJSON(data []byte) error {
|
||||
var err error
|
||||
// use discriminator value to speed up the lookup
|
||||
var jsonDict map[string]interface{}
|
||||
err = newStrictDecoder(data).Decode(&jsonDict)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup")
|
||||
}
|
||||
|
||||
// check if the discriminator value is 'redirect_browser_to'
|
||||
if jsonDict["action"] == "redirect_browser_to" {
|
||||
// try to unmarshal JSON data into ContinueWithRedirectBrowserTo
|
||||
err = json.Unmarshal(data, &dst.ContinueWithRedirectBrowserTo)
|
||||
if err == nil {
|
||||
return nil // data stored in dst.ContinueWithRedirectBrowserTo, return on the first match
|
||||
} else {
|
||||
dst.ContinueWithRedirectBrowserTo = nil
|
||||
return fmt.Errorf("failed to unmarshal ContinueWith as ContinueWithRedirectBrowserTo: %s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
// check if the discriminator value is 'set_ory_session_token'
|
||||
if jsonDict["action"] == "set_ory_session_token" {
|
||||
// try to unmarshal JSON data into ContinueWithSetOrySessionToken
|
||||
err = json.Unmarshal(data, &dst.ContinueWithSetOrySessionToken)
|
||||
if err == nil {
|
||||
return nil // data stored in dst.ContinueWithSetOrySessionToken, return on the first match
|
||||
} else {
|
||||
dst.ContinueWithSetOrySessionToken = nil
|
||||
return fmt.Errorf("failed to unmarshal ContinueWith as ContinueWithSetOrySessionToken: %s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
// check if the discriminator value is 'show_pin_entry_ui'
|
||||
if jsonDict["action"] == "show_pin_entry_ui" {
|
||||
// try to unmarshal JSON data into ContinueWithDeviceAuthnPinEntryUi
|
||||
err = json.Unmarshal(data, &dst.ContinueWithDeviceAuthnPinEntryUi)
|
||||
if err == nil {
|
||||
return nil // data stored in dst.ContinueWithDeviceAuthnPinEntryUi, return on the first match
|
||||
} else {
|
||||
dst.ContinueWithDeviceAuthnPinEntryUi = nil
|
||||
return fmt.Errorf("failed to unmarshal ContinueWith as ContinueWithDeviceAuthnPinEntryUi: %s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
// check if the discriminator value is 'show_recovery_ui'
|
||||
if jsonDict["action"] == "show_recovery_ui" {
|
||||
// try to unmarshal JSON data into ContinueWithRecoveryUi
|
||||
err = json.Unmarshal(data, &dst.ContinueWithRecoveryUi)
|
||||
if err == nil {
|
||||
return nil // data stored in dst.ContinueWithRecoveryUi, return on the first match
|
||||
} else {
|
||||
dst.ContinueWithRecoveryUi = nil
|
||||
return fmt.Errorf("failed to unmarshal ContinueWith as ContinueWithRecoveryUi: %s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
// check if the discriminator value is 'show_settings_ui'
|
||||
if jsonDict["action"] == "show_settings_ui" {
|
||||
// try to unmarshal JSON data into ContinueWithSettingsUi
|
||||
err = json.Unmarshal(data, &dst.ContinueWithSettingsUi)
|
||||
if err == nil {
|
||||
return nil // data stored in dst.ContinueWithSettingsUi, return on the first match
|
||||
} else {
|
||||
dst.ContinueWithSettingsUi = nil
|
||||
return fmt.Errorf("failed to unmarshal ContinueWith as ContinueWithSettingsUi: %s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
// check if the discriminator value is 'show_verification_ui'
|
||||
if jsonDict["action"] == "show_verification_ui" {
|
||||
// try to unmarshal JSON data into ContinueWithVerificationUi
|
||||
err = json.Unmarshal(data, &dst.ContinueWithVerificationUi)
|
||||
if err == nil {
|
||||
return nil // data stored in dst.ContinueWithVerificationUi, return on the first match
|
||||
} else {
|
||||
dst.ContinueWithVerificationUi = nil
|
||||
return fmt.Errorf("failed to unmarshal ContinueWith as ContinueWithVerificationUi: %s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
// check if the discriminator value is 'continueWithDeviceAuthnPinEntryUi'
|
||||
if jsonDict["action"] == "continueWithDeviceAuthnPinEntryUi" {
|
||||
// try to unmarshal JSON data into ContinueWithDeviceAuthnPinEntryUi
|
||||
err = json.Unmarshal(data, &dst.ContinueWithDeviceAuthnPinEntryUi)
|
||||
if err == nil {
|
||||
return nil // data stored in dst.ContinueWithDeviceAuthnPinEntryUi, return on the first match
|
||||
} else {
|
||||
dst.ContinueWithDeviceAuthnPinEntryUi = nil
|
||||
return fmt.Errorf("failed to unmarshal ContinueWith as ContinueWithDeviceAuthnPinEntryUi: %s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
// check if the discriminator value is 'continueWithRecoveryUi'
|
||||
if jsonDict["action"] == "continueWithRecoveryUi" {
|
||||
// try to unmarshal JSON data into ContinueWithRecoveryUi
|
||||
err = json.Unmarshal(data, &dst.ContinueWithRecoveryUi)
|
||||
if err == nil {
|
||||
return nil // data stored in dst.ContinueWithRecoveryUi, return on the first match
|
||||
} else {
|
||||
dst.ContinueWithRecoveryUi = nil
|
||||
return fmt.Errorf("failed to unmarshal ContinueWith as ContinueWithRecoveryUi: %s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
// check if the discriminator value is 'continueWithRedirectBrowserTo'
|
||||
if jsonDict["action"] == "continueWithRedirectBrowserTo" {
|
||||
// try to unmarshal JSON data into ContinueWithRedirectBrowserTo
|
||||
err = json.Unmarshal(data, &dst.ContinueWithRedirectBrowserTo)
|
||||
if err == nil {
|
||||
return nil // data stored in dst.ContinueWithRedirectBrowserTo, return on the first match
|
||||
} else {
|
||||
dst.ContinueWithRedirectBrowserTo = nil
|
||||
return fmt.Errorf("failed to unmarshal ContinueWith as ContinueWithRedirectBrowserTo: %s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
// check if the discriminator value is 'continueWithSetOrySessionToken'
|
||||
if jsonDict["action"] == "continueWithSetOrySessionToken" {
|
||||
// try to unmarshal JSON data into ContinueWithSetOrySessionToken
|
||||
err = json.Unmarshal(data, &dst.ContinueWithSetOrySessionToken)
|
||||
if err == nil {
|
||||
return nil // data stored in dst.ContinueWithSetOrySessionToken, return on the first match
|
||||
} else {
|
||||
dst.ContinueWithSetOrySessionToken = nil
|
||||
return fmt.Errorf("failed to unmarshal ContinueWith as ContinueWithSetOrySessionToken: %s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
// check if the discriminator value is 'continueWithSettingsUi'
|
||||
if jsonDict["action"] == "continueWithSettingsUi" {
|
||||
// try to unmarshal JSON data into ContinueWithSettingsUi
|
||||
err = json.Unmarshal(data, &dst.ContinueWithSettingsUi)
|
||||
if err == nil {
|
||||
return nil // data stored in dst.ContinueWithSettingsUi, return on the first match
|
||||
} else {
|
||||
dst.ContinueWithSettingsUi = nil
|
||||
return fmt.Errorf("failed to unmarshal ContinueWith as ContinueWithSettingsUi: %s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
// check if the discriminator value is 'continueWithVerificationUi'
|
||||
if jsonDict["action"] == "continueWithVerificationUi" {
|
||||
// try to unmarshal JSON data into ContinueWithVerificationUi
|
||||
err = json.Unmarshal(data, &dst.ContinueWithVerificationUi)
|
||||
if err == nil {
|
||||
return nil // data stored in dst.ContinueWithVerificationUi, return on the first match
|
||||
} else {
|
||||
dst.ContinueWithVerificationUi = nil
|
||||
return fmt.Errorf("failed to unmarshal ContinueWith as ContinueWithVerificationUi: %s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Marshal data from the first non-nil pointers in the struct to JSON
|
||||
func (src ContinueWith) MarshalJSON() ([]byte, error) {
|
||||
if src.ContinueWithDeviceAuthnPinEntryUi != nil {
|
||||
return json.Marshal(&src.ContinueWithDeviceAuthnPinEntryUi)
|
||||
}
|
||||
|
||||
if src.ContinueWithRecoveryUi != nil {
|
||||
return json.Marshal(&src.ContinueWithRecoveryUi)
|
||||
}
|
||||
|
||||
if src.ContinueWithRedirectBrowserTo != nil {
|
||||
return json.Marshal(&src.ContinueWithRedirectBrowserTo)
|
||||
}
|
||||
|
||||
if src.ContinueWithSetOrySessionToken != nil {
|
||||
return json.Marshal(&src.ContinueWithSetOrySessionToken)
|
||||
}
|
||||
|
||||
if src.ContinueWithSettingsUi != nil {
|
||||
return json.Marshal(&src.ContinueWithSettingsUi)
|
||||
}
|
||||
|
||||
if src.ContinueWithVerificationUi != nil {
|
||||
return json.Marshal(&src.ContinueWithVerificationUi)
|
||||
}
|
||||
|
||||
return nil, nil // no data in oneOf schemas
|
||||
}
|
||||
|
||||
// Get the actual instance
|
||||
func (obj *ContinueWith) GetActualInstance() interface{} {
|
||||
if obj == nil {
|
||||
return nil
|
||||
}
|
||||
if obj.ContinueWithDeviceAuthnPinEntryUi != nil {
|
||||
return obj.ContinueWithDeviceAuthnPinEntryUi
|
||||
}
|
||||
|
||||
if obj.ContinueWithRecoveryUi != nil {
|
||||
return obj.ContinueWithRecoveryUi
|
||||
}
|
||||
|
||||
if obj.ContinueWithRedirectBrowserTo != nil {
|
||||
return obj.ContinueWithRedirectBrowserTo
|
||||
}
|
||||
|
||||
if obj.ContinueWithSetOrySessionToken != nil {
|
||||
return obj.ContinueWithSetOrySessionToken
|
||||
}
|
||||
|
||||
if obj.ContinueWithSettingsUi != nil {
|
||||
return obj.ContinueWithSettingsUi
|
||||
}
|
||||
|
||||
if obj.ContinueWithVerificationUi != nil {
|
||||
return obj.ContinueWithVerificationUi
|
||||
}
|
||||
|
||||
// all schemas are nil
|
||||
return nil
|
||||
}
|
||||
|
||||
// Get the actual instance value
|
||||
func (obj ContinueWith) GetActualInstanceValue() interface{} {
|
||||
if obj.ContinueWithDeviceAuthnPinEntryUi != nil {
|
||||
return *obj.ContinueWithDeviceAuthnPinEntryUi
|
||||
}
|
||||
|
||||
if obj.ContinueWithRecoveryUi != nil {
|
||||
return *obj.ContinueWithRecoveryUi
|
||||
}
|
||||
|
||||
if obj.ContinueWithRedirectBrowserTo != nil {
|
||||
return *obj.ContinueWithRedirectBrowserTo
|
||||
}
|
||||
|
||||
if obj.ContinueWithSetOrySessionToken != nil {
|
||||
return *obj.ContinueWithSetOrySessionToken
|
||||
}
|
||||
|
||||
if obj.ContinueWithSettingsUi != nil {
|
||||
return *obj.ContinueWithSettingsUi
|
||||
}
|
||||
|
||||
if obj.ContinueWithVerificationUi != nil {
|
||||
return *obj.ContinueWithVerificationUi
|
||||
}
|
||||
|
||||
// all schemas are nil
|
||||
return nil
|
||||
}
|
||||
|
||||
type NullableContinueWith struct {
|
||||
value *ContinueWith
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableContinueWith) Get() *ContinueWith {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableContinueWith) Set(val *ContinueWith) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableContinueWith) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableContinueWith) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableContinueWith(val *ContinueWith) *NullableContinueWith {
|
||||
return &NullableContinueWith{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableContinueWith) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableContinueWith) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
198
pkg/httpclient/model_continue_with_device_authn_pin_entry_ui.go
Normal file
198
pkg/httpclient/model_continue_with_device_authn_pin_entry_ui.go
Normal file
@@ -0,0 +1,198 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the ContinueWithDeviceAuthnPinEntryUi type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ContinueWithDeviceAuthnPinEntryUi{}
|
||||
|
||||
// ContinueWithDeviceAuthnPinEntryUi Returned after a PIN-protected DeviceAuthn enrollment or secret rotation. It carries the one-time HPKE-sealed pin_secret, which the device opens with the transport private key it generated for this enrollment and binds to the user's PIN. The plaintext secret never leaves the device; the server only ever stores its at-rest ciphertext. The enrolled key's client_key_id is not included: it is the SHA-256 fingerprint of the device's own public key, which the device derives locally. Non-PIN keys need no client action at all and therefore produce no continue_with.
|
||||
type ContinueWithDeviceAuthnPinEntryUi struct {
|
||||
// Action will always be `show_pin_entry_ui` show_pin_entry_ui ContinueWithActionShowPINEntryUIString
|
||||
Action string `json:"action"`
|
||||
// The one-time HPKE-sealed pin_secret material the device opens to bind the user's PIN after a PIN-protected DeviceAuthn enrollment or secret rotation.
|
||||
Data ContinueWithDeviceAuthnPinEntryUiData `json:"data"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _ContinueWithDeviceAuthnPinEntryUi ContinueWithDeviceAuthnPinEntryUi
|
||||
|
||||
// NewContinueWithDeviceAuthnPinEntryUi instantiates a new ContinueWithDeviceAuthnPinEntryUi object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewContinueWithDeviceAuthnPinEntryUi(action string, data ContinueWithDeviceAuthnPinEntryUiData) *ContinueWithDeviceAuthnPinEntryUi {
|
||||
this := ContinueWithDeviceAuthnPinEntryUi{}
|
||||
this.Action = action
|
||||
this.Data = data
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewContinueWithDeviceAuthnPinEntryUiWithDefaults instantiates a new ContinueWithDeviceAuthnPinEntryUi object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewContinueWithDeviceAuthnPinEntryUiWithDefaults() *ContinueWithDeviceAuthnPinEntryUi {
|
||||
this := ContinueWithDeviceAuthnPinEntryUi{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAction returns the Action field value
|
||||
func (o *ContinueWithDeviceAuthnPinEntryUi) GetAction() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Action
|
||||
}
|
||||
|
||||
// GetActionOk returns a tuple with the Action field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithDeviceAuthnPinEntryUi) GetActionOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Action, true
|
||||
}
|
||||
|
||||
// SetAction sets field value
|
||||
func (o *ContinueWithDeviceAuthnPinEntryUi) SetAction(v string) {
|
||||
o.Action = v
|
||||
}
|
||||
|
||||
// GetData returns the Data field value
|
||||
func (o *ContinueWithDeviceAuthnPinEntryUi) GetData() ContinueWithDeviceAuthnPinEntryUiData {
|
||||
if o == nil {
|
||||
var ret ContinueWithDeviceAuthnPinEntryUiData
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Data
|
||||
}
|
||||
|
||||
// GetDataOk returns a tuple with the Data field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithDeviceAuthnPinEntryUi) GetDataOk() (*ContinueWithDeviceAuthnPinEntryUiData, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Data, true
|
||||
}
|
||||
|
||||
// SetData sets field value
|
||||
func (o *ContinueWithDeviceAuthnPinEntryUi) SetData(v ContinueWithDeviceAuthnPinEntryUiData) {
|
||||
o.Data = v
|
||||
}
|
||||
|
||||
func (o ContinueWithDeviceAuthnPinEntryUi) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o ContinueWithDeviceAuthnPinEntryUi) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["action"] = o.Action
|
||||
toSerialize["data"] = o.Data
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *ContinueWithDeviceAuthnPinEntryUi) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"action",
|
||||
"data",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varContinueWithDeviceAuthnPinEntryUi := _ContinueWithDeviceAuthnPinEntryUi{}
|
||||
|
||||
err = json.Unmarshal(data, &varContinueWithDeviceAuthnPinEntryUi)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = ContinueWithDeviceAuthnPinEntryUi(varContinueWithDeviceAuthnPinEntryUi)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "action")
|
||||
delete(additionalProperties, "data")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableContinueWithDeviceAuthnPinEntryUi struct {
|
||||
value *ContinueWithDeviceAuthnPinEntryUi
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableContinueWithDeviceAuthnPinEntryUi) Get() *ContinueWithDeviceAuthnPinEntryUi {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithDeviceAuthnPinEntryUi) Set(val *ContinueWithDeviceAuthnPinEntryUi) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableContinueWithDeviceAuthnPinEntryUi) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithDeviceAuthnPinEntryUi) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableContinueWithDeviceAuthnPinEntryUi(val *ContinueWithDeviceAuthnPinEntryUi) *NullableContinueWithDeviceAuthnPinEntryUi {
|
||||
return &NullableContinueWithDeviceAuthnPinEntryUi{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableContinueWithDeviceAuthnPinEntryUi) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithDeviceAuthnPinEntryUi) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
@@ -0,0 +1,198 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the ContinueWithDeviceAuthnPinEntryUiData type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ContinueWithDeviceAuthnPinEntryUiData{}
|
||||
|
||||
// ContinueWithDeviceAuthnPinEntryUiData Contains the encapsulated key and the sealed ciphertext that the device opens with the X25519 transport private key it generated for this enrollment or rotation. Open it with HPKE (RFC 9180) using the suite DHKEM(X25519, HKDF-SHA256), HKDF-SHA256, AES-128-GCM, the ASCII info string \"ory/deviceauthn/pin-secret/v1\", and the key's client_key_id (its ASCII hex form) as the AAD.
|
||||
type ContinueWithDeviceAuthnPinEntryUiData struct {
|
||||
// The base64-encoded HPKE ciphertext of the sealed pin_secret.
|
||||
Ciphertext string `json:"ciphertext"`
|
||||
// The base64-encoded HPKE encapsulated key (the `enc` output of the seal operation).
|
||||
Enc string `json:"enc"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _ContinueWithDeviceAuthnPinEntryUiData ContinueWithDeviceAuthnPinEntryUiData
|
||||
|
||||
// NewContinueWithDeviceAuthnPinEntryUiData instantiates a new ContinueWithDeviceAuthnPinEntryUiData object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewContinueWithDeviceAuthnPinEntryUiData(ciphertext string, enc string) *ContinueWithDeviceAuthnPinEntryUiData {
|
||||
this := ContinueWithDeviceAuthnPinEntryUiData{}
|
||||
this.Ciphertext = ciphertext
|
||||
this.Enc = enc
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewContinueWithDeviceAuthnPinEntryUiDataWithDefaults instantiates a new ContinueWithDeviceAuthnPinEntryUiData object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewContinueWithDeviceAuthnPinEntryUiDataWithDefaults() *ContinueWithDeviceAuthnPinEntryUiData {
|
||||
this := ContinueWithDeviceAuthnPinEntryUiData{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCiphertext returns the Ciphertext field value
|
||||
func (o *ContinueWithDeviceAuthnPinEntryUiData) GetCiphertext() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Ciphertext
|
||||
}
|
||||
|
||||
// GetCiphertextOk returns a tuple with the Ciphertext field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithDeviceAuthnPinEntryUiData) GetCiphertextOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Ciphertext, true
|
||||
}
|
||||
|
||||
// SetCiphertext sets field value
|
||||
func (o *ContinueWithDeviceAuthnPinEntryUiData) SetCiphertext(v string) {
|
||||
o.Ciphertext = v
|
||||
}
|
||||
|
||||
// GetEnc returns the Enc field value
|
||||
func (o *ContinueWithDeviceAuthnPinEntryUiData) GetEnc() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Enc
|
||||
}
|
||||
|
||||
// GetEncOk returns a tuple with the Enc field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithDeviceAuthnPinEntryUiData) GetEncOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Enc, true
|
||||
}
|
||||
|
||||
// SetEnc sets field value
|
||||
func (o *ContinueWithDeviceAuthnPinEntryUiData) SetEnc(v string) {
|
||||
o.Enc = v
|
||||
}
|
||||
|
||||
func (o ContinueWithDeviceAuthnPinEntryUiData) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o ContinueWithDeviceAuthnPinEntryUiData) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["ciphertext"] = o.Ciphertext
|
||||
toSerialize["enc"] = o.Enc
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *ContinueWithDeviceAuthnPinEntryUiData) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"ciphertext",
|
||||
"enc",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varContinueWithDeviceAuthnPinEntryUiData := _ContinueWithDeviceAuthnPinEntryUiData{}
|
||||
|
||||
err = json.Unmarshal(data, &varContinueWithDeviceAuthnPinEntryUiData)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = ContinueWithDeviceAuthnPinEntryUiData(varContinueWithDeviceAuthnPinEntryUiData)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "ciphertext")
|
||||
delete(additionalProperties, "enc")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableContinueWithDeviceAuthnPinEntryUiData struct {
|
||||
value *ContinueWithDeviceAuthnPinEntryUiData
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableContinueWithDeviceAuthnPinEntryUiData) Get() *ContinueWithDeviceAuthnPinEntryUiData {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithDeviceAuthnPinEntryUiData) Set(val *ContinueWithDeviceAuthnPinEntryUiData) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableContinueWithDeviceAuthnPinEntryUiData) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithDeviceAuthnPinEntryUiData) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableContinueWithDeviceAuthnPinEntryUiData(val *ContinueWithDeviceAuthnPinEntryUiData) *NullableContinueWithDeviceAuthnPinEntryUiData {
|
||||
return &NullableContinueWithDeviceAuthnPinEntryUiData{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableContinueWithDeviceAuthnPinEntryUiData) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithDeviceAuthnPinEntryUiData) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
197
pkg/httpclient/model_continue_with_recovery_ui.go
Normal file
197
pkg/httpclient/model_continue_with_recovery_ui.go
Normal file
@@ -0,0 +1,197 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the ContinueWithRecoveryUi type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ContinueWithRecoveryUi{}
|
||||
|
||||
// ContinueWithRecoveryUi Indicates, that the UI flow could be continued by showing a recovery ui
|
||||
type ContinueWithRecoveryUi struct {
|
||||
// Action will always be `show_recovery_ui` show_recovery_ui ContinueWithActionShowRecoveryUIString
|
||||
Action string `json:"action"`
|
||||
Flow ContinueWithRecoveryUiFlow `json:"flow"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _ContinueWithRecoveryUi ContinueWithRecoveryUi
|
||||
|
||||
// NewContinueWithRecoveryUi instantiates a new ContinueWithRecoveryUi object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewContinueWithRecoveryUi(action string, flow ContinueWithRecoveryUiFlow) *ContinueWithRecoveryUi {
|
||||
this := ContinueWithRecoveryUi{}
|
||||
this.Action = action
|
||||
this.Flow = flow
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewContinueWithRecoveryUiWithDefaults instantiates a new ContinueWithRecoveryUi object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewContinueWithRecoveryUiWithDefaults() *ContinueWithRecoveryUi {
|
||||
this := ContinueWithRecoveryUi{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAction returns the Action field value
|
||||
func (o *ContinueWithRecoveryUi) GetAction() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Action
|
||||
}
|
||||
|
||||
// GetActionOk returns a tuple with the Action field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithRecoveryUi) GetActionOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Action, true
|
||||
}
|
||||
|
||||
// SetAction sets field value
|
||||
func (o *ContinueWithRecoveryUi) SetAction(v string) {
|
||||
o.Action = v
|
||||
}
|
||||
|
||||
// GetFlow returns the Flow field value
|
||||
func (o *ContinueWithRecoveryUi) GetFlow() ContinueWithRecoveryUiFlow {
|
||||
if o == nil {
|
||||
var ret ContinueWithRecoveryUiFlow
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Flow
|
||||
}
|
||||
|
||||
// GetFlowOk returns a tuple with the Flow field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithRecoveryUi) GetFlowOk() (*ContinueWithRecoveryUiFlow, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Flow, true
|
||||
}
|
||||
|
||||
// SetFlow sets field value
|
||||
func (o *ContinueWithRecoveryUi) SetFlow(v ContinueWithRecoveryUiFlow) {
|
||||
o.Flow = v
|
||||
}
|
||||
|
||||
func (o ContinueWithRecoveryUi) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o ContinueWithRecoveryUi) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["action"] = o.Action
|
||||
toSerialize["flow"] = o.Flow
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *ContinueWithRecoveryUi) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"action",
|
||||
"flow",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varContinueWithRecoveryUi := _ContinueWithRecoveryUi{}
|
||||
|
||||
err = json.Unmarshal(data, &varContinueWithRecoveryUi)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = ContinueWithRecoveryUi(varContinueWithRecoveryUi)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "action")
|
||||
delete(additionalProperties, "flow")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableContinueWithRecoveryUi struct {
|
||||
value *ContinueWithRecoveryUi
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableContinueWithRecoveryUi) Get() *ContinueWithRecoveryUi {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithRecoveryUi) Set(val *ContinueWithRecoveryUi) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableContinueWithRecoveryUi) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithRecoveryUi) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableContinueWithRecoveryUi(val *ContinueWithRecoveryUi) *NullableContinueWithRecoveryUi {
|
||||
return &NullableContinueWithRecoveryUi{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableContinueWithRecoveryUi) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithRecoveryUi) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
206
pkg/httpclient/model_continue_with_recovery_ui_flow.go
Normal file
206
pkg/httpclient/model_continue_with_recovery_ui_flow.go
Normal file
@@ -0,0 +1,206 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the ContinueWithRecoveryUiFlow type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ContinueWithRecoveryUiFlow{}
|
||||
|
||||
// ContinueWithRecoveryUiFlow struct for ContinueWithRecoveryUiFlow
|
||||
type ContinueWithRecoveryUiFlow struct {
|
||||
// The ID of the recovery flow
|
||||
Id string `json:"id"`
|
||||
// The URL of the recovery flow If this value is set, redirect the user's browser to this URL. This value is typically unset for native clients / API flows.
|
||||
Url *string `json:"url,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _ContinueWithRecoveryUiFlow ContinueWithRecoveryUiFlow
|
||||
|
||||
// NewContinueWithRecoveryUiFlow instantiates a new ContinueWithRecoveryUiFlow object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewContinueWithRecoveryUiFlow(id string) *ContinueWithRecoveryUiFlow {
|
||||
this := ContinueWithRecoveryUiFlow{}
|
||||
this.Id = id
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewContinueWithRecoveryUiFlowWithDefaults instantiates a new ContinueWithRecoveryUiFlow object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewContinueWithRecoveryUiFlowWithDefaults() *ContinueWithRecoveryUiFlow {
|
||||
this := ContinueWithRecoveryUiFlow{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *ContinueWithRecoveryUiFlow) GetId() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Id
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithRecoveryUiFlow) GetIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Id, true
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *ContinueWithRecoveryUiFlow) SetId(v string) {
|
||||
o.Id = v
|
||||
}
|
||||
|
||||
// GetUrl returns the Url field value if set, zero value otherwise.
|
||||
func (o *ContinueWithRecoveryUiFlow) GetUrl() string {
|
||||
if o == nil || IsNil(o.Url) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Url
|
||||
}
|
||||
|
||||
// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithRecoveryUiFlow) GetUrlOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Url) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Url, true
|
||||
}
|
||||
|
||||
// HasUrl returns a boolean if a field has been set.
|
||||
func (o *ContinueWithRecoveryUiFlow) HasUrl() bool {
|
||||
if o != nil && !IsNil(o.Url) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUrl gets a reference to the given string and assigns it to the Url field.
|
||||
func (o *ContinueWithRecoveryUiFlow) SetUrl(v string) {
|
||||
o.Url = &v
|
||||
}
|
||||
|
||||
func (o ContinueWithRecoveryUiFlow) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o ContinueWithRecoveryUiFlow) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["id"] = o.Id
|
||||
if !IsNil(o.Url) {
|
||||
toSerialize["url"] = o.Url
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *ContinueWithRecoveryUiFlow) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"id",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varContinueWithRecoveryUiFlow := _ContinueWithRecoveryUiFlow{}
|
||||
|
||||
err = json.Unmarshal(data, &varContinueWithRecoveryUiFlow)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = ContinueWithRecoveryUiFlow(varContinueWithRecoveryUiFlow)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "id")
|
||||
delete(additionalProperties, "url")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableContinueWithRecoveryUiFlow struct {
|
||||
value *ContinueWithRecoveryUiFlow
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableContinueWithRecoveryUiFlow) Get() *ContinueWithRecoveryUiFlow {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithRecoveryUiFlow) Set(val *ContinueWithRecoveryUiFlow) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableContinueWithRecoveryUiFlow) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithRecoveryUiFlow) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableContinueWithRecoveryUiFlow(val *ContinueWithRecoveryUiFlow) *NullableContinueWithRecoveryUiFlow {
|
||||
return &NullableContinueWithRecoveryUiFlow{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableContinueWithRecoveryUiFlow) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithRecoveryUiFlow) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
198
pkg/httpclient/model_continue_with_redirect_browser_to.go
Normal file
198
pkg/httpclient/model_continue_with_redirect_browser_to.go
Normal file
@@ -0,0 +1,198 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the ContinueWithRedirectBrowserTo type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ContinueWithRedirectBrowserTo{}
|
||||
|
||||
// ContinueWithRedirectBrowserTo Indicates, that the UI flow could be continued by showing a recovery ui
|
||||
type ContinueWithRedirectBrowserTo struct {
|
||||
// Action will always be `redirect_browser_to` redirect_browser_to ContinueWithActionRedirectBrowserToString
|
||||
Action string `json:"action"`
|
||||
// The URL to redirect the browser to
|
||||
RedirectBrowserTo string `json:"redirect_browser_to"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _ContinueWithRedirectBrowserTo ContinueWithRedirectBrowserTo
|
||||
|
||||
// NewContinueWithRedirectBrowserTo instantiates a new ContinueWithRedirectBrowserTo object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewContinueWithRedirectBrowserTo(action string, redirectBrowserTo string) *ContinueWithRedirectBrowserTo {
|
||||
this := ContinueWithRedirectBrowserTo{}
|
||||
this.Action = action
|
||||
this.RedirectBrowserTo = redirectBrowserTo
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewContinueWithRedirectBrowserToWithDefaults instantiates a new ContinueWithRedirectBrowserTo object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewContinueWithRedirectBrowserToWithDefaults() *ContinueWithRedirectBrowserTo {
|
||||
this := ContinueWithRedirectBrowserTo{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAction returns the Action field value
|
||||
func (o *ContinueWithRedirectBrowserTo) GetAction() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Action
|
||||
}
|
||||
|
||||
// GetActionOk returns a tuple with the Action field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithRedirectBrowserTo) GetActionOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Action, true
|
||||
}
|
||||
|
||||
// SetAction sets field value
|
||||
func (o *ContinueWithRedirectBrowserTo) SetAction(v string) {
|
||||
o.Action = v
|
||||
}
|
||||
|
||||
// GetRedirectBrowserTo returns the RedirectBrowserTo field value
|
||||
func (o *ContinueWithRedirectBrowserTo) GetRedirectBrowserTo() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.RedirectBrowserTo
|
||||
}
|
||||
|
||||
// GetRedirectBrowserToOk returns a tuple with the RedirectBrowserTo field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithRedirectBrowserTo) GetRedirectBrowserToOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.RedirectBrowserTo, true
|
||||
}
|
||||
|
||||
// SetRedirectBrowserTo sets field value
|
||||
func (o *ContinueWithRedirectBrowserTo) SetRedirectBrowserTo(v string) {
|
||||
o.RedirectBrowserTo = v
|
||||
}
|
||||
|
||||
func (o ContinueWithRedirectBrowserTo) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o ContinueWithRedirectBrowserTo) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["action"] = o.Action
|
||||
toSerialize["redirect_browser_to"] = o.RedirectBrowserTo
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *ContinueWithRedirectBrowserTo) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"action",
|
||||
"redirect_browser_to",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varContinueWithRedirectBrowserTo := _ContinueWithRedirectBrowserTo{}
|
||||
|
||||
err = json.Unmarshal(data, &varContinueWithRedirectBrowserTo)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = ContinueWithRedirectBrowserTo(varContinueWithRedirectBrowserTo)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "action")
|
||||
delete(additionalProperties, "redirect_browser_to")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableContinueWithRedirectBrowserTo struct {
|
||||
value *ContinueWithRedirectBrowserTo
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableContinueWithRedirectBrowserTo) Get() *ContinueWithRedirectBrowserTo {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithRedirectBrowserTo) Set(val *ContinueWithRedirectBrowserTo) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableContinueWithRedirectBrowserTo) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithRedirectBrowserTo) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableContinueWithRedirectBrowserTo(val *ContinueWithRedirectBrowserTo) *NullableContinueWithRedirectBrowserTo {
|
||||
return &NullableContinueWithRedirectBrowserTo{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableContinueWithRedirectBrowserTo) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithRedirectBrowserTo) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
198
pkg/httpclient/model_continue_with_set_ory_session_token.go
Normal file
198
pkg/httpclient/model_continue_with_set_ory_session_token.go
Normal file
@@ -0,0 +1,198 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the ContinueWithSetOrySessionToken type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ContinueWithSetOrySessionToken{}
|
||||
|
||||
// ContinueWithSetOrySessionToken Indicates that a session was issued, and the application should use this token for authenticated requests
|
||||
type ContinueWithSetOrySessionToken struct {
|
||||
// Action will always be `set_ory_session_token` set_ory_session_token ContinueWithActionSetOrySessionTokenString
|
||||
Action string `json:"action"`
|
||||
// Token is the token of the session
|
||||
OrySessionToken string `json:"ory_session_token"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _ContinueWithSetOrySessionToken ContinueWithSetOrySessionToken
|
||||
|
||||
// NewContinueWithSetOrySessionToken instantiates a new ContinueWithSetOrySessionToken object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewContinueWithSetOrySessionToken(action string, orySessionToken string) *ContinueWithSetOrySessionToken {
|
||||
this := ContinueWithSetOrySessionToken{}
|
||||
this.Action = action
|
||||
this.OrySessionToken = orySessionToken
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewContinueWithSetOrySessionTokenWithDefaults instantiates a new ContinueWithSetOrySessionToken object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewContinueWithSetOrySessionTokenWithDefaults() *ContinueWithSetOrySessionToken {
|
||||
this := ContinueWithSetOrySessionToken{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAction returns the Action field value
|
||||
func (o *ContinueWithSetOrySessionToken) GetAction() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Action
|
||||
}
|
||||
|
||||
// GetActionOk returns a tuple with the Action field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithSetOrySessionToken) GetActionOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Action, true
|
||||
}
|
||||
|
||||
// SetAction sets field value
|
||||
func (o *ContinueWithSetOrySessionToken) SetAction(v string) {
|
||||
o.Action = v
|
||||
}
|
||||
|
||||
// GetOrySessionToken returns the OrySessionToken field value
|
||||
func (o *ContinueWithSetOrySessionToken) GetOrySessionToken() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.OrySessionToken
|
||||
}
|
||||
|
||||
// GetOrySessionTokenOk returns a tuple with the OrySessionToken field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithSetOrySessionToken) GetOrySessionTokenOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.OrySessionToken, true
|
||||
}
|
||||
|
||||
// SetOrySessionToken sets field value
|
||||
func (o *ContinueWithSetOrySessionToken) SetOrySessionToken(v string) {
|
||||
o.OrySessionToken = v
|
||||
}
|
||||
|
||||
func (o ContinueWithSetOrySessionToken) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o ContinueWithSetOrySessionToken) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["action"] = o.Action
|
||||
toSerialize["ory_session_token"] = o.OrySessionToken
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *ContinueWithSetOrySessionToken) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"action",
|
||||
"ory_session_token",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varContinueWithSetOrySessionToken := _ContinueWithSetOrySessionToken{}
|
||||
|
||||
err = json.Unmarshal(data, &varContinueWithSetOrySessionToken)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = ContinueWithSetOrySessionToken(varContinueWithSetOrySessionToken)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "action")
|
||||
delete(additionalProperties, "ory_session_token")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableContinueWithSetOrySessionToken struct {
|
||||
value *ContinueWithSetOrySessionToken
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableContinueWithSetOrySessionToken) Get() *ContinueWithSetOrySessionToken {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithSetOrySessionToken) Set(val *ContinueWithSetOrySessionToken) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableContinueWithSetOrySessionToken) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithSetOrySessionToken) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableContinueWithSetOrySessionToken(val *ContinueWithSetOrySessionToken) *NullableContinueWithSetOrySessionToken {
|
||||
return &NullableContinueWithSetOrySessionToken{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableContinueWithSetOrySessionToken) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithSetOrySessionToken) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
197
pkg/httpclient/model_continue_with_settings_ui.go
Normal file
197
pkg/httpclient/model_continue_with_settings_ui.go
Normal file
@@ -0,0 +1,197 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the ContinueWithSettingsUi type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ContinueWithSettingsUi{}
|
||||
|
||||
// ContinueWithSettingsUi Indicates, that the UI flow could be continued by showing a settings ui
|
||||
type ContinueWithSettingsUi struct {
|
||||
// Action will always be `show_settings_ui` show_settings_ui ContinueWithActionShowSettingsUIString
|
||||
Action string `json:"action"`
|
||||
Flow ContinueWithSettingsUiFlow `json:"flow"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _ContinueWithSettingsUi ContinueWithSettingsUi
|
||||
|
||||
// NewContinueWithSettingsUi instantiates a new ContinueWithSettingsUi object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewContinueWithSettingsUi(action string, flow ContinueWithSettingsUiFlow) *ContinueWithSettingsUi {
|
||||
this := ContinueWithSettingsUi{}
|
||||
this.Action = action
|
||||
this.Flow = flow
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewContinueWithSettingsUiWithDefaults instantiates a new ContinueWithSettingsUi object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewContinueWithSettingsUiWithDefaults() *ContinueWithSettingsUi {
|
||||
this := ContinueWithSettingsUi{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAction returns the Action field value
|
||||
func (o *ContinueWithSettingsUi) GetAction() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Action
|
||||
}
|
||||
|
||||
// GetActionOk returns a tuple with the Action field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithSettingsUi) GetActionOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Action, true
|
||||
}
|
||||
|
||||
// SetAction sets field value
|
||||
func (o *ContinueWithSettingsUi) SetAction(v string) {
|
||||
o.Action = v
|
||||
}
|
||||
|
||||
// GetFlow returns the Flow field value
|
||||
func (o *ContinueWithSettingsUi) GetFlow() ContinueWithSettingsUiFlow {
|
||||
if o == nil {
|
||||
var ret ContinueWithSettingsUiFlow
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Flow
|
||||
}
|
||||
|
||||
// GetFlowOk returns a tuple with the Flow field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithSettingsUi) GetFlowOk() (*ContinueWithSettingsUiFlow, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Flow, true
|
||||
}
|
||||
|
||||
// SetFlow sets field value
|
||||
func (o *ContinueWithSettingsUi) SetFlow(v ContinueWithSettingsUiFlow) {
|
||||
o.Flow = v
|
||||
}
|
||||
|
||||
func (o ContinueWithSettingsUi) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o ContinueWithSettingsUi) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["action"] = o.Action
|
||||
toSerialize["flow"] = o.Flow
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *ContinueWithSettingsUi) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"action",
|
||||
"flow",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varContinueWithSettingsUi := _ContinueWithSettingsUi{}
|
||||
|
||||
err = json.Unmarshal(data, &varContinueWithSettingsUi)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = ContinueWithSettingsUi(varContinueWithSettingsUi)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "action")
|
||||
delete(additionalProperties, "flow")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableContinueWithSettingsUi struct {
|
||||
value *ContinueWithSettingsUi
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableContinueWithSettingsUi) Get() *ContinueWithSettingsUi {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithSettingsUi) Set(val *ContinueWithSettingsUi) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableContinueWithSettingsUi) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithSettingsUi) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableContinueWithSettingsUi(val *ContinueWithSettingsUi) *NullableContinueWithSettingsUi {
|
||||
return &NullableContinueWithSettingsUi{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableContinueWithSettingsUi) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithSettingsUi) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
206
pkg/httpclient/model_continue_with_settings_ui_flow.go
Normal file
206
pkg/httpclient/model_continue_with_settings_ui_flow.go
Normal file
@@ -0,0 +1,206 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the ContinueWithSettingsUiFlow type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ContinueWithSettingsUiFlow{}
|
||||
|
||||
// ContinueWithSettingsUiFlow struct for ContinueWithSettingsUiFlow
|
||||
type ContinueWithSettingsUiFlow struct {
|
||||
// The ID of the settings flow
|
||||
Id string `json:"id"`
|
||||
// The URL of the settings flow If this value is set, redirect the user's browser to this URL. This value is typically unset for native clients / API flows.
|
||||
Url *string `json:"url,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _ContinueWithSettingsUiFlow ContinueWithSettingsUiFlow
|
||||
|
||||
// NewContinueWithSettingsUiFlow instantiates a new ContinueWithSettingsUiFlow object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewContinueWithSettingsUiFlow(id string) *ContinueWithSettingsUiFlow {
|
||||
this := ContinueWithSettingsUiFlow{}
|
||||
this.Id = id
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewContinueWithSettingsUiFlowWithDefaults instantiates a new ContinueWithSettingsUiFlow object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewContinueWithSettingsUiFlowWithDefaults() *ContinueWithSettingsUiFlow {
|
||||
this := ContinueWithSettingsUiFlow{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *ContinueWithSettingsUiFlow) GetId() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Id
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithSettingsUiFlow) GetIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Id, true
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *ContinueWithSettingsUiFlow) SetId(v string) {
|
||||
o.Id = v
|
||||
}
|
||||
|
||||
// GetUrl returns the Url field value if set, zero value otherwise.
|
||||
func (o *ContinueWithSettingsUiFlow) GetUrl() string {
|
||||
if o == nil || IsNil(o.Url) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Url
|
||||
}
|
||||
|
||||
// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithSettingsUiFlow) GetUrlOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Url) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Url, true
|
||||
}
|
||||
|
||||
// HasUrl returns a boolean if a field has been set.
|
||||
func (o *ContinueWithSettingsUiFlow) HasUrl() bool {
|
||||
if o != nil && !IsNil(o.Url) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUrl gets a reference to the given string and assigns it to the Url field.
|
||||
func (o *ContinueWithSettingsUiFlow) SetUrl(v string) {
|
||||
o.Url = &v
|
||||
}
|
||||
|
||||
func (o ContinueWithSettingsUiFlow) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o ContinueWithSettingsUiFlow) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["id"] = o.Id
|
||||
if !IsNil(o.Url) {
|
||||
toSerialize["url"] = o.Url
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *ContinueWithSettingsUiFlow) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"id",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varContinueWithSettingsUiFlow := _ContinueWithSettingsUiFlow{}
|
||||
|
||||
err = json.Unmarshal(data, &varContinueWithSettingsUiFlow)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = ContinueWithSettingsUiFlow(varContinueWithSettingsUiFlow)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "id")
|
||||
delete(additionalProperties, "url")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableContinueWithSettingsUiFlow struct {
|
||||
value *ContinueWithSettingsUiFlow
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableContinueWithSettingsUiFlow) Get() *ContinueWithSettingsUiFlow {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithSettingsUiFlow) Set(val *ContinueWithSettingsUiFlow) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableContinueWithSettingsUiFlow) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithSettingsUiFlow) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableContinueWithSettingsUiFlow(val *ContinueWithSettingsUiFlow) *NullableContinueWithSettingsUiFlow {
|
||||
return &NullableContinueWithSettingsUiFlow{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableContinueWithSettingsUiFlow) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithSettingsUiFlow) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
197
pkg/httpclient/model_continue_with_verification_ui.go
Normal file
197
pkg/httpclient/model_continue_with_verification_ui.go
Normal file
@@ -0,0 +1,197 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the ContinueWithVerificationUi type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ContinueWithVerificationUi{}
|
||||
|
||||
// ContinueWithVerificationUi Indicates, that the UI flow could be continued by showing a verification ui
|
||||
type ContinueWithVerificationUi struct {
|
||||
// Action will always be `show_verification_ui` show_verification_ui ContinueWithActionShowVerificationUIString
|
||||
Action string `json:"action"`
|
||||
Flow ContinueWithVerificationUiFlow `json:"flow"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _ContinueWithVerificationUi ContinueWithVerificationUi
|
||||
|
||||
// NewContinueWithVerificationUi instantiates a new ContinueWithVerificationUi object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewContinueWithVerificationUi(action string, flow ContinueWithVerificationUiFlow) *ContinueWithVerificationUi {
|
||||
this := ContinueWithVerificationUi{}
|
||||
this.Action = action
|
||||
this.Flow = flow
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewContinueWithVerificationUiWithDefaults instantiates a new ContinueWithVerificationUi object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewContinueWithVerificationUiWithDefaults() *ContinueWithVerificationUi {
|
||||
this := ContinueWithVerificationUi{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAction returns the Action field value
|
||||
func (o *ContinueWithVerificationUi) GetAction() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Action
|
||||
}
|
||||
|
||||
// GetActionOk returns a tuple with the Action field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithVerificationUi) GetActionOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Action, true
|
||||
}
|
||||
|
||||
// SetAction sets field value
|
||||
func (o *ContinueWithVerificationUi) SetAction(v string) {
|
||||
o.Action = v
|
||||
}
|
||||
|
||||
// GetFlow returns the Flow field value
|
||||
func (o *ContinueWithVerificationUi) GetFlow() ContinueWithVerificationUiFlow {
|
||||
if o == nil {
|
||||
var ret ContinueWithVerificationUiFlow
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Flow
|
||||
}
|
||||
|
||||
// GetFlowOk returns a tuple with the Flow field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithVerificationUi) GetFlowOk() (*ContinueWithVerificationUiFlow, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Flow, true
|
||||
}
|
||||
|
||||
// SetFlow sets field value
|
||||
func (o *ContinueWithVerificationUi) SetFlow(v ContinueWithVerificationUiFlow) {
|
||||
o.Flow = v
|
||||
}
|
||||
|
||||
func (o ContinueWithVerificationUi) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o ContinueWithVerificationUi) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["action"] = o.Action
|
||||
toSerialize["flow"] = o.Flow
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *ContinueWithVerificationUi) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"action",
|
||||
"flow",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varContinueWithVerificationUi := _ContinueWithVerificationUi{}
|
||||
|
||||
err = json.Unmarshal(data, &varContinueWithVerificationUi)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = ContinueWithVerificationUi(varContinueWithVerificationUi)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "action")
|
||||
delete(additionalProperties, "flow")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableContinueWithVerificationUi struct {
|
||||
value *ContinueWithVerificationUi
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableContinueWithVerificationUi) Get() *ContinueWithVerificationUi {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithVerificationUi) Set(val *ContinueWithVerificationUi) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableContinueWithVerificationUi) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithVerificationUi) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableContinueWithVerificationUi(val *ContinueWithVerificationUi) *NullableContinueWithVerificationUi {
|
||||
return &NullableContinueWithVerificationUi{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableContinueWithVerificationUi) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithVerificationUi) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
236
pkg/httpclient/model_continue_with_verification_ui_flow.go
Normal file
236
pkg/httpclient/model_continue_with_verification_ui_flow.go
Normal file
@@ -0,0 +1,236 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the ContinueWithVerificationUiFlow type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ContinueWithVerificationUiFlow{}
|
||||
|
||||
// ContinueWithVerificationUiFlow struct for ContinueWithVerificationUiFlow
|
||||
type ContinueWithVerificationUiFlow struct {
|
||||
// The ID of the verification flow
|
||||
Id string `json:"id"`
|
||||
// The URL of the verification flow If this value is set, redirect the user's browser to this URL. This value is typically unset for native clients / API flows.
|
||||
Url *string `json:"url,omitempty"`
|
||||
// The address that should be verified in this flow
|
||||
VerifiableAddress string `json:"verifiable_address"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _ContinueWithVerificationUiFlow ContinueWithVerificationUiFlow
|
||||
|
||||
// NewContinueWithVerificationUiFlow instantiates a new ContinueWithVerificationUiFlow object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewContinueWithVerificationUiFlow(id string, verifiableAddress string) *ContinueWithVerificationUiFlow {
|
||||
this := ContinueWithVerificationUiFlow{}
|
||||
this.Id = id
|
||||
this.VerifiableAddress = verifiableAddress
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewContinueWithVerificationUiFlowWithDefaults instantiates a new ContinueWithVerificationUiFlow object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewContinueWithVerificationUiFlowWithDefaults() *ContinueWithVerificationUiFlow {
|
||||
this := ContinueWithVerificationUiFlow{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *ContinueWithVerificationUiFlow) GetId() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Id
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithVerificationUiFlow) GetIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Id, true
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *ContinueWithVerificationUiFlow) SetId(v string) {
|
||||
o.Id = v
|
||||
}
|
||||
|
||||
// GetUrl returns the Url field value if set, zero value otherwise.
|
||||
func (o *ContinueWithVerificationUiFlow) GetUrl() string {
|
||||
if o == nil || IsNil(o.Url) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Url
|
||||
}
|
||||
|
||||
// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithVerificationUiFlow) GetUrlOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Url) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Url, true
|
||||
}
|
||||
|
||||
// HasUrl returns a boolean if a field has been set.
|
||||
func (o *ContinueWithVerificationUiFlow) HasUrl() bool {
|
||||
if o != nil && !IsNil(o.Url) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUrl gets a reference to the given string and assigns it to the Url field.
|
||||
func (o *ContinueWithVerificationUiFlow) SetUrl(v string) {
|
||||
o.Url = &v
|
||||
}
|
||||
|
||||
// GetVerifiableAddress returns the VerifiableAddress field value
|
||||
func (o *ContinueWithVerificationUiFlow) GetVerifiableAddress() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.VerifiableAddress
|
||||
}
|
||||
|
||||
// GetVerifiableAddressOk returns a tuple with the VerifiableAddress field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ContinueWithVerificationUiFlow) GetVerifiableAddressOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.VerifiableAddress, true
|
||||
}
|
||||
|
||||
// SetVerifiableAddress sets field value
|
||||
func (o *ContinueWithVerificationUiFlow) SetVerifiableAddress(v string) {
|
||||
o.VerifiableAddress = v
|
||||
}
|
||||
|
||||
func (o ContinueWithVerificationUiFlow) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o ContinueWithVerificationUiFlow) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["id"] = o.Id
|
||||
if !IsNil(o.Url) {
|
||||
toSerialize["url"] = o.Url
|
||||
}
|
||||
toSerialize["verifiable_address"] = o.VerifiableAddress
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *ContinueWithVerificationUiFlow) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"id",
|
||||
"verifiable_address",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varContinueWithVerificationUiFlow := _ContinueWithVerificationUiFlow{}
|
||||
|
||||
err = json.Unmarshal(data, &varContinueWithVerificationUiFlow)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = ContinueWithVerificationUiFlow(varContinueWithVerificationUiFlow)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "id")
|
||||
delete(additionalProperties, "url")
|
||||
delete(additionalProperties, "verifiable_address")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableContinueWithVerificationUiFlow struct {
|
||||
value *ContinueWithVerificationUiFlow
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableContinueWithVerificationUiFlow) Get() *ContinueWithVerificationUiFlow {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithVerificationUiFlow) Set(val *ContinueWithVerificationUiFlow) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableContinueWithVerificationUiFlow) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithVerificationUiFlow) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableContinueWithVerificationUiFlow(val *ContinueWithVerificationUiFlow) *NullableContinueWithVerificationUiFlow {
|
||||
return &NullableContinueWithVerificationUiFlow{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableContinueWithVerificationUiFlow) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableContinueWithVerificationUiFlow) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
115
pkg/httpclient/model_courier_message_status.go
Normal file
115
pkg/httpclient/model_courier_message_status.go
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// CourierMessageStatus A Message's Status
|
||||
type CourierMessageStatus string
|
||||
|
||||
// List of courierMessageStatus
|
||||
const (
|
||||
COURIERMESSAGESTATUS_QUEUED CourierMessageStatus = "queued"
|
||||
COURIERMESSAGESTATUS_SENT CourierMessageStatus = "sent"
|
||||
COURIERMESSAGESTATUS_PROCESSING CourierMessageStatus = "processing"
|
||||
COURIERMESSAGESTATUS_ABANDONED CourierMessageStatus = "abandoned"
|
||||
)
|
||||
|
||||
// All allowed values of CourierMessageStatus enum
|
||||
var AllowedCourierMessageStatusEnumValues = []CourierMessageStatus{
|
||||
"queued",
|
||||
"sent",
|
||||
"processing",
|
||||
"abandoned",
|
||||
}
|
||||
|
||||
func (v *CourierMessageStatus) UnmarshalJSON(src []byte) error {
|
||||
var value string
|
||||
err := json.Unmarshal(src, &value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
enumTypeValue := CourierMessageStatus(value)
|
||||
for _, existing := range AllowedCourierMessageStatusEnumValues {
|
||||
if existing == enumTypeValue {
|
||||
*v = enumTypeValue
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("%+v is not a valid CourierMessageStatus", value)
|
||||
}
|
||||
|
||||
// NewCourierMessageStatusFromValue returns a pointer to a valid CourierMessageStatus
|
||||
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||
func NewCourierMessageStatusFromValue(v string) (*CourierMessageStatus, error) {
|
||||
ev := CourierMessageStatus(v)
|
||||
if ev.IsValid() {
|
||||
return &ev, nil
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid value '%v' for CourierMessageStatus: valid values are %v", v, AllowedCourierMessageStatusEnumValues)
|
||||
}
|
||||
}
|
||||
|
||||
// IsValid return true if the value is valid for the enum, false otherwise
|
||||
func (v CourierMessageStatus) IsValid() bool {
|
||||
for _, existing := range AllowedCourierMessageStatusEnumValues {
|
||||
if existing == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Ptr returns reference to courierMessageStatus value
|
||||
func (v CourierMessageStatus) Ptr() *CourierMessageStatus {
|
||||
return &v
|
||||
}
|
||||
|
||||
type NullableCourierMessageStatus struct {
|
||||
value *CourierMessageStatus
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCourierMessageStatus) Get() *CourierMessageStatus {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCourierMessageStatus) Set(val *CourierMessageStatus) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCourierMessageStatus) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCourierMessageStatus) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCourierMessageStatus(val *CourierMessageStatus) *NullableCourierMessageStatus {
|
||||
return &NullableCourierMessageStatus{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCourierMessageStatus) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCourierMessageStatus) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
111
pkg/httpclient/model_courier_message_type.go
Normal file
111
pkg/httpclient/model_courier_message_type.go
Normal file
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// CourierMessageType It can either be `email` or `phone`
|
||||
type CourierMessageType string
|
||||
|
||||
// List of courierMessageType
|
||||
const (
|
||||
COURIERMESSAGETYPE_EMAIL CourierMessageType = "email"
|
||||
COURIERMESSAGETYPE_PHONE CourierMessageType = "phone"
|
||||
)
|
||||
|
||||
// All allowed values of CourierMessageType enum
|
||||
var AllowedCourierMessageTypeEnumValues = []CourierMessageType{
|
||||
"email",
|
||||
"phone",
|
||||
}
|
||||
|
||||
func (v *CourierMessageType) UnmarshalJSON(src []byte) error {
|
||||
var value string
|
||||
err := json.Unmarshal(src, &value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
enumTypeValue := CourierMessageType(value)
|
||||
for _, existing := range AllowedCourierMessageTypeEnumValues {
|
||||
if existing == enumTypeValue {
|
||||
*v = enumTypeValue
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("%+v is not a valid CourierMessageType", value)
|
||||
}
|
||||
|
||||
// NewCourierMessageTypeFromValue returns a pointer to a valid CourierMessageType
|
||||
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||
func NewCourierMessageTypeFromValue(v string) (*CourierMessageType, error) {
|
||||
ev := CourierMessageType(v)
|
||||
if ev.IsValid() {
|
||||
return &ev, nil
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid value '%v' for CourierMessageType: valid values are %v", v, AllowedCourierMessageTypeEnumValues)
|
||||
}
|
||||
}
|
||||
|
||||
// IsValid return true if the value is valid for the enum, false otherwise
|
||||
func (v CourierMessageType) IsValid() bool {
|
||||
for _, existing := range AllowedCourierMessageTypeEnumValues {
|
||||
if existing == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Ptr returns reference to courierMessageType value
|
||||
func (v CourierMessageType) Ptr() *CourierMessageType {
|
||||
return &v
|
||||
}
|
||||
|
||||
type NullableCourierMessageType struct {
|
||||
value *CourierMessageType
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCourierMessageType) Get() *CourierMessageType {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCourierMessageType) Set(val *CourierMessageType) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCourierMessageType) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCourierMessageType) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCourierMessageType(val *CourierMessageType) *NullableCourierMessageType {
|
||||
return &NullableCourierMessageType{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCourierMessageType) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCourierMessageType) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
191
pkg/httpclient/model_create_fedcm_flow_response.go
Normal file
191
pkg/httpclient/model_create_fedcm_flow_response.go
Normal file
@@ -0,0 +1,191 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreateFedcmFlowResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateFedcmFlowResponse{}
|
||||
|
||||
// CreateFedcmFlowResponse Contains a list of all available FedCM providers.
|
||||
type CreateFedcmFlowResponse struct {
|
||||
CsrfToken *string `json:"csrf_token,omitempty"`
|
||||
Providers []Provider `json:"providers,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _CreateFedcmFlowResponse CreateFedcmFlowResponse
|
||||
|
||||
// NewCreateFedcmFlowResponse instantiates a new CreateFedcmFlowResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewCreateFedcmFlowResponse() *CreateFedcmFlowResponse {
|
||||
this := CreateFedcmFlowResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateFedcmFlowResponseWithDefaults instantiates a new CreateFedcmFlowResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewCreateFedcmFlowResponseWithDefaults() *CreateFedcmFlowResponse {
|
||||
this := CreateFedcmFlowResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCsrfToken returns the CsrfToken field value if set, zero value otherwise.
|
||||
func (o *CreateFedcmFlowResponse) GetCsrfToken() string {
|
||||
if o == nil || IsNil(o.CsrfToken) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.CsrfToken
|
||||
}
|
||||
|
||||
// GetCsrfTokenOk returns a tuple with the CsrfToken field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateFedcmFlowResponse) GetCsrfTokenOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.CsrfToken) {
|
||||
return nil, false
|
||||
}
|
||||
return o.CsrfToken, true
|
||||
}
|
||||
|
||||
// HasCsrfToken returns a boolean if a field has been set.
|
||||
func (o *CreateFedcmFlowResponse) HasCsrfToken() bool {
|
||||
if o != nil && !IsNil(o.CsrfToken) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCsrfToken gets a reference to the given string and assigns it to the CsrfToken field.
|
||||
func (o *CreateFedcmFlowResponse) SetCsrfToken(v string) {
|
||||
o.CsrfToken = &v
|
||||
}
|
||||
|
||||
// GetProviders returns the Providers field value if set, zero value otherwise.
|
||||
func (o *CreateFedcmFlowResponse) GetProviders() []Provider {
|
||||
if o == nil || IsNil(o.Providers) {
|
||||
var ret []Provider
|
||||
return ret
|
||||
}
|
||||
return o.Providers
|
||||
}
|
||||
|
||||
// GetProvidersOk returns a tuple with the Providers field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateFedcmFlowResponse) GetProvidersOk() ([]Provider, bool) {
|
||||
if o == nil || IsNil(o.Providers) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Providers, true
|
||||
}
|
||||
|
||||
// HasProviders returns a boolean if a field has been set.
|
||||
func (o *CreateFedcmFlowResponse) HasProviders() bool {
|
||||
if o != nil && !IsNil(o.Providers) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetProviders gets a reference to the given []Provider and assigns it to the Providers field.
|
||||
func (o *CreateFedcmFlowResponse) SetProviders(v []Provider) {
|
||||
o.Providers = v
|
||||
}
|
||||
|
||||
func (o CreateFedcmFlowResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o CreateFedcmFlowResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.CsrfToken) {
|
||||
toSerialize["csrf_token"] = o.CsrfToken
|
||||
}
|
||||
if !IsNil(o.Providers) {
|
||||
toSerialize["providers"] = o.Providers
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *CreateFedcmFlowResponse) UnmarshalJSON(data []byte) (err error) {
|
||||
varCreateFedcmFlowResponse := _CreateFedcmFlowResponse{}
|
||||
|
||||
err = json.Unmarshal(data, &varCreateFedcmFlowResponse)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = CreateFedcmFlowResponse(varCreateFedcmFlowResponse)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "csrf_token")
|
||||
delete(additionalProperties, "providers")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableCreateFedcmFlowResponse struct {
|
||||
value *CreateFedcmFlowResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateFedcmFlowResponse) Get() *CreateFedcmFlowResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateFedcmFlowResponse) Set(val *CreateFedcmFlowResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateFedcmFlowResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateFedcmFlowResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateFedcmFlowResponse(val *CreateFedcmFlowResponse) *NullableCreateFedcmFlowResponse {
|
||||
return &NullableCreateFedcmFlowResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateFedcmFlowResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateFedcmFlowResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
551
pkg/httpclient/model_create_identity_body.go
Normal file
551
pkg/httpclient/model_create_identity_body.go
Normal file
@@ -0,0 +1,551 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the CreateIdentityBody type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateIdentityBody{}
|
||||
|
||||
// CreateIdentityBody Create Identity Body
|
||||
type CreateIdentityBody struct {
|
||||
Credentials *IdentityWithCredentials `json:"credentials,omitempty"`
|
||||
// ExternalID is an optional external ID of the identity. This is used to link the identity to an external system. If set, the external ID must be unique across all identities.
|
||||
ExternalId *string `json:"external_id,omitempty"`
|
||||
// Store metadata about the user which is only accessible through admin APIs such as `GET /admin/identities/<id>`.
|
||||
MetadataAdmin interface{} `json:"metadata_admin,omitempty"`
|
||||
// Store metadata about the identity which the identity itself can see when calling for example the session endpoint. Do not store sensitive information (e.g. credit score) about the identity in this field.
|
||||
MetadataPublic interface{} `json:"metadata_public,omitempty"`
|
||||
OrganizationId NullableString `json:"organization_id,omitempty"`
|
||||
// RecoveryAddresses contains all the addresses that can be used to recover an identity. Use this structure to import recovery addresses for an identity. Please keep in mind that the address needs to be represented in the Identity Schema or this field will be overwritten on the next identity update.
|
||||
RecoveryAddresses []RecoveryIdentityAddress `json:"recovery_addresses,omitempty"`
|
||||
// Region is the Ory Network region this identity will be created in. Optional; defaults to the project home region if omitted. Only effective on the Ory Network. eu-central EUCentral asia-northeast AsiaNorthEast us-east USEast us-west USWest eu EU asia Asia us US global Global
|
||||
Region *string `json:"region,omitempty"`
|
||||
// SchemaID is the ID of the JSON Schema to be used for validating the identity's traits.
|
||||
SchemaId string `json:"schema_id"`
|
||||
// State is the identity's state. active StateActive inactive StateInactive
|
||||
State *string `json:"state,omitempty"`
|
||||
// Traits represent an identity's traits. The identity is able to create, modify, and delete traits in a self-service manner. The input will always be validated against the JSON Schema defined in `schema_url`.
|
||||
Traits map[string]interface{} `json:"traits"`
|
||||
// VerifiableAddresses contains all the addresses that can be verified by the user. Use this structure to import verified addresses for an identity. Please keep in mind that the address needs to be represented in the Identity Schema or this field will be overwritten on the next identity update.
|
||||
VerifiableAddresses []VerifiableIdentityAddress `json:"verifiable_addresses,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _CreateIdentityBody CreateIdentityBody
|
||||
|
||||
// NewCreateIdentityBody instantiates a new CreateIdentityBody object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewCreateIdentityBody(schemaId string, traits map[string]interface{}) *CreateIdentityBody {
|
||||
this := CreateIdentityBody{}
|
||||
this.SchemaId = schemaId
|
||||
this.Traits = traits
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateIdentityBodyWithDefaults instantiates a new CreateIdentityBody object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewCreateIdentityBodyWithDefaults() *CreateIdentityBody {
|
||||
this := CreateIdentityBody{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCredentials returns the Credentials field value if set, zero value otherwise.
|
||||
func (o *CreateIdentityBody) GetCredentials() IdentityWithCredentials {
|
||||
if o == nil || IsNil(o.Credentials) {
|
||||
var ret IdentityWithCredentials
|
||||
return ret
|
||||
}
|
||||
return *o.Credentials
|
||||
}
|
||||
|
||||
// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateIdentityBody) GetCredentialsOk() (*IdentityWithCredentials, bool) {
|
||||
if o == nil || IsNil(o.Credentials) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Credentials, true
|
||||
}
|
||||
|
||||
// HasCredentials returns a boolean if a field has been set.
|
||||
func (o *CreateIdentityBody) HasCredentials() bool {
|
||||
if o != nil && !IsNil(o.Credentials) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCredentials gets a reference to the given IdentityWithCredentials and assigns it to the Credentials field.
|
||||
func (o *CreateIdentityBody) SetCredentials(v IdentityWithCredentials) {
|
||||
o.Credentials = &v
|
||||
}
|
||||
|
||||
// GetExternalId returns the ExternalId field value if set, zero value otherwise.
|
||||
func (o *CreateIdentityBody) GetExternalId() string {
|
||||
if o == nil || IsNil(o.ExternalId) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.ExternalId
|
||||
}
|
||||
|
||||
// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateIdentityBody) GetExternalIdOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.ExternalId) {
|
||||
return nil, false
|
||||
}
|
||||
return o.ExternalId, true
|
||||
}
|
||||
|
||||
// HasExternalId returns a boolean if a field has been set.
|
||||
func (o *CreateIdentityBody) HasExternalId() bool {
|
||||
if o != nil && !IsNil(o.ExternalId) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetExternalId gets a reference to the given string and assigns it to the ExternalId field.
|
||||
func (o *CreateIdentityBody) SetExternalId(v string) {
|
||||
o.ExternalId = &v
|
||||
}
|
||||
|
||||
// GetMetadataAdmin returns the MetadataAdmin field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *CreateIdentityBody) GetMetadataAdmin() interface{} {
|
||||
if o == nil {
|
||||
var ret interface{}
|
||||
return ret
|
||||
}
|
||||
return o.MetadataAdmin
|
||||
}
|
||||
|
||||
// GetMetadataAdminOk returns a tuple with the MetadataAdmin field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *CreateIdentityBody) GetMetadataAdminOk() (*interface{}, bool) {
|
||||
if o == nil || IsNil(o.MetadataAdmin) {
|
||||
return nil, false
|
||||
}
|
||||
return &o.MetadataAdmin, true
|
||||
}
|
||||
|
||||
// HasMetadataAdmin returns a boolean if a field has been set.
|
||||
func (o *CreateIdentityBody) HasMetadataAdmin() bool {
|
||||
if o != nil && !IsNil(o.MetadataAdmin) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetMetadataAdmin gets a reference to the given interface{} and assigns it to the MetadataAdmin field.
|
||||
func (o *CreateIdentityBody) SetMetadataAdmin(v interface{}) {
|
||||
o.MetadataAdmin = v
|
||||
}
|
||||
|
||||
// GetMetadataPublic returns the MetadataPublic field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *CreateIdentityBody) GetMetadataPublic() interface{} {
|
||||
if o == nil {
|
||||
var ret interface{}
|
||||
return ret
|
||||
}
|
||||
return o.MetadataPublic
|
||||
}
|
||||
|
||||
// GetMetadataPublicOk returns a tuple with the MetadataPublic field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *CreateIdentityBody) GetMetadataPublicOk() (*interface{}, bool) {
|
||||
if o == nil || IsNil(o.MetadataPublic) {
|
||||
return nil, false
|
||||
}
|
||||
return &o.MetadataPublic, true
|
||||
}
|
||||
|
||||
// HasMetadataPublic returns a boolean if a field has been set.
|
||||
func (o *CreateIdentityBody) HasMetadataPublic() bool {
|
||||
if o != nil && !IsNil(o.MetadataPublic) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetMetadataPublic gets a reference to the given interface{} and assigns it to the MetadataPublic field.
|
||||
func (o *CreateIdentityBody) SetMetadataPublic(v interface{}) {
|
||||
o.MetadataPublic = v
|
||||
}
|
||||
|
||||
// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *CreateIdentityBody) GetOrganizationId() string {
|
||||
if o == nil || IsNil(o.OrganizationId.Get()) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.OrganizationId.Get()
|
||||
}
|
||||
|
||||
// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *CreateIdentityBody) GetOrganizationIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.OrganizationId.Get(), o.OrganizationId.IsSet()
|
||||
}
|
||||
|
||||
// HasOrganizationId returns a boolean if a field has been set.
|
||||
func (o *CreateIdentityBody) HasOrganizationId() bool {
|
||||
if o != nil && o.OrganizationId.IsSet() {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetOrganizationId gets a reference to the given NullableString and assigns it to the OrganizationId field.
|
||||
func (o *CreateIdentityBody) SetOrganizationId(v string) {
|
||||
o.OrganizationId.Set(&v)
|
||||
}
|
||||
|
||||
// SetOrganizationIdNil sets the value for OrganizationId to be an explicit nil
|
||||
func (o *CreateIdentityBody) SetOrganizationIdNil() {
|
||||
o.OrganizationId.Set(nil)
|
||||
}
|
||||
|
||||
// UnsetOrganizationId ensures that no value is present for OrganizationId, not even an explicit nil
|
||||
func (o *CreateIdentityBody) UnsetOrganizationId() {
|
||||
o.OrganizationId.Unset()
|
||||
}
|
||||
|
||||
// GetRecoveryAddresses returns the RecoveryAddresses field value if set, zero value otherwise.
|
||||
func (o *CreateIdentityBody) GetRecoveryAddresses() []RecoveryIdentityAddress {
|
||||
if o == nil || IsNil(o.RecoveryAddresses) {
|
||||
var ret []RecoveryIdentityAddress
|
||||
return ret
|
||||
}
|
||||
return o.RecoveryAddresses
|
||||
}
|
||||
|
||||
// GetRecoveryAddressesOk returns a tuple with the RecoveryAddresses field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateIdentityBody) GetRecoveryAddressesOk() ([]RecoveryIdentityAddress, bool) {
|
||||
if o == nil || IsNil(o.RecoveryAddresses) {
|
||||
return nil, false
|
||||
}
|
||||
return o.RecoveryAddresses, true
|
||||
}
|
||||
|
||||
// HasRecoveryAddresses returns a boolean if a field has been set.
|
||||
func (o *CreateIdentityBody) HasRecoveryAddresses() bool {
|
||||
if o != nil && !IsNil(o.RecoveryAddresses) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRecoveryAddresses gets a reference to the given []RecoveryIdentityAddress and assigns it to the RecoveryAddresses field.
|
||||
func (o *CreateIdentityBody) SetRecoveryAddresses(v []RecoveryIdentityAddress) {
|
||||
o.RecoveryAddresses = v
|
||||
}
|
||||
|
||||
// GetRegion returns the Region field value if set, zero value otherwise.
|
||||
func (o *CreateIdentityBody) GetRegion() string {
|
||||
if o == nil || IsNil(o.Region) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Region
|
||||
}
|
||||
|
||||
// GetRegionOk returns a tuple with the Region field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateIdentityBody) GetRegionOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Region) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Region, true
|
||||
}
|
||||
|
||||
// HasRegion returns a boolean if a field has been set.
|
||||
func (o *CreateIdentityBody) HasRegion() bool {
|
||||
if o != nil && !IsNil(o.Region) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRegion gets a reference to the given string and assigns it to the Region field.
|
||||
func (o *CreateIdentityBody) SetRegion(v string) {
|
||||
o.Region = &v
|
||||
}
|
||||
|
||||
// GetSchemaId returns the SchemaId field value
|
||||
func (o *CreateIdentityBody) GetSchemaId() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.SchemaId
|
||||
}
|
||||
|
||||
// GetSchemaIdOk returns a tuple with the SchemaId field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateIdentityBody) GetSchemaIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.SchemaId, true
|
||||
}
|
||||
|
||||
// SetSchemaId sets field value
|
||||
func (o *CreateIdentityBody) SetSchemaId(v string) {
|
||||
o.SchemaId = v
|
||||
}
|
||||
|
||||
// GetState returns the State field value if set, zero value otherwise.
|
||||
func (o *CreateIdentityBody) GetState() string {
|
||||
if o == nil || IsNil(o.State) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.State
|
||||
}
|
||||
|
||||
// GetStateOk returns a tuple with the State field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateIdentityBody) GetStateOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.State) {
|
||||
return nil, false
|
||||
}
|
||||
return o.State, true
|
||||
}
|
||||
|
||||
// HasState returns a boolean if a field has been set.
|
||||
func (o *CreateIdentityBody) HasState() bool {
|
||||
if o != nil && !IsNil(o.State) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetState gets a reference to the given string and assigns it to the State field.
|
||||
func (o *CreateIdentityBody) SetState(v string) {
|
||||
o.State = &v
|
||||
}
|
||||
|
||||
// GetTraits returns the Traits field value
|
||||
func (o *CreateIdentityBody) GetTraits() map[string]interface{} {
|
||||
if o == nil {
|
||||
var ret map[string]interface{}
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Traits
|
||||
}
|
||||
|
||||
// GetTraitsOk returns a tuple with the Traits field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateIdentityBody) GetTraitsOk() (map[string]interface{}, bool) {
|
||||
if o == nil {
|
||||
return map[string]interface{}{}, false
|
||||
}
|
||||
return o.Traits, true
|
||||
}
|
||||
|
||||
// SetTraits sets field value
|
||||
func (o *CreateIdentityBody) SetTraits(v map[string]interface{}) {
|
||||
o.Traits = v
|
||||
}
|
||||
|
||||
// GetVerifiableAddresses returns the VerifiableAddresses field value if set, zero value otherwise.
|
||||
func (o *CreateIdentityBody) GetVerifiableAddresses() []VerifiableIdentityAddress {
|
||||
if o == nil || IsNil(o.VerifiableAddresses) {
|
||||
var ret []VerifiableIdentityAddress
|
||||
return ret
|
||||
}
|
||||
return o.VerifiableAddresses
|
||||
}
|
||||
|
||||
// GetVerifiableAddressesOk returns a tuple with the VerifiableAddresses field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateIdentityBody) GetVerifiableAddressesOk() ([]VerifiableIdentityAddress, bool) {
|
||||
if o == nil || IsNil(o.VerifiableAddresses) {
|
||||
return nil, false
|
||||
}
|
||||
return o.VerifiableAddresses, true
|
||||
}
|
||||
|
||||
// HasVerifiableAddresses returns a boolean if a field has been set.
|
||||
func (o *CreateIdentityBody) HasVerifiableAddresses() bool {
|
||||
if o != nil && !IsNil(o.VerifiableAddresses) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetVerifiableAddresses gets a reference to the given []VerifiableIdentityAddress and assigns it to the VerifiableAddresses field.
|
||||
func (o *CreateIdentityBody) SetVerifiableAddresses(v []VerifiableIdentityAddress) {
|
||||
o.VerifiableAddresses = v
|
||||
}
|
||||
|
||||
func (o CreateIdentityBody) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o CreateIdentityBody) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Credentials) {
|
||||
toSerialize["credentials"] = o.Credentials
|
||||
}
|
||||
if !IsNil(o.ExternalId) {
|
||||
toSerialize["external_id"] = o.ExternalId
|
||||
}
|
||||
if o.MetadataAdmin != nil {
|
||||
toSerialize["metadata_admin"] = o.MetadataAdmin
|
||||
}
|
||||
if o.MetadataPublic != nil {
|
||||
toSerialize["metadata_public"] = o.MetadataPublic
|
||||
}
|
||||
if o.OrganizationId.IsSet() {
|
||||
toSerialize["organization_id"] = o.OrganizationId.Get()
|
||||
}
|
||||
if !IsNil(o.RecoveryAddresses) {
|
||||
toSerialize["recovery_addresses"] = o.RecoveryAddresses
|
||||
}
|
||||
if !IsNil(o.Region) {
|
||||
toSerialize["region"] = o.Region
|
||||
}
|
||||
toSerialize["schema_id"] = o.SchemaId
|
||||
if !IsNil(o.State) {
|
||||
toSerialize["state"] = o.State
|
||||
}
|
||||
toSerialize["traits"] = o.Traits
|
||||
if !IsNil(o.VerifiableAddresses) {
|
||||
toSerialize["verifiable_addresses"] = o.VerifiableAddresses
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *CreateIdentityBody) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"schema_id",
|
||||
"traits",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varCreateIdentityBody := _CreateIdentityBody{}
|
||||
|
||||
err = json.Unmarshal(data, &varCreateIdentityBody)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = CreateIdentityBody(varCreateIdentityBody)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "credentials")
|
||||
delete(additionalProperties, "external_id")
|
||||
delete(additionalProperties, "metadata_admin")
|
||||
delete(additionalProperties, "metadata_public")
|
||||
delete(additionalProperties, "organization_id")
|
||||
delete(additionalProperties, "recovery_addresses")
|
||||
delete(additionalProperties, "region")
|
||||
delete(additionalProperties, "schema_id")
|
||||
delete(additionalProperties, "state")
|
||||
delete(additionalProperties, "traits")
|
||||
delete(additionalProperties, "verifiable_addresses")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableCreateIdentityBody struct {
|
||||
value *CreateIdentityBody
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateIdentityBody) Get() *CreateIdentityBody {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateIdentityBody) Set(val *CreateIdentityBody) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateIdentityBody) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateIdentityBody) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateIdentityBody(val *CreateIdentityBody) *NullableCreateIdentityBody {
|
||||
return &NullableCreateIdentityBody{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateIdentityBody) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateIdentityBody) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
244
pkg/httpclient/model_create_recovery_code_for_identity_body.go
Normal file
244
pkg/httpclient/model_create_recovery_code_for_identity_body.go
Normal file
@@ -0,0 +1,244 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the CreateRecoveryCodeForIdentityBody type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateRecoveryCodeForIdentityBody{}
|
||||
|
||||
// CreateRecoveryCodeForIdentityBody Create Recovery Code for Identity Request Body
|
||||
type CreateRecoveryCodeForIdentityBody struct {
|
||||
// Code Expires In The recovery code will expire after that amount of time has passed. Defaults to the configuration value of `selfservice.methods.code.config.lifespan`.
|
||||
ExpiresIn *string `json:"expires_in,omitempty" validate:"regexp=^([0-9]+([.][0-9]+)?(ns|us|µs|ms|s|m|h))+$"`
|
||||
// The flow type can either be `api` or `browser`.
|
||||
FlowType *string `json:"flow_type,omitempty"`
|
||||
// Identity to Recover The identity's ID you wish to recover.
|
||||
IdentityId string `json:"identity_id"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _CreateRecoveryCodeForIdentityBody CreateRecoveryCodeForIdentityBody
|
||||
|
||||
// NewCreateRecoveryCodeForIdentityBody instantiates a new CreateRecoveryCodeForIdentityBody object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewCreateRecoveryCodeForIdentityBody(identityId string) *CreateRecoveryCodeForIdentityBody {
|
||||
this := CreateRecoveryCodeForIdentityBody{}
|
||||
this.IdentityId = identityId
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateRecoveryCodeForIdentityBodyWithDefaults instantiates a new CreateRecoveryCodeForIdentityBody object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewCreateRecoveryCodeForIdentityBodyWithDefaults() *CreateRecoveryCodeForIdentityBody {
|
||||
this := CreateRecoveryCodeForIdentityBody{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise.
|
||||
func (o *CreateRecoveryCodeForIdentityBody) GetExpiresIn() string {
|
||||
if o == nil || IsNil(o.ExpiresIn) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.ExpiresIn
|
||||
}
|
||||
|
||||
// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateRecoveryCodeForIdentityBody) GetExpiresInOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.ExpiresIn) {
|
||||
return nil, false
|
||||
}
|
||||
return o.ExpiresIn, true
|
||||
}
|
||||
|
||||
// HasExpiresIn returns a boolean if a field has been set.
|
||||
func (o *CreateRecoveryCodeForIdentityBody) HasExpiresIn() bool {
|
||||
if o != nil && !IsNil(o.ExpiresIn) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetExpiresIn gets a reference to the given string and assigns it to the ExpiresIn field.
|
||||
func (o *CreateRecoveryCodeForIdentityBody) SetExpiresIn(v string) {
|
||||
o.ExpiresIn = &v
|
||||
}
|
||||
|
||||
// GetFlowType returns the FlowType field value if set, zero value otherwise.
|
||||
func (o *CreateRecoveryCodeForIdentityBody) GetFlowType() string {
|
||||
if o == nil || IsNil(o.FlowType) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.FlowType
|
||||
}
|
||||
|
||||
// GetFlowTypeOk returns a tuple with the FlowType field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateRecoveryCodeForIdentityBody) GetFlowTypeOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.FlowType) {
|
||||
return nil, false
|
||||
}
|
||||
return o.FlowType, true
|
||||
}
|
||||
|
||||
// HasFlowType returns a boolean if a field has been set.
|
||||
func (o *CreateRecoveryCodeForIdentityBody) HasFlowType() bool {
|
||||
if o != nil && !IsNil(o.FlowType) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetFlowType gets a reference to the given string and assigns it to the FlowType field.
|
||||
func (o *CreateRecoveryCodeForIdentityBody) SetFlowType(v string) {
|
||||
o.FlowType = &v
|
||||
}
|
||||
|
||||
// GetIdentityId returns the IdentityId field value
|
||||
func (o *CreateRecoveryCodeForIdentityBody) GetIdentityId() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.IdentityId
|
||||
}
|
||||
|
||||
// GetIdentityIdOk returns a tuple with the IdentityId field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateRecoveryCodeForIdentityBody) GetIdentityIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.IdentityId, true
|
||||
}
|
||||
|
||||
// SetIdentityId sets field value
|
||||
func (o *CreateRecoveryCodeForIdentityBody) SetIdentityId(v string) {
|
||||
o.IdentityId = v
|
||||
}
|
||||
|
||||
func (o CreateRecoveryCodeForIdentityBody) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o CreateRecoveryCodeForIdentityBody) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.ExpiresIn) {
|
||||
toSerialize["expires_in"] = o.ExpiresIn
|
||||
}
|
||||
if !IsNil(o.FlowType) {
|
||||
toSerialize["flow_type"] = o.FlowType
|
||||
}
|
||||
toSerialize["identity_id"] = o.IdentityId
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *CreateRecoveryCodeForIdentityBody) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"identity_id",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varCreateRecoveryCodeForIdentityBody := _CreateRecoveryCodeForIdentityBody{}
|
||||
|
||||
err = json.Unmarshal(data, &varCreateRecoveryCodeForIdentityBody)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = CreateRecoveryCodeForIdentityBody(varCreateRecoveryCodeForIdentityBody)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "expires_in")
|
||||
delete(additionalProperties, "flow_type")
|
||||
delete(additionalProperties, "identity_id")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableCreateRecoveryCodeForIdentityBody struct {
|
||||
value *CreateRecoveryCodeForIdentityBody
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateRecoveryCodeForIdentityBody) Get() *CreateRecoveryCodeForIdentityBody {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateRecoveryCodeForIdentityBody) Set(val *CreateRecoveryCodeForIdentityBody) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateRecoveryCodeForIdentityBody) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateRecoveryCodeForIdentityBody) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateRecoveryCodeForIdentityBody(val *CreateRecoveryCodeForIdentityBody) *NullableCreateRecoveryCodeForIdentityBody {
|
||||
return &NullableCreateRecoveryCodeForIdentityBody{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateRecoveryCodeForIdentityBody) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateRecoveryCodeForIdentityBody) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
206
pkg/httpclient/model_create_recovery_link_for_identity_body.go
Normal file
206
pkg/httpclient/model_create_recovery_link_for_identity_body.go
Normal file
@@ -0,0 +1,206 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the CreateRecoveryLinkForIdentityBody type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateRecoveryLinkForIdentityBody{}
|
||||
|
||||
// CreateRecoveryLinkForIdentityBody Create Recovery Link for Identity Request Body
|
||||
type CreateRecoveryLinkForIdentityBody struct {
|
||||
// Link Expires In The recovery link will expire after that amount of time has passed. Defaults to the configuration value of `selfservice.methods.code.config.lifespan`.
|
||||
ExpiresIn *string `json:"expires_in,omitempty" validate:"regexp=^([0-9]+([.][0-9]+)?(ns|us|µs|ms|s|m|h))+$"`
|
||||
// Identity to Recover The identity's ID you wish to recover.
|
||||
IdentityId string `json:"identity_id"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _CreateRecoveryLinkForIdentityBody CreateRecoveryLinkForIdentityBody
|
||||
|
||||
// NewCreateRecoveryLinkForIdentityBody instantiates a new CreateRecoveryLinkForIdentityBody object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewCreateRecoveryLinkForIdentityBody(identityId string) *CreateRecoveryLinkForIdentityBody {
|
||||
this := CreateRecoveryLinkForIdentityBody{}
|
||||
this.IdentityId = identityId
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateRecoveryLinkForIdentityBodyWithDefaults instantiates a new CreateRecoveryLinkForIdentityBody object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewCreateRecoveryLinkForIdentityBodyWithDefaults() *CreateRecoveryLinkForIdentityBody {
|
||||
this := CreateRecoveryLinkForIdentityBody{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise.
|
||||
func (o *CreateRecoveryLinkForIdentityBody) GetExpiresIn() string {
|
||||
if o == nil || IsNil(o.ExpiresIn) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.ExpiresIn
|
||||
}
|
||||
|
||||
// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateRecoveryLinkForIdentityBody) GetExpiresInOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.ExpiresIn) {
|
||||
return nil, false
|
||||
}
|
||||
return o.ExpiresIn, true
|
||||
}
|
||||
|
||||
// HasExpiresIn returns a boolean if a field has been set.
|
||||
func (o *CreateRecoveryLinkForIdentityBody) HasExpiresIn() bool {
|
||||
if o != nil && !IsNil(o.ExpiresIn) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetExpiresIn gets a reference to the given string and assigns it to the ExpiresIn field.
|
||||
func (o *CreateRecoveryLinkForIdentityBody) SetExpiresIn(v string) {
|
||||
o.ExpiresIn = &v
|
||||
}
|
||||
|
||||
// GetIdentityId returns the IdentityId field value
|
||||
func (o *CreateRecoveryLinkForIdentityBody) GetIdentityId() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.IdentityId
|
||||
}
|
||||
|
||||
// GetIdentityIdOk returns a tuple with the IdentityId field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateRecoveryLinkForIdentityBody) GetIdentityIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.IdentityId, true
|
||||
}
|
||||
|
||||
// SetIdentityId sets field value
|
||||
func (o *CreateRecoveryLinkForIdentityBody) SetIdentityId(v string) {
|
||||
o.IdentityId = v
|
||||
}
|
||||
|
||||
func (o CreateRecoveryLinkForIdentityBody) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o CreateRecoveryLinkForIdentityBody) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.ExpiresIn) {
|
||||
toSerialize["expires_in"] = o.ExpiresIn
|
||||
}
|
||||
toSerialize["identity_id"] = o.IdentityId
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *CreateRecoveryLinkForIdentityBody) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"identity_id",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varCreateRecoveryLinkForIdentityBody := _CreateRecoveryLinkForIdentityBody{}
|
||||
|
||||
err = json.Unmarshal(data, &varCreateRecoveryLinkForIdentityBody)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = CreateRecoveryLinkForIdentityBody(varCreateRecoveryLinkForIdentityBody)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "expires_in")
|
||||
delete(additionalProperties, "identity_id")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableCreateRecoveryLinkForIdentityBody struct {
|
||||
value *CreateRecoveryLinkForIdentityBody
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateRecoveryLinkForIdentityBody) Get() *CreateRecoveryLinkForIdentityBody {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateRecoveryLinkForIdentityBody) Set(val *CreateRecoveryLinkForIdentityBody) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateRecoveryLinkForIdentityBody) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateRecoveryLinkForIdentityBody) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateRecoveryLinkForIdentityBody(val *CreateRecoveryLinkForIdentityBody) *NullableCreateRecoveryLinkForIdentityBody {
|
||||
return &NullableCreateRecoveryLinkForIdentityBody{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateRecoveryLinkForIdentityBody) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateRecoveryLinkForIdentityBody) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
168
pkg/httpclient/model_create_test_login_flow_body.go
Normal file
168
pkg/httpclient/model_create_test_login_flow_body.go
Normal file
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the CreateTestLoginFlowBody type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateTestLoginFlowBody{}
|
||||
|
||||
// CreateTestLoginFlowBody struct for CreateTestLoginFlowBody
|
||||
type CreateTestLoginFlowBody struct {
|
||||
// ID of the OIDC provider to test. Must match a provider configured on the project that serves this request.
|
||||
ProviderId string `json:"provider_id"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _CreateTestLoginFlowBody CreateTestLoginFlowBody
|
||||
|
||||
// NewCreateTestLoginFlowBody instantiates a new CreateTestLoginFlowBody object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewCreateTestLoginFlowBody(providerId string) *CreateTestLoginFlowBody {
|
||||
this := CreateTestLoginFlowBody{}
|
||||
this.ProviderId = providerId
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateTestLoginFlowBodyWithDefaults instantiates a new CreateTestLoginFlowBody object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewCreateTestLoginFlowBodyWithDefaults() *CreateTestLoginFlowBody {
|
||||
this := CreateTestLoginFlowBody{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetProviderId returns the ProviderId field value
|
||||
func (o *CreateTestLoginFlowBody) GetProviderId() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.ProviderId
|
||||
}
|
||||
|
||||
// GetProviderIdOk returns a tuple with the ProviderId field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateTestLoginFlowBody) GetProviderIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.ProviderId, true
|
||||
}
|
||||
|
||||
// SetProviderId sets field value
|
||||
func (o *CreateTestLoginFlowBody) SetProviderId(v string) {
|
||||
o.ProviderId = v
|
||||
}
|
||||
|
||||
func (o CreateTestLoginFlowBody) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o CreateTestLoginFlowBody) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["provider_id"] = o.ProviderId
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *CreateTestLoginFlowBody) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"provider_id",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varCreateTestLoginFlowBody := _CreateTestLoginFlowBody{}
|
||||
|
||||
err = json.Unmarshal(data, &varCreateTestLoginFlowBody)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = CreateTestLoginFlowBody(varCreateTestLoginFlowBody)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "provider_id")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableCreateTestLoginFlowBody struct {
|
||||
value *CreateTestLoginFlowBody
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateTestLoginFlowBody) Get() *CreateTestLoginFlowBody {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateTestLoginFlowBody) Set(val *CreateTestLoginFlowBody) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateTestLoginFlowBody) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateTestLoginFlowBody) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateTestLoginFlowBody(val *CreateTestLoginFlowBody) *NullableCreateTestLoginFlowBody {
|
||||
return &NullableCreateTestLoginFlowBody{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateTestLoginFlowBody) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateTestLoginFlowBody) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
155
pkg/httpclient/model_delete_my_sessions_count.go
Normal file
155
pkg/httpclient/model_delete_my_sessions_count.go
Normal file
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the DeleteMySessionsCount type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &DeleteMySessionsCount{}
|
||||
|
||||
// DeleteMySessionsCount Deleted Session Count
|
||||
type DeleteMySessionsCount struct {
|
||||
// The number of sessions that were revoked.
|
||||
Count *int64 `json:"count,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _DeleteMySessionsCount DeleteMySessionsCount
|
||||
|
||||
// NewDeleteMySessionsCount instantiates a new DeleteMySessionsCount object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewDeleteMySessionsCount() *DeleteMySessionsCount {
|
||||
this := DeleteMySessionsCount{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewDeleteMySessionsCountWithDefaults instantiates a new DeleteMySessionsCount object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewDeleteMySessionsCountWithDefaults() *DeleteMySessionsCount {
|
||||
this := DeleteMySessionsCount{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCount returns the Count field value if set, zero value otherwise.
|
||||
func (o *DeleteMySessionsCount) GetCount() int64 {
|
||||
if o == nil || IsNil(o.Count) {
|
||||
var ret int64
|
||||
return ret
|
||||
}
|
||||
return *o.Count
|
||||
}
|
||||
|
||||
// GetCountOk returns a tuple with the Count field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeleteMySessionsCount) GetCountOk() (*int64, bool) {
|
||||
if o == nil || IsNil(o.Count) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Count, true
|
||||
}
|
||||
|
||||
// HasCount returns a boolean if a field has been set.
|
||||
func (o *DeleteMySessionsCount) HasCount() bool {
|
||||
if o != nil && !IsNil(o.Count) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCount gets a reference to the given int64 and assigns it to the Count field.
|
||||
func (o *DeleteMySessionsCount) SetCount(v int64) {
|
||||
o.Count = &v
|
||||
}
|
||||
|
||||
func (o DeleteMySessionsCount) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o DeleteMySessionsCount) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Count) {
|
||||
toSerialize["count"] = o.Count
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *DeleteMySessionsCount) UnmarshalJSON(data []byte) (err error) {
|
||||
varDeleteMySessionsCount := _DeleteMySessionsCount{}
|
||||
|
||||
err = json.Unmarshal(data, &varDeleteMySessionsCount)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = DeleteMySessionsCount(varDeleteMySessionsCount)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "count")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableDeleteMySessionsCount struct {
|
||||
value *DeleteMySessionsCount
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableDeleteMySessionsCount) Get() *DeleteMySessionsCount {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableDeleteMySessionsCount) Set(val *DeleteMySessionsCount) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableDeleteMySessionsCount) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableDeleteMySessionsCount) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableDeleteMySessionsCount(val *DeleteMySessionsCount) *NullableDeleteMySessionsCount {
|
||||
return &NullableDeleteMySessionsCount{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableDeleteMySessionsCount) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableDeleteMySessionsCount) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
1116
pkg/httpclient/model_device_authn_android_authorization_list.go
Normal file
1116
pkg/httpclient/model_device_authn_android_authorization_list.go
Normal file
File diff suppressed because it is too large
Load Diff
339
pkg/httpclient/model_device_authn_android_key_description.go
Normal file
339
pkg/httpclient/model_device_authn_android_key_description.go
Normal file
@@ -0,0 +1,339 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the DeviceAuthnAndroidKeyDescription type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &DeviceAuthnAndroidKeyDescription{}
|
||||
|
||||
// DeviceAuthnAndroidKeyDescription Schema: https://source.android.com/docs/security/features/keystore/attestation#schema
|
||||
type DeviceAuthnAndroidKeyDescription struct {
|
||||
AttestationSecurityLevel *int64 `json:"attestation_security_level,omitempty"`
|
||||
AttestationVersion *int64 `json:"attestation_version,omitempty"`
|
||||
KeymasterSecurityLevel *int64 `json:"keymaster_security_level,omitempty"`
|
||||
KeymasterVersion *int64 `json:"keymaster_version,omitempty"`
|
||||
SoftwareEnforced *DeviceAuthnAndroidAuthorizationList `json:"software_enforced,omitempty"`
|
||||
TeeEnforced *DeviceAuthnAndroidAuthorizationList `json:"tee_enforced,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _DeviceAuthnAndroidKeyDescription DeviceAuthnAndroidKeyDescription
|
||||
|
||||
// NewDeviceAuthnAndroidKeyDescription instantiates a new DeviceAuthnAndroidKeyDescription object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewDeviceAuthnAndroidKeyDescription() *DeviceAuthnAndroidKeyDescription {
|
||||
this := DeviceAuthnAndroidKeyDescription{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewDeviceAuthnAndroidKeyDescriptionWithDefaults instantiates a new DeviceAuthnAndroidKeyDescription object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewDeviceAuthnAndroidKeyDescriptionWithDefaults() *DeviceAuthnAndroidKeyDescription {
|
||||
this := DeviceAuthnAndroidKeyDescription{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAttestationSecurityLevel returns the AttestationSecurityLevel field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) GetAttestationSecurityLevel() int64 {
|
||||
if o == nil || IsNil(o.AttestationSecurityLevel) {
|
||||
var ret int64
|
||||
return ret
|
||||
}
|
||||
return *o.AttestationSecurityLevel
|
||||
}
|
||||
|
||||
// GetAttestationSecurityLevelOk returns a tuple with the AttestationSecurityLevel field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) GetAttestationSecurityLevelOk() (*int64, bool) {
|
||||
if o == nil || IsNil(o.AttestationSecurityLevel) {
|
||||
return nil, false
|
||||
}
|
||||
return o.AttestationSecurityLevel, true
|
||||
}
|
||||
|
||||
// HasAttestationSecurityLevel returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) HasAttestationSecurityLevel() bool {
|
||||
if o != nil && !IsNil(o.AttestationSecurityLevel) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAttestationSecurityLevel gets a reference to the given int64 and assigns it to the AttestationSecurityLevel field.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) SetAttestationSecurityLevel(v int64) {
|
||||
o.AttestationSecurityLevel = &v
|
||||
}
|
||||
|
||||
// GetAttestationVersion returns the AttestationVersion field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) GetAttestationVersion() int64 {
|
||||
if o == nil || IsNil(o.AttestationVersion) {
|
||||
var ret int64
|
||||
return ret
|
||||
}
|
||||
return *o.AttestationVersion
|
||||
}
|
||||
|
||||
// GetAttestationVersionOk returns a tuple with the AttestationVersion field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) GetAttestationVersionOk() (*int64, bool) {
|
||||
if o == nil || IsNil(o.AttestationVersion) {
|
||||
return nil, false
|
||||
}
|
||||
return o.AttestationVersion, true
|
||||
}
|
||||
|
||||
// HasAttestationVersion returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) HasAttestationVersion() bool {
|
||||
if o != nil && !IsNil(o.AttestationVersion) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAttestationVersion gets a reference to the given int64 and assigns it to the AttestationVersion field.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) SetAttestationVersion(v int64) {
|
||||
o.AttestationVersion = &v
|
||||
}
|
||||
|
||||
// GetKeymasterSecurityLevel returns the KeymasterSecurityLevel field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) GetKeymasterSecurityLevel() int64 {
|
||||
if o == nil || IsNil(o.KeymasterSecurityLevel) {
|
||||
var ret int64
|
||||
return ret
|
||||
}
|
||||
return *o.KeymasterSecurityLevel
|
||||
}
|
||||
|
||||
// GetKeymasterSecurityLevelOk returns a tuple with the KeymasterSecurityLevel field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) GetKeymasterSecurityLevelOk() (*int64, bool) {
|
||||
if o == nil || IsNil(o.KeymasterSecurityLevel) {
|
||||
return nil, false
|
||||
}
|
||||
return o.KeymasterSecurityLevel, true
|
||||
}
|
||||
|
||||
// HasKeymasterSecurityLevel returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) HasKeymasterSecurityLevel() bool {
|
||||
if o != nil && !IsNil(o.KeymasterSecurityLevel) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetKeymasterSecurityLevel gets a reference to the given int64 and assigns it to the KeymasterSecurityLevel field.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) SetKeymasterSecurityLevel(v int64) {
|
||||
o.KeymasterSecurityLevel = &v
|
||||
}
|
||||
|
||||
// GetKeymasterVersion returns the KeymasterVersion field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) GetKeymasterVersion() int64 {
|
||||
if o == nil || IsNil(o.KeymasterVersion) {
|
||||
var ret int64
|
||||
return ret
|
||||
}
|
||||
return *o.KeymasterVersion
|
||||
}
|
||||
|
||||
// GetKeymasterVersionOk returns a tuple with the KeymasterVersion field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) GetKeymasterVersionOk() (*int64, bool) {
|
||||
if o == nil || IsNil(o.KeymasterVersion) {
|
||||
return nil, false
|
||||
}
|
||||
return o.KeymasterVersion, true
|
||||
}
|
||||
|
||||
// HasKeymasterVersion returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) HasKeymasterVersion() bool {
|
||||
if o != nil && !IsNil(o.KeymasterVersion) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetKeymasterVersion gets a reference to the given int64 and assigns it to the KeymasterVersion field.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) SetKeymasterVersion(v int64) {
|
||||
o.KeymasterVersion = &v
|
||||
}
|
||||
|
||||
// GetSoftwareEnforced returns the SoftwareEnforced field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) GetSoftwareEnforced() DeviceAuthnAndroidAuthorizationList {
|
||||
if o == nil || IsNil(o.SoftwareEnforced) {
|
||||
var ret DeviceAuthnAndroidAuthorizationList
|
||||
return ret
|
||||
}
|
||||
return *o.SoftwareEnforced
|
||||
}
|
||||
|
||||
// GetSoftwareEnforcedOk returns a tuple with the SoftwareEnforced field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) GetSoftwareEnforcedOk() (*DeviceAuthnAndroidAuthorizationList, bool) {
|
||||
if o == nil || IsNil(o.SoftwareEnforced) {
|
||||
return nil, false
|
||||
}
|
||||
return o.SoftwareEnforced, true
|
||||
}
|
||||
|
||||
// HasSoftwareEnforced returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) HasSoftwareEnforced() bool {
|
||||
if o != nil && !IsNil(o.SoftwareEnforced) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSoftwareEnforced gets a reference to the given DeviceAuthnAndroidAuthorizationList and assigns it to the SoftwareEnforced field.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) SetSoftwareEnforced(v DeviceAuthnAndroidAuthorizationList) {
|
||||
o.SoftwareEnforced = &v
|
||||
}
|
||||
|
||||
// GetTeeEnforced returns the TeeEnforced field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) GetTeeEnforced() DeviceAuthnAndroidAuthorizationList {
|
||||
if o == nil || IsNil(o.TeeEnforced) {
|
||||
var ret DeviceAuthnAndroidAuthorizationList
|
||||
return ret
|
||||
}
|
||||
return *o.TeeEnforced
|
||||
}
|
||||
|
||||
// GetTeeEnforcedOk returns a tuple with the TeeEnforced field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) GetTeeEnforcedOk() (*DeviceAuthnAndroidAuthorizationList, bool) {
|
||||
if o == nil || IsNil(o.TeeEnforced) {
|
||||
return nil, false
|
||||
}
|
||||
return o.TeeEnforced, true
|
||||
}
|
||||
|
||||
// HasTeeEnforced returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) HasTeeEnforced() bool {
|
||||
if o != nil && !IsNil(o.TeeEnforced) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTeeEnforced gets a reference to the given DeviceAuthnAndroidAuthorizationList and assigns it to the TeeEnforced field.
|
||||
func (o *DeviceAuthnAndroidKeyDescription) SetTeeEnforced(v DeviceAuthnAndroidAuthorizationList) {
|
||||
o.TeeEnforced = &v
|
||||
}
|
||||
|
||||
func (o DeviceAuthnAndroidKeyDescription) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o DeviceAuthnAndroidKeyDescription) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.AttestationSecurityLevel) {
|
||||
toSerialize["attestation_security_level"] = o.AttestationSecurityLevel
|
||||
}
|
||||
if !IsNil(o.AttestationVersion) {
|
||||
toSerialize["attestation_version"] = o.AttestationVersion
|
||||
}
|
||||
if !IsNil(o.KeymasterSecurityLevel) {
|
||||
toSerialize["keymaster_security_level"] = o.KeymasterSecurityLevel
|
||||
}
|
||||
if !IsNil(o.KeymasterVersion) {
|
||||
toSerialize["keymaster_version"] = o.KeymasterVersion
|
||||
}
|
||||
if !IsNil(o.SoftwareEnforced) {
|
||||
toSerialize["software_enforced"] = o.SoftwareEnforced
|
||||
}
|
||||
if !IsNil(o.TeeEnforced) {
|
||||
toSerialize["tee_enforced"] = o.TeeEnforced
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *DeviceAuthnAndroidKeyDescription) UnmarshalJSON(data []byte) (err error) {
|
||||
varDeviceAuthnAndroidKeyDescription := _DeviceAuthnAndroidKeyDescription{}
|
||||
|
||||
err = json.Unmarshal(data, &varDeviceAuthnAndroidKeyDescription)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = DeviceAuthnAndroidKeyDescription(varDeviceAuthnAndroidKeyDescription)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "attestation_security_level")
|
||||
delete(additionalProperties, "attestation_version")
|
||||
delete(additionalProperties, "keymaster_security_level")
|
||||
delete(additionalProperties, "keymaster_version")
|
||||
delete(additionalProperties, "software_enforced")
|
||||
delete(additionalProperties, "tee_enforced")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableDeviceAuthnAndroidKeyDescription struct {
|
||||
value *DeviceAuthnAndroidKeyDescription
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableDeviceAuthnAndroidKeyDescription) Get() *DeviceAuthnAndroidKeyDescription {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableDeviceAuthnAndroidKeyDescription) Set(val *DeviceAuthnAndroidKeyDescription) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableDeviceAuthnAndroidKeyDescription) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableDeviceAuthnAndroidKeyDescription) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableDeviceAuthnAndroidKeyDescription(val *DeviceAuthnAndroidKeyDescription) *NullableDeviceAuthnAndroidKeyDescription {
|
||||
return &NullableDeviceAuthnAndroidKeyDescription{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableDeviceAuthnAndroidKeyDescription) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableDeviceAuthnAndroidKeyDescription) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
265
pkg/httpclient/model_device_authn_android_root_of_trust.go
Normal file
265
pkg/httpclient/model_device_authn_android_root_of_trust.go
Normal file
@@ -0,0 +1,265 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the DeviceAuthnAndroidRootOfTrust type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &DeviceAuthnAndroidRootOfTrust{}
|
||||
|
||||
// DeviceAuthnAndroidRootOfTrust struct for DeviceAuthnAndroidRootOfTrust
|
||||
type DeviceAuthnAndroidRootOfTrust struct {
|
||||
DeviceLocked *bool `json:"device_locked,omitempty"`
|
||||
VerifiedBootHash []int32 `json:"verified_boot_hash,omitempty"`
|
||||
VerifiedBootKey []int32 `json:"verified_boot_key,omitempty"`
|
||||
VerifiedBootState *int64 `json:"verified_boot_state,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _DeviceAuthnAndroidRootOfTrust DeviceAuthnAndroidRootOfTrust
|
||||
|
||||
// NewDeviceAuthnAndroidRootOfTrust instantiates a new DeviceAuthnAndroidRootOfTrust object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewDeviceAuthnAndroidRootOfTrust() *DeviceAuthnAndroidRootOfTrust {
|
||||
this := DeviceAuthnAndroidRootOfTrust{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewDeviceAuthnAndroidRootOfTrustWithDefaults instantiates a new DeviceAuthnAndroidRootOfTrust object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewDeviceAuthnAndroidRootOfTrustWithDefaults() *DeviceAuthnAndroidRootOfTrust {
|
||||
this := DeviceAuthnAndroidRootOfTrust{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetDeviceLocked returns the DeviceLocked field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnAndroidRootOfTrust) GetDeviceLocked() bool {
|
||||
if o == nil || IsNil(o.DeviceLocked) {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.DeviceLocked
|
||||
}
|
||||
|
||||
// GetDeviceLockedOk returns a tuple with the DeviceLocked field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnAndroidRootOfTrust) GetDeviceLockedOk() (*bool, bool) {
|
||||
if o == nil || IsNil(o.DeviceLocked) {
|
||||
return nil, false
|
||||
}
|
||||
return o.DeviceLocked, true
|
||||
}
|
||||
|
||||
// HasDeviceLocked returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnAndroidRootOfTrust) HasDeviceLocked() bool {
|
||||
if o != nil && !IsNil(o.DeviceLocked) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDeviceLocked gets a reference to the given bool and assigns it to the DeviceLocked field.
|
||||
func (o *DeviceAuthnAndroidRootOfTrust) SetDeviceLocked(v bool) {
|
||||
o.DeviceLocked = &v
|
||||
}
|
||||
|
||||
// GetVerifiedBootHash returns the VerifiedBootHash field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnAndroidRootOfTrust) GetVerifiedBootHash() []int32 {
|
||||
if o == nil || IsNil(o.VerifiedBootHash) {
|
||||
var ret []int32
|
||||
return ret
|
||||
}
|
||||
return o.VerifiedBootHash
|
||||
}
|
||||
|
||||
// GetVerifiedBootHashOk returns a tuple with the VerifiedBootHash field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnAndroidRootOfTrust) GetVerifiedBootHashOk() ([]int32, bool) {
|
||||
if o == nil || IsNil(o.VerifiedBootHash) {
|
||||
return nil, false
|
||||
}
|
||||
return o.VerifiedBootHash, true
|
||||
}
|
||||
|
||||
// HasVerifiedBootHash returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnAndroidRootOfTrust) HasVerifiedBootHash() bool {
|
||||
if o != nil && !IsNil(o.VerifiedBootHash) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetVerifiedBootHash gets a reference to the given []int32 and assigns it to the VerifiedBootHash field.
|
||||
func (o *DeviceAuthnAndroidRootOfTrust) SetVerifiedBootHash(v []int32) {
|
||||
o.VerifiedBootHash = v
|
||||
}
|
||||
|
||||
// GetVerifiedBootKey returns the VerifiedBootKey field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnAndroidRootOfTrust) GetVerifiedBootKey() []int32 {
|
||||
if o == nil || IsNil(o.VerifiedBootKey) {
|
||||
var ret []int32
|
||||
return ret
|
||||
}
|
||||
return o.VerifiedBootKey
|
||||
}
|
||||
|
||||
// GetVerifiedBootKeyOk returns a tuple with the VerifiedBootKey field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnAndroidRootOfTrust) GetVerifiedBootKeyOk() ([]int32, bool) {
|
||||
if o == nil || IsNil(o.VerifiedBootKey) {
|
||||
return nil, false
|
||||
}
|
||||
return o.VerifiedBootKey, true
|
||||
}
|
||||
|
||||
// HasVerifiedBootKey returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnAndroidRootOfTrust) HasVerifiedBootKey() bool {
|
||||
if o != nil && !IsNil(o.VerifiedBootKey) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetVerifiedBootKey gets a reference to the given []int32 and assigns it to the VerifiedBootKey field.
|
||||
func (o *DeviceAuthnAndroidRootOfTrust) SetVerifiedBootKey(v []int32) {
|
||||
o.VerifiedBootKey = v
|
||||
}
|
||||
|
||||
// GetVerifiedBootState returns the VerifiedBootState field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnAndroidRootOfTrust) GetVerifiedBootState() int64 {
|
||||
if o == nil || IsNil(o.VerifiedBootState) {
|
||||
var ret int64
|
||||
return ret
|
||||
}
|
||||
return *o.VerifiedBootState
|
||||
}
|
||||
|
||||
// GetVerifiedBootStateOk returns a tuple with the VerifiedBootState field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnAndroidRootOfTrust) GetVerifiedBootStateOk() (*int64, bool) {
|
||||
if o == nil || IsNil(o.VerifiedBootState) {
|
||||
return nil, false
|
||||
}
|
||||
return o.VerifiedBootState, true
|
||||
}
|
||||
|
||||
// HasVerifiedBootState returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnAndroidRootOfTrust) HasVerifiedBootState() bool {
|
||||
if o != nil && !IsNil(o.VerifiedBootState) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetVerifiedBootState gets a reference to the given int64 and assigns it to the VerifiedBootState field.
|
||||
func (o *DeviceAuthnAndroidRootOfTrust) SetVerifiedBootState(v int64) {
|
||||
o.VerifiedBootState = &v
|
||||
}
|
||||
|
||||
func (o DeviceAuthnAndroidRootOfTrust) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o DeviceAuthnAndroidRootOfTrust) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.DeviceLocked) {
|
||||
toSerialize["device_locked"] = o.DeviceLocked
|
||||
}
|
||||
if !IsNil(o.VerifiedBootHash) {
|
||||
toSerialize["verified_boot_hash"] = o.VerifiedBootHash
|
||||
}
|
||||
if !IsNil(o.VerifiedBootKey) {
|
||||
toSerialize["verified_boot_key"] = o.VerifiedBootKey
|
||||
}
|
||||
if !IsNil(o.VerifiedBootState) {
|
||||
toSerialize["verified_boot_state"] = o.VerifiedBootState
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *DeviceAuthnAndroidRootOfTrust) UnmarshalJSON(data []byte) (err error) {
|
||||
varDeviceAuthnAndroidRootOfTrust := _DeviceAuthnAndroidRootOfTrust{}
|
||||
|
||||
err = json.Unmarshal(data, &varDeviceAuthnAndroidRootOfTrust)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = DeviceAuthnAndroidRootOfTrust(varDeviceAuthnAndroidRootOfTrust)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "device_locked")
|
||||
delete(additionalProperties, "verified_boot_hash")
|
||||
delete(additionalProperties, "verified_boot_key")
|
||||
delete(additionalProperties, "verified_boot_state")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableDeviceAuthnAndroidRootOfTrust struct {
|
||||
value *DeviceAuthnAndroidRootOfTrust
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableDeviceAuthnAndroidRootOfTrust) Get() *DeviceAuthnAndroidRootOfTrust {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableDeviceAuthnAndroidRootOfTrust) Set(val *DeviceAuthnAndroidRootOfTrust) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableDeviceAuthnAndroidRootOfTrust) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableDeviceAuthnAndroidRootOfTrust) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableDeviceAuthnAndroidRootOfTrust(val *DeviceAuthnAndroidRootOfTrust) *NullableDeviceAuthnAndroidRootOfTrust {
|
||||
return &NullableDeviceAuthnAndroidRootOfTrust{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableDeviceAuthnAndroidRootOfTrust) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableDeviceAuthnAndroidRootOfTrust) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
191
pkg/httpclient/model_device_authn_attestation.go
Normal file
191
pkg/httpclient/model_device_authn_attestation.go
Normal file
@@ -0,0 +1,191 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the DeviceAuthnAttestation type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &DeviceAuthnAttestation{}
|
||||
|
||||
// DeviceAuthnAttestation Exactly one of `android` or `ios` is set, matching the key's device_type.
|
||||
type DeviceAuthnAttestation struct {
|
||||
Android *DeviceAuthnAndroidKeyDescription `json:"android,omitempty"`
|
||||
Ios *DeviceAuthnIOSAttestation `json:"ios,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _DeviceAuthnAttestation DeviceAuthnAttestation
|
||||
|
||||
// NewDeviceAuthnAttestation instantiates a new DeviceAuthnAttestation object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewDeviceAuthnAttestation() *DeviceAuthnAttestation {
|
||||
this := DeviceAuthnAttestation{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewDeviceAuthnAttestationWithDefaults instantiates a new DeviceAuthnAttestation object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewDeviceAuthnAttestationWithDefaults() *DeviceAuthnAttestation {
|
||||
this := DeviceAuthnAttestation{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAndroid returns the Android field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnAttestation) GetAndroid() DeviceAuthnAndroidKeyDescription {
|
||||
if o == nil || IsNil(o.Android) {
|
||||
var ret DeviceAuthnAndroidKeyDescription
|
||||
return ret
|
||||
}
|
||||
return *o.Android
|
||||
}
|
||||
|
||||
// GetAndroidOk returns a tuple with the Android field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnAttestation) GetAndroidOk() (*DeviceAuthnAndroidKeyDescription, bool) {
|
||||
if o == nil || IsNil(o.Android) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Android, true
|
||||
}
|
||||
|
||||
// HasAndroid returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnAttestation) HasAndroid() bool {
|
||||
if o != nil && !IsNil(o.Android) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAndroid gets a reference to the given DeviceAuthnAndroidKeyDescription and assigns it to the Android field.
|
||||
func (o *DeviceAuthnAttestation) SetAndroid(v DeviceAuthnAndroidKeyDescription) {
|
||||
o.Android = &v
|
||||
}
|
||||
|
||||
// GetIos returns the Ios field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnAttestation) GetIos() DeviceAuthnIOSAttestation {
|
||||
if o == nil || IsNil(o.Ios) {
|
||||
var ret DeviceAuthnIOSAttestation
|
||||
return ret
|
||||
}
|
||||
return *o.Ios
|
||||
}
|
||||
|
||||
// GetIosOk returns a tuple with the Ios field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnAttestation) GetIosOk() (*DeviceAuthnIOSAttestation, bool) {
|
||||
if o == nil || IsNil(o.Ios) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Ios, true
|
||||
}
|
||||
|
||||
// HasIos returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnAttestation) HasIos() bool {
|
||||
if o != nil && !IsNil(o.Ios) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetIos gets a reference to the given DeviceAuthnIOSAttestation and assigns it to the Ios field.
|
||||
func (o *DeviceAuthnAttestation) SetIos(v DeviceAuthnIOSAttestation) {
|
||||
o.Ios = &v
|
||||
}
|
||||
|
||||
func (o DeviceAuthnAttestation) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o DeviceAuthnAttestation) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Android) {
|
||||
toSerialize["android"] = o.Android
|
||||
}
|
||||
if !IsNil(o.Ios) {
|
||||
toSerialize["ios"] = o.Ios
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *DeviceAuthnAttestation) UnmarshalJSON(data []byte) (err error) {
|
||||
varDeviceAuthnAttestation := _DeviceAuthnAttestation{}
|
||||
|
||||
err = json.Unmarshal(data, &varDeviceAuthnAttestation)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = DeviceAuthnAttestation(varDeviceAuthnAttestation)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "android")
|
||||
delete(additionalProperties, "ios")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableDeviceAuthnAttestation struct {
|
||||
value *DeviceAuthnAttestation
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableDeviceAuthnAttestation) Get() *DeviceAuthnAttestation {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableDeviceAuthnAttestation) Set(val *DeviceAuthnAttestation) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableDeviceAuthnAttestation) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableDeviceAuthnAttestation) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableDeviceAuthnAttestation(val *DeviceAuthnAttestation) *NullableDeviceAuthnAttestation {
|
||||
return &NullableDeviceAuthnAttestation{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableDeviceAuthnAttestation) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableDeviceAuthnAttestation) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
155
pkg/httpclient/model_device_authn_ios_att_stmt.go
Normal file
155
pkg/httpclient/model_device_authn_ios_att_stmt.go
Normal file
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the DeviceAuthnIOSAttStmt type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &DeviceAuthnIOSAttStmt{}
|
||||
|
||||
// DeviceAuthnIOSAttStmt Defined in https://developer.apple.com/documentation/devicecheck/validating-apps-that-connect-to-your-server#Verify-the-attestation .
|
||||
type DeviceAuthnIOSAttStmt struct {
|
||||
// X5c is the leaf-first certificate chain encoded as base64(DER), per the JOSE convention defined in RFC 7515 §4.1.6.
|
||||
X5c [][]int32 `json:"x5c,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _DeviceAuthnIOSAttStmt DeviceAuthnIOSAttStmt
|
||||
|
||||
// NewDeviceAuthnIOSAttStmt instantiates a new DeviceAuthnIOSAttStmt object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewDeviceAuthnIOSAttStmt() *DeviceAuthnIOSAttStmt {
|
||||
this := DeviceAuthnIOSAttStmt{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewDeviceAuthnIOSAttStmtWithDefaults instantiates a new DeviceAuthnIOSAttStmt object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewDeviceAuthnIOSAttStmtWithDefaults() *DeviceAuthnIOSAttStmt {
|
||||
this := DeviceAuthnIOSAttStmt{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetX5c returns the X5c field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnIOSAttStmt) GetX5c() [][]int32 {
|
||||
if o == nil || IsNil(o.X5c) {
|
||||
var ret [][]int32
|
||||
return ret
|
||||
}
|
||||
return o.X5c
|
||||
}
|
||||
|
||||
// GetX5cOk returns a tuple with the X5c field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnIOSAttStmt) GetX5cOk() ([][]int32, bool) {
|
||||
if o == nil || IsNil(o.X5c) {
|
||||
return nil, false
|
||||
}
|
||||
return o.X5c, true
|
||||
}
|
||||
|
||||
// HasX5c returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnIOSAttStmt) HasX5c() bool {
|
||||
if o != nil && !IsNil(o.X5c) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetX5c gets a reference to the given [][]int32 and assigns it to the X5c field.
|
||||
func (o *DeviceAuthnIOSAttStmt) SetX5c(v [][]int32) {
|
||||
o.X5c = v
|
||||
}
|
||||
|
||||
func (o DeviceAuthnIOSAttStmt) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o DeviceAuthnIOSAttStmt) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.X5c) {
|
||||
toSerialize["x5c"] = o.X5c
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *DeviceAuthnIOSAttStmt) UnmarshalJSON(data []byte) (err error) {
|
||||
varDeviceAuthnIOSAttStmt := _DeviceAuthnIOSAttStmt{}
|
||||
|
||||
err = json.Unmarshal(data, &varDeviceAuthnIOSAttStmt)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = DeviceAuthnIOSAttStmt(varDeviceAuthnIOSAttStmt)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "x5c")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableDeviceAuthnIOSAttStmt struct {
|
||||
value *DeviceAuthnIOSAttStmt
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableDeviceAuthnIOSAttStmt) Get() *DeviceAuthnIOSAttStmt {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableDeviceAuthnIOSAttStmt) Set(val *DeviceAuthnIOSAttStmt) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableDeviceAuthnIOSAttStmt) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableDeviceAuthnIOSAttStmt) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableDeviceAuthnIOSAttStmt(val *DeviceAuthnIOSAttStmt) *NullableDeviceAuthnIOSAttStmt {
|
||||
return &NullableDeviceAuthnIOSAttStmt{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableDeviceAuthnIOSAttStmt) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableDeviceAuthnIOSAttStmt) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
228
pkg/httpclient/model_device_authn_ios_attestation.go
Normal file
228
pkg/httpclient/model_device_authn_ios_attestation.go
Normal file
@@ -0,0 +1,228 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the DeviceAuthnIOSAttestation type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &DeviceAuthnIOSAttestation{}
|
||||
|
||||
// DeviceAuthnIOSAttestation Defined in https://developer.apple.com/documentation/devicecheck/validating-apps-that-connect-to-your-server#Verify-the-attestation .
|
||||
type DeviceAuthnIOSAttestation struct {
|
||||
AttStmt *DeviceAuthnIOSAttStmt `json:"att_stmt,omitempty"`
|
||||
AuthData []int32 `json:"auth_data,omitempty"`
|
||||
Fmt *string `json:"fmt,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _DeviceAuthnIOSAttestation DeviceAuthnIOSAttestation
|
||||
|
||||
// NewDeviceAuthnIOSAttestation instantiates a new DeviceAuthnIOSAttestation object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewDeviceAuthnIOSAttestation() *DeviceAuthnIOSAttestation {
|
||||
this := DeviceAuthnIOSAttestation{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewDeviceAuthnIOSAttestationWithDefaults instantiates a new DeviceAuthnIOSAttestation object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewDeviceAuthnIOSAttestationWithDefaults() *DeviceAuthnIOSAttestation {
|
||||
this := DeviceAuthnIOSAttestation{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAttStmt returns the AttStmt field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnIOSAttestation) GetAttStmt() DeviceAuthnIOSAttStmt {
|
||||
if o == nil || IsNil(o.AttStmt) {
|
||||
var ret DeviceAuthnIOSAttStmt
|
||||
return ret
|
||||
}
|
||||
return *o.AttStmt
|
||||
}
|
||||
|
||||
// GetAttStmtOk returns a tuple with the AttStmt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnIOSAttestation) GetAttStmtOk() (*DeviceAuthnIOSAttStmt, bool) {
|
||||
if o == nil || IsNil(o.AttStmt) {
|
||||
return nil, false
|
||||
}
|
||||
return o.AttStmt, true
|
||||
}
|
||||
|
||||
// HasAttStmt returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnIOSAttestation) HasAttStmt() bool {
|
||||
if o != nil && !IsNil(o.AttStmt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAttStmt gets a reference to the given DeviceAuthnIOSAttStmt and assigns it to the AttStmt field.
|
||||
func (o *DeviceAuthnIOSAttestation) SetAttStmt(v DeviceAuthnIOSAttStmt) {
|
||||
o.AttStmt = &v
|
||||
}
|
||||
|
||||
// GetAuthData returns the AuthData field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnIOSAttestation) GetAuthData() []int32 {
|
||||
if o == nil || IsNil(o.AuthData) {
|
||||
var ret []int32
|
||||
return ret
|
||||
}
|
||||
return o.AuthData
|
||||
}
|
||||
|
||||
// GetAuthDataOk returns a tuple with the AuthData field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnIOSAttestation) GetAuthDataOk() ([]int32, bool) {
|
||||
if o == nil || IsNil(o.AuthData) {
|
||||
return nil, false
|
||||
}
|
||||
return o.AuthData, true
|
||||
}
|
||||
|
||||
// HasAuthData returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnIOSAttestation) HasAuthData() bool {
|
||||
if o != nil && !IsNil(o.AuthData) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAuthData gets a reference to the given []int32 and assigns it to the AuthData field.
|
||||
func (o *DeviceAuthnIOSAttestation) SetAuthData(v []int32) {
|
||||
o.AuthData = v
|
||||
}
|
||||
|
||||
// GetFmt returns the Fmt field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnIOSAttestation) GetFmt() string {
|
||||
if o == nil || IsNil(o.Fmt) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Fmt
|
||||
}
|
||||
|
||||
// GetFmtOk returns a tuple with the Fmt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnIOSAttestation) GetFmtOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Fmt) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Fmt, true
|
||||
}
|
||||
|
||||
// HasFmt returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnIOSAttestation) HasFmt() bool {
|
||||
if o != nil && !IsNil(o.Fmt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetFmt gets a reference to the given string and assigns it to the Fmt field.
|
||||
func (o *DeviceAuthnIOSAttestation) SetFmt(v string) {
|
||||
o.Fmt = &v
|
||||
}
|
||||
|
||||
func (o DeviceAuthnIOSAttestation) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o DeviceAuthnIOSAttestation) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.AttStmt) {
|
||||
toSerialize["att_stmt"] = o.AttStmt
|
||||
}
|
||||
if !IsNil(o.AuthData) {
|
||||
toSerialize["auth_data"] = o.AuthData
|
||||
}
|
||||
if !IsNil(o.Fmt) {
|
||||
toSerialize["fmt"] = o.Fmt
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *DeviceAuthnIOSAttestation) UnmarshalJSON(data []byte) (err error) {
|
||||
varDeviceAuthnIOSAttestation := _DeviceAuthnIOSAttestation{}
|
||||
|
||||
err = json.Unmarshal(data, &varDeviceAuthnIOSAttestation)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = DeviceAuthnIOSAttestation(varDeviceAuthnIOSAttestation)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "att_stmt")
|
||||
delete(additionalProperties, "auth_data")
|
||||
delete(additionalProperties, "fmt")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableDeviceAuthnIOSAttestation struct {
|
||||
value *DeviceAuthnIOSAttestation
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableDeviceAuthnIOSAttestation) Get() *DeviceAuthnIOSAttestation {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableDeviceAuthnIOSAttestation) Set(val *DeviceAuthnIOSAttestation) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableDeviceAuthnIOSAttestation) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableDeviceAuthnIOSAttestation) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableDeviceAuthnIOSAttestation(val *DeviceAuthnIOSAttestation) *NullableDeviceAuthnIOSAttestation {
|
||||
return &NullableDeviceAuthnIOSAttestation{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableDeviceAuthnIOSAttestation) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableDeviceAuthnIOSAttestation) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
531
pkg/httpclient/model_device_authn_key.go
Normal file
531
pkg/httpclient/model_device_authn_key.go
Normal file
@@ -0,0 +1,531 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// checks if the DeviceAuthnKey type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &DeviceAuthnKey{}
|
||||
|
||||
// DeviceAuthnKey Represents a hardware-backed signing key enrolled from a mobile device. The private key resides inside the device and never exists on the server. To list the identity's enrolled keys, fetch a settings flow: each key's remove button (a `ui.nodes` entry named `deviceauthn_remove` in group `deviceauthn`) carries the key, with its PIN state redacted, in the node label's `context`.
|
||||
type DeviceAuthnKey struct {
|
||||
Attestation *DeviceAuthnAttestation `json:"attestation,omitempty"`
|
||||
// The key's stable id, unique per identity. Submit it as the `client_key_id` when logging in with the key, deleting it, or rotating its pin_secret. The device can also compute the id without reading it back from the server: it is the lowercase-hex SHA-256 of `public_key` (the key's PKIX, ASN.1 DER encoding). Keys enrolled before the server derived the id keep their original client-chosen value, so prefer reading this field over recomputing it for older keys.
|
||||
ClientKeyId *string `json:"client_key_id,omitempty"`
|
||||
// When the key was enrolled. Only used for troubleshooting and UI.
|
||||
CreatedAt *time.Time `json:"created_at,omitempty"`
|
||||
// A human-readable name for the device, helping the user tell this key apart from others.
|
||||
DeviceName *string `json:"device_name,omitempty"`
|
||||
DeviceType *DeviceType `json:"device_type,omitempty"`
|
||||
Pin *PINConfig `json:"pin,omitempty"`
|
||||
// The device's public key (an elliptic-curve key on P-224, P-256, P-384, or P-521 in version 1) in PKIX, ASN.1 DER (SubjectPublicKeyInfo) form, base64-encoded. Signatures are verified against this key.
|
||||
PublicKey *string `json:"public_key,omitempty"`
|
||||
// Set only when the key's attestation chain was accepted under relaxed rules (software roots, expired certificates, software security level) rather than strict hardware attestation. Such keys are refused at login after this time, or immediately once relaxed attestation is turned off. Absent for hardware-attested keys that pass strict validation.
|
||||
RelaxedAttestationExpiresAt *time.Time `json:"relaxed_attestation_expires_at,omitempty"`
|
||||
State *KeyState `json:"state,omitempty"`
|
||||
UserVerification *UserVerification `json:"user_verification,omitempty"`
|
||||
// The cryptography version of the key. Version 1 uses ECDSA with SHA-256 on an elliptic curve (P-224, P-256, P-384, or P-521); further versions are reserved for future signature suites.
|
||||
Version *int64 `json:"version,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _DeviceAuthnKey DeviceAuthnKey
|
||||
|
||||
// NewDeviceAuthnKey instantiates a new DeviceAuthnKey object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewDeviceAuthnKey() *DeviceAuthnKey {
|
||||
this := DeviceAuthnKey{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewDeviceAuthnKeyWithDefaults instantiates a new DeviceAuthnKey object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewDeviceAuthnKeyWithDefaults() *DeviceAuthnKey {
|
||||
this := DeviceAuthnKey{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAttestation returns the Attestation field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnKey) GetAttestation() DeviceAuthnAttestation {
|
||||
if o == nil || IsNil(o.Attestation) {
|
||||
var ret DeviceAuthnAttestation
|
||||
return ret
|
||||
}
|
||||
return *o.Attestation
|
||||
}
|
||||
|
||||
// GetAttestationOk returns a tuple with the Attestation field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnKey) GetAttestationOk() (*DeviceAuthnAttestation, bool) {
|
||||
if o == nil || IsNil(o.Attestation) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Attestation, true
|
||||
}
|
||||
|
||||
// HasAttestation returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnKey) HasAttestation() bool {
|
||||
if o != nil && !IsNil(o.Attestation) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAttestation gets a reference to the given DeviceAuthnAttestation and assigns it to the Attestation field.
|
||||
func (o *DeviceAuthnKey) SetAttestation(v DeviceAuthnAttestation) {
|
||||
o.Attestation = &v
|
||||
}
|
||||
|
||||
// GetClientKeyId returns the ClientKeyId field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnKey) GetClientKeyId() string {
|
||||
if o == nil || IsNil(o.ClientKeyId) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.ClientKeyId
|
||||
}
|
||||
|
||||
// GetClientKeyIdOk returns a tuple with the ClientKeyId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnKey) GetClientKeyIdOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.ClientKeyId) {
|
||||
return nil, false
|
||||
}
|
||||
return o.ClientKeyId, true
|
||||
}
|
||||
|
||||
// HasClientKeyId returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnKey) HasClientKeyId() bool {
|
||||
if o != nil && !IsNil(o.ClientKeyId) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetClientKeyId gets a reference to the given string and assigns it to the ClientKeyId field.
|
||||
func (o *DeviceAuthnKey) SetClientKeyId(v string) {
|
||||
o.ClientKeyId = &v
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnKey) GetCreatedAt() time.Time {
|
||||
if o == nil || IsNil(o.CreatedAt) {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
return *o.CreatedAt
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnKey) GetCreatedAtOk() (*time.Time, bool) {
|
||||
if o == nil || IsNil(o.CreatedAt) {
|
||||
return nil, false
|
||||
}
|
||||
return o.CreatedAt, true
|
||||
}
|
||||
|
||||
// HasCreatedAt returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnKey) HasCreatedAt() bool {
|
||||
if o != nil && !IsNil(o.CreatedAt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
||||
func (o *DeviceAuthnKey) SetCreatedAt(v time.Time) {
|
||||
o.CreatedAt = &v
|
||||
}
|
||||
|
||||
// GetDeviceName returns the DeviceName field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnKey) GetDeviceName() string {
|
||||
if o == nil || IsNil(o.DeviceName) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.DeviceName
|
||||
}
|
||||
|
||||
// GetDeviceNameOk returns a tuple with the DeviceName field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnKey) GetDeviceNameOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.DeviceName) {
|
||||
return nil, false
|
||||
}
|
||||
return o.DeviceName, true
|
||||
}
|
||||
|
||||
// HasDeviceName returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnKey) HasDeviceName() bool {
|
||||
if o != nil && !IsNil(o.DeviceName) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDeviceName gets a reference to the given string and assigns it to the DeviceName field.
|
||||
func (o *DeviceAuthnKey) SetDeviceName(v string) {
|
||||
o.DeviceName = &v
|
||||
}
|
||||
|
||||
// GetDeviceType returns the DeviceType field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnKey) GetDeviceType() DeviceType {
|
||||
if o == nil || IsNil(o.DeviceType) {
|
||||
var ret DeviceType
|
||||
return ret
|
||||
}
|
||||
return *o.DeviceType
|
||||
}
|
||||
|
||||
// GetDeviceTypeOk returns a tuple with the DeviceType field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnKey) GetDeviceTypeOk() (*DeviceType, bool) {
|
||||
if o == nil || IsNil(o.DeviceType) {
|
||||
return nil, false
|
||||
}
|
||||
return o.DeviceType, true
|
||||
}
|
||||
|
||||
// HasDeviceType returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnKey) HasDeviceType() bool {
|
||||
if o != nil && !IsNil(o.DeviceType) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDeviceType gets a reference to the given DeviceType and assigns it to the DeviceType field.
|
||||
func (o *DeviceAuthnKey) SetDeviceType(v DeviceType) {
|
||||
o.DeviceType = &v
|
||||
}
|
||||
|
||||
// GetPin returns the Pin field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnKey) GetPin() PINConfig {
|
||||
if o == nil || IsNil(o.Pin) {
|
||||
var ret PINConfig
|
||||
return ret
|
||||
}
|
||||
return *o.Pin
|
||||
}
|
||||
|
||||
// GetPinOk returns a tuple with the Pin field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnKey) GetPinOk() (*PINConfig, bool) {
|
||||
if o == nil || IsNil(o.Pin) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Pin, true
|
||||
}
|
||||
|
||||
// HasPin returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnKey) HasPin() bool {
|
||||
if o != nil && !IsNil(o.Pin) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPin gets a reference to the given PINConfig and assigns it to the Pin field.
|
||||
func (o *DeviceAuthnKey) SetPin(v PINConfig) {
|
||||
o.Pin = &v
|
||||
}
|
||||
|
||||
// GetPublicKey returns the PublicKey field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnKey) GetPublicKey() string {
|
||||
if o == nil || IsNil(o.PublicKey) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.PublicKey
|
||||
}
|
||||
|
||||
// GetPublicKeyOk returns a tuple with the PublicKey field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnKey) GetPublicKeyOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.PublicKey) {
|
||||
return nil, false
|
||||
}
|
||||
return o.PublicKey, true
|
||||
}
|
||||
|
||||
// HasPublicKey returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnKey) HasPublicKey() bool {
|
||||
if o != nil && !IsNil(o.PublicKey) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPublicKey gets a reference to the given string and assigns it to the PublicKey field.
|
||||
func (o *DeviceAuthnKey) SetPublicKey(v string) {
|
||||
o.PublicKey = &v
|
||||
}
|
||||
|
||||
// GetRelaxedAttestationExpiresAt returns the RelaxedAttestationExpiresAt field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnKey) GetRelaxedAttestationExpiresAt() time.Time {
|
||||
if o == nil || IsNil(o.RelaxedAttestationExpiresAt) {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
return *o.RelaxedAttestationExpiresAt
|
||||
}
|
||||
|
||||
// GetRelaxedAttestationExpiresAtOk returns a tuple with the RelaxedAttestationExpiresAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnKey) GetRelaxedAttestationExpiresAtOk() (*time.Time, bool) {
|
||||
if o == nil || IsNil(o.RelaxedAttestationExpiresAt) {
|
||||
return nil, false
|
||||
}
|
||||
return o.RelaxedAttestationExpiresAt, true
|
||||
}
|
||||
|
||||
// HasRelaxedAttestationExpiresAt returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnKey) HasRelaxedAttestationExpiresAt() bool {
|
||||
if o != nil && !IsNil(o.RelaxedAttestationExpiresAt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRelaxedAttestationExpiresAt gets a reference to the given time.Time and assigns it to the RelaxedAttestationExpiresAt field.
|
||||
func (o *DeviceAuthnKey) SetRelaxedAttestationExpiresAt(v time.Time) {
|
||||
o.RelaxedAttestationExpiresAt = &v
|
||||
}
|
||||
|
||||
// GetState returns the State field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnKey) GetState() KeyState {
|
||||
if o == nil || IsNil(o.State) {
|
||||
var ret KeyState
|
||||
return ret
|
||||
}
|
||||
return *o.State
|
||||
}
|
||||
|
||||
// GetStateOk returns a tuple with the State field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnKey) GetStateOk() (*KeyState, bool) {
|
||||
if o == nil || IsNil(o.State) {
|
||||
return nil, false
|
||||
}
|
||||
return o.State, true
|
||||
}
|
||||
|
||||
// HasState returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnKey) HasState() bool {
|
||||
if o != nil && !IsNil(o.State) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetState gets a reference to the given KeyState and assigns it to the State field.
|
||||
func (o *DeviceAuthnKey) SetState(v KeyState) {
|
||||
o.State = &v
|
||||
}
|
||||
|
||||
// GetUserVerification returns the UserVerification field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnKey) GetUserVerification() UserVerification {
|
||||
if o == nil || IsNil(o.UserVerification) {
|
||||
var ret UserVerification
|
||||
return ret
|
||||
}
|
||||
return *o.UserVerification
|
||||
}
|
||||
|
||||
// GetUserVerificationOk returns a tuple with the UserVerification field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnKey) GetUserVerificationOk() (*UserVerification, bool) {
|
||||
if o == nil || IsNil(o.UserVerification) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UserVerification, true
|
||||
}
|
||||
|
||||
// HasUserVerification returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnKey) HasUserVerification() bool {
|
||||
if o != nil && !IsNil(o.UserVerification) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUserVerification gets a reference to the given UserVerification and assigns it to the UserVerification field.
|
||||
func (o *DeviceAuthnKey) SetUserVerification(v UserVerification) {
|
||||
o.UserVerification = &v
|
||||
}
|
||||
|
||||
// GetVersion returns the Version field value if set, zero value otherwise.
|
||||
func (o *DeviceAuthnKey) GetVersion() int64 {
|
||||
if o == nil || IsNil(o.Version) {
|
||||
var ret int64
|
||||
return ret
|
||||
}
|
||||
return *o.Version
|
||||
}
|
||||
|
||||
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DeviceAuthnKey) GetVersionOk() (*int64, bool) {
|
||||
if o == nil || IsNil(o.Version) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Version, true
|
||||
}
|
||||
|
||||
// HasVersion returns a boolean if a field has been set.
|
||||
func (o *DeviceAuthnKey) HasVersion() bool {
|
||||
if o != nil && !IsNil(o.Version) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetVersion gets a reference to the given int64 and assigns it to the Version field.
|
||||
func (o *DeviceAuthnKey) SetVersion(v int64) {
|
||||
o.Version = &v
|
||||
}
|
||||
|
||||
func (o DeviceAuthnKey) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o DeviceAuthnKey) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Attestation) {
|
||||
toSerialize["attestation"] = o.Attestation
|
||||
}
|
||||
if !IsNil(o.ClientKeyId) {
|
||||
toSerialize["client_key_id"] = o.ClientKeyId
|
||||
}
|
||||
if !IsNil(o.CreatedAt) {
|
||||
toSerialize["created_at"] = o.CreatedAt
|
||||
}
|
||||
if !IsNil(o.DeviceName) {
|
||||
toSerialize["device_name"] = o.DeviceName
|
||||
}
|
||||
if !IsNil(o.DeviceType) {
|
||||
toSerialize["device_type"] = o.DeviceType
|
||||
}
|
||||
if !IsNil(o.Pin) {
|
||||
toSerialize["pin"] = o.Pin
|
||||
}
|
||||
if !IsNil(o.PublicKey) {
|
||||
toSerialize["public_key"] = o.PublicKey
|
||||
}
|
||||
if !IsNil(o.RelaxedAttestationExpiresAt) {
|
||||
toSerialize["relaxed_attestation_expires_at"] = o.RelaxedAttestationExpiresAt
|
||||
}
|
||||
if !IsNil(o.State) {
|
||||
toSerialize["state"] = o.State
|
||||
}
|
||||
if !IsNil(o.UserVerification) {
|
||||
toSerialize["user_verification"] = o.UserVerification
|
||||
}
|
||||
if !IsNil(o.Version) {
|
||||
toSerialize["version"] = o.Version
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *DeviceAuthnKey) UnmarshalJSON(data []byte) (err error) {
|
||||
varDeviceAuthnKey := _DeviceAuthnKey{}
|
||||
|
||||
err = json.Unmarshal(data, &varDeviceAuthnKey)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = DeviceAuthnKey(varDeviceAuthnKey)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "attestation")
|
||||
delete(additionalProperties, "client_key_id")
|
||||
delete(additionalProperties, "created_at")
|
||||
delete(additionalProperties, "device_name")
|
||||
delete(additionalProperties, "device_type")
|
||||
delete(additionalProperties, "pin")
|
||||
delete(additionalProperties, "public_key")
|
||||
delete(additionalProperties, "relaxed_attestation_expires_at")
|
||||
delete(additionalProperties, "state")
|
||||
delete(additionalProperties, "user_verification")
|
||||
delete(additionalProperties, "version")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableDeviceAuthnKey struct {
|
||||
value *DeviceAuthnKey
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableDeviceAuthnKey) Get() *DeviceAuthnKey {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableDeviceAuthnKey) Set(val *DeviceAuthnKey) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableDeviceAuthnKey) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableDeviceAuthnKey) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableDeviceAuthnKey(val *DeviceAuthnKey) *NullableDeviceAuthnKey {
|
||||
return &NullableDeviceAuthnKey{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableDeviceAuthnKey) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableDeviceAuthnKey) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
111
pkg/httpclient/model_device_type.go
Normal file
111
pkg/httpclient/model_device_type.go
Normal file
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// DeviceType \"Android\" and \"iOS\" use different attestation and signature encodings.
|
||||
type DeviceType string
|
||||
|
||||
// List of DeviceType
|
||||
const (
|
||||
DEVICETYPE_ANDROID DeviceType = "Android"
|
||||
DEVICETYPE_IOS DeviceType = "iOS"
|
||||
)
|
||||
|
||||
// All allowed values of DeviceType enum
|
||||
var AllowedDeviceTypeEnumValues = []DeviceType{
|
||||
"Android",
|
||||
"iOS",
|
||||
}
|
||||
|
||||
func (v *DeviceType) UnmarshalJSON(src []byte) error {
|
||||
var value string
|
||||
err := json.Unmarshal(src, &value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
enumTypeValue := DeviceType(value)
|
||||
for _, existing := range AllowedDeviceTypeEnumValues {
|
||||
if existing == enumTypeValue {
|
||||
*v = enumTypeValue
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("%+v is not a valid DeviceType", value)
|
||||
}
|
||||
|
||||
// NewDeviceTypeFromValue returns a pointer to a valid DeviceType
|
||||
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||
func NewDeviceTypeFromValue(v string) (*DeviceType, error) {
|
||||
ev := DeviceType(v)
|
||||
if ev.IsValid() {
|
||||
return &ev, nil
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid value '%v' for DeviceType: valid values are %v", v, AllowedDeviceTypeEnumValues)
|
||||
}
|
||||
}
|
||||
|
||||
// IsValid return true if the value is valid for the enum, false otherwise
|
||||
func (v DeviceType) IsValid() bool {
|
||||
for _, existing := range AllowedDeviceTypeEnumValues {
|
||||
if existing == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Ptr returns reference to DeviceType value
|
||||
func (v DeviceType) Ptr() *DeviceType {
|
||||
return &v
|
||||
}
|
||||
|
||||
type NullableDeviceType struct {
|
||||
value *DeviceType
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableDeviceType) Get() *DeviceType {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableDeviceType) Set(val *DeviceType) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableDeviceType) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableDeviceType) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableDeviceType(val *DeviceType) *NullableDeviceType {
|
||||
return &NullableDeviceType{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableDeviceType) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableDeviceType) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the ErrorAuthenticatorAssuranceLevelNotSatisfied type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ErrorAuthenticatorAssuranceLevelNotSatisfied{}
|
||||
|
||||
// ErrorAuthenticatorAssuranceLevelNotSatisfied struct for ErrorAuthenticatorAssuranceLevelNotSatisfied
|
||||
type ErrorAuthenticatorAssuranceLevelNotSatisfied struct {
|
||||
Error *GenericError `json:"error,omitempty"`
|
||||
// Points to where to redirect the user to next.
|
||||
RedirectBrowserTo *string `json:"redirect_browser_to,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _ErrorAuthenticatorAssuranceLevelNotSatisfied ErrorAuthenticatorAssuranceLevelNotSatisfied
|
||||
|
||||
// NewErrorAuthenticatorAssuranceLevelNotSatisfied instantiates a new ErrorAuthenticatorAssuranceLevelNotSatisfied object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewErrorAuthenticatorAssuranceLevelNotSatisfied() *ErrorAuthenticatorAssuranceLevelNotSatisfied {
|
||||
this := ErrorAuthenticatorAssuranceLevelNotSatisfied{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewErrorAuthenticatorAssuranceLevelNotSatisfiedWithDefaults instantiates a new ErrorAuthenticatorAssuranceLevelNotSatisfied object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewErrorAuthenticatorAssuranceLevelNotSatisfiedWithDefaults() *ErrorAuthenticatorAssuranceLevelNotSatisfied {
|
||||
this := ErrorAuthenticatorAssuranceLevelNotSatisfied{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetError returns the Error field value if set, zero value otherwise.
|
||||
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetError() GenericError {
|
||||
if o == nil || IsNil(o.Error) {
|
||||
var ret GenericError
|
||||
return ret
|
||||
}
|
||||
return *o.Error
|
||||
}
|
||||
|
||||
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetErrorOk() (*GenericError, bool) {
|
||||
if o == nil || IsNil(o.Error) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Error, true
|
||||
}
|
||||
|
||||
// HasError returns a boolean if a field has been set.
|
||||
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasError() bool {
|
||||
if o != nil && !IsNil(o.Error) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetError gets a reference to the given GenericError and assigns it to the Error field.
|
||||
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetError(v GenericError) {
|
||||
o.Error = &v
|
||||
}
|
||||
|
||||
// GetRedirectBrowserTo returns the RedirectBrowserTo field value if set, zero value otherwise.
|
||||
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetRedirectBrowserTo() string {
|
||||
if o == nil || IsNil(o.RedirectBrowserTo) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.RedirectBrowserTo
|
||||
}
|
||||
|
||||
// GetRedirectBrowserToOk returns a tuple with the RedirectBrowserTo field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetRedirectBrowserToOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.RedirectBrowserTo) {
|
||||
return nil, false
|
||||
}
|
||||
return o.RedirectBrowserTo, true
|
||||
}
|
||||
|
||||
// HasRedirectBrowserTo returns a boolean if a field has been set.
|
||||
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasRedirectBrowserTo() bool {
|
||||
if o != nil && !IsNil(o.RedirectBrowserTo) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRedirectBrowserTo gets a reference to the given string and assigns it to the RedirectBrowserTo field.
|
||||
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetRedirectBrowserTo(v string) {
|
||||
o.RedirectBrowserTo = &v
|
||||
}
|
||||
|
||||
func (o ErrorAuthenticatorAssuranceLevelNotSatisfied) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o ErrorAuthenticatorAssuranceLevelNotSatisfied) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Error) {
|
||||
toSerialize["error"] = o.Error
|
||||
}
|
||||
if !IsNil(o.RedirectBrowserTo) {
|
||||
toSerialize["redirect_browser_to"] = o.RedirectBrowserTo
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) UnmarshalJSON(data []byte) (err error) {
|
||||
varErrorAuthenticatorAssuranceLevelNotSatisfied := _ErrorAuthenticatorAssuranceLevelNotSatisfied{}
|
||||
|
||||
err = json.Unmarshal(data, &varErrorAuthenticatorAssuranceLevelNotSatisfied)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = ErrorAuthenticatorAssuranceLevelNotSatisfied(varErrorAuthenticatorAssuranceLevelNotSatisfied)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "error")
|
||||
delete(additionalProperties, "redirect_browser_to")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableErrorAuthenticatorAssuranceLevelNotSatisfied struct {
|
||||
value *ErrorAuthenticatorAssuranceLevelNotSatisfied
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableErrorAuthenticatorAssuranceLevelNotSatisfied) Get() *ErrorAuthenticatorAssuranceLevelNotSatisfied {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableErrorAuthenticatorAssuranceLevelNotSatisfied) Set(val *ErrorAuthenticatorAssuranceLevelNotSatisfied) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableErrorAuthenticatorAssuranceLevelNotSatisfied) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableErrorAuthenticatorAssuranceLevelNotSatisfied) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableErrorAuthenticatorAssuranceLevelNotSatisfied(val *ErrorAuthenticatorAssuranceLevelNotSatisfied) *NullableErrorAuthenticatorAssuranceLevelNotSatisfied {
|
||||
return &NullableErrorAuthenticatorAssuranceLevelNotSatisfied{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableErrorAuthenticatorAssuranceLevelNotSatisfied) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableErrorAuthenticatorAssuranceLevelNotSatisfied) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
192
pkg/httpclient/model_error_browser_location_change_required.go
Normal file
192
pkg/httpclient/model_error_browser_location_change_required.go
Normal file
@@ -0,0 +1,192 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the ErrorBrowserLocationChangeRequired type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ErrorBrowserLocationChangeRequired{}
|
||||
|
||||
// ErrorBrowserLocationChangeRequired struct for ErrorBrowserLocationChangeRequired
|
||||
type ErrorBrowserLocationChangeRequired struct {
|
||||
Error *ErrorGeneric `json:"error,omitempty"`
|
||||
// Points to where to redirect the user to next.
|
||||
RedirectBrowserTo *string `json:"redirect_browser_to,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _ErrorBrowserLocationChangeRequired ErrorBrowserLocationChangeRequired
|
||||
|
||||
// NewErrorBrowserLocationChangeRequired instantiates a new ErrorBrowserLocationChangeRequired object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewErrorBrowserLocationChangeRequired() *ErrorBrowserLocationChangeRequired {
|
||||
this := ErrorBrowserLocationChangeRequired{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewErrorBrowserLocationChangeRequiredWithDefaults instantiates a new ErrorBrowserLocationChangeRequired object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewErrorBrowserLocationChangeRequiredWithDefaults() *ErrorBrowserLocationChangeRequired {
|
||||
this := ErrorBrowserLocationChangeRequired{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetError returns the Error field value if set, zero value otherwise.
|
||||
func (o *ErrorBrowserLocationChangeRequired) GetError() ErrorGeneric {
|
||||
if o == nil || IsNil(o.Error) {
|
||||
var ret ErrorGeneric
|
||||
return ret
|
||||
}
|
||||
return *o.Error
|
||||
}
|
||||
|
||||
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ErrorBrowserLocationChangeRequired) GetErrorOk() (*ErrorGeneric, bool) {
|
||||
if o == nil || IsNil(o.Error) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Error, true
|
||||
}
|
||||
|
||||
// HasError returns a boolean if a field has been set.
|
||||
func (o *ErrorBrowserLocationChangeRequired) HasError() bool {
|
||||
if o != nil && !IsNil(o.Error) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetError gets a reference to the given ErrorGeneric and assigns it to the Error field.
|
||||
func (o *ErrorBrowserLocationChangeRequired) SetError(v ErrorGeneric) {
|
||||
o.Error = &v
|
||||
}
|
||||
|
||||
// GetRedirectBrowserTo returns the RedirectBrowserTo field value if set, zero value otherwise.
|
||||
func (o *ErrorBrowserLocationChangeRequired) GetRedirectBrowserTo() string {
|
||||
if o == nil || IsNil(o.RedirectBrowserTo) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.RedirectBrowserTo
|
||||
}
|
||||
|
||||
// GetRedirectBrowserToOk returns a tuple with the RedirectBrowserTo field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ErrorBrowserLocationChangeRequired) GetRedirectBrowserToOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.RedirectBrowserTo) {
|
||||
return nil, false
|
||||
}
|
||||
return o.RedirectBrowserTo, true
|
||||
}
|
||||
|
||||
// HasRedirectBrowserTo returns a boolean if a field has been set.
|
||||
func (o *ErrorBrowserLocationChangeRequired) HasRedirectBrowserTo() bool {
|
||||
if o != nil && !IsNil(o.RedirectBrowserTo) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRedirectBrowserTo gets a reference to the given string and assigns it to the RedirectBrowserTo field.
|
||||
func (o *ErrorBrowserLocationChangeRequired) SetRedirectBrowserTo(v string) {
|
||||
o.RedirectBrowserTo = &v
|
||||
}
|
||||
|
||||
func (o ErrorBrowserLocationChangeRequired) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o ErrorBrowserLocationChangeRequired) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Error) {
|
||||
toSerialize["error"] = o.Error
|
||||
}
|
||||
if !IsNil(o.RedirectBrowserTo) {
|
||||
toSerialize["redirect_browser_to"] = o.RedirectBrowserTo
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *ErrorBrowserLocationChangeRequired) UnmarshalJSON(data []byte) (err error) {
|
||||
varErrorBrowserLocationChangeRequired := _ErrorBrowserLocationChangeRequired{}
|
||||
|
||||
err = json.Unmarshal(data, &varErrorBrowserLocationChangeRequired)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = ErrorBrowserLocationChangeRequired(varErrorBrowserLocationChangeRequired)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "error")
|
||||
delete(additionalProperties, "redirect_browser_to")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableErrorBrowserLocationChangeRequired struct {
|
||||
value *ErrorBrowserLocationChangeRequired
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableErrorBrowserLocationChangeRequired) Get() *ErrorBrowserLocationChangeRequired {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableErrorBrowserLocationChangeRequired) Set(val *ErrorBrowserLocationChangeRequired) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableErrorBrowserLocationChangeRequired) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableErrorBrowserLocationChangeRequired) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableErrorBrowserLocationChangeRequired(val *ErrorBrowserLocationChangeRequired) *NullableErrorBrowserLocationChangeRequired {
|
||||
return &NullableErrorBrowserLocationChangeRequired{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableErrorBrowserLocationChangeRequired) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableErrorBrowserLocationChangeRequired) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
192
pkg/httpclient/model_error_flow_replaced.go
Normal file
192
pkg/httpclient/model_error_flow_replaced.go
Normal file
@@ -0,0 +1,192 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the ErrorFlowReplaced type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ErrorFlowReplaced{}
|
||||
|
||||
// ErrorFlowReplaced Is sent when a flow is replaced by a different flow of the same class
|
||||
type ErrorFlowReplaced struct {
|
||||
Error *GenericError `json:"error,omitempty"`
|
||||
// The flow ID that should be used for the new flow as it contains the correct messages.
|
||||
UseFlowId *string `json:"use_flow_id,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _ErrorFlowReplaced ErrorFlowReplaced
|
||||
|
||||
// NewErrorFlowReplaced instantiates a new ErrorFlowReplaced object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewErrorFlowReplaced() *ErrorFlowReplaced {
|
||||
this := ErrorFlowReplaced{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewErrorFlowReplacedWithDefaults instantiates a new ErrorFlowReplaced object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewErrorFlowReplacedWithDefaults() *ErrorFlowReplaced {
|
||||
this := ErrorFlowReplaced{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetError returns the Error field value if set, zero value otherwise.
|
||||
func (o *ErrorFlowReplaced) GetError() GenericError {
|
||||
if o == nil || IsNil(o.Error) {
|
||||
var ret GenericError
|
||||
return ret
|
||||
}
|
||||
return *o.Error
|
||||
}
|
||||
|
||||
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ErrorFlowReplaced) GetErrorOk() (*GenericError, bool) {
|
||||
if o == nil || IsNil(o.Error) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Error, true
|
||||
}
|
||||
|
||||
// HasError returns a boolean if a field has been set.
|
||||
func (o *ErrorFlowReplaced) HasError() bool {
|
||||
if o != nil && !IsNil(o.Error) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetError gets a reference to the given GenericError and assigns it to the Error field.
|
||||
func (o *ErrorFlowReplaced) SetError(v GenericError) {
|
||||
o.Error = &v
|
||||
}
|
||||
|
||||
// GetUseFlowId returns the UseFlowId field value if set, zero value otherwise.
|
||||
func (o *ErrorFlowReplaced) GetUseFlowId() string {
|
||||
if o == nil || IsNil(o.UseFlowId) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.UseFlowId
|
||||
}
|
||||
|
||||
// GetUseFlowIdOk returns a tuple with the UseFlowId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ErrorFlowReplaced) GetUseFlowIdOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.UseFlowId) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UseFlowId, true
|
||||
}
|
||||
|
||||
// HasUseFlowId returns a boolean if a field has been set.
|
||||
func (o *ErrorFlowReplaced) HasUseFlowId() bool {
|
||||
if o != nil && !IsNil(o.UseFlowId) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUseFlowId gets a reference to the given string and assigns it to the UseFlowId field.
|
||||
func (o *ErrorFlowReplaced) SetUseFlowId(v string) {
|
||||
o.UseFlowId = &v
|
||||
}
|
||||
|
||||
func (o ErrorFlowReplaced) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o ErrorFlowReplaced) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Error) {
|
||||
toSerialize["error"] = o.Error
|
||||
}
|
||||
if !IsNil(o.UseFlowId) {
|
||||
toSerialize["use_flow_id"] = o.UseFlowId
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *ErrorFlowReplaced) UnmarshalJSON(data []byte) (err error) {
|
||||
varErrorFlowReplaced := _ErrorFlowReplaced{}
|
||||
|
||||
err = json.Unmarshal(data, &varErrorFlowReplaced)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = ErrorFlowReplaced(varErrorFlowReplaced)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "error")
|
||||
delete(additionalProperties, "use_flow_id")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableErrorFlowReplaced struct {
|
||||
value *ErrorFlowReplaced
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableErrorFlowReplaced) Get() *ErrorFlowReplaced {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableErrorFlowReplaced) Set(val *ErrorFlowReplaced) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableErrorFlowReplaced) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableErrorFlowReplaced) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableErrorFlowReplaced(val *ErrorFlowReplaced) *NullableErrorFlowReplaced {
|
||||
return &NullableErrorFlowReplaced{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableErrorFlowReplaced) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableErrorFlowReplaced) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
167
pkg/httpclient/model_error_generic.go
Normal file
167
pkg/httpclient/model_error_generic.go
Normal file
@@ -0,0 +1,167 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the ErrorGeneric type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ErrorGeneric{}
|
||||
|
||||
// ErrorGeneric The standard Ory JSON API error format.
|
||||
type ErrorGeneric struct {
|
||||
Error GenericError `json:"error"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _ErrorGeneric ErrorGeneric
|
||||
|
||||
// NewErrorGeneric instantiates a new ErrorGeneric object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewErrorGeneric(error_ GenericError) *ErrorGeneric {
|
||||
this := ErrorGeneric{}
|
||||
this.Error = error_
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewErrorGenericWithDefaults instantiates a new ErrorGeneric object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewErrorGenericWithDefaults() *ErrorGeneric {
|
||||
this := ErrorGeneric{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetError returns the Error field value
|
||||
func (o *ErrorGeneric) GetError() GenericError {
|
||||
if o == nil {
|
||||
var ret GenericError
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Error
|
||||
}
|
||||
|
||||
// GetErrorOk returns a tuple with the Error field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ErrorGeneric) GetErrorOk() (*GenericError, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Error, true
|
||||
}
|
||||
|
||||
// SetError sets field value
|
||||
func (o *ErrorGeneric) SetError(v GenericError) {
|
||||
o.Error = v
|
||||
}
|
||||
|
||||
func (o ErrorGeneric) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o ErrorGeneric) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["error"] = o.Error
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *ErrorGeneric) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"error",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varErrorGeneric := _ErrorGeneric{}
|
||||
|
||||
err = json.Unmarshal(data, &varErrorGeneric)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = ErrorGeneric(varErrorGeneric)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "error")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableErrorGeneric struct {
|
||||
value *ErrorGeneric
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableErrorGeneric) Get() *ErrorGeneric {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableErrorGeneric) Set(val *ErrorGeneric) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableErrorGeneric) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableErrorGeneric) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableErrorGeneric(val *ErrorGeneric) *NullableErrorGeneric {
|
||||
return &NullableErrorGeneric{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableErrorGeneric) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableErrorGeneric) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
282
pkg/httpclient/model_flow_error.go
Normal file
282
pkg/httpclient/model_flow_error.go
Normal file
@@ -0,0 +1,282 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
// checks if the FlowError type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &FlowError{}
|
||||
|
||||
// FlowError struct for FlowError
|
||||
type FlowError struct {
|
||||
// CreatedAt is a helper struct field for gobuffalo.pop.
|
||||
CreatedAt *time.Time `json:"created_at,omitempty"`
|
||||
Error map[string]interface{} `json:"error,omitempty"`
|
||||
// ID of the error container.
|
||||
Id string `json:"id"`
|
||||
// UpdatedAt is a helper struct field for gobuffalo.pop.
|
||||
UpdatedAt *time.Time `json:"updated_at,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _FlowError FlowError
|
||||
|
||||
// NewFlowError instantiates a new FlowError object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewFlowError(id string) *FlowError {
|
||||
this := FlowError{}
|
||||
this.Id = id
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewFlowErrorWithDefaults instantiates a new FlowError object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewFlowErrorWithDefaults() *FlowError {
|
||||
this := FlowError{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *FlowError) GetCreatedAt() time.Time {
|
||||
if o == nil || IsNil(o.CreatedAt) {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
return *o.CreatedAt
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *FlowError) GetCreatedAtOk() (*time.Time, bool) {
|
||||
if o == nil || IsNil(o.CreatedAt) {
|
||||
return nil, false
|
||||
}
|
||||
return o.CreatedAt, true
|
||||
}
|
||||
|
||||
// HasCreatedAt returns a boolean if a field has been set.
|
||||
func (o *FlowError) HasCreatedAt() bool {
|
||||
if o != nil && !IsNil(o.CreatedAt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
||||
func (o *FlowError) SetCreatedAt(v time.Time) {
|
||||
o.CreatedAt = &v
|
||||
}
|
||||
|
||||
// GetError returns the Error field value if set, zero value otherwise.
|
||||
func (o *FlowError) GetError() map[string]interface{} {
|
||||
if o == nil || IsNil(o.Error) {
|
||||
var ret map[string]interface{}
|
||||
return ret
|
||||
}
|
||||
return o.Error
|
||||
}
|
||||
|
||||
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *FlowError) GetErrorOk() (map[string]interface{}, bool) {
|
||||
if o == nil || IsNil(o.Error) {
|
||||
return map[string]interface{}{}, false
|
||||
}
|
||||
return o.Error, true
|
||||
}
|
||||
|
||||
// HasError returns a boolean if a field has been set.
|
||||
func (o *FlowError) HasError() bool {
|
||||
if o != nil && !IsNil(o.Error) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetError gets a reference to the given map[string]interface{} and assigns it to the Error field.
|
||||
func (o *FlowError) SetError(v map[string]interface{}) {
|
||||
o.Error = v
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *FlowError) GetId() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Id
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *FlowError) GetIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Id, true
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *FlowError) SetId(v string) {
|
||||
o.Id = v
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
||||
func (o *FlowError) GetUpdatedAt() time.Time {
|
||||
if o == nil || IsNil(o.UpdatedAt) {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
return *o.UpdatedAt
|
||||
}
|
||||
|
||||
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *FlowError) GetUpdatedAtOk() (*time.Time, bool) {
|
||||
if o == nil || IsNil(o.UpdatedAt) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UpdatedAt, true
|
||||
}
|
||||
|
||||
// HasUpdatedAt returns a boolean if a field has been set.
|
||||
func (o *FlowError) HasUpdatedAt() bool {
|
||||
if o != nil && !IsNil(o.UpdatedAt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
|
||||
func (o *FlowError) SetUpdatedAt(v time.Time) {
|
||||
o.UpdatedAt = &v
|
||||
}
|
||||
|
||||
func (o FlowError) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o FlowError) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.CreatedAt) {
|
||||
toSerialize["created_at"] = o.CreatedAt
|
||||
}
|
||||
if !IsNil(o.Error) {
|
||||
toSerialize["error"] = o.Error
|
||||
}
|
||||
toSerialize["id"] = o.Id
|
||||
if !IsNil(o.UpdatedAt) {
|
||||
toSerialize["updated_at"] = o.UpdatedAt
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *FlowError) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"id",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varFlowError := _FlowError{}
|
||||
|
||||
err = json.Unmarshal(data, &varFlowError)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = FlowError(varFlowError)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "created_at")
|
||||
delete(additionalProperties, "error")
|
||||
delete(additionalProperties, "id")
|
||||
delete(additionalProperties, "updated_at")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableFlowError struct {
|
||||
value *FlowError
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableFlowError) Get() *FlowError {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableFlowError) Set(val *FlowError) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableFlowError) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableFlowError) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableFlowError(val *FlowError) *NullableFlowError {
|
||||
return &NullableFlowError{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableFlowError) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableFlowError) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
434
pkg/httpclient/model_generic_error.go
Normal file
434
pkg/httpclient/model_generic_error.go
Normal file
@@ -0,0 +1,434 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the GenericError type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &GenericError{}
|
||||
|
||||
// GenericError struct for GenericError
|
||||
type GenericError struct {
|
||||
// The status code
|
||||
Code *int64 `json:"code,omitempty"`
|
||||
// Debug information This field is often not exposed to protect against leaking sensitive information.
|
||||
Debug *string `json:"debug,omitempty"`
|
||||
// Further error details
|
||||
Details map[string]interface{} `json:"details,omitempty"`
|
||||
// The error ID Useful when trying to identify various errors in application logic.
|
||||
Id *string `json:"id,omitempty"`
|
||||
// Error message The error's message.
|
||||
Message string `json:"message"`
|
||||
// A human-readable reason for the error
|
||||
Reason *string `json:"reason,omitempty"`
|
||||
// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.
|
||||
Request *string `json:"request,omitempty"`
|
||||
// The status description
|
||||
Status *string `json:"status,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _GenericError GenericError
|
||||
|
||||
// NewGenericError instantiates a new GenericError object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewGenericError(message string) *GenericError {
|
||||
this := GenericError{}
|
||||
this.Message = message
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewGenericErrorWithDefaults instantiates a new GenericError object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewGenericErrorWithDefaults() *GenericError {
|
||||
this := GenericError{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCode returns the Code field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetCode() int64 {
|
||||
if o == nil || IsNil(o.Code) {
|
||||
var ret int64
|
||||
return ret
|
||||
}
|
||||
return *o.Code
|
||||
}
|
||||
|
||||
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetCodeOk() (*int64, bool) {
|
||||
if o == nil || IsNil(o.Code) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Code, true
|
||||
}
|
||||
|
||||
// HasCode returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasCode() bool {
|
||||
if o != nil && !IsNil(o.Code) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCode gets a reference to the given int64 and assigns it to the Code field.
|
||||
func (o *GenericError) SetCode(v int64) {
|
||||
o.Code = &v
|
||||
}
|
||||
|
||||
// GetDebug returns the Debug field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetDebug() string {
|
||||
if o == nil || IsNil(o.Debug) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Debug
|
||||
}
|
||||
|
||||
// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetDebugOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Debug) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Debug, true
|
||||
}
|
||||
|
||||
// HasDebug returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasDebug() bool {
|
||||
if o != nil && !IsNil(o.Debug) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDebug gets a reference to the given string and assigns it to the Debug field.
|
||||
func (o *GenericError) SetDebug(v string) {
|
||||
o.Debug = &v
|
||||
}
|
||||
|
||||
// GetDetails returns the Details field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetDetails() map[string]interface{} {
|
||||
if o == nil || IsNil(o.Details) {
|
||||
var ret map[string]interface{}
|
||||
return ret
|
||||
}
|
||||
return o.Details
|
||||
}
|
||||
|
||||
// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetDetailsOk() (map[string]interface{}, bool) {
|
||||
if o == nil || IsNil(o.Details) {
|
||||
return map[string]interface{}{}, false
|
||||
}
|
||||
return o.Details, true
|
||||
}
|
||||
|
||||
// HasDetails returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasDetails() bool {
|
||||
if o != nil && !IsNil(o.Details) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field.
|
||||
func (o *GenericError) SetDetails(v map[string]interface{}) {
|
||||
o.Details = v
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetId() string {
|
||||
if o == nil || IsNil(o.Id) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Id
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetIdOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Id) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Id, true
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasId() bool {
|
||||
if o != nil && !IsNil(o.Id) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *GenericError) SetId(v string) {
|
||||
o.Id = &v
|
||||
}
|
||||
|
||||
// GetMessage returns the Message field value
|
||||
func (o *GenericError) GetMessage() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Message
|
||||
}
|
||||
|
||||
// GetMessageOk returns a tuple with the Message field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetMessageOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Message, true
|
||||
}
|
||||
|
||||
// SetMessage sets field value
|
||||
func (o *GenericError) SetMessage(v string) {
|
||||
o.Message = v
|
||||
}
|
||||
|
||||
// GetReason returns the Reason field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetReason() string {
|
||||
if o == nil || IsNil(o.Reason) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Reason
|
||||
}
|
||||
|
||||
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetReasonOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Reason) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Reason, true
|
||||
}
|
||||
|
||||
// HasReason returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasReason() bool {
|
||||
if o != nil && !IsNil(o.Reason) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetReason gets a reference to the given string and assigns it to the Reason field.
|
||||
func (o *GenericError) SetReason(v string) {
|
||||
o.Reason = &v
|
||||
}
|
||||
|
||||
// GetRequest returns the Request field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetRequest() string {
|
||||
if o == nil || IsNil(o.Request) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Request
|
||||
}
|
||||
|
||||
// GetRequestOk returns a tuple with the Request field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetRequestOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Request) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Request, true
|
||||
}
|
||||
|
||||
// HasRequest returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasRequest() bool {
|
||||
if o != nil && !IsNil(o.Request) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRequest gets a reference to the given string and assigns it to the Request field.
|
||||
func (o *GenericError) SetRequest(v string) {
|
||||
o.Request = &v
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetStatus() string {
|
||||
if o == nil || IsNil(o.Status) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Status
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetStatusOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Status) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Status, true
|
||||
}
|
||||
|
||||
// HasStatus returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasStatus() bool {
|
||||
if o != nil && !IsNil(o.Status) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
||||
func (o *GenericError) SetStatus(v string) {
|
||||
o.Status = &v
|
||||
}
|
||||
|
||||
func (o GenericError) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o GenericError) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Code) {
|
||||
toSerialize["code"] = o.Code
|
||||
}
|
||||
if !IsNil(o.Debug) {
|
||||
toSerialize["debug"] = o.Debug
|
||||
}
|
||||
if !IsNil(o.Details) {
|
||||
toSerialize["details"] = o.Details
|
||||
}
|
||||
if !IsNil(o.Id) {
|
||||
toSerialize["id"] = o.Id
|
||||
}
|
||||
toSerialize["message"] = o.Message
|
||||
if !IsNil(o.Reason) {
|
||||
toSerialize["reason"] = o.Reason
|
||||
}
|
||||
if !IsNil(o.Request) {
|
||||
toSerialize["request"] = o.Request
|
||||
}
|
||||
if !IsNil(o.Status) {
|
||||
toSerialize["status"] = o.Status
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *GenericError) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"message",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varGenericError := _GenericError{}
|
||||
|
||||
err = json.Unmarshal(data, &varGenericError)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = GenericError(varGenericError)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "code")
|
||||
delete(additionalProperties, "debug")
|
||||
delete(additionalProperties, "details")
|
||||
delete(additionalProperties, "id")
|
||||
delete(additionalProperties, "message")
|
||||
delete(additionalProperties, "reason")
|
||||
delete(additionalProperties, "request")
|
||||
delete(additionalProperties, "status")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableGenericError struct {
|
||||
value *GenericError
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableGenericError) Get() *GenericError {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableGenericError) Set(val *GenericError) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableGenericError) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableGenericError) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableGenericError(val *GenericError) *NullableGenericError {
|
||||
return &NullableGenericError{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableGenericError) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableGenericError) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
168
pkg/httpclient/model_get_version_200_response.go
Normal file
168
pkg/httpclient/model_get_version_200_response.go
Normal file
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the GetVersion200Response type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &GetVersion200Response{}
|
||||
|
||||
// GetVersion200Response struct for GetVersion200Response
|
||||
type GetVersion200Response struct {
|
||||
// The version of Ory Kratos.
|
||||
Version string `json:"version"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _GetVersion200Response GetVersion200Response
|
||||
|
||||
// NewGetVersion200Response instantiates a new GetVersion200Response object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewGetVersion200Response(version string) *GetVersion200Response {
|
||||
this := GetVersion200Response{}
|
||||
this.Version = version
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewGetVersion200ResponseWithDefaults instantiates a new GetVersion200Response object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewGetVersion200ResponseWithDefaults() *GetVersion200Response {
|
||||
this := GetVersion200Response{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetVersion returns the Version field value
|
||||
func (o *GetVersion200Response) GetVersion() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Version
|
||||
}
|
||||
|
||||
// GetVersionOk returns a tuple with the Version field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetVersion200Response) GetVersionOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Version, true
|
||||
}
|
||||
|
||||
// SetVersion sets field value
|
||||
func (o *GetVersion200Response) SetVersion(v string) {
|
||||
o.Version = v
|
||||
}
|
||||
|
||||
func (o GetVersion200Response) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o GetVersion200Response) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["version"] = o.Version
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *GetVersion200Response) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"version",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varGetVersion200Response := _GetVersion200Response{}
|
||||
|
||||
err = json.Unmarshal(data, &varGetVersion200Response)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = GetVersion200Response(varGetVersion200Response)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "version")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableGetVersion200Response struct {
|
||||
value *GetVersion200Response
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableGetVersion200Response) Get() *GetVersion200Response {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableGetVersion200Response) Set(val *GetVersion200Response) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableGetVersion200Response) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableGetVersion200Response) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableGetVersion200Response(val *GetVersion200Response) *NullableGetVersion200Response {
|
||||
return &NullableGetVersion200Response{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableGetVersion200Response) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableGetVersion200Response) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
155
pkg/httpclient/model_health_not_ready_status.go
Normal file
155
pkg/httpclient/model_health_not_ready_status.go
Normal file
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the HealthNotReadyStatus type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &HealthNotReadyStatus{}
|
||||
|
||||
// HealthNotReadyStatus struct for HealthNotReadyStatus
|
||||
type HealthNotReadyStatus struct {
|
||||
// Errors contains a list of errors that caused the not ready status.
|
||||
Errors *map[string]string `json:"errors,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _HealthNotReadyStatus HealthNotReadyStatus
|
||||
|
||||
// NewHealthNotReadyStatus instantiates a new HealthNotReadyStatus object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewHealthNotReadyStatus() *HealthNotReadyStatus {
|
||||
this := HealthNotReadyStatus{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewHealthNotReadyStatusWithDefaults instantiates a new HealthNotReadyStatus object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewHealthNotReadyStatusWithDefaults() *HealthNotReadyStatus {
|
||||
this := HealthNotReadyStatus{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetErrors returns the Errors field value if set, zero value otherwise.
|
||||
func (o *HealthNotReadyStatus) GetErrors() map[string]string {
|
||||
if o == nil || IsNil(o.Errors) {
|
||||
var ret map[string]string
|
||||
return ret
|
||||
}
|
||||
return *o.Errors
|
||||
}
|
||||
|
||||
// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *HealthNotReadyStatus) GetErrorsOk() (*map[string]string, bool) {
|
||||
if o == nil || IsNil(o.Errors) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Errors, true
|
||||
}
|
||||
|
||||
// HasErrors returns a boolean if a field has been set.
|
||||
func (o *HealthNotReadyStatus) HasErrors() bool {
|
||||
if o != nil && !IsNil(o.Errors) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetErrors gets a reference to the given map[string]string and assigns it to the Errors field.
|
||||
func (o *HealthNotReadyStatus) SetErrors(v map[string]string) {
|
||||
o.Errors = &v
|
||||
}
|
||||
|
||||
func (o HealthNotReadyStatus) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o HealthNotReadyStatus) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Errors) {
|
||||
toSerialize["errors"] = o.Errors
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *HealthNotReadyStatus) UnmarshalJSON(data []byte) (err error) {
|
||||
varHealthNotReadyStatus := _HealthNotReadyStatus{}
|
||||
|
||||
err = json.Unmarshal(data, &varHealthNotReadyStatus)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = HealthNotReadyStatus(varHealthNotReadyStatus)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "errors")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableHealthNotReadyStatus struct {
|
||||
value *HealthNotReadyStatus
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableHealthNotReadyStatus) Get() *HealthNotReadyStatus {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableHealthNotReadyStatus) Set(val *HealthNotReadyStatus) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableHealthNotReadyStatus) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableHealthNotReadyStatus) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableHealthNotReadyStatus(val *HealthNotReadyStatus) *NullableHealthNotReadyStatus {
|
||||
return &NullableHealthNotReadyStatus{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableHealthNotReadyStatus) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableHealthNotReadyStatus) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
155
pkg/httpclient/model_health_status.go
Normal file
155
pkg/httpclient/model_health_status.go
Normal file
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the HealthStatus type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &HealthStatus{}
|
||||
|
||||
// HealthStatus struct for HealthStatus
|
||||
type HealthStatus struct {
|
||||
// Status always contains \"ok\".
|
||||
Status *string `json:"status,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _HealthStatus HealthStatus
|
||||
|
||||
// NewHealthStatus instantiates a new HealthStatus object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewHealthStatus() *HealthStatus {
|
||||
this := HealthStatus{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewHealthStatusWithDefaults instantiates a new HealthStatus object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewHealthStatusWithDefaults() *HealthStatus {
|
||||
this := HealthStatus{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||
func (o *HealthStatus) GetStatus() string {
|
||||
if o == nil || IsNil(o.Status) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Status
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *HealthStatus) GetStatusOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Status) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Status, true
|
||||
}
|
||||
|
||||
// HasStatus returns a boolean if a field has been set.
|
||||
func (o *HealthStatus) HasStatus() bool {
|
||||
if o != nil && !IsNil(o.Status) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
||||
func (o *HealthStatus) SetStatus(v string) {
|
||||
o.Status = &v
|
||||
}
|
||||
|
||||
func (o HealthStatus) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o HealthStatus) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Status) {
|
||||
toSerialize["status"] = o.Status
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *HealthStatus) UnmarshalJSON(data []byte) (err error) {
|
||||
varHealthStatus := _HealthStatus{}
|
||||
|
||||
err = json.Unmarshal(data, &varHealthStatus)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = HealthStatus(varHealthStatus)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "status")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableHealthStatus struct {
|
||||
value *HealthStatus
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableHealthStatus) Get() *HealthStatus {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableHealthStatus) Set(val *HealthStatus) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableHealthStatus) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableHealthStatus) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableHealthStatus(val *HealthStatus) *NullableHealthStatus {
|
||||
return &NullableHealthStatus{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableHealthStatus) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableHealthStatus) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
730
pkg/httpclient/model_identity.go
Normal file
730
pkg/httpclient/model_identity.go
Normal file
@@ -0,0 +1,730 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
// checks if the Identity type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &Identity{}
|
||||
|
||||
// Identity An [identity](https://www.ory.com/docs/kratos/concepts/identity-user-model) represents a (human) user in Ory.
|
||||
type Identity struct {
|
||||
// CreatedAt is a helper struct field for gobuffalo.pop.
|
||||
CreatedAt *time.Time `json:"created_at,omitempty"`
|
||||
// Credentials represents all credentials that can be used for authenticating this identity.
|
||||
Credentials *map[string]IdentityCredentials `json:"credentials,omitempty"`
|
||||
// ExternalID is an optional external ID of the identity. This is used to link the identity to an external system. If set, the external ID must be unique across all identities.
|
||||
ExternalId *string `json:"external_id,omitempty"`
|
||||
// ID is the identity's unique identifier. The Identity ID can not be changed and can not be chosen. This ensures future compatibility and optimization for distributed stores such as CockroachDB.
|
||||
Id string `json:"id"`
|
||||
// NullJSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger and is NULLable-
|
||||
MetadataAdmin interface{} `json:"metadata_admin,omitempty"`
|
||||
// NullJSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger and is NULLable-
|
||||
MetadataPublic interface{} `json:"metadata_public,omitempty"`
|
||||
OrganizationId NullableString `json:"organization_id,omitempty"`
|
||||
// RecoveryAddresses contains all the addresses that can be used to recover an identity.
|
||||
RecoveryAddresses []RecoveryIdentityAddress `json:"recovery_addresses,omitempty"`
|
||||
// Region is the Ory Network region this identity is homed in. Set by the multi-region persister; empty on OSS and single-region deployments. eu-central EUCentral asia-northeast AsiaNorthEast us-east USEast us-west USWest eu EU asia Asia us US global Global
|
||||
Region *string `json:"region,omitempty"`
|
||||
// SchemaID is the ID of the JSON Schema to be used for validating the identity's traits.
|
||||
SchemaId string `json:"schema_id"`
|
||||
// SchemaURL is the URL of the endpoint where the identity's traits schema can be fetched from. format: url
|
||||
SchemaUrl string `json:"schema_url"`
|
||||
// State is the identity's state. This value has currently no effect. active StateActive inactive StateInactive
|
||||
State *string `json:"state,omitempty"`
|
||||
StateChangedAt *time.Time `json:"state_changed_at,omitempty"`
|
||||
// Traits represent an identity's traits. The identity is able to create, modify, and delete traits in a self-service manner. The input will always be validated against the JSON Schema defined in `schema_url`.
|
||||
Traits interface{} `json:"traits"`
|
||||
// UpdatedAt is a helper struct field for gobuffalo.pop.
|
||||
UpdatedAt *time.Time `json:"updated_at,omitempty"`
|
||||
// VerifiableAddresses contains all the addresses that can be verified by the user.
|
||||
VerifiableAddresses []VerifiableIdentityAddress `json:"verifiable_addresses,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _Identity Identity
|
||||
|
||||
// NewIdentity instantiates a new Identity object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentity(id string, schemaId string, schemaUrl string, traits interface{}) *Identity {
|
||||
this := Identity{}
|
||||
this.Id = id
|
||||
this.SchemaId = schemaId
|
||||
this.SchemaUrl = schemaUrl
|
||||
this.Traits = traits
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityWithDefaults instantiates a new Identity object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityWithDefaults() *Identity {
|
||||
this := Identity{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *Identity) GetCreatedAt() time.Time {
|
||||
if o == nil || IsNil(o.CreatedAt) {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
return *o.CreatedAt
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Identity) GetCreatedAtOk() (*time.Time, bool) {
|
||||
if o == nil || IsNil(o.CreatedAt) {
|
||||
return nil, false
|
||||
}
|
||||
return o.CreatedAt, true
|
||||
}
|
||||
|
||||
// HasCreatedAt returns a boolean if a field has been set.
|
||||
func (o *Identity) HasCreatedAt() bool {
|
||||
if o != nil && !IsNil(o.CreatedAt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
||||
func (o *Identity) SetCreatedAt(v time.Time) {
|
||||
o.CreatedAt = &v
|
||||
}
|
||||
|
||||
// GetCredentials returns the Credentials field value if set, zero value otherwise.
|
||||
func (o *Identity) GetCredentials() map[string]IdentityCredentials {
|
||||
if o == nil || IsNil(o.Credentials) {
|
||||
var ret map[string]IdentityCredentials
|
||||
return ret
|
||||
}
|
||||
return *o.Credentials
|
||||
}
|
||||
|
||||
// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Identity) GetCredentialsOk() (*map[string]IdentityCredentials, bool) {
|
||||
if o == nil || IsNil(o.Credentials) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Credentials, true
|
||||
}
|
||||
|
||||
// HasCredentials returns a boolean if a field has been set.
|
||||
func (o *Identity) HasCredentials() bool {
|
||||
if o != nil && !IsNil(o.Credentials) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCredentials gets a reference to the given map[string]IdentityCredentials and assigns it to the Credentials field.
|
||||
func (o *Identity) SetCredentials(v map[string]IdentityCredentials) {
|
||||
o.Credentials = &v
|
||||
}
|
||||
|
||||
// GetExternalId returns the ExternalId field value if set, zero value otherwise.
|
||||
func (o *Identity) GetExternalId() string {
|
||||
if o == nil || IsNil(o.ExternalId) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.ExternalId
|
||||
}
|
||||
|
||||
// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Identity) GetExternalIdOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.ExternalId) {
|
||||
return nil, false
|
||||
}
|
||||
return o.ExternalId, true
|
||||
}
|
||||
|
||||
// HasExternalId returns a boolean if a field has been set.
|
||||
func (o *Identity) HasExternalId() bool {
|
||||
if o != nil && !IsNil(o.ExternalId) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetExternalId gets a reference to the given string and assigns it to the ExternalId field.
|
||||
func (o *Identity) SetExternalId(v string) {
|
||||
o.ExternalId = &v
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *Identity) GetId() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Id
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Identity) GetIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Id, true
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *Identity) SetId(v string) {
|
||||
o.Id = v
|
||||
}
|
||||
|
||||
// GetMetadataAdmin returns the MetadataAdmin field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *Identity) GetMetadataAdmin() interface{} {
|
||||
if o == nil {
|
||||
var ret interface{}
|
||||
return ret
|
||||
}
|
||||
return o.MetadataAdmin
|
||||
}
|
||||
|
||||
// GetMetadataAdminOk returns a tuple with the MetadataAdmin field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *Identity) GetMetadataAdminOk() (*interface{}, bool) {
|
||||
if o == nil || IsNil(o.MetadataAdmin) {
|
||||
return nil, false
|
||||
}
|
||||
return &o.MetadataAdmin, true
|
||||
}
|
||||
|
||||
// HasMetadataAdmin returns a boolean if a field has been set.
|
||||
func (o *Identity) HasMetadataAdmin() bool {
|
||||
if o != nil && !IsNil(o.MetadataAdmin) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetMetadataAdmin gets a reference to the given interface{} and assigns it to the MetadataAdmin field.
|
||||
func (o *Identity) SetMetadataAdmin(v interface{}) {
|
||||
o.MetadataAdmin = v
|
||||
}
|
||||
|
||||
// GetMetadataPublic returns the MetadataPublic field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *Identity) GetMetadataPublic() interface{} {
|
||||
if o == nil {
|
||||
var ret interface{}
|
||||
return ret
|
||||
}
|
||||
return o.MetadataPublic
|
||||
}
|
||||
|
||||
// GetMetadataPublicOk returns a tuple with the MetadataPublic field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *Identity) GetMetadataPublicOk() (*interface{}, bool) {
|
||||
if o == nil || IsNil(o.MetadataPublic) {
|
||||
return nil, false
|
||||
}
|
||||
return &o.MetadataPublic, true
|
||||
}
|
||||
|
||||
// HasMetadataPublic returns a boolean if a field has been set.
|
||||
func (o *Identity) HasMetadataPublic() bool {
|
||||
if o != nil && !IsNil(o.MetadataPublic) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetMetadataPublic gets a reference to the given interface{} and assigns it to the MetadataPublic field.
|
||||
func (o *Identity) SetMetadataPublic(v interface{}) {
|
||||
o.MetadataPublic = v
|
||||
}
|
||||
|
||||
// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *Identity) GetOrganizationId() string {
|
||||
if o == nil || IsNil(o.OrganizationId.Get()) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.OrganizationId.Get()
|
||||
}
|
||||
|
||||
// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *Identity) GetOrganizationIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.OrganizationId.Get(), o.OrganizationId.IsSet()
|
||||
}
|
||||
|
||||
// HasOrganizationId returns a boolean if a field has been set.
|
||||
func (o *Identity) HasOrganizationId() bool {
|
||||
if o != nil && o.OrganizationId.IsSet() {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetOrganizationId gets a reference to the given NullableString and assigns it to the OrganizationId field.
|
||||
func (o *Identity) SetOrganizationId(v string) {
|
||||
o.OrganizationId.Set(&v)
|
||||
}
|
||||
|
||||
// SetOrganizationIdNil sets the value for OrganizationId to be an explicit nil
|
||||
func (o *Identity) SetOrganizationIdNil() {
|
||||
o.OrganizationId.Set(nil)
|
||||
}
|
||||
|
||||
// UnsetOrganizationId ensures that no value is present for OrganizationId, not even an explicit nil
|
||||
func (o *Identity) UnsetOrganizationId() {
|
||||
o.OrganizationId.Unset()
|
||||
}
|
||||
|
||||
// GetRecoveryAddresses returns the RecoveryAddresses field value if set, zero value otherwise.
|
||||
func (o *Identity) GetRecoveryAddresses() []RecoveryIdentityAddress {
|
||||
if o == nil || IsNil(o.RecoveryAddresses) {
|
||||
var ret []RecoveryIdentityAddress
|
||||
return ret
|
||||
}
|
||||
return o.RecoveryAddresses
|
||||
}
|
||||
|
||||
// GetRecoveryAddressesOk returns a tuple with the RecoveryAddresses field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Identity) GetRecoveryAddressesOk() ([]RecoveryIdentityAddress, bool) {
|
||||
if o == nil || IsNil(o.RecoveryAddresses) {
|
||||
return nil, false
|
||||
}
|
||||
return o.RecoveryAddresses, true
|
||||
}
|
||||
|
||||
// HasRecoveryAddresses returns a boolean if a field has been set.
|
||||
func (o *Identity) HasRecoveryAddresses() bool {
|
||||
if o != nil && !IsNil(o.RecoveryAddresses) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRecoveryAddresses gets a reference to the given []RecoveryIdentityAddress and assigns it to the RecoveryAddresses field.
|
||||
func (o *Identity) SetRecoveryAddresses(v []RecoveryIdentityAddress) {
|
||||
o.RecoveryAddresses = v
|
||||
}
|
||||
|
||||
// GetRegion returns the Region field value if set, zero value otherwise.
|
||||
func (o *Identity) GetRegion() string {
|
||||
if o == nil || IsNil(o.Region) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Region
|
||||
}
|
||||
|
||||
// GetRegionOk returns a tuple with the Region field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Identity) GetRegionOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Region) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Region, true
|
||||
}
|
||||
|
||||
// HasRegion returns a boolean if a field has been set.
|
||||
func (o *Identity) HasRegion() bool {
|
||||
if o != nil && !IsNil(o.Region) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRegion gets a reference to the given string and assigns it to the Region field.
|
||||
func (o *Identity) SetRegion(v string) {
|
||||
o.Region = &v
|
||||
}
|
||||
|
||||
// GetSchemaId returns the SchemaId field value
|
||||
func (o *Identity) GetSchemaId() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.SchemaId
|
||||
}
|
||||
|
||||
// GetSchemaIdOk returns a tuple with the SchemaId field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Identity) GetSchemaIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.SchemaId, true
|
||||
}
|
||||
|
||||
// SetSchemaId sets field value
|
||||
func (o *Identity) SetSchemaId(v string) {
|
||||
o.SchemaId = v
|
||||
}
|
||||
|
||||
// GetSchemaUrl returns the SchemaUrl field value
|
||||
func (o *Identity) GetSchemaUrl() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.SchemaUrl
|
||||
}
|
||||
|
||||
// GetSchemaUrlOk returns a tuple with the SchemaUrl field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Identity) GetSchemaUrlOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.SchemaUrl, true
|
||||
}
|
||||
|
||||
// SetSchemaUrl sets field value
|
||||
func (o *Identity) SetSchemaUrl(v string) {
|
||||
o.SchemaUrl = v
|
||||
}
|
||||
|
||||
// GetState returns the State field value if set, zero value otherwise.
|
||||
func (o *Identity) GetState() string {
|
||||
if o == nil || IsNil(o.State) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.State
|
||||
}
|
||||
|
||||
// GetStateOk returns a tuple with the State field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Identity) GetStateOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.State) {
|
||||
return nil, false
|
||||
}
|
||||
return o.State, true
|
||||
}
|
||||
|
||||
// HasState returns a boolean if a field has been set.
|
||||
func (o *Identity) HasState() bool {
|
||||
if o != nil && !IsNil(o.State) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetState gets a reference to the given string and assigns it to the State field.
|
||||
func (o *Identity) SetState(v string) {
|
||||
o.State = &v
|
||||
}
|
||||
|
||||
// GetStateChangedAt returns the StateChangedAt field value if set, zero value otherwise.
|
||||
func (o *Identity) GetStateChangedAt() time.Time {
|
||||
if o == nil || IsNil(o.StateChangedAt) {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
return *o.StateChangedAt
|
||||
}
|
||||
|
||||
// GetStateChangedAtOk returns a tuple with the StateChangedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Identity) GetStateChangedAtOk() (*time.Time, bool) {
|
||||
if o == nil || IsNil(o.StateChangedAt) {
|
||||
return nil, false
|
||||
}
|
||||
return o.StateChangedAt, true
|
||||
}
|
||||
|
||||
// HasStateChangedAt returns a boolean if a field has been set.
|
||||
func (o *Identity) HasStateChangedAt() bool {
|
||||
if o != nil && !IsNil(o.StateChangedAt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetStateChangedAt gets a reference to the given time.Time and assigns it to the StateChangedAt field.
|
||||
func (o *Identity) SetStateChangedAt(v time.Time) {
|
||||
o.StateChangedAt = &v
|
||||
}
|
||||
|
||||
// GetTraits returns the Traits field value
|
||||
// If the value is explicit nil, the zero value for interface{} will be returned
|
||||
func (o *Identity) GetTraits() interface{} {
|
||||
if o == nil {
|
||||
var ret interface{}
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Traits
|
||||
}
|
||||
|
||||
// GetTraitsOk returns a tuple with the Traits field value
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *Identity) GetTraitsOk() (*interface{}, bool) {
|
||||
if o == nil || IsNil(o.Traits) {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Traits, true
|
||||
}
|
||||
|
||||
// SetTraits sets field value
|
||||
func (o *Identity) SetTraits(v interface{}) {
|
||||
o.Traits = v
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
||||
func (o *Identity) GetUpdatedAt() time.Time {
|
||||
if o == nil || IsNil(o.UpdatedAt) {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
return *o.UpdatedAt
|
||||
}
|
||||
|
||||
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Identity) GetUpdatedAtOk() (*time.Time, bool) {
|
||||
if o == nil || IsNil(o.UpdatedAt) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UpdatedAt, true
|
||||
}
|
||||
|
||||
// HasUpdatedAt returns a boolean if a field has been set.
|
||||
func (o *Identity) HasUpdatedAt() bool {
|
||||
if o != nil && !IsNil(o.UpdatedAt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
|
||||
func (o *Identity) SetUpdatedAt(v time.Time) {
|
||||
o.UpdatedAt = &v
|
||||
}
|
||||
|
||||
// GetVerifiableAddresses returns the VerifiableAddresses field value if set, zero value otherwise.
|
||||
func (o *Identity) GetVerifiableAddresses() []VerifiableIdentityAddress {
|
||||
if o == nil || IsNil(o.VerifiableAddresses) {
|
||||
var ret []VerifiableIdentityAddress
|
||||
return ret
|
||||
}
|
||||
return o.VerifiableAddresses
|
||||
}
|
||||
|
||||
// GetVerifiableAddressesOk returns a tuple with the VerifiableAddresses field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Identity) GetVerifiableAddressesOk() ([]VerifiableIdentityAddress, bool) {
|
||||
if o == nil || IsNil(o.VerifiableAddresses) {
|
||||
return nil, false
|
||||
}
|
||||
return o.VerifiableAddresses, true
|
||||
}
|
||||
|
||||
// HasVerifiableAddresses returns a boolean if a field has been set.
|
||||
func (o *Identity) HasVerifiableAddresses() bool {
|
||||
if o != nil && !IsNil(o.VerifiableAddresses) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetVerifiableAddresses gets a reference to the given []VerifiableIdentityAddress and assigns it to the VerifiableAddresses field.
|
||||
func (o *Identity) SetVerifiableAddresses(v []VerifiableIdentityAddress) {
|
||||
o.VerifiableAddresses = v
|
||||
}
|
||||
|
||||
func (o Identity) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o Identity) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.CreatedAt) {
|
||||
toSerialize["created_at"] = o.CreatedAt
|
||||
}
|
||||
if !IsNil(o.Credentials) {
|
||||
toSerialize["credentials"] = o.Credentials
|
||||
}
|
||||
if !IsNil(o.ExternalId) {
|
||||
toSerialize["external_id"] = o.ExternalId
|
||||
}
|
||||
toSerialize["id"] = o.Id
|
||||
if o.MetadataAdmin != nil {
|
||||
toSerialize["metadata_admin"] = o.MetadataAdmin
|
||||
}
|
||||
if o.MetadataPublic != nil {
|
||||
toSerialize["metadata_public"] = o.MetadataPublic
|
||||
}
|
||||
if o.OrganizationId.IsSet() {
|
||||
toSerialize["organization_id"] = o.OrganizationId.Get()
|
||||
}
|
||||
if !IsNil(o.RecoveryAddresses) {
|
||||
toSerialize["recovery_addresses"] = o.RecoveryAddresses
|
||||
}
|
||||
if !IsNil(o.Region) {
|
||||
toSerialize["region"] = o.Region
|
||||
}
|
||||
toSerialize["schema_id"] = o.SchemaId
|
||||
toSerialize["schema_url"] = o.SchemaUrl
|
||||
if !IsNil(o.State) {
|
||||
toSerialize["state"] = o.State
|
||||
}
|
||||
if !IsNil(o.StateChangedAt) {
|
||||
toSerialize["state_changed_at"] = o.StateChangedAt
|
||||
}
|
||||
if o.Traits != nil {
|
||||
toSerialize["traits"] = o.Traits
|
||||
}
|
||||
if !IsNil(o.UpdatedAt) {
|
||||
toSerialize["updated_at"] = o.UpdatedAt
|
||||
}
|
||||
if !IsNil(o.VerifiableAddresses) {
|
||||
toSerialize["verifiable_addresses"] = o.VerifiableAddresses
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *Identity) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"id",
|
||||
"schema_id",
|
||||
"schema_url",
|
||||
"traits",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varIdentity := _Identity{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentity)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = Identity(varIdentity)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "created_at")
|
||||
delete(additionalProperties, "credentials")
|
||||
delete(additionalProperties, "external_id")
|
||||
delete(additionalProperties, "id")
|
||||
delete(additionalProperties, "metadata_admin")
|
||||
delete(additionalProperties, "metadata_public")
|
||||
delete(additionalProperties, "organization_id")
|
||||
delete(additionalProperties, "recovery_addresses")
|
||||
delete(additionalProperties, "region")
|
||||
delete(additionalProperties, "schema_id")
|
||||
delete(additionalProperties, "schema_url")
|
||||
delete(additionalProperties, "state")
|
||||
delete(additionalProperties, "state_changed_at")
|
||||
delete(additionalProperties, "traits")
|
||||
delete(additionalProperties, "updated_at")
|
||||
delete(additionalProperties, "verifiable_addresses")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentity struct {
|
||||
value *Identity
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentity) Get() *Identity {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentity) Set(val *Identity) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentity) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentity) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentity(val *Identity) *NullableIdentity {
|
||||
return &NullableIdentity{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentity) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentity) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
345
pkg/httpclient/model_identity_credentials.go
Normal file
345
pkg/httpclient/model_identity_credentials.go
Normal file
@@ -0,0 +1,345 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// checks if the IdentityCredentials type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityCredentials{}
|
||||
|
||||
// IdentityCredentials Credentials represents a specific credential type
|
||||
type IdentityCredentials struct {
|
||||
Config map[string]interface{} `json:"config,omitempty"`
|
||||
// CreatedAt is a helper struct field for gobuffalo.pop.
|
||||
CreatedAt *time.Time `json:"created_at,omitempty"`
|
||||
// Identifiers represent a list of unique identifiers this credential type matches.
|
||||
Identifiers []string `json:"identifiers,omitempty"`
|
||||
// Type discriminates between different types of credentials. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth passkey CredentialsTypePasskey profile CredentialsTypeProfile saml CredentialsTypeSAML deviceauthn CredentialsTypeDeviceAuthn identifier_first CredentialsTypeIdentifierFirst link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode
|
||||
Type *string `json:"type,omitempty"`
|
||||
// UpdatedAt is a helper struct field for gobuffalo.pop.
|
||||
UpdatedAt *time.Time `json:"updated_at,omitempty"`
|
||||
// Version refers to the version of the credential. Useful when changing the config schema.
|
||||
Version *int64 `json:"version,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityCredentials IdentityCredentials
|
||||
|
||||
// NewIdentityCredentials instantiates a new IdentityCredentials object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityCredentials() *IdentityCredentials {
|
||||
this := IdentityCredentials{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityCredentialsWithDefaults instantiates a new IdentityCredentials object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityCredentialsWithDefaults() *IdentityCredentials {
|
||||
this := IdentityCredentials{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetConfig returns the Config field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentials) GetConfig() map[string]interface{} {
|
||||
if o == nil || IsNil(o.Config) {
|
||||
var ret map[string]interface{}
|
||||
return ret
|
||||
}
|
||||
return o.Config
|
||||
}
|
||||
|
||||
// GetConfigOk returns a tuple with the Config field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentials) GetConfigOk() (map[string]interface{}, bool) {
|
||||
if o == nil || IsNil(o.Config) {
|
||||
return map[string]interface{}{}, false
|
||||
}
|
||||
return o.Config, true
|
||||
}
|
||||
|
||||
// HasConfig returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentials) HasConfig() bool {
|
||||
if o != nil && !IsNil(o.Config) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field.
|
||||
func (o *IdentityCredentials) SetConfig(v map[string]interface{}) {
|
||||
o.Config = v
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentials) GetCreatedAt() time.Time {
|
||||
if o == nil || IsNil(o.CreatedAt) {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
return *o.CreatedAt
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentials) GetCreatedAtOk() (*time.Time, bool) {
|
||||
if o == nil || IsNil(o.CreatedAt) {
|
||||
return nil, false
|
||||
}
|
||||
return o.CreatedAt, true
|
||||
}
|
||||
|
||||
// HasCreatedAt returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentials) HasCreatedAt() bool {
|
||||
if o != nil && !IsNil(o.CreatedAt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
||||
func (o *IdentityCredentials) SetCreatedAt(v time.Time) {
|
||||
o.CreatedAt = &v
|
||||
}
|
||||
|
||||
// GetIdentifiers returns the Identifiers field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentials) GetIdentifiers() []string {
|
||||
if o == nil || IsNil(o.Identifiers) {
|
||||
var ret []string
|
||||
return ret
|
||||
}
|
||||
return o.Identifiers
|
||||
}
|
||||
|
||||
// GetIdentifiersOk returns a tuple with the Identifiers field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentials) GetIdentifiersOk() ([]string, bool) {
|
||||
if o == nil || IsNil(o.Identifiers) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Identifiers, true
|
||||
}
|
||||
|
||||
// HasIdentifiers returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentials) HasIdentifiers() bool {
|
||||
if o != nil && !IsNil(o.Identifiers) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetIdentifiers gets a reference to the given []string and assigns it to the Identifiers field.
|
||||
func (o *IdentityCredentials) SetIdentifiers(v []string) {
|
||||
o.Identifiers = v
|
||||
}
|
||||
|
||||
// GetType returns the Type field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentials) GetType() string {
|
||||
if o == nil || IsNil(o.Type) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Type
|
||||
}
|
||||
|
||||
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentials) GetTypeOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Type) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Type, true
|
||||
}
|
||||
|
||||
// HasType returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentials) HasType() bool {
|
||||
if o != nil && !IsNil(o.Type) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetType gets a reference to the given string and assigns it to the Type field.
|
||||
func (o *IdentityCredentials) SetType(v string) {
|
||||
o.Type = &v
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentials) GetUpdatedAt() time.Time {
|
||||
if o == nil || IsNil(o.UpdatedAt) {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
return *o.UpdatedAt
|
||||
}
|
||||
|
||||
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentials) GetUpdatedAtOk() (*time.Time, bool) {
|
||||
if o == nil || IsNil(o.UpdatedAt) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UpdatedAt, true
|
||||
}
|
||||
|
||||
// HasUpdatedAt returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentials) HasUpdatedAt() bool {
|
||||
if o != nil && !IsNil(o.UpdatedAt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
|
||||
func (o *IdentityCredentials) SetUpdatedAt(v time.Time) {
|
||||
o.UpdatedAt = &v
|
||||
}
|
||||
|
||||
// GetVersion returns the Version field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentials) GetVersion() int64 {
|
||||
if o == nil || IsNil(o.Version) {
|
||||
var ret int64
|
||||
return ret
|
||||
}
|
||||
return *o.Version
|
||||
}
|
||||
|
||||
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentials) GetVersionOk() (*int64, bool) {
|
||||
if o == nil || IsNil(o.Version) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Version, true
|
||||
}
|
||||
|
||||
// HasVersion returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentials) HasVersion() bool {
|
||||
if o != nil && !IsNil(o.Version) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetVersion gets a reference to the given int64 and assigns it to the Version field.
|
||||
func (o *IdentityCredentials) SetVersion(v int64) {
|
||||
o.Version = &v
|
||||
}
|
||||
|
||||
func (o IdentityCredentials) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityCredentials) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Config) {
|
||||
toSerialize["config"] = o.Config
|
||||
}
|
||||
if !IsNil(o.CreatedAt) {
|
||||
toSerialize["created_at"] = o.CreatedAt
|
||||
}
|
||||
if !IsNil(o.Identifiers) {
|
||||
toSerialize["identifiers"] = o.Identifiers
|
||||
}
|
||||
if !IsNil(o.Type) {
|
||||
toSerialize["type"] = o.Type
|
||||
}
|
||||
if !IsNil(o.UpdatedAt) {
|
||||
toSerialize["updated_at"] = o.UpdatedAt
|
||||
}
|
||||
if !IsNil(o.Version) {
|
||||
toSerialize["version"] = o.Version
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityCredentials) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityCredentials := _IdentityCredentials{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityCredentials)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityCredentials(varIdentityCredentials)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "config")
|
||||
delete(additionalProperties, "created_at")
|
||||
delete(additionalProperties, "identifiers")
|
||||
delete(additionalProperties, "type")
|
||||
delete(additionalProperties, "updated_at")
|
||||
delete(additionalProperties, "version")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityCredentials struct {
|
||||
value *IdentityCredentials
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentials) Get() *IdentityCredentials {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentials) Set(val *IdentityCredentials) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentials) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentials) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityCredentials(val *IdentityCredentials) *NullableIdentityCredentials {
|
||||
return &NullableIdentityCredentials{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentials) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentials) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
154
pkg/httpclient/model_identity_credentials_code.go
Normal file
154
pkg/httpclient/model_identity_credentials_code.go
Normal file
@@ -0,0 +1,154 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityCredentialsCode type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityCredentialsCode{}
|
||||
|
||||
// IdentityCredentialsCode CredentialsCode represents a one time login/registration code
|
||||
type IdentityCredentialsCode struct {
|
||||
Addresses []IdentityCredentialsCodeAddress `json:"addresses,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityCredentialsCode IdentityCredentialsCode
|
||||
|
||||
// NewIdentityCredentialsCode instantiates a new IdentityCredentialsCode object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityCredentialsCode() *IdentityCredentialsCode {
|
||||
this := IdentityCredentialsCode{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityCredentialsCodeWithDefaults instantiates a new IdentityCredentialsCode object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityCredentialsCodeWithDefaults() *IdentityCredentialsCode {
|
||||
this := IdentityCredentialsCode{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAddresses returns the Addresses field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsCode) GetAddresses() []IdentityCredentialsCodeAddress {
|
||||
if o == nil || IsNil(o.Addresses) {
|
||||
var ret []IdentityCredentialsCodeAddress
|
||||
return ret
|
||||
}
|
||||
return o.Addresses
|
||||
}
|
||||
|
||||
// GetAddressesOk returns a tuple with the Addresses field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsCode) GetAddressesOk() ([]IdentityCredentialsCodeAddress, bool) {
|
||||
if o == nil || IsNil(o.Addresses) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Addresses, true
|
||||
}
|
||||
|
||||
// HasAddresses returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsCode) HasAddresses() bool {
|
||||
if o != nil && !IsNil(o.Addresses) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAddresses gets a reference to the given []IdentityCredentialsCodeAddress and assigns it to the Addresses field.
|
||||
func (o *IdentityCredentialsCode) SetAddresses(v []IdentityCredentialsCodeAddress) {
|
||||
o.Addresses = v
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsCode) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsCode) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Addresses) {
|
||||
toSerialize["addresses"] = o.Addresses
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityCredentialsCode) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityCredentialsCode := _IdentityCredentialsCode{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityCredentialsCode)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityCredentialsCode(varIdentityCredentialsCode)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "addresses")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityCredentialsCode struct {
|
||||
value *IdentityCredentialsCode
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsCode) Get() *IdentityCredentialsCode {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsCode) Set(val *IdentityCredentialsCode) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsCode) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsCode) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityCredentialsCode(val *IdentityCredentialsCode) *NullableIdentityCredentialsCode {
|
||||
return &NullableIdentityCredentialsCode{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsCode) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsCode) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
192
pkg/httpclient/model_identity_credentials_code_address.go
Normal file
192
pkg/httpclient/model_identity_credentials_code_address.go
Normal file
@@ -0,0 +1,192 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityCredentialsCodeAddress type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityCredentialsCodeAddress{}
|
||||
|
||||
// IdentityCredentialsCodeAddress struct for IdentityCredentialsCodeAddress
|
||||
type IdentityCredentialsCodeAddress struct {
|
||||
// The address for this code
|
||||
Address *string `json:"address,omitempty"`
|
||||
Channel *string `json:"channel,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityCredentialsCodeAddress IdentityCredentialsCodeAddress
|
||||
|
||||
// NewIdentityCredentialsCodeAddress instantiates a new IdentityCredentialsCodeAddress object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityCredentialsCodeAddress() *IdentityCredentialsCodeAddress {
|
||||
this := IdentityCredentialsCodeAddress{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityCredentialsCodeAddressWithDefaults instantiates a new IdentityCredentialsCodeAddress object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityCredentialsCodeAddressWithDefaults() *IdentityCredentialsCodeAddress {
|
||||
this := IdentityCredentialsCodeAddress{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAddress returns the Address field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsCodeAddress) GetAddress() string {
|
||||
if o == nil || IsNil(o.Address) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Address
|
||||
}
|
||||
|
||||
// GetAddressOk returns a tuple with the Address field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsCodeAddress) GetAddressOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Address) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Address, true
|
||||
}
|
||||
|
||||
// HasAddress returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsCodeAddress) HasAddress() bool {
|
||||
if o != nil && !IsNil(o.Address) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAddress gets a reference to the given string and assigns it to the Address field.
|
||||
func (o *IdentityCredentialsCodeAddress) SetAddress(v string) {
|
||||
o.Address = &v
|
||||
}
|
||||
|
||||
// GetChannel returns the Channel field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsCodeAddress) GetChannel() string {
|
||||
if o == nil || IsNil(o.Channel) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Channel
|
||||
}
|
||||
|
||||
// GetChannelOk returns a tuple with the Channel field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsCodeAddress) GetChannelOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Channel) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Channel, true
|
||||
}
|
||||
|
||||
// HasChannel returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsCodeAddress) HasChannel() bool {
|
||||
if o != nil && !IsNil(o.Channel) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetChannel gets a reference to the given string and assigns it to the Channel field.
|
||||
func (o *IdentityCredentialsCodeAddress) SetChannel(v string) {
|
||||
o.Channel = &v
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsCodeAddress) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsCodeAddress) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Address) {
|
||||
toSerialize["address"] = o.Address
|
||||
}
|
||||
if !IsNil(o.Channel) {
|
||||
toSerialize["channel"] = o.Channel
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityCredentialsCodeAddress) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityCredentialsCodeAddress := _IdentityCredentialsCodeAddress{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityCredentialsCodeAddress)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityCredentialsCodeAddress(varIdentityCredentialsCodeAddress)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "address")
|
||||
delete(additionalProperties, "channel")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityCredentialsCodeAddress struct {
|
||||
value *IdentityCredentialsCodeAddress
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsCodeAddress) Get() *IdentityCredentialsCodeAddress {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsCodeAddress) Set(val *IdentityCredentialsCodeAddress) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsCodeAddress) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsCodeAddress) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityCredentialsCodeAddress(val *IdentityCredentialsCodeAddress) *NullableIdentityCredentialsCodeAddress {
|
||||
return &NullableIdentityCredentialsCodeAddress{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsCodeAddress) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsCodeAddress) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
193
pkg/httpclient/model_identity_credentials_lookup_secret_code.go
Normal file
193
pkg/httpclient/model_identity_credentials_lookup_secret_code.go
Normal file
@@ -0,0 +1,193 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// checks if the IdentityCredentialsLookupSecretCode type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityCredentialsLookupSecretCode{}
|
||||
|
||||
// IdentityCredentialsLookupSecretCode Recovery codes can be used once and are invalidated after use.
|
||||
type IdentityCredentialsLookupSecretCode struct {
|
||||
// A recovery code
|
||||
Code *string `json:"code,omitempty"`
|
||||
UsedAt *time.Time `json:"used_at,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityCredentialsLookupSecretCode IdentityCredentialsLookupSecretCode
|
||||
|
||||
// NewIdentityCredentialsLookupSecretCode instantiates a new IdentityCredentialsLookupSecretCode object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityCredentialsLookupSecretCode() *IdentityCredentialsLookupSecretCode {
|
||||
this := IdentityCredentialsLookupSecretCode{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityCredentialsLookupSecretCodeWithDefaults instantiates a new IdentityCredentialsLookupSecretCode object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityCredentialsLookupSecretCodeWithDefaults() *IdentityCredentialsLookupSecretCode {
|
||||
this := IdentityCredentialsLookupSecretCode{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCode returns the Code field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsLookupSecretCode) GetCode() string {
|
||||
if o == nil || IsNil(o.Code) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Code
|
||||
}
|
||||
|
||||
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsLookupSecretCode) GetCodeOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Code) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Code, true
|
||||
}
|
||||
|
||||
// HasCode returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsLookupSecretCode) HasCode() bool {
|
||||
if o != nil && !IsNil(o.Code) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCode gets a reference to the given string and assigns it to the Code field.
|
||||
func (o *IdentityCredentialsLookupSecretCode) SetCode(v string) {
|
||||
o.Code = &v
|
||||
}
|
||||
|
||||
// GetUsedAt returns the UsedAt field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsLookupSecretCode) GetUsedAt() time.Time {
|
||||
if o == nil || IsNil(o.UsedAt) {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
return *o.UsedAt
|
||||
}
|
||||
|
||||
// GetUsedAtOk returns a tuple with the UsedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsLookupSecretCode) GetUsedAtOk() (*time.Time, bool) {
|
||||
if o == nil || IsNil(o.UsedAt) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UsedAt, true
|
||||
}
|
||||
|
||||
// HasUsedAt returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsLookupSecretCode) HasUsedAt() bool {
|
||||
if o != nil && !IsNil(o.UsedAt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUsedAt gets a reference to the given time.Time and assigns it to the UsedAt field.
|
||||
func (o *IdentityCredentialsLookupSecretCode) SetUsedAt(v time.Time) {
|
||||
o.UsedAt = &v
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsLookupSecretCode) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsLookupSecretCode) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Code) {
|
||||
toSerialize["code"] = o.Code
|
||||
}
|
||||
if !IsNil(o.UsedAt) {
|
||||
toSerialize["used_at"] = o.UsedAt
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityCredentialsLookupSecretCode) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityCredentialsLookupSecretCode := _IdentityCredentialsLookupSecretCode{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityCredentialsLookupSecretCode)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityCredentialsLookupSecretCode(varIdentityCredentialsLookupSecretCode)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "code")
|
||||
delete(additionalProperties, "used_at")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityCredentialsLookupSecretCode struct {
|
||||
value *IdentityCredentialsLookupSecretCode
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsLookupSecretCode) Get() *IdentityCredentialsLookupSecretCode {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsLookupSecretCode) Set(val *IdentityCredentialsLookupSecretCode) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsLookupSecretCode) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsLookupSecretCode) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityCredentialsLookupSecretCode(val *IdentityCredentialsLookupSecretCode) *NullableIdentityCredentialsLookupSecretCode {
|
||||
return &NullableIdentityCredentialsLookupSecretCode{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsLookupSecretCode) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsLookupSecretCode) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
154
pkg/httpclient/model_identity_credentials_oidc.go
Normal file
154
pkg/httpclient/model_identity_credentials_oidc.go
Normal file
@@ -0,0 +1,154 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityCredentialsOidc type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityCredentialsOidc{}
|
||||
|
||||
// IdentityCredentialsOidc struct for IdentityCredentialsOidc
|
||||
type IdentityCredentialsOidc struct {
|
||||
Providers []IdentityCredentialsOidcProvider `json:"providers,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityCredentialsOidc IdentityCredentialsOidc
|
||||
|
||||
// NewIdentityCredentialsOidc instantiates a new IdentityCredentialsOidc object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityCredentialsOidc() *IdentityCredentialsOidc {
|
||||
this := IdentityCredentialsOidc{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityCredentialsOidcWithDefaults instantiates a new IdentityCredentialsOidc object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityCredentialsOidcWithDefaults() *IdentityCredentialsOidc {
|
||||
this := IdentityCredentialsOidc{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetProviders returns the Providers field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsOidc) GetProviders() []IdentityCredentialsOidcProvider {
|
||||
if o == nil || IsNil(o.Providers) {
|
||||
var ret []IdentityCredentialsOidcProvider
|
||||
return ret
|
||||
}
|
||||
return o.Providers
|
||||
}
|
||||
|
||||
// GetProvidersOk returns a tuple with the Providers field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsOidc) GetProvidersOk() ([]IdentityCredentialsOidcProvider, bool) {
|
||||
if o == nil || IsNil(o.Providers) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Providers, true
|
||||
}
|
||||
|
||||
// HasProviders returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsOidc) HasProviders() bool {
|
||||
if o != nil && !IsNil(o.Providers) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetProviders gets a reference to the given []IdentityCredentialsOidcProvider and assigns it to the Providers field.
|
||||
func (o *IdentityCredentialsOidc) SetProviders(v []IdentityCredentialsOidcProvider) {
|
||||
o.Providers = v
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsOidc) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsOidc) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Providers) {
|
||||
toSerialize["providers"] = o.Providers
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityCredentialsOidc) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityCredentialsOidc := _IdentityCredentialsOidc{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityCredentialsOidc)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityCredentialsOidc(varIdentityCredentialsOidc)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "providers")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityCredentialsOidc struct {
|
||||
value *IdentityCredentialsOidc
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsOidc) Get() *IdentityCredentialsOidc {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsOidc) Set(val *IdentityCredentialsOidc) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsOidc) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsOidc) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityCredentialsOidc(val *IdentityCredentialsOidc) *NullableIdentityCredentialsOidc {
|
||||
return &NullableIdentityCredentialsOidc{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsOidc) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsOidc) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
376
pkg/httpclient/model_identity_credentials_oidc_provider.go
Normal file
376
pkg/httpclient/model_identity_credentials_oidc_provider.go
Normal file
@@ -0,0 +1,376 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityCredentialsOidcProvider type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityCredentialsOidcProvider{}
|
||||
|
||||
// IdentityCredentialsOidcProvider struct for IdentityCredentialsOidcProvider
|
||||
type IdentityCredentialsOidcProvider struct {
|
||||
InitialAccessToken *string `json:"initial_access_token,omitempty"`
|
||||
InitialIdToken *string `json:"initial_id_token,omitempty"`
|
||||
InitialRefreshToken *string `json:"initial_refresh_token,omitempty"`
|
||||
Organization *string `json:"organization,omitempty"`
|
||||
Provider *string `json:"provider,omitempty"`
|
||||
Subject *string `json:"subject,omitempty"`
|
||||
UseAutoLink *bool `json:"use_auto_link,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityCredentialsOidcProvider IdentityCredentialsOidcProvider
|
||||
|
||||
// NewIdentityCredentialsOidcProvider instantiates a new IdentityCredentialsOidcProvider object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityCredentialsOidcProvider() *IdentityCredentialsOidcProvider {
|
||||
this := IdentityCredentialsOidcProvider{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityCredentialsOidcProviderWithDefaults instantiates a new IdentityCredentialsOidcProvider object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityCredentialsOidcProviderWithDefaults() *IdentityCredentialsOidcProvider {
|
||||
this := IdentityCredentialsOidcProvider{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetInitialAccessToken returns the InitialAccessToken field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsOidcProvider) GetInitialAccessToken() string {
|
||||
if o == nil || IsNil(o.InitialAccessToken) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.InitialAccessToken
|
||||
}
|
||||
|
||||
// GetInitialAccessTokenOk returns a tuple with the InitialAccessToken field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsOidcProvider) GetInitialAccessTokenOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.InitialAccessToken) {
|
||||
return nil, false
|
||||
}
|
||||
return o.InitialAccessToken, true
|
||||
}
|
||||
|
||||
// HasInitialAccessToken returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsOidcProvider) HasInitialAccessToken() bool {
|
||||
if o != nil && !IsNil(o.InitialAccessToken) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetInitialAccessToken gets a reference to the given string and assigns it to the InitialAccessToken field.
|
||||
func (o *IdentityCredentialsOidcProvider) SetInitialAccessToken(v string) {
|
||||
o.InitialAccessToken = &v
|
||||
}
|
||||
|
||||
// GetInitialIdToken returns the InitialIdToken field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsOidcProvider) GetInitialIdToken() string {
|
||||
if o == nil || IsNil(o.InitialIdToken) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.InitialIdToken
|
||||
}
|
||||
|
||||
// GetInitialIdTokenOk returns a tuple with the InitialIdToken field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsOidcProvider) GetInitialIdTokenOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.InitialIdToken) {
|
||||
return nil, false
|
||||
}
|
||||
return o.InitialIdToken, true
|
||||
}
|
||||
|
||||
// HasInitialIdToken returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsOidcProvider) HasInitialIdToken() bool {
|
||||
if o != nil && !IsNil(o.InitialIdToken) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetInitialIdToken gets a reference to the given string and assigns it to the InitialIdToken field.
|
||||
func (o *IdentityCredentialsOidcProvider) SetInitialIdToken(v string) {
|
||||
o.InitialIdToken = &v
|
||||
}
|
||||
|
||||
// GetInitialRefreshToken returns the InitialRefreshToken field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsOidcProvider) GetInitialRefreshToken() string {
|
||||
if o == nil || IsNil(o.InitialRefreshToken) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.InitialRefreshToken
|
||||
}
|
||||
|
||||
// GetInitialRefreshTokenOk returns a tuple with the InitialRefreshToken field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsOidcProvider) GetInitialRefreshTokenOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.InitialRefreshToken) {
|
||||
return nil, false
|
||||
}
|
||||
return o.InitialRefreshToken, true
|
||||
}
|
||||
|
||||
// HasInitialRefreshToken returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsOidcProvider) HasInitialRefreshToken() bool {
|
||||
if o != nil && !IsNil(o.InitialRefreshToken) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetInitialRefreshToken gets a reference to the given string and assigns it to the InitialRefreshToken field.
|
||||
func (o *IdentityCredentialsOidcProvider) SetInitialRefreshToken(v string) {
|
||||
o.InitialRefreshToken = &v
|
||||
}
|
||||
|
||||
// GetOrganization returns the Organization field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsOidcProvider) GetOrganization() string {
|
||||
if o == nil || IsNil(o.Organization) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Organization
|
||||
}
|
||||
|
||||
// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsOidcProvider) GetOrganizationOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Organization) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Organization, true
|
||||
}
|
||||
|
||||
// HasOrganization returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsOidcProvider) HasOrganization() bool {
|
||||
if o != nil && !IsNil(o.Organization) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetOrganization gets a reference to the given string and assigns it to the Organization field.
|
||||
func (o *IdentityCredentialsOidcProvider) SetOrganization(v string) {
|
||||
o.Organization = &v
|
||||
}
|
||||
|
||||
// GetProvider returns the Provider field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsOidcProvider) GetProvider() string {
|
||||
if o == nil || IsNil(o.Provider) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Provider
|
||||
}
|
||||
|
||||
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsOidcProvider) GetProviderOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Provider) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Provider, true
|
||||
}
|
||||
|
||||
// HasProvider returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsOidcProvider) HasProvider() bool {
|
||||
if o != nil && !IsNil(o.Provider) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetProvider gets a reference to the given string and assigns it to the Provider field.
|
||||
func (o *IdentityCredentialsOidcProvider) SetProvider(v string) {
|
||||
o.Provider = &v
|
||||
}
|
||||
|
||||
// GetSubject returns the Subject field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsOidcProvider) GetSubject() string {
|
||||
if o == nil || IsNil(o.Subject) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Subject
|
||||
}
|
||||
|
||||
// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsOidcProvider) GetSubjectOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Subject) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Subject, true
|
||||
}
|
||||
|
||||
// HasSubject returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsOidcProvider) HasSubject() bool {
|
||||
if o != nil && !IsNil(o.Subject) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSubject gets a reference to the given string and assigns it to the Subject field.
|
||||
func (o *IdentityCredentialsOidcProvider) SetSubject(v string) {
|
||||
o.Subject = &v
|
||||
}
|
||||
|
||||
// GetUseAutoLink returns the UseAutoLink field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsOidcProvider) GetUseAutoLink() bool {
|
||||
if o == nil || IsNil(o.UseAutoLink) {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.UseAutoLink
|
||||
}
|
||||
|
||||
// GetUseAutoLinkOk returns a tuple with the UseAutoLink field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsOidcProvider) GetUseAutoLinkOk() (*bool, bool) {
|
||||
if o == nil || IsNil(o.UseAutoLink) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UseAutoLink, true
|
||||
}
|
||||
|
||||
// HasUseAutoLink returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsOidcProvider) HasUseAutoLink() bool {
|
||||
if o != nil && !IsNil(o.UseAutoLink) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUseAutoLink gets a reference to the given bool and assigns it to the UseAutoLink field.
|
||||
func (o *IdentityCredentialsOidcProvider) SetUseAutoLink(v bool) {
|
||||
o.UseAutoLink = &v
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsOidcProvider) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsOidcProvider) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.InitialAccessToken) {
|
||||
toSerialize["initial_access_token"] = o.InitialAccessToken
|
||||
}
|
||||
if !IsNil(o.InitialIdToken) {
|
||||
toSerialize["initial_id_token"] = o.InitialIdToken
|
||||
}
|
||||
if !IsNil(o.InitialRefreshToken) {
|
||||
toSerialize["initial_refresh_token"] = o.InitialRefreshToken
|
||||
}
|
||||
if !IsNil(o.Organization) {
|
||||
toSerialize["organization"] = o.Organization
|
||||
}
|
||||
if !IsNil(o.Provider) {
|
||||
toSerialize["provider"] = o.Provider
|
||||
}
|
||||
if !IsNil(o.Subject) {
|
||||
toSerialize["subject"] = o.Subject
|
||||
}
|
||||
if !IsNil(o.UseAutoLink) {
|
||||
toSerialize["use_auto_link"] = o.UseAutoLink
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityCredentialsOidcProvider) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityCredentialsOidcProvider := _IdentityCredentialsOidcProvider{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityCredentialsOidcProvider)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityCredentialsOidcProvider(varIdentityCredentialsOidcProvider)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "initial_access_token")
|
||||
delete(additionalProperties, "initial_id_token")
|
||||
delete(additionalProperties, "initial_refresh_token")
|
||||
delete(additionalProperties, "organization")
|
||||
delete(additionalProperties, "provider")
|
||||
delete(additionalProperties, "subject")
|
||||
delete(additionalProperties, "use_auto_link")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityCredentialsOidcProvider struct {
|
||||
value *IdentityCredentialsOidcProvider
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsOidcProvider) Get() *IdentityCredentialsOidcProvider {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsOidcProvider) Set(val *IdentityCredentialsOidcProvider) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsOidcProvider) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsOidcProvider) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityCredentialsOidcProvider(val *IdentityCredentialsOidcProvider) *NullableIdentityCredentialsOidcProvider {
|
||||
return &NullableIdentityCredentialsOidcProvider{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsOidcProvider) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsOidcProvider) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
193
pkg/httpclient/model_identity_credentials_password.go
Normal file
193
pkg/httpclient/model_identity_credentials_password.go
Normal file
@@ -0,0 +1,193 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityCredentialsPassword type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityCredentialsPassword{}
|
||||
|
||||
// IdentityCredentialsPassword struct for IdentityCredentialsPassword
|
||||
type IdentityCredentialsPassword struct {
|
||||
// HashedPassword is a hash-representation of the password.
|
||||
HashedPassword *string `json:"hashed_password,omitempty"`
|
||||
// UsePasswordMigrationHook is set to true if the password should be migrated using the password migration hook. If set, and the HashedPassword is empty, a webhook will be called during login to migrate the password.
|
||||
UsePasswordMigrationHook *bool `json:"use_password_migration_hook,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityCredentialsPassword IdentityCredentialsPassword
|
||||
|
||||
// NewIdentityCredentialsPassword instantiates a new IdentityCredentialsPassword object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityCredentialsPassword() *IdentityCredentialsPassword {
|
||||
this := IdentityCredentialsPassword{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityCredentialsPasswordWithDefaults instantiates a new IdentityCredentialsPassword object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityCredentialsPasswordWithDefaults() *IdentityCredentialsPassword {
|
||||
this := IdentityCredentialsPassword{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetHashedPassword returns the HashedPassword field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsPassword) GetHashedPassword() string {
|
||||
if o == nil || IsNil(o.HashedPassword) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.HashedPassword
|
||||
}
|
||||
|
||||
// GetHashedPasswordOk returns a tuple with the HashedPassword field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsPassword) GetHashedPasswordOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.HashedPassword) {
|
||||
return nil, false
|
||||
}
|
||||
return o.HashedPassword, true
|
||||
}
|
||||
|
||||
// HasHashedPassword returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsPassword) HasHashedPassword() bool {
|
||||
if o != nil && !IsNil(o.HashedPassword) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetHashedPassword gets a reference to the given string and assigns it to the HashedPassword field.
|
||||
func (o *IdentityCredentialsPassword) SetHashedPassword(v string) {
|
||||
o.HashedPassword = &v
|
||||
}
|
||||
|
||||
// GetUsePasswordMigrationHook returns the UsePasswordMigrationHook field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsPassword) GetUsePasswordMigrationHook() bool {
|
||||
if o == nil || IsNil(o.UsePasswordMigrationHook) {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.UsePasswordMigrationHook
|
||||
}
|
||||
|
||||
// GetUsePasswordMigrationHookOk returns a tuple with the UsePasswordMigrationHook field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsPassword) GetUsePasswordMigrationHookOk() (*bool, bool) {
|
||||
if o == nil || IsNil(o.UsePasswordMigrationHook) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UsePasswordMigrationHook, true
|
||||
}
|
||||
|
||||
// HasUsePasswordMigrationHook returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsPassword) HasUsePasswordMigrationHook() bool {
|
||||
if o != nil && !IsNil(o.UsePasswordMigrationHook) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUsePasswordMigrationHook gets a reference to the given bool and assigns it to the UsePasswordMigrationHook field.
|
||||
func (o *IdentityCredentialsPassword) SetUsePasswordMigrationHook(v bool) {
|
||||
o.UsePasswordMigrationHook = &v
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsPassword) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsPassword) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.HashedPassword) {
|
||||
toSerialize["hashed_password"] = o.HashedPassword
|
||||
}
|
||||
if !IsNil(o.UsePasswordMigrationHook) {
|
||||
toSerialize["use_password_migration_hook"] = o.UsePasswordMigrationHook
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityCredentialsPassword) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityCredentialsPassword := _IdentityCredentialsPassword{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityCredentialsPassword)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityCredentialsPassword(varIdentityCredentialsPassword)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "hashed_password")
|
||||
delete(additionalProperties, "use_password_migration_hook")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityCredentialsPassword struct {
|
||||
value *IdentityCredentialsPassword
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsPassword) Get() *IdentityCredentialsPassword {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsPassword) Set(val *IdentityCredentialsPassword) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsPassword) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsPassword) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityCredentialsPassword(val *IdentityCredentialsPassword) *NullableIdentityCredentialsPassword {
|
||||
return &NullableIdentityCredentialsPassword{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsPassword) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsPassword) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
488
pkg/httpclient/model_identity_credentials_web_authn.go
Normal file
488
pkg/httpclient/model_identity_credentials_web_authn.go
Normal file
@@ -0,0 +1,488 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// checks if the IdentityCredentialsWebAuthn type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityCredentialsWebAuthn{}
|
||||
|
||||
// IdentityCredentialsWebAuthn struct for IdentityCredentialsWebAuthn
|
||||
type IdentityCredentialsWebAuthn struct {
|
||||
AddedAt *time.Time `json:"added_at,omitempty"`
|
||||
Attestation *IdentityCredentialsWebAuthnAttestation `json:"attestation,omitempty"`
|
||||
AttestationType *string `json:"attestation_type,omitempty"`
|
||||
Authenticator *IdentityCredentialsWebAuthnAuthenticator `json:"authenticator,omitempty"`
|
||||
DisplayName *string `json:"display_name,omitempty"`
|
||||
Flags *IdentityCredentialsWebAuthnFlags `json:"flags,omitempty"`
|
||||
Id []int32 `json:"id,omitempty"`
|
||||
IsPasswordless *bool `json:"is_passwordless,omitempty"`
|
||||
PublicKey []int32 `json:"public_key,omitempty"`
|
||||
Transport []string `json:"transport,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityCredentialsWebAuthn IdentityCredentialsWebAuthn
|
||||
|
||||
// NewIdentityCredentialsWebAuthn instantiates a new IdentityCredentialsWebAuthn object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityCredentialsWebAuthn() *IdentityCredentialsWebAuthn {
|
||||
this := IdentityCredentialsWebAuthn{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityCredentialsWebAuthnWithDefaults instantiates a new IdentityCredentialsWebAuthn object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityCredentialsWebAuthnWithDefaults() *IdentityCredentialsWebAuthn {
|
||||
this := IdentityCredentialsWebAuthn{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAddedAt returns the AddedAt field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthn) GetAddedAt() time.Time {
|
||||
if o == nil || IsNil(o.AddedAt) {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
return *o.AddedAt
|
||||
}
|
||||
|
||||
// GetAddedAtOk returns a tuple with the AddedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) GetAddedAtOk() (*time.Time, bool) {
|
||||
if o == nil || IsNil(o.AddedAt) {
|
||||
return nil, false
|
||||
}
|
||||
return o.AddedAt, true
|
||||
}
|
||||
|
||||
// HasAddedAt returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) HasAddedAt() bool {
|
||||
if o != nil && !IsNil(o.AddedAt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAddedAt gets a reference to the given time.Time and assigns it to the AddedAt field.
|
||||
func (o *IdentityCredentialsWebAuthn) SetAddedAt(v time.Time) {
|
||||
o.AddedAt = &v
|
||||
}
|
||||
|
||||
// GetAttestation returns the Attestation field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthn) GetAttestation() IdentityCredentialsWebAuthnAttestation {
|
||||
if o == nil || IsNil(o.Attestation) {
|
||||
var ret IdentityCredentialsWebAuthnAttestation
|
||||
return ret
|
||||
}
|
||||
return *o.Attestation
|
||||
}
|
||||
|
||||
// GetAttestationOk returns a tuple with the Attestation field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) GetAttestationOk() (*IdentityCredentialsWebAuthnAttestation, bool) {
|
||||
if o == nil || IsNil(o.Attestation) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Attestation, true
|
||||
}
|
||||
|
||||
// HasAttestation returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) HasAttestation() bool {
|
||||
if o != nil && !IsNil(o.Attestation) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAttestation gets a reference to the given IdentityCredentialsWebAuthnAttestation and assigns it to the Attestation field.
|
||||
func (o *IdentityCredentialsWebAuthn) SetAttestation(v IdentityCredentialsWebAuthnAttestation) {
|
||||
o.Attestation = &v
|
||||
}
|
||||
|
||||
// GetAttestationType returns the AttestationType field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthn) GetAttestationType() string {
|
||||
if o == nil || IsNil(o.AttestationType) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.AttestationType
|
||||
}
|
||||
|
||||
// GetAttestationTypeOk returns a tuple with the AttestationType field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) GetAttestationTypeOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.AttestationType) {
|
||||
return nil, false
|
||||
}
|
||||
return o.AttestationType, true
|
||||
}
|
||||
|
||||
// HasAttestationType returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) HasAttestationType() bool {
|
||||
if o != nil && !IsNil(o.AttestationType) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAttestationType gets a reference to the given string and assigns it to the AttestationType field.
|
||||
func (o *IdentityCredentialsWebAuthn) SetAttestationType(v string) {
|
||||
o.AttestationType = &v
|
||||
}
|
||||
|
||||
// GetAuthenticator returns the Authenticator field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthn) GetAuthenticator() IdentityCredentialsWebAuthnAuthenticator {
|
||||
if o == nil || IsNil(o.Authenticator) {
|
||||
var ret IdentityCredentialsWebAuthnAuthenticator
|
||||
return ret
|
||||
}
|
||||
return *o.Authenticator
|
||||
}
|
||||
|
||||
// GetAuthenticatorOk returns a tuple with the Authenticator field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) GetAuthenticatorOk() (*IdentityCredentialsWebAuthnAuthenticator, bool) {
|
||||
if o == nil || IsNil(o.Authenticator) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Authenticator, true
|
||||
}
|
||||
|
||||
// HasAuthenticator returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) HasAuthenticator() bool {
|
||||
if o != nil && !IsNil(o.Authenticator) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAuthenticator gets a reference to the given IdentityCredentialsWebAuthnAuthenticator and assigns it to the Authenticator field.
|
||||
func (o *IdentityCredentialsWebAuthn) SetAuthenticator(v IdentityCredentialsWebAuthnAuthenticator) {
|
||||
o.Authenticator = &v
|
||||
}
|
||||
|
||||
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthn) GetDisplayName() string {
|
||||
if o == nil || IsNil(o.DisplayName) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.DisplayName
|
||||
}
|
||||
|
||||
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) GetDisplayNameOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.DisplayName) {
|
||||
return nil, false
|
||||
}
|
||||
return o.DisplayName, true
|
||||
}
|
||||
|
||||
// HasDisplayName returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) HasDisplayName() bool {
|
||||
if o != nil && !IsNil(o.DisplayName) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
|
||||
func (o *IdentityCredentialsWebAuthn) SetDisplayName(v string) {
|
||||
o.DisplayName = &v
|
||||
}
|
||||
|
||||
// GetFlags returns the Flags field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthn) GetFlags() IdentityCredentialsWebAuthnFlags {
|
||||
if o == nil || IsNil(o.Flags) {
|
||||
var ret IdentityCredentialsWebAuthnFlags
|
||||
return ret
|
||||
}
|
||||
return *o.Flags
|
||||
}
|
||||
|
||||
// GetFlagsOk returns a tuple with the Flags field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) GetFlagsOk() (*IdentityCredentialsWebAuthnFlags, bool) {
|
||||
if o == nil || IsNil(o.Flags) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Flags, true
|
||||
}
|
||||
|
||||
// HasFlags returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) HasFlags() bool {
|
||||
if o != nil && !IsNil(o.Flags) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetFlags gets a reference to the given IdentityCredentialsWebAuthnFlags and assigns it to the Flags field.
|
||||
func (o *IdentityCredentialsWebAuthn) SetFlags(v IdentityCredentialsWebAuthnFlags) {
|
||||
o.Flags = &v
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthn) GetId() []int32 {
|
||||
if o == nil || IsNil(o.Id) {
|
||||
var ret []int32
|
||||
return ret
|
||||
}
|
||||
return o.Id
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) GetIdOk() ([]int32, bool) {
|
||||
if o == nil || IsNil(o.Id) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Id, true
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) HasId() bool {
|
||||
if o != nil && !IsNil(o.Id) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given []int32 and assigns it to the Id field.
|
||||
func (o *IdentityCredentialsWebAuthn) SetId(v []int32) {
|
||||
o.Id = v
|
||||
}
|
||||
|
||||
// GetIsPasswordless returns the IsPasswordless field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthn) GetIsPasswordless() bool {
|
||||
if o == nil || IsNil(o.IsPasswordless) {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.IsPasswordless
|
||||
}
|
||||
|
||||
// GetIsPasswordlessOk returns a tuple with the IsPasswordless field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) GetIsPasswordlessOk() (*bool, bool) {
|
||||
if o == nil || IsNil(o.IsPasswordless) {
|
||||
return nil, false
|
||||
}
|
||||
return o.IsPasswordless, true
|
||||
}
|
||||
|
||||
// HasIsPasswordless returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) HasIsPasswordless() bool {
|
||||
if o != nil && !IsNil(o.IsPasswordless) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetIsPasswordless gets a reference to the given bool and assigns it to the IsPasswordless field.
|
||||
func (o *IdentityCredentialsWebAuthn) SetIsPasswordless(v bool) {
|
||||
o.IsPasswordless = &v
|
||||
}
|
||||
|
||||
// GetPublicKey returns the PublicKey field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthn) GetPublicKey() []int32 {
|
||||
if o == nil || IsNil(o.PublicKey) {
|
||||
var ret []int32
|
||||
return ret
|
||||
}
|
||||
return o.PublicKey
|
||||
}
|
||||
|
||||
// GetPublicKeyOk returns a tuple with the PublicKey field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) GetPublicKeyOk() ([]int32, bool) {
|
||||
if o == nil || IsNil(o.PublicKey) {
|
||||
return nil, false
|
||||
}
|
||||
return o.PublicKey, true
|
||||
}
|
||||
|
||||
// HasPublicKey returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) HasPublicKey() bool {
|
||||
if o != nil && !IsNil(o.PublicKey) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPublicKey gets a reference to the given []int32 and assigns it to the PublicKey field.
|
||||
func (o *IdentityCredentialsWebAuthn) SetPublicKey(v []int32) {
|
||||
o.PublicKey = v
|
||||
}
|
||||
|
||||
// GetTransport returns the Transport field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthn) GetTransport() []string {
|
||||
if o == nil || IsNil(o.Transport) {
|
||||
var ret []string
|
||||
return ret
|
||||
}
|
||||
return o.Transport
|
||||
}
|
||||
|
||||
// GetTransportOk returns a tuple with the Transport field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) GetTransportOk() ([]string, bool) {
|
||||
if o == nil || IsNil(o.Transport) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Transport, true
|
||||
}
|
||||
|
||||
// HasTransport returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthn) HasTransport() bool {
|
||||
if o != nil && !IsNil(o.Transport) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTransport gets a reference to the given []string and assigns it to the Transport field.
|
||||
func (o *IdentityCredentialsWebAuthn) SetTransport(v []string) {
|
||||
o.Transport = v
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsWebAuthn) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsWebAuthn) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.AddedAt) {
|
||||
toSerialize["added_at"] = o.AddedAt
|
||||
}
|
||||
if !IsNil(o.Attestation) {
|
||||
toSerialize["attestation"] = o.Attestation
|
||||
}
|
||||
if !IsNil(o.AttestationType) {
|
||||
toSerialize["attestation_type"] = o.AttestationType
|
||||
}
|
||||
if !IsNil(o.Authenticator) {
|
||||
toSerialize["authenticator"] = o.Authenticator
|
||||
}
|
||||
if !IsNil(o.DisplayName) {
|
||||
toSerialize["display_name"] = o.DisplayName
|
||||
}
|
||||
if !IsNil(o.Flags) {
|
||||
toSerialize["flags"] = o.Flags
|
||||
}
|
||||
if !IsNil(o.Id) {
|
||||
toSerialize["id"] = o.Id
|
||||
}
|
||||
if !IsNil(o.IsPasswordless) {
|
||||
toSerialize["is_passwordless"] = o.IsPasswordless
|
||||
}
|
||||
if !IsNil(o.PublicKey) {
|
||||
toSerialize["public_key"] = o.PublicKey
|
||||
}
|
||||
if !IsNil(o.Transport) {
|
||||
toSerialize["transport"] = o.Transport
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityCredentialsWebAuthn) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityCredentialsWebAuthn := _IdentityCredentialsWebAuthn{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityCredentialsWebAuthn)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityCredentialsWebAuthn(varIdentityCredentialsWebAuthn)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "added_at")
|
||||
delete(additionalProperties, "attestation")
|
||||
delete(additionalProperties, "attestation_type")
|
||||
delete(additionalProperties, "authenticator")
|
||||
delete(additionalProperties, "display_name")
|
||||
delete(additionalProperties, "flags")
|
||||
delete(additionalProperties, "id")
|
||||
delete(additionalProperties, "is_passwordless")
|
||||
delete(additionalProperties, "public_key")
|
||||
delete(additionalProperties, "transport")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityCredentialsWebAuthn struct {
|
||||
value *IdentityCredentialsWebAuthn
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsWebAuthn) Get() *IdentityCredentialsWebAuthn {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsWebAuthn) Set(val *IdentityCredentialsWebAuthn) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsWebAuthn) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsWebAuthn) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityCredentialsWebAuthn(val *IdentityCredentialsWebAuthn) *NullableIdentityCredentialsWebAuthn {
|
||||
return &NullableIdentityCredentialsWebAuthn{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsWebAuthn) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsWebAuthn) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
@@ -0,0 +1,302 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityCredentialsWebAuthnAttestation type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityCredentialsWebAuthnAttestation{}
|
||||
|
||||
// IdentityCredentialsWebAuthnAttestation struct for IdentityCredentialsWebAuthnAttestation
|
||||
type IdentityCredentialsWebAuthnAttestation struct {
|
||||
AuthenticatorData []int32 `json:"authenticator_data,omitempty"`
|
||||
ClientDataJSON []int32 `json:"client_dataJSON,omitempty"`
|
||||
ClientDataHash []int32 `json:"client_data_hash,omitempty"`
|
||||
Object []int32 `json:"object,omitempty"`
|
||||
PublicKeyAlgorithm *int64 `json:"public_key_algorithm,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityCredentialsWebAuthnAttestation IdentityCredentialsWebAuthnAttestation
|
||||
|
||||
// NewIdentityCredentialsWebAuthnAttestation instantiates a new IdentityCredentialsWebAuthnAttestation object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityCredentialsWebAuthnAttestation() *IdentityCredentialsWebAuthnAttestation {
|
||||
this := IdentityCredentialsWebAuthnAttestation{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityCredentialsWebAuthnAttestationWithDefaults instantiates a new IdentityCredentialsWebAuthnAttestation object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityCredentialsWebAuthnAttestationWithDefaults() *IdentityCredentialsWebAuthnAttestation {
|
||||
this := IdentityCredentialsWebAuthnAttestation{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAuthenticatorData returns the AuthenticatorData field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) GetAuthenticatorData() []int32 {
|
||||
if o == nil || IsNil(o.AuthenticatorData) {
|
||||
var ret []int32
|
||||
return ret
|
||||
}
|
||||
return o.AuthenticatorData
|
||||
}
|
||||
|
||||
// GetAuthenticatorDataOk returns a tuple with the AuthenticatorData field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) GetAuthenticatorDataOk() ([]int32, bool) {
|
||||
if o == nil || IsNil(o.AuthenticatorData) {
|
||||
return nil, false
|
||||
}
|
||||
return o.AuthenticatorData, true
|
||||
}
|
||||
|
||||
// HasAuthenticatorData returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) HasAuthenticatorData() bool {
|
||||
if o != nil && !IsNil(o.AuthenticatorData) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAuthenticatorData gets a reference to the given []int32 and assigns it to the AuthenticatorData field.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) SetAuthenticatorData(v []int32) {
|
||||
o.AuthenticatorData = v
|
||||
}
|
||||
|
||||
// GetClientDataJSON returns the ClientDataJSON field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) GetClientDataJSON() []int32 {
|
||||
if o == nil || IsNil(o.ClientDataJSON) {
|
||||
var ret []int32
|
||||
return ret
|
||||
}
|
||||
return o.ClientDataJSON
|
||||
}
|
||||
|
||||
// GetClientDataJSONOk returns a tuple with the ClientDataJSON field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) GetClientDataJSONOk() ([]int32, bool) {
|
||||
if o == nil || IsNil(o.ClientDataJSON) {
|
||||
return nil, false
|
||||
}
|
||||
return o.ClientDataJSON, true
|
||||
}
|
||||
|
||||
// HasClientDataJSON returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) HasClientDataJSON() bool {
|
||||
if o != nil && !IsNil(o.ClientDataJSON) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetClientDataJSON gets a reference to the given []int32 and assigns it to the ClientDataJSON field.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) SetClientDataJSON(v []int32) {
|
||||
o.ClientDataJSON = v
|
||||
}
|
||||
|
||||
// GetClientDataHash returns the ClientDataHash field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) GetClientDataHash() []int32 {
|
||||
if o == nil || IsNil(o.ClientDataHash) {
|
||||
var ret []int32
|
||||
return ret
|
||||
}
|
||||
return o.ClientDataHash
|
||||
}
|
||||
|
||||
// GetClientDataHashOk returns a tuple with the ClientDataHash field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) GetClientDataHashOk() ([]int32, bool) {
|
||||
if o == nil || IsNil(o.ClientDataHash) {
|
||||
return nil, false
|
||||
}
|
||||
return o.ClientDataHash, true
|
||||
}
|
||||
|
||||
// HasClientDataHash returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) HasClientDataHash() bool {
|
||||
if o != nil && !IsNil(o.ClientDataHash) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetClientDataHash gets a reference to the given []int32 and assigns it to the ClientDataHash field.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) SetClientDataHash(v []int32) {
|
||||
o.ClientDataHash = v
|
||||
}
|
||||
|
||||
// GetObject returns the Object field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) GetObject() []int32 {
|
||||
if o == nil || IsNil(o.Object) {
|
||||
var ret []int32
|
||||
return ret
|
||||
}
|
||||
return o.Object
|
||||
}
|
||||
|
||||
// GetObjectOk returns a tuple with the Object field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) GetObjectOk() ([]int32, bool) {
|
||||
if o == nil || IsNil(o.Object) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Object, true
|
||||
}
|
||||
|
||||
// HasObject returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) HasObject() bool {
|
||||
if o != nil && !IsNil(o.Object) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetObject gets a reference to the given []int32 and assigns it to the Object field.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) SetObject(v []int32) {
|
||||
o.Object = v
|
||||
}
|
||||
|
||||
// GetPublicKeyAlgorithm returns the PublicKeyAlgorithm field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) GetPublicKeyAlgorithm() int64 {
|
||||
if o == nil || IsNil(o.PublicKeyAlgorithm) {
|
||||
var ret int64
|
||||
return ret
|
||||
}
|
||||
return *o.PublicKeyAlgorithm
|
||||
}
|
||||
|
||||
// GetPublicKeyAlgorithmOk returns a tuple with the PublicKeyAlgorithm field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) GetPublicKeyAlgorithmOk() (*int64, bool) {
|
||||
if o == nil || IsNil(o.PublicKeyAlgorithm) {
|
||||
return nil, false
|
||||
}
|
||||
return o.PublicKeyAlgorithm, true
|
||||
}
|
||||
|
||||
// HasPublicKeyAlgorithm returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) HasPublicKeyAlgorithm() bool {
|
||||
if o != nil && !IsNil(o.PublicKeyAlgorithm) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPublicKeyAlgorithm gets a reference to the given int64 and assigns it to the PublicKeyAlgorithm field.
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) SetPublicKeyAlgorithm(v int64) {
|
||||
o.PublicKeyAlgorithm = &v
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsWebAuthnAttestation) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsWebAuthnAttestation) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.AuthenticatorData) {
|
||||
toSerialize["authenticator_data"] = o.AuthenticatorData
|
||||
}
|
||||
if !IsNil(o.ClientDataJSON) {
|
||||
toSerialize["client_dataJSON"] = o.ClientDataJSON
|
||||
}
|
||||
if !IsNil(o.ClientDataHash) {
|
||||
toSerialize["client_data_hash"] = o.ClientDataHash
|
||||
}
|
||||
if !IsNil(o.Object) {
|
||||
toSerialize["object"] = o.Object
|
||||
}
|
||||
if !IsNil(o.PublicKeyAlgorithm) {
|
||||
toSerialize["public_key_algorithm"] = o.PublicKeyAlgorithm
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityCredentialsWebAuthnAttestation) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityCredentialsWebAuthnAttestation := _IdentityCredentialsWebAuthnAttestation{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityCredentialsWebAuthnAttestation)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityCredentialsWebAuthnAttestation(varIdentityCredentialsWebAuthnAttestation)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "authenticator_data")
|
||||
delete(additionalProperties, "client_dataJSON")
|
||||
delete(additionalProperties, "client_data_hash")
|
||||
delete(additionalProperties, "object")
|
||||
delete(additionalProperties, "public_key_algorithm")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityCredentialsWebAuthnAttestation struct {
|
||||
value *IdentityCredentialsWebAuthnAttestation
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsWebAuthnAttestation) Get() *IdentityCredentialsWebAuthnAttestation {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsWebAuthnAttestation) Set(val *IdentityCredentialsWebAuthnAttestation) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsWebAuthnAttestation) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsWebAuthnAttestation) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityCredentialsWebAuthnAttestation(val *IdentityCredentialsWebAuthnAttestation) *NullableIdentityCredentialsWebAuthnAttestation {
|
||||
return &NullableIdentityCredentialsWebAuthnAttestation{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsWebAuthnAttestation) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsWebAuthnAttestation) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
@@ -0,0 +1,228 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityCredentialsWebAuthnAuthenticator type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityCredentialsWebAuthnAuthenticator{}
|
||||
|
||||
// IdentityCredentialsWebAuthnAuthenticator struct for IdentityCredentialsWebAuthnAuthenticator
|
||||
type IdentityCredentialsWebAuthnAuthenticator struct {
|
||||
Aaguid []int32 `json:"aaguid,omitempty"`
|
||||
CloneWarning *bool `json:"clone_warning,omitempty"`
|
||||
SignCount *int32 `json:"sign_count,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityCredentialsWebAuthnAuthenticator IdentityCredentialsWebAuthnAuthenticator
|
||||
|
||||
// NewIdentityCredentialsWebAuthnAuthenticator instantiates a new IdentityCredentialsWebAuthnAuthenticator object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityCredentialsWebAuthnAuthenticator() *IdentityCredentialsWebAuthnAuthenticator {
|
||||
this := IdentityCredentialsWebAuthnAuthenticator{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityCredentialsWebAuthnAuthenticatorWithDefaults instantiates a new IdentityCredentialsWebAuthnAuthenticator object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityCredentialsWebAuthnAuthenticatorWithDefaults() *IdentityCredentialsWebAuthnAuthenticator {
|
||||
this := IdentityCredentialsWebAuthnAuthenticator{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAaguid returns the Aaguid field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthnAuthenticator) GetAaguid() []int32 {
|
||||
if o == nil || IsNil(o.Aaguid) {
|
||||
var ret []int32
|
||||
return ret
|
||||
}
|
||||
return o.Aaguid
|
||||
}
|
||||
|
||||
// GetAaguidOk returns a tuple with the Aaguid field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthnAuthenticator) GetAaguidOk() ([]int32, bool) {
|
||||
if o == nil || IsNil(o.Aaguid) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Aaguid, true
|
||||
}
|
||||
|
||||
// HasAaguid returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthnAuthenticator) HasAaguid() bool {
|
||||
if o != nil && !IsNil(o.Aaguid) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAaguid gets a reference to the given []int32 and assigns it to the Aaguid field.
|
||||
func (o *IdentityCredentialsWebAuthnAuthenticator) SetAaguid(v []int32) {
|
||||
o.Aaguid = v
|
||||
}
|
||||
|
||||
// GetCloneWarning returns the CloneWarning field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthnAuthenticator) GetCloneWarning() bool {
|
||||
if o == nil || IsNil(o.CloneWarning) {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.CloneWarning
|
||||
}
|
||||
|
||||
// GetCloneWarningOk returns a tuple with the CloneWarning field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthnAuthenticator) GetCloneWarningOk() (*bool, bool) {
|
||||
if o == nil || IsNil(o.CloneWarning) {
|
||||
return nil, false
|
||||
}
|
||||
return o.CloneWarning, true
|
||||
}
|
||||
|
||||
// HasCloneWarning returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthnAuthenticator) HasCloneWarning() bool {
|
||||
if o != nil && !IsNil(o.CloneWarning) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCloneWarning gets a reference to the given bool and assigns it to the CloneWarning field.
|
||||
func (o *IdentityCredentialsWebAuthnAuthenticator) SetCloneWarning(v bool) {
|
||||
o.CloneWarning = &v
|
||||
}
|
||||
|
||||
// GetSignCount returns the SignCount field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthnAuthenticator) GetSignCount() int32 {
|
||||
if o == nil || IsNil(o.SignCount) {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.SignCount
|
||||
}
|
||||
|
||||
// GetSignCountOk returns a tuple with the SignCount field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthnAuthenticator) GetSignCountOk() (*int32, bool) {
|
||||
if o == nil || IsNil(o.SignCount) {
|
||||
return nil, false
|
||||
}
|
||||
return o.SignCount, true
|
||||
}
|
||||
|
||||
// HasSignCount returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthnAuthenticator) HasSignCount() bool {
|
||||
if o != nil && !IsNil(o.SignCount) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSignCount gets a reference to the given int32 and assigns it to the SignCount field.
|
||||
func (o *IdentityCredentialsWebAuthnAuthenticator) SetSignCount(v int32) {
|
||||
o.SignCount = &v
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsWebAuthnAuthenticator) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsWebAuthnAuthenticator) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Aaguid) {
|
||||
toSerialize["aaguid"] = o.Aaguid
|
||||
}
|
||||
if !IsNil(o.CloneWarning) {
|
||||
toSerialize["clone_warning"] = o.CloneWarning
|
||||
}
|
||||
if !IsNil(o.SignCount) {
|
||||
toSerialize["sign_count"] = o.SignCount
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityCredentialsWebAuthnAuthenticator) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityCredentialsWebAuthnAuthenticator := _IdentityCredentialsWebAuthnAuthenticator{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityCredentialsWebAuthnAuthenticator)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityCredentialsWebAuthnAuthenticator(varIdentityCredentialsWebAuthnAuthenticator)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "aaguid")
|
||||
delete(additionalProperties, "clone_warning")
|
||||
delete(additionalProperties, "sign_count")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityCredentialsWebAuthnAuthenticator struct {
|
||||
value *IdentityCredentialsWebAuthnAuthenticator
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsWebAuthnAuthenticator) Get() *IdentityCredentialsWebAuthnAuthenticator {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsWebAuthnAuthenticator) Set(val *IdentityCredentialsWebAuthnAuthenticator) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsWebAuthnAuthenticator) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsWebAuthnAuthenticator) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityCredentialsWebAuthnAuthenticator(val *IdentityCredentialsWebAuthnAuthenticator) *NullableIdentityCredentialsWebAuthnAuthenticator {
|
||||
return &NullableIdentityCredentialsWebAuthnAuthenticator{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsWebAuthnAuthenticator) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsWebAuthnAuthenticator) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
265
pkg/httpclient/model_identity_credentials_web_authn_flags.go
Normal file
265
pkg/httpclient/model_identity_credentials_web_authn_flags.go
Normal file
@@ -0,0 +1,265 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityCredentialsWebAuthnFlags type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityCredentialsWebAuthnFlags{}
|
||||
|
||||
// IdentityCredentialsWebAuthnFlags struct for IdentityCredentialsWebAuthnFlags
|
||||
type IdentityCredentialsWebAuthnFlags struct {
|
||||
BackupEligible *bool `json:"backup_eligible,omitempty"`
|
||||
BackupState *bool `json:"backup_state,omitempty"`
|
||||
UserPresent *bool `json:"user_present,omitempty"`
|
||||
UserVerified *bool `json:"user_verified,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityCredentialsWebAuthnFlags IdentityCredentialsWebAuthnFlags
|
||||
|
||||
// NewIdentityCredentialsWebAuthnFlags instantiates a new IdentityCredentialsWebAuthnFlags object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityCredentialsWebAuthnFlags() *IdentityCredentialsWebAuthnFlags {
|
||||
this := IdentityCredentialsWebAuthnFlags{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityCredentialsWebAuthnFlagsWithDefaults instantiates a new IdentityCredentialsWebAuthnFlags object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityCredentialsWebAuthnFlagsWithDefaults() *IdentityCredentialsWebAuthnFlags {
|
||||
this := IdentityCredentialsWebAuthnFlags{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetBackupEligible returns the BackupEligible field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthnFlags) GetBackupEligible() bool {
|
||||
if o == nil || IsNil(o.BackupEligible) {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.BackupEligible
|
||||
}
|
||||
|
||||
// GetBackupEligibleOk returns a tuple with the BackupEligible field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthnFlags) GetBackupEligibleOk() (*bool, bool) {
|
||||
if o == nil || IsNil(o.BackupEligible) {
|
||||
return nil, false
|
||||
}
|
||||
return o.BackupEligible, true
|
||||
}
|
||||
|
||||
// HasBackupEligible returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthnFlags) HasBackupEligible() bool {
|
||||
if o != nil && !IsNil(o.BackupEligible) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetBackupEligible gets a reference to the given bool and assigns it to the BackupEligible field.
|
||||
func (o *IdentityCredentialsWebAuthnFlags) SetBackupEligible(v bool) {
|
||||
o.BackupEligible = &v
|
||||
}
|
||||
|
||||
// GetBackupState returns the BackupState field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthnFlags) GetBackupState() bool {
|
||||
if o == nil || IsNil(o.BackupState) {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.BackupState
|
||||
}
|
||||
|
||||
// GetBackupStateOk returns a tuple with the BackupState field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthnFlags) GetBackupStateOk() (*bool, bool) {
|
||||
if o == nil || IsNil(o.BackupState) {
|
||||
return nil, false
|
||||
}
|
||||
return o.BackupState, true
|
||||
}
|
||||
|
||||
// HasBackupState returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthnFlags) HasBackupState() bool {
|
||||
if o != nil && !IsNil(o.BackupState) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetBackupState gets a reference to the given bool and assigns it to the BackupState field.
|
||||
func (o *IdentityCredentialsWebAuthnFlags) SetBackupState(v bool) {
|
||||
o.BackupState = &v
|
||||
}
|
||||
|
||||
// GetUserPresent returns the UserPresent field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthnFlags) GetUserPresent() bool {
|
||||
if o == nil || IsNil(o.UserPresent) {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.UserPresent
|
||||
}
|
||||
|
||||
// GetUserPresentOk returns a tuple with the UserPresent field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthnFlags) GetUserPresentOk() (*bool, bool) {
|
||||
if o == nil || IsNil(o.UserPresent) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UserPresent, true
|
||||
}
|
||||
|
||||
// HasUserPresent returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthnFlags) HasUserPresent() bool {
|
||||
if o != nil && !IsNil(o.UserPresent) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUserPresent gets a reference to the given bool and assigns it to the UserPresent field.
|
||||
func (o *IdentityCredentialsWebAuthnFlags) SetUserPresent(v bool) {
|
||||
o.UserPresent = &v
|
||||
}
|
||||
|
||||
// GetUserVerified returns the UserVerified field value if set, zero value otherwise.
|
||||
func (o *IdentityCredentialsWebAuthnFlags) GetUserVerified() bool {
|
||||
if o == nil || IsNil(o.UserVerified) {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.UserVerified
|
||||
}
|
||||
|
||||
// GetUserVerifiedOk returns a tuple with the UserVerified field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityCredentialsWebAuthnFlags) GetUserVerifiedOk() (*bool, bool) {
|
||||
if o == nil || IsNil(o.UserVerified) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UserVerified, true
|
||||
}
|
||||
|
||||
// HasUserVerified returns a boolean if a field has been set.
|
||||
func (o *IdentityCredentialsWebAuthnFlags) HasUserVerified() bool {
|
||||
if o != nil && !IsNil(o.UserVerified) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUserVerified gets a reference to the given bool and assigns it to the UserVerified field.
|
||||
func (o *IdentityCredentialsWebAuthnFlags) SetUserVerified(v bool) {
|
||||
o.UserVerified = &v
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsWebAuthnFlags) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityCredentialsWebAuthnFlags) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.BackupEligible) {
|
||||
toSerialize["backup_eligible"] = o.BackupEligible
|
||||
}
|
||||
if !IsNil(o.BackupState) {
|
||||
toSerialize["backup_state"] = o.BackupState
|
||||
}
|
||||
if !IsNil(o.UserPresent) {
|
||||
toSerialize["user_present"] = o.UserPresent
|
||||
}
|
||||
if !IsNil(o.UserVerified) {
|
||||
toSerialize["user_verified"] = o.UserVerified
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityCredentialsWebAuthnFlags) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityCredentialsWebAuthnFlags := _IdentityCredentialsWebAuthnFlags{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityCredentialsWebAuthnFlags)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityCredentialsWebAuthnFlags(varIdentityCredentialsWebAuthnFlags)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "backup_eligible")
|
||||
delete(additionalProperties, "backup_state")
|
||||
delete(additionalProperties, "user_present")
|
||||
delete(additionalProperties, "user_verified")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityCredentialsWebAuthnFlags struct {
|
||||
value *IdentityCredentialsWebAuthnFlags
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsWebAuthnFlags) Get() *IdentityCredentialsWebAuthnFlags {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsWebAuthnFlags) Set(val *IdentityCredentialsWebAuthnFlags) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsWebAuthnFlags) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsWebAuthnFlags) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityCredentialsWebAuthnFlags(val *IdentityCredentialsWebAuthnFlags) *NullableIdentityCredentialsWebAuthnFlags {
|
||||
return &NullableIdentityCredentialsWebAuthnFlags{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityCredentialsWebAuthnFlags) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityCredentialsWebAuthnFlags) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
192
pkg/httpclient/model_identity_patch.go
Normal file
192
pkg/httpclient/model_identity_patch.go
Normal file
@@ -0,0 +1,192 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityPatch type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityPatch{}
|
||||
|
||||
// IdentityPatch Payload for patching an identity
|
||||
type IdentityPatch struct {
|
||||
Create *CreateIdentityBody `json:"create,omitempty"`
|
||||
// The ID of this patch. The patch ID is optional. If specified, the ID will be returned in the response, so consumers of this API can correlate the response with the patch.
|
||||
PatchId *string `json:"patch_id,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityPatch IdentityPatch
|
||||
|
||||
// NewIdentityPatch instantiates a new IdentityPatch object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityPatch() *IdentityPatch {
|
||||
this := IdentityPatch{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityPatchWithDefaults instantiates a new IdentityPatch object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityPatchWithDefaults() *IdentityPatch {
|
||||
this := IdentityPatch{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCreate returns the Create field value if set, zero value otherwise.
|
||||
func (o *IdentityPatch) GetCreate() CreateIdentityBody {
|
||||
if o == nil || IsNil(o.Create) {
|
||||
var ret CreateIdentityBody
|
||||
return ret
|
||||
}
|
||||
return *o.Create
|
||||
}
|
||||
|
||||
// GetCreateOk returns a tuple with the Create field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityPatch) GetCreateOk() (*CreateIdentityBody, bool) {
|
||||
if o == nil || IsNil(o.Create) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Create, true
|
||||
}
|
||||
|
||||
// HasCreate returns a boolean if a field has been set.
|
||||
func (o *IdentityPatch) HasCreate() bool {
|
||||
if o != nil && !IsNil(o.Create) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCreate gets a reference to the given CreateIdentityBody and assigns it to the Create field.
|
||||
func (o *IdentityPatch) SetCreate(v CreateIdentityBody) {
|
||||
o.Create = &v
|
||||
}
|
||||
|
||||
// GetPatchId returns the PatchId field value if set, zero value otherwise.
|
||||
func (o *IdentityPatch) GetPatchId() string {
|
||||
if o == nil || IsNil(o.PatchId) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.PatchId
|
||||
}
|
||||
|
||||
// GetPatchIdOk returns a tuple with the PatchId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityPatch) GetPatchIdOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.PatchId) {
|
||||
return nil, false
|
||||
}
|
||||
return o.PatchId, true
|
||||
}
|
||||
|
||||
// HasPatchId returns a boolean if a field has been set.
|
||||
func (o *IdentityPatch) HasPatchId() bool {
|
||||
if o != nil && !IsNil(o.PatchId) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPatchId gets a reference to the given string and assigns it to the PatchId field.
|
||||
func (o *IdentityPatch) SetPatchId(v string) {
|
||||
o.PatchId = &v
|
||||
}
|
||||
|
||||
func (o IdentityPatch) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityPatch) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Create) {
|
||||
toSerialize["create"] = o.Create
|
||||
}
|
||||
if !IsNil(o.PatchId) {
|
||||
toSerialize["patch_id"] = o.PatchId
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityPatch) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityPatch := _IdentityPatch{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityPatch)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityPatch(varIdentityPatch)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "create")
|
||||
delete(additionalProperties, "patch_id")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityPatch struct {
|
||||
value *IdentityPatch
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityPatch) Get() *IdentityPatch {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityPatch) Set(val *IdentityPatch) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityPatch) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityPatch) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityPatch(val *IdentityPatch) *NullableIdentityPatch {
|
||||
return &NullableIdentityPatch{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityPatch) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityPatch) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
270
pkg/httpclient/model_identity_patch_response.go
Normal file
270
pkg/httpclient/model_identity_patch_response.go
Normal file
@@ -0,0 +1,270 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityPatchResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityPatchResponse{}
|
||||
|
||||
// IdentityPatchResponse Response for a single identity patch
|
||||
type IdentityPatchResponse struct {
|
||||
// The action for this specific patch create ActionCreate Create this identity. error ActionError Error indicates that the patch failed.
|
||||
Action *string `json:"action,omitempty"`
|
||||
// From https://go.dev/wiki/CodeReviewComments#receiver-type: > Can function or methods, either concurrently or when called from this method, be mutating the receiver? A value type creates a copy of the receiver when the method is invoked, so outside updates will not be applied to this receiver. If changes must be visible in the original receiver, the receiver must be a pointer. > If the receiver is a struct, array or slice and any of its elements is a pointer to something that might be mutating, > prefer a pointer receiver, as it will make the intention clearer to the reader. > Don’t mix receiver types. Choose either pointers or struct types for all available methods.
|
||||
Error interface{} `json:"error,omitempty"`
|
||||
// The identity ID payload of this patch
|
||||
Identity *string `json:"identity,omitempty"`
|
||||
// The ID of this patch response, if an ID was specified in the patch.
|
||||
PatchId *string `json:"patch_id,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityPatchResponse IdentityPatchResponse
|
||||
|
||||
// NewIdentityPatchResponse instantiates a new IdentityPatchResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityPatchResponse() *IdentityPatchResponse {
|
||||
this := IdentityPatchResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityPatchResponseWithDefaults instantiates a new IdentityPatchResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityPatchResponseWithDefaults() *IdentityPatchResponse {
|
||||
this := IdentityPatchResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAction returns the Action field value if set, zero value otherwise.
|
||||
func (o *IdentityPatchResponse) GetAction() string {
|
||||
if o == nil || IsNil(o.Action) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Action
|
||||
}
|
||||
|
||||
// GetActionOk returns a tuple with the Action field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityPatchResponse) GetActionOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Action) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Action, true
|
||||
}
|
||||
|
||||
// HasAction returns a boolean if a field has been set.
|
||||
func (o *IdentityPatchResponse) HasAction() bool {
|
||||
if o != nil && !IsNil(o.Action) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAction gets a reference to the given string and assigns it to the Action field.
|
||||
func (o *IdentityPatchResponse) SetAction(v string) {
|
||||
o.Action = &v
|
||||
}
|
||||
|
||||
// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *IdentityPatchResponse) GetError() interface{} {
|
||||
if o == nil {
|
||||
var ret interface{}
|
||||
return ret
|
||||
}
|
||||
return o.Error
|
||||
}
|
||||
|
||||
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *IdentityPatchResponse) GetErrorOk() (*interface{}, bool) {
|
||||
if o == nil || IsNil(o.Error) {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Error, true
|
||||
}
|
||||
|
||||
// HasError returns a boolean if a field has been set.
|
||||
func (o *IdentityPatchResponse) HasError() bool {
|
||||
if o != nil && !IsNil(o.Error) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetError gets a reference to the given interface{} and assigns it to the Error field.
|
||||
func (o *IdentityPatchResponse) SetError(v interface{}) {
|
||||
o.Error = v
|
||||
}
|
||||
|
||||
// GetIdentity returns the Identity field value if set, zero value otherwise.
|
||||
func (o *IdentityPatchResponse) GetIdentity() string {
|
||||
if o == nil || IsNil(o.Identity) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Identity
|
||||
}
|
||||
|
||||
// GetIdentityOk returns a tuple with the Identity field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityPatchResponse) GetIdentityOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Identity) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Identity, true
|
||||
}
|
||||
|
||||
// HasIdentity returns a boolean if a field has been set.
|
||||
func (o *IdentityPatchResponse) HasIdentity() bool {
|
||||
if o != nil && !IsNil(o.Identity) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetIdentity gets a reference to the given string and assigns it to the Identity field.
|
||||
func (o *IdentityPatchResponse) SetIdentity(v string) {
|
||||
o.Identity = &v
|
||||
}
|
||||
|
||||
// GetPatchId returns the PatchId field value if set, zero value otherwise.
|
||||
func (o *IdentityPatchResponse) GetPatchId() string {
|
||||
if o == nil || IsNil(o.PatchId) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.PatchId
|
||||
}
|
||||
|
||||
// GetPatchIdOk returns a tuple with the PatchId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityPatchResponse) GetPatchIdOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.PatchId) {
|
||||
return nil, false
|
||||
}
|
||||
return o.PatchId, true
|
||||
}
|
||||
|
||||
// HasPatchId returns a boolean if a field has been set.
|
||||
func (o *IdentityPatchResponse) HasPatchId() bool {
|
||||
if o != nil && !IsNil(o.PatchId) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPatchId gets a reference to the given string and assigns it to the PatchId field.
|
||||
func (o *IdentityPatchResponse) SetPatchId(v string) {
|
||||
o.PatchId = &v
|
||||
}
|
||||
|
||||
func (o IdentityPatchResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityPatchResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Action) {
|
||||
toSerialize["action"] = o.Action
|
||||
}
|
||||
if o.Error != nil {
|
||||
toSerialize["error"] = o.Error
|
||||
}
|
||||
if !IsNil(o.Identity) {
|
||||
toSerialize["identity"] = o.Identity
|
||||
}
|
||||
if !IsNil(o.PatchId) {
|
||||
toSerialize["patch_id"] = o.PatchId
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityPatchResponse) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityPatchResponse := _IdentityPatchResponse{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityPatchResponse)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityPatchResponse(varIdentityPatchResponse)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "action")
|
||||
delete(additionalProperties, "error")
|
||||
delete(additionalProperties, "identity")
|
||||
delete(additionalProperties, "patch_id")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityPatchResponse struct {
|
||||
value *IdentityPatchResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityPatchResponse) Get() *IdentityPatchResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityPatchResponse) Set(val *IdentityPatchResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityPatchResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityPatchResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityPatchResponse(val *IdentityPatchResponse) *NullableIdentityPatchResponse {
|
||||
return &NullableIdentityPatchResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityPatchResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityPatchResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
198
pkg/httpclient/model_identity_schema_container.go
Normal file
198
pkg/httpclient/model_identity_schema_container.go
Normal file
@@ -0,0 +1,198 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the IdentitySchemaContainer type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentitySchemaContainer{}
|
||||
|
||||
// IdentitySchemaContainer An Identity JSON Schema Container
|
||||
type IdentitySchemaContainer struct {
|
||||
// The ID of the Identity JSON Schema
|
||||
Id string `json:"id"`
|
||||
// The actual Identity JSON Schema
|
||||
Schema map[string]interface{} `json:"schema"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentitySchemaContainer IdentitySchemaContainer
|
||||
|
||||
// NewIdentitySchemaContainer instantiates a new IdentitySchemaContainer object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentitySchemaContainer(id string, schema map[string]interface{}) *IdentitySchemaContainer {
|
||||
this := IdentitySchemaContainer{}
|
||||
this.Id = id
|
||||
this.Schema = schema
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentitySchemaContainerWithDefaults instantiates a new IdentitySchemaContainer object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentitySchemaContainerWithDefaults() *IdentitySchemaContainer {
|
||||
this := IdentitySchemaContainer{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *IdentitySchemaContainer) GetId() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Id
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentitySchemaContainer) GetIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Id, true
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *IdentitySchemaContainer) SetId(v string) {
|
||||
o.Id = v
|
||||
}
|
||||
|
||||
// GetSchema returns the Schema field value
|
||||
func (o *IdentitySchemaContainer) GetSchema() map[string]interface{} {
|
||||
if o == nil {
|
||||
var ret map[string]interface{}
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Schema
|
||||
}
|
||||
|
||||
// GetSchemaOk returns a tuple with the Schema field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentitySchemaContainer) GetSchemaOk() (map[string]interface{}, bool) {
|
||||
if o == nil {
|
||||
return map[string]interface{}{}, false
|
||||
}
|
||||
return o.Schema, true
|
||||
}
|
||||
|
||||
// SetSchema sets field value
|
||||
func (o *IdentitySchemaContainer) SetSchema(v map[string]interface{}) {
|
||||
o.Schema = v
|
||||
}
|
||||
|
||||
func (o IdentitySchemaContainer) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentitySchemaContainer) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["id"] = o.Id
|
||||
toSerialize["schema"] = o.Schema
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentitySchemaContainer) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"id",
|
||||
"schema",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varIdentitySchemaContainer := _IdentitySchemaContainer{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentitySchemaContainer)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentitySchemaContainer(varIdentitySchemaContainer)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "id")
|
||||
delete(additionalProperties, "schema")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentitySchemaContainer struct {
|
||||
value *IdentitySchemaContainer
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentitySchemaContainer) Get() *IdentitySchemaContainer {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentitySchemaContainer) Set(val *IdentitySchemaContainer) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentitySchemaContainer) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentitySchemaContainer) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentitySchemaContainer(val *IdentitySchemaContainer) *NullableIdentitySchemaContainer {
|
||||
return &NullableIdentitySchemaContainer{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentitySchemaContainer) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentitySchemaContainer) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
376
pkg/httpclient/model_identity_with_credentials.go
Normal file
376
pkg/httpclient/model_identity_with_credentials.go
Normal file
@@ -0,0 +1,376 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityWithCredentials type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityWithCredentials{}
|
||||
|
||||
// IdentityWithCredentials Create Identity and Import Credentials
|
||||
type IdentityWithCredentials struct {
|
||||
LookupSecret *AdminIdentityImportCredentialsLookupSecret `json:"lookup_secret,omitempty"`
|
||||
Oidc *IdentityWithCredentialsOidc `json:"oidc,omitempty"`
|
||||
Passkey *IdentityWithCredentialsPasskey `json:"passkey,omitempty"`
|
||||
Password *IdentityWithCredentialsPassword `json:"password,omitempty"`
|
||||
Saml *IdentityWithCredentialsSaml `json:"saml,omitempty"`
|
||||
Totp *IdentityWithCredentialsTotp `json:"totp,omitempty"`
|
||||
Webauthn *IdentityWithCredentialsWebAuthn `json:"webauthn,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityWithCredentials IdentityWithCredentials
|
||||
|
||||
// NewIdentityWithCredentials instantiates a new IdentityWithCredentials object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityWithCredentials() *IdentityWithCredentials {
|
||||
this := IdentityWithCredentials{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityWithCredentialsWithDefaults instantiates a new IdentityWithCredentials object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityWithCredentialsWithDefaults() *IdentityWithCredentials {
|
||||
this := IdentityWithCredentials{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetLookupSecret returns the LookupSecret field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentials) GetLookupSecret() AdminIdentityImportCredentialsLookupSecret {
|
||||
if o == nil || IsNil(o.LookupSecret) {
|
||||
var ret AdminIdentityImportCredentialsLookupSecret
|
||||
return ret
|
||||
}
|
||||
return *o.LookupSecret
|
||||
}
|
||||
|
||||
// GetLookupSecretOk returns a tuple with the LookupSecret field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentials) GetLookupSecretOk() (*AdminIdentityImportCredentialsLookupSecret, bool) {
|
||||
if o == nil || IsNil(o.LookupSecret) {
|
||||
return nil, false
|
||||
}
|
||||
return o.LookupSecret, true
|
||||
}
|
||||
|
||||
// HasLookupSecret returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentials) HasLookupSecret() bool {
|
||||
if o != nil && !IsNil(o.LookupSecret) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetLookupSecret gets a reference to the given AdminIdentityImportCredentialsLookupSecret and assigns it to the LookupSecret field.
|
||||
func (o *IdentityWithCredentials) SetLookupSecret(v AdminIdentityImportCredentialsLookupSecret) {
|
||||
o.LookupSecret = &v
|
||||
}
|
||||
|
||||
// GetOidc returns the Oidc field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentials) GetOidc() IdentityWithCredentialsOidc {
|
||||
if o == nil || IsNil(o.Oidc) {
|
||||
var ret IdentityWithCredentialsOidc
|
||||
return ret
|
||||
}
|
||||
return *o.Oidc
|
||||
}
|
||||
|
||||
// GetOidcOk returns a tuple with the Oidc field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentials) GetOidcOk() (*IdentityWithCredentialsOidc, bool) {
|
||||
if o == nil || IsNil(o.Oidc) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Oidc, true
|
||||
}
|
||||
|
||||
// HasOidc returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentials) HasOidc() bool {
|
||||
if o != nil && !IsNil(o.Oidc) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetOidc gets a reference to the given IdentityWithCredentialsOidc and assigns it to the Oidc field.
|
||||
func (o *IdentityWithCredentials) SetOidc(v IdentityWithCredentialsOidc) {
|
||||
o.Oidc = &v
|
||||
}
|
||||
|
||||
// GetPasskey returns the Passkey field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentials) GetPasskey() IdentityWithCredentialsPasskey {
|
||||
if o == nil || IsNil(o.Passkey) {
|
||||
var ret IdentityWithCredentialsPasskey
|
||||
return ret
|
||||
}
|
||||
return *o.Passkey
|
||||
}
|
||||
|
||||
// GetPasskeyOk returns a tuple with the Passkey field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentials) GetPasskeyOk() (*IdentityWithCredentialsPasskey, bool) {
|
||||
if o == nil || IsNil(o.Passkey) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Passkey, true
|
||||
}
|
||||
|
||||
// HasPasskey returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentials) HasPasskey() bool {
|
||||
if o != nil && !IsNil(o.Passkey) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPasskey gets a reference to the given IdentityWithCredentialsPasskey and assigns it to the Passkey field.
|
||||
func (o *IdentityWithCredentials) SetPasskey(v IdentityWithCredentialsPasskey) {
|
||||
o.Passkey = &v
|
||||
}
|
||||
|
||||
// GetPassword returns the Password field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentials) GetPassword() IdentityWithCredentialsPassword {
|
||||
if o == nil || IsNil(o.Password) {
|
||||
var ret IdentityWithCredentialsPassword
|
||||
return ret
|
||||
}
|
||||
return *o.Password
|
||||
}
|
||||
|
||||
// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentials) GetPasswordOk() (*IdentityWithCredentialsPassword, bool) {
|
||||
if o == nil || IsNil(o.Password) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Password, true
|
||||
}
|
||||
|
||||
// HasPassword returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentials) HasPassword() bool {
|
||||
if o != nil && !IsNil(o.Password) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPassword gets a reference to the given IdentityWithCredentialsPassword and assigns it to the Password field.
|
||||
func (o *IdentityWithCredentials) SetPassword(v IdentityWithCredentialsPassword) {
|
||||
o.Password = &v
|
||||
}
|
||||
|
||||
// GetSaml returns the Saml field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentials) GetSaml() IdentityWithCredentialsSaml {
|
||||
if o == nil || IsNil(o.Saml) {
|
||||
var ret IdentityWithCredentialsSaml
|
||||
return ret
|
||||
}
|
||||
return *o.Saml
|
||||
}
|
||||
|
||||
// GetSamlOk returns a tuple with the Saml field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentials) GetSamlOk() (*IdentityWithCredentialsSaml, bool) {
|
||||
if o == nil || IsNil(o.Saml) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Saml, true
|
||||
}
|
||||
|
||||
// HasSaml returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentials) HasSaml() bool {
|
||||
if o != nil && !IsNil(o.Saml) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSaml gets a reference to the given IdentityWithCredentialsSaml and assigns it to the Saml field.
|
||||
func (o *IdentityWithCredentials) SetSaml(v IdentityWithCredentialsSaml) {
|
||||
o.Saml = &v
|
||||
}
|
||||
|
||||
// GetTotp returns the Totp field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentials) GetTotp() IdentityWithCredentialsTotp {
|
||||
if o == nil || IsNil(o.Totp) {
|
||||
var ret IdentityWithCredentialsTotp
|
||||
return ret
|
||||
}
|
||||
return *o.Totp
|
||||
}
|
||||
|
||||
// GetTotpOk returns a tuple with the Totp field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentials) GetTotpOk() (*IdentityWithCredentialsTotp, bool) {
|
||||
if o == nil || IsNil(o.Totp) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Totp, true
|
||||
}
|
||||
|
||||
// HasTotp returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentials) HasTotp() bool {
|
||||
if o != nil && !IsNil(o.Totp) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTotp gets a reference to the given IdentityWithCredentialsTotp and assigns it to the Totp field.
|
||||
func (o *IdentityWithCredentials) SetTotp(v IdentityWithCredentialsTotp) {
|
||||
o.Totp = &v
|
||||
}
|
||||
|
||||
// GetWebauthn returns the Webauthn field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentials) GetWebauthn() IdentityWithCredentialsWebAuthn {
|
||||
if o == nil || IsNil(o.Webauthn) {
|
||||
var ret IdentityWithCredentialsWebAuthn
|
||||
return ret
|
||||
}
|
||||
return *o.Webauthn
|
||||
}
|
||||
|
||||
// GetWebauthnOk returns a tuple with the Webauthn field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentials) GetWebauthnOk() (*IdentityWithCredentialsWebAuthn, bool) {
|
||||
if o == nil || IsNil(o.Webauthn) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Webauthn, true
|
||||
}
|
||||
|
||||
// HasWebauthn returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentials) HasWebauthn() bool {
|
||||
if o != nil && !IsNil(o.Webauthn) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetWebauthn gets a reference to the given IdentityWithCredentialsWebAuthn and assigns it to the Webauthn field.
|
||||
func (o *IdentityWithCredentials) SetWebauthn(v IdentityWithCredentialsWebAuthn) {
|
||||
o.Webauthn = &v
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentials) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentials) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.LookupSecret) {
|
||||
toSerialize["lookup_secret"] = o.LookupSecret
|
||||
}
|
||||
if !IsNil(o.Oidc) {
|
||||
toSerialize["oidc"] = o.Oidc
|
||||
}
|
||||
if !IsNil(o.Passkey) {
|
||||
toSerialize["passkey"] = o.Passkey
|
||||
}
|
||||
if !IsNil(o.Password) {
|
||||
toSerialize["password"] = o.Password
|
||||
}
|
||||
if !IsNil(o.Saml) {
|
||||
toSerialize["saml"] = o.Saml
|
||||
}
|
||||
if !IsNil(o.Totp) {
|
||||
toSerialize["totp"] = o.Totp
|
||||
}
|
||||
if !IsNil(o.Webauthn) {
|
||||
toSerialize["webauthn"] = o.Webauthn
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityWithCredentials) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityWithCredentials := _IdentityWithCredentials{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityWithCredentials)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityWithCredentials(varIdentityWithCredentials)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "lookup_secret")
|
||||
delete(additionalProperties, "oidc")
|
||||
delete(additionalProperties, "passkey")
|
||||
delete(additionalProperties, "password")
|
||||
delete(additionalProperties, "saml")
|
||||
delete(additionalProperties, "totp")
|
||||
delete(additionalProperties, "webauthn")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityWithCredentials struct {
|
||||
value *IdentityWithCredentials
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentials) Get() *IdentityWithCredentials {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentials) Set(val *IdentityWithCredentials) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentials) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentials) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityWithCredentials(val *IdentityWithCredentials) *NullableIdentityWithCredentials {
|
||||
return &NullableIdentityWithCredentials{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentials) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentials) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
154
pkg/httpclient/model_identity_with_credentials_oidc.go
Normal file
154
pkg/httpclient/model_identity_with_credentials_oidc.go
Normal file
@@ -0,0 +1,154 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityWithCredentialsOidc type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityWithCredentialsOidc{}
|
||||
|
||||
// IdentityWithCredentialsOidc Create Identity and Import Social Sign In Credentials
|
||||
type IdentityWithCredentialsOidc struct {
|
||||
Config *IdentityWithCredentialsOidcConfig `json:"config,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityWithCredentialsOidc IdentityWithCredentialsOidc
|
||||
|
||||
// NewIdentityWithCredentialsOidc instantiates a new IdentityWithCredentialsOidc object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityWithCredentialsOidc() *IdentityWithCredentialsOidc {
|
||||
this := IdentityWithCredentialsOidc{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityWithCredentialsOidcWithDefaults instantiates a new IdentityWithCredentialsOidc object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityWithCredentialsOidcWithDefaults() *IdentityWithCredentialsOidc {
|
||||
this := IdentityWithCredentialsOidc{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetConfig returns the Config field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentialsOidc) GetConfig() IdentityWithCredentialsOidcConfig {
|
||||
if o == nil || IsNil(o.Config) {
|
||||
var ret IdentityWithCredentialsOidcConfig
|
||||
return ret
|
||||
}
|
||||
return *o.Config
|
||||
}
|
||||
|
||||
// GetConfigOk returns a tuple with the Config field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsOidc) GetConfigOk() (*IdentityWithCredentialsOidcConfig, bool) {
|
||||
if o == nil || IsNil(o.Config) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Config, true
|
||||
}
|
||||
|
||||
// HasConfig returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentialsOidc) HasConfig() bool {
|
||||
if o != nil && !IsNil(o.Config) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetConfig gets a reference to the given IdentityWithCredentialsOidcConfig and assigns it to the Config field.
|
||||
func (o *IdentityWithCredentialsOidc) SetConfig(v IdentityWithCredentialsOidcConfig) {
|
||||
o.Config = &v
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsOidc) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsOidc) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Config) {
|
||||
toSerialize["config"] = o.Config
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityWithCredentialsOidc) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityWithCredentialsOidc := _IdentityWithCredentialsOidc{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityWithCredentialsOidc)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityWithCredentialsOidc(varIdentityWithCredentialsOidc)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "config")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityWithCredentialsOidc struct {
|
||||
value *IdentityWithCredentialsOidc
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsOidc) Get() *IdentityWithCredentialsOidc {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsOidc) Set(val *IdentityWithCredentialsOidc) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsOidc) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsOidc) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityWithCredentialsOidc(val *IdentityWithCredentialsOidc) *NullableIdentityWithCredentialsOidc {
|
||||
return &NullableIdentityWithCredentialsOidc{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsOidc) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsOidc) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
155
pkg/httpclient/model_identity_with_credentials_oidc_config.go
Normal file
155
pkg/httpclient/model_identity_with_credentials_oidc_config.go
Normal file
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityWithCredentialsOidcConfig type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityWithCredentialsOidcConfig{}
|
||||
|
||||
// IdentityWithCredentialsOidcConfig struct for IdentityWithCredentialsOidcConfig
|
||||
type IdentityWithCredentialsOidcConfig struct {
|
||||
// A list of OpenID Connect Providers
|
||||
Providers []IdentityWithCredentialsOidcConfigProvider `json:"providers,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityWithCredentialsOidcConfig IdentityWithCredentialsOidcConfig
|
||||
|
||||
// NewIdentityWithCredentialsOidcConfig instantiates a new IdentityWithCredentialsOidcConfig object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityWithCredentialsOidcConfig() *IdentityWithCredentialsOidcConfig {
|
||||
this := IdentityWithCredentialsOidcConfig{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityWithCredentialsOidcConfigWithDefaults instantiates a new IdentityWithCredentialsOidcConfig object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityWithCredentialsOidcConfigWithDefaults() *IdentityWithCredentialsOidcConfig {
|
||||
this := IdentityWithCredentialsOidcConfig{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetProviders returns the Providers field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentialsOidcConfig) GetProviders() []IdentityWithCredentialsOidcConfigProvider {
|
||||
if o == nil || IsNil(o.Providers) {
|
||||
var ret []IdentityWithCredentialsOidcConfigProvider
|
||||
return ret
|
||||
}
|
||||
return o.Providers
|
||||
}
|
||||
|
||||
// GetProvidersOk returns a tuple with the Providers field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsOidcConfig) GetProvidersOk() ([]IdentityWithCredentialsOidcConfigProvider, bool) {
|
||||
if o == nil || IsNil(o.Providers) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Providers, true
|
||||
}
|
||||
|
||||
// HasProviders returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentialsOidcConfig) HasProviders() bool {
|
||||
if o != nil && !IsNil(o.Providers) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetProviders gets a reference to the given []IdentityWithCredentialsOidcConfigProvider and assigns it to the Providers field.
|
||||
func (o *IdentityWithCredentialsOidcConfig) SetProviders(v []IdentityWithCredentialsOidcConfigProvider) {
|
||||
o.Providers = v
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsOidcConfig) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsOidcConfig) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Providers) {
|
||||
toSerialize["providers"] = o.Providers
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityWithCredentialsOidcConfig) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityWithCredentialsOidcConfig := _IdentityWithCredentialsOidcConfig{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityWithCredentialsOidcConfig)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityWithCredentialsOidcConfig(varIdentityWithCredentialsOidcConfig)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "providers")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityWithCredentialsOidcConfig struct {
|
||||
value *IdentityWithCredentialsOidcConfig
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsOidcConfig) Get() *IdentityWithCredentialsOidcConfig {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsOidcConfig) Set(val *IdentityWithCredentialsOidcConfig) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsOidcConfig) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsOidcConfig) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityWithCredentialsOidcConfig(val *IdentityWithCredentialsOidcConfig) *NullableIdentityWithCredentialsOidcConfig {
|
||||
return &NullableIdentityWithCredentialsOidcConfig{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsOidcConfig) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsOidcConfig) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
@@ -0,0 +1,284 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the IdentityWithCredentialsOidcConfigProvider type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityWithCredentialsOidcConfigProvider{}
|
||||
|
||||
// IdentityWithCredentialsOidcConfigProvider Create Identity and Import Social Sign In Credentials Configuration
|
||||
type IdentityWithCredentialsOidcConfigProvider struct {
|
||||
Organization NullableString `json:"organization,omitempty"`
|
||||
// The OpenID Connect provider to link the subject to. Usually something like `google` or `github`.
|
||||
Provider string `json:"provider"`
|
||||
// The subject (`sub`) of the OpenID Connect connection. Usually the `sub` field of the ID Token.
|
||||
Subject string `json:"subject"`
|
||||
// If set, this credential allows the user to sign in using the OpenID Connect provider without setting the subject first.
|
||||
UseAutoLink *bool `json:"use_auto_link,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityWithCredentialsOidcConfigProvider IdentityWithCredentialsOidcConfigProvider
|
||||
|
||||
// NewIdentityWithCredentialsOidcConfigProvider instantiates a new IdentityWithCredentialsOidcConfigProvider object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityWithCredentialsOidcConfigProvider(provider string, subject string) *IdentityWithCredentialsOidcConfigProvider {
|
||||
this := IdentityWithCredentialsOidcConfigProvider{}
|
||||
this.Provider = provider
|
||||
this.Subject = subject
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityWithCredentialsOidcConfigProviderWithDefaults instantiates a new IdentityWithCredentialsOidcConfigProvider object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityWithCredentialsOidcConfigProviderWithDefaults() *IdentityWithCredentialsOidcConfigProvider {
|
||||
this := IdentityWithCredentialsOidcConfigProvider{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetOrganization returns the Organization field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *IdentityWithCredentialsOidcConfigProvider) GetOrganization() string {
|
||||
if o == nil || IsNil(o.Organization.Get()) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Organization.Get()
|
||||
}
|
||||
|
||||
// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *IdentityWithCredentialsOidcConfigProvider) GetOrganizationOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Organization.Get(), o.Organization.IsSet()
|
||||
}
|
||||
|
||||
// HasOrganization returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentialsOidcConfigProvider) HasOrganization() bool {
|
||||
if o != nil && o.Organization.IsSet() {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetOrganization gets a reference to the given NullableString and assigns it to the Organization field.
|
||||
func (o *IdentityWithCredentialsOidcConfigProvider) SetOrganization(v string) {
|
||||
o.Organization.Set(&v)
|
||||
}
|
||||
|
||||
// SetOrganizationNil sets the value for Organization to be an explicit nil
|
||||
func (o *IdentityWithCredentialsOidcConfigProvider) SetOrganizationNil() {
|
||||
o.Organization.Set(nil)
|
||||
}
|
||||
|
||||
// UnsetOrganization ensures that no value is present for Organization, not even an explicit nil
|
||||
func (o *IdentityWithCredentialsOidcConfigProvider) UnsetOrganization() {
|
||||
o.Organization.Unset()
|
||||
}
|
||||
|
||||
// GetProvider returns the Provider field value
|
||||
func (o *IdentityWithCredentialsOidcConfigProvider) GetProvider() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Provider
|
||||
}
|
||||
|
||||
// GetProviderOk returns a tuple with the Provider field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsOidcConfigProvider) GetProviderOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Provider, true
|
||||
}
|
||||
|
||||
// SetProvider sets field value
|
||||
func (o *IdentityWithCredentialsOidcConfigProvider) SetProvider(v string) {
|
||||
o.Provider = v
|
||||
}
|
||||
|
||||
// GetSubject returns the Subject field value
|
||||
func (o *IdentityWithCredentialsOidcConfigProvider) GetSubject() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Subject
|
||||
}
|
||||
|
||||
// GetSubjectOk returns a tuple with the Subject field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsOidcConfigProvider) GetSubjectOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Subject, true
|
||||
}
|
||||
|
||||
// SetSubject sets field value
|
||||
func (o *IdentityWithCredentialsOidcConfigProvider) SetSubject(v string) {
|
||||
o.Subject = v
|
||||
}
|
||||
|
||||
// GetUseAutoLink returns the UseAutoLink field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentialsOidcConfigProvider) GetUseAutoLink() bool {
|
||||
if o == nil || IsNil(o.UseAutoLink) {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.UseAutoLink
|
||||
}
|
||||
|
||||
// GetUseAutoLinkOk returns a tuple with the UseAutoLink field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsOidcConfigProvider) GetUseAutoLinkOk() (*bool, bool) {
|
||||
if o == nil || IsNil(o.UseAutoLink) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UseAutoLink, true
|
||||
}
|
||||
|
||||
// HasUseAutoLink returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentialsOidcConfigProvider) HasUseAutoLink() bool {
|
||||
if o != nil && !IsNil(o.UseAutoLink) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUseAutoLink gets a reference to the given bool and assigns it to the UseAutoLink field.
|
||||
func (o *IdentityWithCredentialsOidcConfigProvider) SetUseAutoLink(v bool) {
|
||||
o.UseAutoLink = &v
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsOidcConfigProvider) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsOidcConfigProvider) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Organization.IsSet() {
|
||||
toSerialize["organization"] = o.Organization.Get()
|
||||
}
|
||||
toSerialize["provider"] = o.Provider
|
||||
toSerialize["subject"] = o.Subject
|
||||
if !IsNil(o.UseAutoLink) {
|
||||
toSerialize["use_auto_link"] = o.UseAutoLink
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityWithCredentialsOidcConfigProvider) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"provider",
|
||||
"subject",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varIdentityWithCredentialsOidcConfigProvider := _IdentityWithCredentialsOidcConfigProvider{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityWithCredentialsOidcConfigProvider)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityWithCredentialsOidcConfigProvider(varIdentityWithCredentialsOidcConfigProvider)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "organization")
|
||||
delete(additionalProperties, "provider")
|
||||
delete(additionalProperties, "subject")
|
||||
delete(additionalProperties, "use_auto_link")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityWithCredentialsOidcConfigProvider struct {
|
||||
value *IdentityWithCredentialsOidcConfigProvider
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsOidcConfigProvider) Get() *IdentityWithCredentialsOidcConfigProvider {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsOidcConfigProvider) Set(val *IdentityWithCredentialsOidcConfigProvider) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsOidcConfigProvider) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsOidcConfigProvider) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityWithCredentialsOidcConfigProvider(val *IdentityWithCredentialsOidcConfigProvider) *NullableIdentityWithCredentialsOidcConfigProvider {
|
||||
return &NullableIdentityWithCredentialsOidcConfigProvider{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsOidcConfigProvider) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsOidcConfigProvider) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
154
pkg/httpclient/model_identity_with_credentials_passkey.go
Normal file
154
pkg/httpclient/model_identity_with_credentials_passkey.go
Normal file
@@ -0,0 +1,154 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityWithCredentialsPasskey type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityWithCredentialsPasskey{}
|
||||
|
||||
// IdentityWithCredentialsPasskey Create Identity and Import Passkey Credentials
|
||||
type IdentityWithCredentialsPasskey struct {
|
||||
Config *IdentityWithCredentialsPasskeyConfig `json:"config,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityWithCredentialsPasskey IdentityWithCredentialsPasskey
|
||||
|
||||
// NewIdentityWithCredentialsPasskey instantiates a new IdentityWithCredentialsPasskey object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityWithCredentialsPasskey() *IdentityWithCredentialsPasskey {
|
||||
this := IdentityWithCredentialsPasskey{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityWithCredentialsPasskeyWithDefaults instantiates a new IdentityWithCredentialsPasskey object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityWithCredentialsPasskeyWithDefaults() *IdentityWithCredentialsPasskey {
|
||||
this := IdentityWithCredentialsPasskey{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetConfig returns the Config field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentialsPasskey) GetConfig() IdentityWithCredentialsPasskeyConfig {
|
||||
if o == nil || IsNil(o.Config) {
|
||||
var ret IdentityWithCredentialsPasskeyConfig
|
||||
return ret
|
||||
}
|
||||
return *o.Config
|
||||
}
|
||||
|
||||
// GetConfigOk returns a tuple with the Config field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsPasskey) GetConfigOk() (*IdentityWithCredentialsPasskeyConfig, bool) {
|
||||
if o == nil || IsNil(o.Config) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Config, true
|
||||
}
|
||||
|
||||
// HasConfig returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentialsPasskey) HasConfig() bool {
|
||||
if o != nil && !IsNil(o.Config) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetConfig gets a reference to the given IdentityWithCredentialsPasskeyConfig and assigns it to the Config field.
|
||||
func (o *IdentityWithCredentialsPasskey) SetConfig(v IdentityWithCredentialsPasskeyConfig) {
|
||||
o.Config = &v
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsPasskey) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsPasskey) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Config) {
|
||||
toSerialize["config"] = o.Config
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityWithCredentialsPasskey) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityWithCredentialsPasskey := _IdentityWithCredentialsPasskey{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityWithCredentialsPasskey)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityWithCredentialsPasskey(varIdentityWithCredentialsPasskey)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "config")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityWithCredentialsPasskey struct {
|
||||
value *IdentityWithCredentialsPasskey
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsPasskey) Get() *IdentityWithCredentialsPasskey {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsPasskey) Set(val *IdentityWithCredentialsPasskey) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsPasskey) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsPasskey) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityWithCredentialsPasskey(val *IdentityWithCredentialsPasskey) *NullableIdentityWithCredentialsPasskey {
|
||||
return &NullableIdentityWithCredentialsPasskey{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsPasskey) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsPasskey) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
192
pkg/httpclient/model_identity_with_credentials_passkey_config.go
Normal file
192
pkg/httpclient/model_identity_with_credentials_passkey_config.go
Normal file
@@ -0,0 +1,192 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityWithCredentialsPasskeyConfig type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityWithCredentialsPasskeyConfig{}
|
||||
|
||||
// IdentityWithCredentialsPasskeyConfig Create Identity and Import Passkey Credentials Configuration
|
||||
type IdentityWithCredentialsPasskeyConfig struct {
|
||||
Credentials []IdentityCredentialsWebAuthn `json:"credentials,omitempty"`
|
||||
// UserHandle is the user handle of the webauthn credential.
|
||||
UserHandle []int32 `json:"user_handle,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityWithCredentialsPasskeyConfig IdentityWithCredentialsPasskeyConfig
|
||||
|
||||
// NewIdentityWithCredentialsPasskeyConfig instantiates a new IdentityWithCredentialsPasskeyConfig object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityWithCredentialsPasskeyConfig() *IdentityWithCredentialsPasskeyConfig {
|
||||
this := IdentityWithCredentialsPasskeyConfig{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityWithCredentialsPasskeyConfigWithDefaults instantiates a new IdentityWithCredentialsPasskeyConfig object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityWithCredentialsPasskeyConfigWithDefaults() *IdentityWithCredentialsPasskeyConfig {
|
||||
this := IdentityWithCredentialsPasskeyConfig{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCredentials returns the Credentials field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentialsPasskeyConfig) GetCredentials() []IdentityCredentialsWebAuthn {
|
||||
if o == nil || IsNil(o.Credentials) {
|
||||
var ret []IdentityCredentialsWebAuthn
|
||||
return ret
|
||||
}
|
||||
return o.Credentials
|
||||
}
|
||||
|
||||
// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsPasskeyConfig) GetCredentialsOk() ([]IdentityCredentialsWebAuthn, bool) {
|
||||
if o == nil || IsNil(o.Credentials) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Credentials, true
|
||||
}
|
||||
|
||||
// HasCredentials returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentialsPasskeyConfig) HasCredentials() bool {
|
||||
if o != nil && !IsNil(o.Credentials) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCredentials gets a reference to the given []IdentityCredentialsWebAuthn and assigns it to the Credentials field.
|
||||
func (o *IdentityWithCredentialsPasskeyConfig) SetCredentials(v []IdentityCredentialsWebAuthn) {
|
||||
o.Credentials = v
|
||||
}
|
||||
|
||||
// GetUserHandle returns the UserHandle field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentialsPasskeyConfig) GetUserHandle() []int32 {
|
||||
if o == nil || IsNil(o.UserHandle) {
|
||||
var ret []int32
|
||||
return ret
|
||||
}
|
||||
return o.UserHandle
|
||||
}
|
||||
|
||||
// GetUserHandleOk returns a tuple with the UserHandle field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsPasskeyConfig) GetUserHandleOk() ([]int32, bool) {
|
||||
if o == nil || IsNil(o.UserHandle) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UserHandle, true
|
||||
}
|
||||
|
||||
// HasUserHandle returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentialsPasskeyConfig) HasUserHandle() bool {
|
||||
if o != nil && !IsNil(o.UserHandle) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUserHandle gets a reference to the given []int32 and assigns it to the UserHandle field.
|
||||
func (o *IdentityWithCredentialsPasskeyConfig) SetUserHandle(v []int32) {
|
||||
o.UserHandle = v
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsPasskeyConfig) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsPasskeyConfig) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Credentials) {
|
||||
toSerialize["credentials"] = o.Credentials
|
||||
}
|
||||
if !IsNil(o.UserHandle) {
|
||||
toSerialize["user_handle"] = o.UserHandle
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityWithCredentialsPasskeyConfig) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityWithCredentialsPasskeyConfig := _IdentityWithCredentialsPasskeyConfig{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityWithCredentialsPasskeyConfig)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityWithCredentialsPasskeyConfig(varIdentityWithCredentialsPasskeyConfig)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "credentials")
|
||||
delete(additionalProperties, "user_handle")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityWithCredentialsPasskeyConfig struct {
|
||||
value *IdentityWithCredentialsPasskeyConfig
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsPasskeyConfig) Get() *IdentityWithCredentialsPasskeyConfig {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsPasskeyConfig) Set(val *IdentityWithCredentialsPasskeyConfig) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsPasskeyConfig) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsPasskeyConfig) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityWithCredentialsPasskeyConfig(val *IdentityWithCredentialsPasskeyConfig) *NullableIdentityWithCredentialsPasskeyConfig {
|
||||
return &NullableIdentityWithCredentialsPasskeyConfig{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsPasskeyConfig) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsPasskeyConfig) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
154
pkg/httpclient/model_identity_with_credentials_password.go
Normal file
154
pkg/httpclient/model_identity_with_credentials_password.go
Normal file
@@ -0,0 +1,154 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityWithCredentialsPassword type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityWithCredentialsPassword{}
|
||||
|
||||
// IdentityWithCredentialsPassword Create Identity and Import Password Credentials
|
||||
type IdentityWithCredentialsPassword struct {
|
||||
Config *IdentityWithCredentialsPasswordConfig `json:"config,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityWithCredentialsPassword IdentityWithCredentialsPassword
|
||||
|
||||
// NewIdentityWithCredentialsPassword instantiates a new IdentityWithCredentialsPassword object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityWithCredentialsPassword() *IdentityWithCredentialsPassword {
|
||||
this := IdentityWithCredentialsPassword{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityWithCredentialsPasswordWithDefaults instantiates a new IdentityWithCredentialsPassword object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityWithCredentialsPasswordWithDefaults() *IdentityWithCredentialsPassword {
|
||||
this := IdentityWithCredentialsPassword{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetConfig returns the Config field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentialsPassword) GetConfig() IdentityWithCredentialsPasswordConfig {
|
||||
if o == nil || IsNil(o.Config) {
|
||||
var ret IdentityWithCredentialsPasswordConfig
|
||||
return ret
|
||||
}
|
||||
return *o.Config
|
||||
}
|
||||
|
||||
// GetConfigOk returns a tuple with the Config field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsPassword) GetConfigOk() (*IdentityWithCredentialsPasswordConfig, bool) {
|
||||
if o == nil || IsNil(o.Config) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Config, true
|
||||
}
|
||||
|
||||
// HasConfig returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentialsPassword) HasConfig() bool {
|
||||
if o != nil && !IsNil(o.Config) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetConfig gets a reference to the given IdentityWithCredentialsPasswordConfig and assigns it to the Config field.
|
||||
func (o *IdentityWithCredentialsPassword) SetConfig(v IdentityWithCredentialsPasswordConfig) {
|
||||
o.Config = &v
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsPassword) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsPassword) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Config) {
|
||||
toSerialize["config"] = o.Config
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityWithCredentialsPassword) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityWithCredentialsPassword := _IdentityWithCredentialsPassword{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityWithCredentialsPassword)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityWithCredentialsPassword(varIdentityWithCredentialsPassword)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "config")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityWithCredentialsPassword struct {
|
||||
value *IdentityWithCredentialsPassword
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsPassword) Get() *IdentityWithCredentialsPassword {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsPassword) Set(val *IdentityWithCredentialsPassword) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsPassword) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsPassword) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityWithCredentialsPassword(val *IdentityWithCredentialsPassword) *NullableIdentityWithCredentialsPassword {
|
||||
return &NullableIdentityWithCredentialsPassword{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsPassword) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsPassword) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
@@ -0,0 +1,231 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityWithCredentialsPasswordConfig type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityWithCredentialsPasswordConfig{}
|
||||
|
||||
// IdentityWithCredentialsPasswordConfig Create Identity and Import Password Credentials Configuration
|
||||
type IdentityWithCredentialsPasswordConfig struct {
|
||||
// The hashed password in [PHC format](https://www.ory.com/docs/kratos/manage-identities/import-user-accounts-identities#hashed-passwords)
|
||||
HashedPassword *string `json:"hashed_password,omitempty"`
|
||||
// The password in plain text if no hash is available.
|
||||
Password *string `json:"password,omitempty"`
|
||||
// If set to true, the password will be migrated using the password migration hook.
|
||||
UsePasswordMigrationHook *bool `json:"use_password_migration_hook,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityWithCredentialsPasswordConfig IdentityWithCredentialsPasswordConfig
|
||||
|
||||
// NewIdentityWithCredentialsPasswordConfig instantiates a new IdentityWithCredentialsPasswordConfig object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityWithCredentialsPasswordConfig() *IdentityWithCredentialsPasswordConfig {
|
||||
this := IdentityWithCredentialsPasswordConfig{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityWithCredentialsPasswordConfigWithDefaults instantiates a new IdentityWithCredentialsPasswordConfig object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityWithCredentialsPasswordConfigWithDefaults() *IdentityWithCredentialsPasswordConfig {
|
||||
this := IdentityWithCredentialsPasswordConfig{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetHashedPassword returns the HashedPassword field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentialsPasswordConfig) GetHashedPassword() string {
|
||||
if o == nil || IsNil(o.HashedPassword) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.HashedPassword
|
||||
}
|
||||
|
||||
// GetHashedPasswordOk returns a tuple with the HashedPassword field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsPasswordConfig) GetHashedPasswordOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.HashedPassword) {
|
||||
return nil, false
|
||||
}
|
||||
return o.HashedPassword, true
|
||||
}
|
||||
|
||||
// HasHashedPassword returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentialsPasswordConfig) HasHashedPassword() bool {
|
||||
if o != nil && !IsNil(o.HashedPassword) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetHashedPassword gets a reference to the given string and assigns it to the HashedPassword field.
|
||||
func (o *IdentityWithCredentialsPasswordConfig) SetHashedPassword(v string) {
|
||||
o.HashedPassword = &v
|
||||
}
|
||||
|
||||
// GetPassword returns the Password field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentialsPasswordConfig) GetPassword() string {
|
||||
if o == nil || IsNil(o.Password) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Password
|
||||
}
|
||||
|
||||
// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsPasswordConfig) GetPasswordOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Password) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Password, true
|
||||
}
|
||||
|
||||
// HasPassword returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentialsPasswordConfig) HasPassword() bool {
|
||||
if o != nil && !IsNil(o.Password) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPassword gets a reference to the given string and assigns it to the Password field.
|
||||
func (o *IdentityWithCredentialsPasswordConfig) SetPassword(v string) {
|
||||
o.Password = &v
|
||||
}
|
||||
|
||||
// GetUsePasswordMigrationHook returns the UsePasswordMigrationHook field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentialsPasswordConfig) GetUsePasswordMigrationHook() bool {
|
||||
if o == nil || IsNil(o.UsePasswordMigrationHook) {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.UsePasswordMigrationHook
|
||||
}
|
||||
|
||||
// GetUsePasswordMigrationHookOk returns a tuple with the UsePasswordMigrationHook field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsPasswordConfig) GetUsePasswordMigrationHookOk() (*bool, bool) {
|
||||
if o == nil || IsNil(o.UsePasswordMigrationHook) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UsePasswordMigrationHook, true
|
||||
}
|
||||
|
||||
// HasUsePasswordMigrationHook returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentialsPasswordConfig) HasUsePasswordMigrationHook() bool {
|
||||
if o != nil && !IsNil(o.UsePasswordMigrationHook) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUsePasswordMigrationHook gets a reference to the given bool and assigns it to the UsePasswordMigrationHook field.
|
||||
func (o *IdentityWithCredentialsPasswordConfig) SetUsePasswordMigrationHook(v bool) {
|
||||
o.UsePasswordMigrationHook = &v
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsPasswordConfig) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsPasswordConfig) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.HashedPassword) {
|
||||
toSerialize["hashed_password"] = o.HashedPassword
|
||||
}
|
||||
if !IsNil(o.Password) {
|
||||
toSerialize["password"] = o.Password
|
||||
}
|
||||
if !IsNil(o.UsePasswordMigrationHook) {
|
||||
toSerialize["use_password_migration_hook"] = o.UsePasswordMigrationHook
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityWithCredentialsPasswordConfig) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityWithCredentialsPasswordConfig := _IdentityWithCredentialsPasswordConfig{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityWithCredentialsPasswordConfig)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityWithCredentialsPasswordConfig(varIdentityWithCredentialsPasswordConfig)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "hashed_password")
|
||||
delete(additionalProperties, "password")
|
||||
delete(additionalProperties, "use_password_migration_hook")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityWithCredentialsPasswordConfig struct {
|
||||
value *IdentityWithCredentialsPasswordConfig
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsPasswordConfig) Get() *IdentityWithCredentialsPasswordConfig {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsPasswordConfig) Set(val *IdentityWithCredentialsPasswordConfig) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsPasswordConfig) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsPasswordConfig) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityWithCredentialsPasswordConfig(val *IdentityWithCredentialsPasswordConfig) *NullableIdentityWithCredentialsPasswordConfig {
|
||||
return &NullableIdentityWithCredentialsPasswordConfig{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsPasswordConfig) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsPasswordConfig) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
154
pkg/httpclient/model_identity_with_credentials_saml.go
Normal file
154
pkg/httpclient/model_identity_with_credentials_saml.go
Normal file
@@ -0,0 +1,154 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityWithCredentialsSaml type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityWithCredentialsSaml{}
|
||||
|
||||
// IdentityWithCredentialsSaml Payload to import SAML credentials
|
||||
type IdentityWithCredentialsSaml struct {
|
||||
Config *IdentityWithCredentialsSamlConfig `json:"config,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityWithCredentialsSaml IdentityWithCredentialsSaml
|
||||
|
||||
// NewIdentityWithCredentialsSaml instantiates a new IdentityWithCredentialsSaml object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityWithCredentialsSaml() *IdentityWithCredentialsSaml {
|
||||
this := IdentityWithCredentialsSaml{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityWithCredentialsSamlWithDefaults instantiates a new IdentityWithCredentialsSaml object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityWithCredentialsSamlWithDefaults() *IdentityWithCredentialsSaml {
|
||||
this := IdentityWithCredentialsSaml{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetConfig returns the Config field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentialsSaml) GetConfig() IdentityWithCredentialsSamlConfig {
|
||||
if o == nil || IsNil(o.Config) {
|
||||
var ret IdentityWithCredentialsSamlConfig
|
||||
return ret
|
||||
}
|
||||
return *o.Config
|
||||
}
|
||||
|
||||
// GetConfigOk returns a tuple with the Config field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsSaml) GetConfigOk() (*IdentityWithCredentialsSamlConfig, bool) {
|
||||
if o == nil || IsNil(o.Config) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Config, true
|
||||
}
|
||||
|
||||
// HasConfig returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentialsSaml) HasConfig() bool {
|
||||
if o != nil && !IsNil(o.Config) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetConfig gets a reference to the given IdentityWithCredentialsSamlConfig and assigns it to the Config field.
|
||||
func (o *IdentityWithCredentialsSaml) SetConfig(v IdentityWithCredentialsSamlConfig) {
|
||||
o.Config = &v
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsSaml) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsSaml) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Config) {
|
||||
toSerialize["config"] = o.Config
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityWithCredentialsSaml) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityWithCredentialsSaml := _IdentityWithCredentialsSaml{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityWithCredentialsSaml)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityWithCredentialsSaml(varIdentityWithCredentialsSaml)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "config")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityWithCredentialsSaml struct {
|
||||
value *IdentityWithCredentialsSaml
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsSaml) Get() *IdentityWithCredentialsSaml {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsSaml) Set(val *IdentityWithCredentialsSaml) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsSaml) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsSaml) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityWithCredentialsSaml(val *IdentityWithCredentialsSaml) *NullableIdentityWithCredentialsSaml {
|
||||
return &NullableIdentityWithCredentialsSaml{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsSaml) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsSaml) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
155
pkg/httpclient/model_identity_with_credentials_saml_config.go
Normal file
155
pkg/httpclient/model_identity_with_credentials_saml_config.go
Normal file
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityWithCredentialsSamlConfig type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityWithCredentialsSamlConfig{}
|
||||
|
||||
// IdentityWithCredentialsSamlConfig Payload of SAML providers
|
||||
type IdentityWithCredentialsSamlConfig struct {
|
||||
// A list of SAML Providers
|
||||
Providers []IdentityWithCredentialsSamlConfigProvider `json:"providers,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityWithCredentialsSamlConfig IdentityWithCredentialsSamlConfig
|
||||
|
||||
// NewIdentityWithCredentialsSamlConfig instantiates a new IdentityWithCredentialsSamlConfig object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityWithCredentialsSamlConfig() *IdentityWithCredentialsSamlConfig {
|
||||
this := IdentityWithCredentialsSamlConfig{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityWithCredentialsSamlConfigWithDefaults instantiates a new IdentityWithCredentialsSamlConfig object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityWithCredentialsSamlConfigWithDefaults() *IdentityWithCredentialsSamlConfig {
|
||||
this := IdentityWithCredentialsSamlConfig{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetProviders returns the Providers field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentialsSamlConfig) GetProviders() []IdentityWithCredentialsSamlConfigProvider {
|
||||
if o == nil || IsNil(o.Providers) {
|
||||
var ret []IdentityWithCredentialsSamlConfigProvider
|
||||
return ret
|
||||
}
|
||||
return o.Providers
|
||||
}
|
||||
|
||||
// GetProvidersOk returns a tuple with the Providers field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsSamlConfig) GetProvidersOk() ([]IdentityWithCredentialsSamlConfigProvider, bool) {
|
||||
if o == nil || IsNil(o.Providers) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Providers, true
|
||||
}
|
||||
|
||||
// HasProviders returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentialsSamlConfig) HasProviders() bool {
|
||||
if o != nil && !IsNil(o.Providers) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetProviders gets a reference to the given []IdentityWithCredentialsSamlConfigProvider and assigns it to the Providers field.
|
||||
func (o *IdentityWithCredentialsSamlConfig) SetProviders(v []IdentityWithCredentialsSamlConfigProvider) {
|
||||
o.Providers = v
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsSamlConfig) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsSamlConfig) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Providers) {
|
||||
toSerialize["providers"] = o.Providers
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityWithCredentialsSamlConfig) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityWithCredentialsSamlConfig := _IdentityWithCredentialsSamlConfig{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityWithCredentialsSamlConfig)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityWithCredentialsSamlConfig(varIdentityWithCredentialsSamlConfig)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "providers")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityWithCredentialsSamlConfig struct {
|
||||
value *IdentityWithCredentialsSamlConfig
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsSamlConfig) Get() *IdentityWithCredentialsSamlConfig {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsSamlConfig) Set(val *IdentityWithCredentialsSamlConfig) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsSamlConfig) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsSamlConfig) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityWithCredentialsSamlConfig(val *IdentityWithCredentialsSamlConfig) *NullableIdentityWithCredentialsSamlConfig {
|
||||
return &NullableIdentityWithCredentialsSamlConfig{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsSamlConfig) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsSamlConfig) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
@@ -0,0 +1,246 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the IdentityWithCredentialsSamlConfigProvider type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityWithCredentialsSamlConfigProvider{}
|
||||
|
||||
// IdentityWithCredentialsSamlConfigProvider Payload of specific SAML provider
|
||||
type IdentityWithCredentialsSamlConfigProvider struct {
|
||||
Organization NullableString `json:"organization,omitempty"`
|
||||
// The SAML provider to link the subject to.
|
||||
Provider string `json:"provider"`
|
||||
// The unique subject of the SAML connection. This value must be immutable at the source.
|
||||
Subject string `json:"subject"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityWithCredentialsSamlConfigProvider IdentityWithCredentialsSamlConfigProvider
|
||||
|
||||
// NewIdentityWithCredentialsSamlConfigProvider instantiates a new IdentityWithCredentialsSamlConfigProvider object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityWithCredentialsSamlConfigProvider(provider string, subject string) *IdentityWithCredentialsSamlConfigProvider {
|
||||
this := IdentityWithCredentialsSamlConfigProvider{}
|
||||
this.Provider = provider
|
||||
this.Subject = subject
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityWithCredentialsSamlConfigProviderWithDefaults instantiates a new IdentityWithCredentialsSamlConfigProvider object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityWithCredentialsSamlConfigProviderWithDefaults() *IdentityWithCredentialsSamlConfigProvider {
|
||||
this := IdentityWithCredentialsSamlConfigProvider{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetOrganization returns the Organization field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *IdentityWithCredentialsSamlConfigProvider) GetOrganization() string {
|
||||
if o == nil || IsNil(o.Organization.Get()) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Organization.Get()
|
||||
}
|
||||
|
||||
// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *IdentityWithCredentialsSamlConfigProvider) GetOrganizationOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Organization.Get(), o.Organization.IsSet()
|
||||
}
|
||||
|
||||
// HasOrganization returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentialsSamlConfigProvider) HasOrganization() bool {
|
||||
if o != nil && o.Organization.IsSet() {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetOrganization gets a reference to the given NullableString and assigns it to the Organization field.
|
||||
func (o *IdentityWithCredentialsSamlConfigProvider) SetOrganization(v string) {
|
||||
o.Organization.Set(&v)
|
||||
}
|
||||
|
||||
// SetOrganizationNil sets the value for Organization to be an explicit nil
|
||||
func (o *IdentityWithCredentialsSamlConfigProvider) SetOrganizationNil() {
|
||||
o.Organization.Set(nil)
|
||||
}
|
||||
|
||||
// UnsetOrganization ensures that no value is present for Organization, not even an explicit nil
|
||||
func (o *IdentityWithCredentialsSamlConfigProvider) UnsetOrganization() {
|
||||
o.Organization.Unset()
|
||||
}
|
||||
|
||||
// GetProvider returns the Provider field value
|
||||
func (o *IdentityWithCredentialsSamlConfigProvider) GetProvider() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Provider
|
||||
}
|
||||
|
||||
// GetProviderOk returns a tuple with the Provider field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsSamlConfigProvider) GetProviderOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Provider, true
|
||||
}
|
||||
|
||||
// SetProvider sets field value
|
||||
func (o *IdentityWithCredentialsSamlConfigProvider) SetProvider(v string) {
|
||||
o.Provider = v
|
||||
}
|
||||
|
||||
// GetSubject returns the Subject field value
|
||||
func (o *IdentityWithCredentialsSamlConfigProvider) GetSubject() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Subject
|
||||
}
|
||||
|
||||
// GetSubjectOk returns a tuple with the Subject field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsSamlConfigProvider) GetSubjectOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Subject, true
|
||||
}
|
||||
|
||||
// SetSubject sets field value
|
||||
func (o *IdentityWithCredentialsSamlConfigProvider) SetSubject(v string) {
|
||||
o.Subject = v
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsSamlConfigProvider) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsSamlConfigProvider) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Organization.IsSet() {
|
||||
toSerialize["organization"] = o.Organization.Get()
|
||||
}
|
||||
toSerialize["provider"] = o.Provider
|
||||
toSerialize["subject"] = o.Subject
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityWithCredentialsSamlConfigProvider) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"provider",
|
||||
"subject",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varIdentityWithCredentialsSamlConfigProvider := _IdentityWithCredentialsSamlConfigProvider{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityWithCredentialsSamlConfigProvider)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityWithCredentialsSamlConfigProvider(varIdentityWithCredentialsSamlConfigProvider)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "organization")
|
||||
delete(additionalProperties, "provider")
|
||||
delete(additionalProperties, "subject")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityWithCredentialsSamlConfigProvider struct {
|
||||
value *IdentityWithCredentialsSamlConfigProvider
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsSamlConfigProvider) Get() *IdentityWithCredentialsSamlConfigProvider {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsSamlConfigProvider) Set(val *IdentityWithCredentialsSamlConfigProvider) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsSamlConfigProvider) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsSamlConfigProvider) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityWithCredentialsSamlConfigProvider(val *IdentityWithCredentialsSamlConfigProvider) *NullableIdentityWithCredentialsSamlConfigProvider {
|
||||
return &NullableIdentityWithCredentialsSamlConfigProvider{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsSamlConfigProvider) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsSamlConfigProvider) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
154
pkg/httpclient/model_identity_with_credentials_totp.go
Normal file
154
pkg/httpclient/model_identity_with_credentials_totp.go
Normal file
@@ -0,0 +1,154 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityWithCredentialsTotp type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityWithCredentialsTotp{}
|
||||
|
||||
// IdentityWithCredentialsTotp Create Identity and Import TOTP 2FA Credentials
|
||||
type IdentityWithCredentialsTotp struct {
|
||||
Config *IdentityWithCredentialsTotpConfig `json:"config,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityWithCredentialsTotp IdentityWithCredentialsTotp
|
||||
|
||||
// NewIdentityWithCredentialsTotp instantiates a new IdentityWithCredentialsTotp object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityWithCredentialsTotp() *IdentityWithCredentialsTotp {
|
||||
this := IdentityWithCredentialsTotp{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityWithCredentialsTotpWithDefaults instantiates a new IdentityWithCredentialsTotp object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityWithCredentialsTotpWithDefaults() *IdentityWithCredentialsTotp {
|
||||
this := IdentityWithCredentialsTotp{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetConfig returns the Config field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentialsTotp) GetConfig() IdentityWithCredentialsTotpConfig {
|
||||
if o == nil || IsNil(o.Config) {
|
||||
var ret IdentityWithCredentialsTotpConfig
|
||||
return ret
|
||||
}
|
||||
return *o.Config
|
||||
}
|
||||
|
||||
// GetConfigOk returns a tuple with the Config field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsTotp) GetConfigOk() (*IdentityWithCredentialsTotpConfig, bool) {
|
||||
if o == nil || IsNil(o.Config) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Config, true
|
||||
}
|
||||
|
||||
// HasConfig returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentialsTotp) HasConfig() bool {
|
||||
if o != nil && !IsNil(o.Config) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetConfig gets a reference to the given IdentityWithCredentialsTotpConfig and assigns it to the Config field.
|
||||
func (o *IdentityWithCredentialsTotp) SetConfig(v IdentityWithCredentialsTotpConfig) {
|
||||
o.Config = &v
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsTotp) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsTotp) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Config) {
|
||||
toSerialize["config"] = o.Config
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityWithCredentialsTotp) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityWithCredentialsTotp := _IdentityWithCredentialsTotp{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityWithCredentialsTotp)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityWithCredentialsTotp(varIdentityWithCredentialsTotp)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "config")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityWithCredentialsTotp struct {
|
||||
value *IdentityWithCredentialsTotp
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsTotp) Get() *IdentityWithCredentialsTotp {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsTotp) Set(val *IdentityWithCredentialsTotp) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsTotp) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsTotp) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityWithCredentialsTotp(val *IdentityWithCredentialsTotp) *NullableIdentityWithCredentialsTotp {
|
||||
return &NullableIdentityWithCredentialsTotp{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsTotp) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsTotp) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
155
pkg/httpclient/model_identity_with_credentials_totp_config.go
Normal file
155
pkg/httpclient/model_identity_with_credentials_totp_config.go
Normal file
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityWithCredentialsTotpConfig type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityWithCredentialsTotpConfig{}
|
||||
|
||||
// IdentityWithCredentialsTotpConfig Create Identity and Import TOTP 2FA Credentials Configuration
|
||||
type IdentityWithCredentialsTotpConfig struct {
|
||||
// TOTPURL is the TOTP URL For more details see: https://github.com/google/google-authenticator/wiki/Key-Uri-Format
|
||||
TotpUrl *string `json:"totp_url,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityWithCredentialsTotpConfig IdentityWithCredentialsTotpConfig
|
||||
|
||||
// NewIdentityWithCredentialsTotpConfig instantiates a new IdentityWithCredentialsTotpConfig object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityWithCredentialsTotpConfig() *IdentityWithCredentialsTotpConfig {
|
||||
this := IdentityWithCredentialsTotpConfig{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityWithCredentialsTotpConfigWithDefaults instantiates a new IdentityWithCredentialsTotpConfig object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityWithCredentialsTotpConfigWithDefaults() *IdentityWithCredentialsTotpConfig {
|
||||
this := IdentityWithCredentialsTotpConfig{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetTotpUrl returns the TotpUrl field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentialsTotpConfig) GetTotpUrl() string {
|
||||
if o == nil || IsNil(o.TotpUrl) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.TotpUrl
|
||||
}
|
||||
|
||||
// GetTotpUrlOk returns a tuple with the TotpUrl field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsTotpConfig) GetTotpUrlOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.TotpUrl) {
|
||||
return nil, false
|
||||
}
|
||||
return o.TotpUrl, true
|
||||
}
|
||||
|
||||
// HasTotpUrl returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentialsTotpConfig) HasTotpUrl() bool {
|
||||
if o != nil && !IsNil(o.TotpUrl) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTotpUrl gets a reference to the given string and assigns it to the TotpUrl field.
|
||||
func (o *IdentityWithCredentialsTotpConfig) SetTotpUrl(v string) {
|
||||
o.TotpUrl = &v
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsTotpConfig) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsTotpConfig) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.TotpUrl) {
|
||||
toSerialize["totp_url"] = o.TotpUrl
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityWithCredentialsTotpConfig) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityWithCredentialsTotpConfig := _IdentityWithCredentialsTotpConfig{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityWithCredentialsTotpConfig)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityWithCredentialsTotpConfig(varIdentityWithCredentialsTotpConfig)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "totp_url")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityWithCredentialsTotpConfig struct {
|
||||
value *IdentityWithCredentialsTotpConfig
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsTotpConfig) Get() *IdentityWithCredentialsTotpConfig {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsTotpConfig) Set(val *IdentityWithCredentialsTotpConfig) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsTotpConfig) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsTotpConfig) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityWithCredentialsTotpConfig(val *IdentityWithCredentialsTotpConfig) *NullableIdentityWithCredentialsTotpConfig {
|
||||
return &NullableIdentityWithCredentialsTotpConfig{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsTotpConfig) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsTotpConfig) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
154
pkg/httpclient/model_identity_with_credentials_web_authn.go
Normal file
154
pkg/httpclient/model_identity_with_credentials_web_authn.go
Normal file
@@ -0,0 +1,154 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityWithCredentialsWebAuthn type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityWithCredentialsWebAuthn{}
|
||||
|
||||
// IdentityWithCredentialsWebAuthn Create Identity and Import WebAuthn Credentials
|
||||
type IdentityWithCredentialsWebAuthn struct {
|
||||
Config *IdentityWithCredentialsWebAuthnConfig `json:"config,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityWithCredentialsWebAuthn IdentityWithCredentialsWebAuthn
|
||||
|
||||
// NewIdentityWithCredentialsWebAuthn instantiates a new IdentityWithCredentialsWebAuthn object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityWithCredentialsWebAuthn() *IdentityWithCredentialsWebAuthn {
|
||||
this := IdentityWithCredentialsWebAuthn{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityWithCredentialsWebAuthnWithDefaults instantiates a new IdentityWithCredentialsWebAuthn object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityWithCredentialsWebAuthnWithDefaults() *IdentityWithCredentialsWebAuthn {
|
||||
this := IdentityWithCredentialsWebAuthn{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetConfig returns the Config field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentialsWebAuthn) GetConfig() IdentityWithCredentialsWebAuthnConfig {
|
||||
if o == nil || IsNil(o.Config) {
|
||||
var ret IdentityWithCredentialsWebAuthnConfig
|
||||
return ret
|
||||
}
|
||||
return *o.Config
|
||||
}
|
||||
|
||||
// GetConfigOk returns a tuple with the Config field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsWebAuthn) GetConfigOk() (*IdentityWithCredentialsWebAuthnConfig, bool) {
|
||||
if o == nil || IsNil(o.Config) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Config, true
|
||||
}
|
||||
|
||||
// HasConfig returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentialsWebAuthn) HasConfig() bool {
|
||||
if o != nil && !IsNil(o.Config) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetConfig gets a reference to the given IdentityWithCredentialsWebAuthnConfig and assigns it to the Config field.
|
||||
func (o *IdentityWithCredentialsWebAuthn) SetConfig(v IdentityWithCredentialsWebAuthnConfig) {
|
||||
o.Config = &v
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsWebAuthn) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsWebAuthn) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Config) {
|
||||
toSerialize["config"] = o.Config
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityWithCredentialsWebAuthn) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityWithCredentialsWebAuthn := _IdentityWithCredentialsWebAuthn{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityWithCredentialsWebAuthn)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityWithCredentialsWebAuthn(varIdentityWithCredentialsWebAuthn)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "config")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityWithCredentialsWebAuthn struct {
|
||||
value *IdentityWithCredentialsWebAuthn
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsWebAuthn) Get() *IdentityWithCredentialsWebAuthn {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsWebAuthn) Set(val *IdentityWithCredentialsWebAuthn) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsWebAuthn) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsWebAuthn) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityWithCredentialsWebAuthn(val *IdentityWithCredentialsWebAuthn) *NullableIdentityWithCredentialsWebAuthn {
|
||||
return &NullableIdentityWithCredentialsWebAuthn{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsWebAuthn) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsWebAuthn) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the IdentityWithCredentialsWebAuthnConfig type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IdentityWithCredentialsWebAuthnConfig{}
|
||||
|
||||
// IdentityWithCredentialsWebAuthnConfig Create Identity and Import WebAuthn Credentials Configuration
|
||||
type IdentityWithCredentialsWebAuthnConfig struct {
|
||||
Credentials []IdentityCredentialsWebAuthn `json:"credentials,omitempty"`
|
||||
// UserHandle is the user handle of the webauthn credential.
|
||||
UserHandle []int32 `json:"user_handle,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IdentityWithCredentialsWebAuthnConfig IdentityWithCredentialsWebAuthnConfig
|
||||
|
||||
// NewIdentityWithCredentialsWebAuthnConfig instantiates a new IdentityWithCredentialsWebAuthnConfig object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIdentityWithCredentialsWebAuthnConfig() *IdentityWithCredentialsWebAuthnConfig {
|
||||
this := IdentityWithCredentialsWebAuthnConfig{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIdentityWithCredentialsWebAuthnConfigWithDefaults instantiates a new IdentityWithCredentialsWebAuthnConfig object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIdentityWithCredentialsWebAuthnConfigWithDefaults() *IdentityWithCredentialsWebAuthnConfig {
|
||||
this := IdentityWithCredentialsWebAuthnConfig{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCredentials returns the Credentials field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentialsWebAuthnConfig) GetCredentials() []IdentityCredentialsWebAuthn {
|
||||
if o == nil || IsNil(o.Credentials) {
|
||||
var ret []IdentityCredentialsWebAuthn
|
||||
return ret
|
||||
}
|
||||
return o.Credentials
|
||||
}
|
||||
|
||||
// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsWebAuthnConfig) GetCredentialsOk() ([]IdentityCredentialsWebAuthn, bool) {
|
||||
if o == nil || IsNil(o.Credentials) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Credentials, true
|
||||
}
|
||||
|
||||
// HasCredentials returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentialsWebAuthnConfig) HasCredentials() bool {
|
||||
if o != nil && !IsNil(o.Credentials) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCredentials gets a reference to the given []IdentityCredentialsWebAuthn and assigns it to the Credentials field.
|
||||
func (o *IdentityWithCredentialsWebAuthnConfig) SetCredentials(v []IdentityCredentialsWebAuthn) {
|
||||
o.Credentials = v
|
||||
}
|
||||
|
||||
// GetUserHandle returns the UserHandle field value if set, zero value otherwise.
|
||||
func (o *IdentityWithCredentialsWebAuthnConfig) GetUserHandle() []int32 {
|
||||
if o == nil || IsNil(o.UserHandle) {
|
||||
var ret []int32
|
||||
return ret
|
||||
}
|
||||
return o.UserHandle
|
||||
}
|
||||
|
||||
// GetUserHandleOk returns a tuple with the UserHandle field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IdentityWithCredentialsWebAuthnConfig) GetUserHandleOk() ([]int32, bool) {
|
||||
if o == nil || IsNil(o.UserHandle) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UserHandle, true
|
||||
}
|
||||
|
||||
// HasUserHandle returns a boolean if a field has been set.
|
||||
func (o *IdentityWithCredentialsWebAuthnConfig) HasUserHandle() bool {
|
||||
if o != nil && !IsNil(o.UserHandle) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUserHandle gets a reference to the given []int32 and assigns it to the UserHandle field.
|
||||
func (o *IdentityWithCredentialsWebAuthnConfig) SetUserHandle(v []int32) {
|
||||
o.UserHandle = v
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsWebAuthnConfig) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IdentityWithCredentialsWebAuthnConfig) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Credentials) {
|
||||
toSerialize["credentials"] = o.Credentials
|
||||
}
|
||||
if !IsNil(o.UserHandle) {
|
||||
toSerialize["user_handle"] = o.UserHandle
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IdentityWithCredentialsWebAuthnConfig) UnmarshalJSON(data []byte) (err error) {
|
||||
varIdentityWithCredentialsWebAuthnConfig := _IdentityWithCredentialsWebAuthnConfig{}
|
||||
|
||||
err = json.Unmarshal(data, &varIdentityWithCredentialsWebAuthnConfig)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IdentityWithCredentialsWebAuthnConfig(varIdentityWithCredentialsWebAuthnConfig)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "credentials")
|
||||
delete(additionalProperties, "user_handle")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIdentityWithCredentialsWebAuthnConfig struct {
|
||||
value *IdentityWithCredentialsWebAuthnConfig
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsWebAuthnConfig) Get() *IdentityWithCredentialsWebAuthnConfig {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsWebAuthnConfig) Set(val *IdentityWithCredentialsWebAuthnConfig) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsWebAuthnConfig) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsWebAuthnConfig) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIdentityWithCredentialsWebAuthnConfig(val *IdentityWithCredentialsWebAuthnConfig) *NullableIdentityWithCredentialsWebAuthnConfig {
|
||||
return &NullableIdentityWithCredentialsWebAuthnConfig{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIdentityWithCredentialsWebAuthnConfig) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIdentityWithCredentialsWebAuthnConfig) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
168
pkg/httpclient/model_is_alive_200_response.go
Normal file
168
pkg/httpclient/model_is_alive_200_response.go
Normal file
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the IsAlive200Response type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IsAlive200Response{}
|
||||
|
||||
// IsAlive200Response struct for IsAlive200Response
|
||||
type IsAlive200Response struct {
|
||||
// Always \"ok\".
|
||||
Status string `json:"status"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IsAlive200Response IsAlive200Response
|
||||
|
||||
// NewIsAlive200Response instantiates a new IsAlive200Response object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIsAlive200Response(status string) *IsAlive200Response {
|
||||
this := IsAlive200Response{}
|
||||
this.Status = status
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIsAlive200ResponseWithDefaults instantiates a new IsAlive200Response object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIsAlive200ResponseWithDefaults() *IsAlive200Response {
|
||||
this := IsAlive200Response{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value
|
||||
func (o *IsAlive200Response) GetStatus() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Status
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IsAlive200Response) GetStatusOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Status, true
|
||||
}
|
||||
|
||||
// SetStatus sets field value
|
||||
func (o *IsAlive200Response) SetStatus(v string) {
|
||||
o.Status = v
|
||||
}
|
||||
|
||||
func (o IsAlive200Response) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IsAlive200Response) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["status"] = o.Status
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IsAlive200Response) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"status",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varIsAlive200Response := _IsAlive200Response{}
|
||||
|
||||
err = json.Unmarshal(data, &varIsAlive200Response)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IsAlive200Response(varIsAlive200Response)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "status")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIsAlive200Response struct {
|
||||
value *IsAlive200Response
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIsAlive200Response) Get() *IsAlive200Response {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIsAlive200Response) Set(val *IsAlive200Response) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIsAlive200Response) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIsAlive200Response) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIsAlive200Response(val *IsAlive200Response) *NullableIsAlive200Response {
|
||||
return &NullableIsAlive200Response{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIsAlive200Response) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIsAlive200Response) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
168
pkg/httpclient/model_is_ready_503_response.go
Normal file
168
pkg/httpclient/model_is_ready_503_response.go
Normal file
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the IsReady503Response type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &IsReady503Response{}
|
||||
|
||||
// IsReady503Response struct for IsReady503Response
|
||||
type IsReady503Response struct {
|
||||
// Errors contains a list of errors that caused the not ready status.
|
||||
Errors map[string]string `json:"errors"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _IsReady503Response IsReady503Response
|
||||
|
||||
// NewIsReady503Response instantiates a new IsReady503Response object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIsReady503Response(errors map[string]string) *IsReady503Response {
|
||||
this := IsReady503Response{}
|
||||
this.Errors = errors
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIsReady503ResponseWithDefaults instantiates a new IsReady503Response object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIsReady503ResponseWithDefaults() *IsReady503Response {
|
||||
this := IsReady503Response{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetErrors returns the Errors field value
|
||||
func (o *IsReady503Response) GetErrors() map[string]string {
|
||||
if o == nil {
|
||||
var ret map[string]string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Errors
|
||||
}
|
||||
|
||||
// GetErrorsOk returns a tuple with the Errors field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IsReady503Response) GetErrorsOk() (*map[string]string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Errors, true
|
||||
}
|
||||
|
||||
// SetErrors sets field value
|
||||
func (o *IsReady503Response) SetErrors(v map[string]string) {
|
||||
o.Errors = v
|
||||
}
|
||||
|
||||
func (o IsReady503Response) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o IsReady503Response) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["errors"] = o.Errors
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *IsReady503Response) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"errors",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varIsReady503Response := _IsReady503Response{}
|
||||
|
||||
err = json.Unmarshal(data, &varIsReady503Response)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = IsReady503Response(varIsReady503Response)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "errors")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableIsReady503Response struct {
|
||||
value *IsReady503Response
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIsReady503Response) Get() *IsReady503Response {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIsReady503Response) Set(val *IsReady503Response) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIsReady503Response) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIsReady503Response) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIsReady503Response(val *IsReady503Response) *NullableIsReady503Response {
|
||||
return &NullableIsReady503Response{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIsReady503Response) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIsReady503Response) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
275
pkg/httpclient/model_json_patch.go
Normal file
275
pkg/httpclient/model_json_patch.go
Normal file
@@ -0,0 +1,275 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the JsonPatch type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &JsonPatch{}
|
||||
|
||||
// JsonPatch A JSONPatch document as defined by RFC 6902
|
||||
type JsonPatch struct {
|
||||
// This field is used together with operation \"move\" and uses JSON Pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).
|
||||
From *string `json:"from,omitempty"`
|
||||
// The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\".
|
||||
Op string `json:"op"`
|
||||
// The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).
|
||||
Path string `json:"path"`
|
||||
// The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).
|
||||
Value interface{} `json:"value,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _JsonPatch JsonPatch
|
||||
|
||||
// NewJsonPatch instantiates a new JsonPatch object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewJsonPatch(op string, path string) *JsonPatch {
|
||||
this := JsonPatch{}
|
||||
this.Op = op
|
||||
this.Path = path
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewJsonPatchWithDefaults instantiates a new JsonPatch object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewJsonPatchWithDefaults() *JsonPatch {
|
||||
this := JsonPatch{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetFrom returns the From field value if set, zero value otherwise.
|
||||
func (o *JsonPatch) GetFrom() string {
|
||||
if o == nil || IsNil(o.From) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.From
|
||||
}
|
||||
|
||||
// GetFromOk returns a tuple with the From field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *JsonPatch) GetFromOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.From) {
|
||||
return nil, false
|
||||
}
|
||||
return o.From, true
|
||||
}
|
||||
|
||||
// HasFrom returns a boolean if a field has been set.
|
||||
func (o *JsonPatch) HasFrom() bool {
|
||||
if o != nil && !IsNil(o.From) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetFrom gets a reference to the given string and assigns it to the From field.
|
||||
func (o *JsonPatch) SetFrom(v string) {
|
||||
o.From = &v
|
||||
}
|
||||
|
||||
// GetOp returns the Op field value
|
||||
func (o *JsonPatch) GetOp() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Op
|
||||
}
|
||||
|
||||
// GetOpOk returns a tuple with the Op field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *JsonPatch) GetOpOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Op, true
|
||||
}
|
||||
|
||||
// SetOp sets field value
|
||||
func (o *JsonPatch) SetOp(v string) {
|
||||
o.Op = v
|
||||
}
|
||||
|
||||
// GetPath returns the Path field value
|
||||
func (o *JsonPatch) GetPath() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Path
|
||||
}
|
||||
|
||||
// GetPathOk returns a tuple with the Path field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *JsonPatch) GetPathOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Path, true
|
||||
}
|
||||
|
||||
// SetPath sets field value
|
||||
func (o *JsonPatch) SetPath(v string) {
|
||||
o.Path = v
|
||||
}
|
||||
|
||||
// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *JsonPatch) GetValue() interface{} {
|
||||
if o == nil {
|
||||
var ret interface{}
|
||||
return ret
|
||||
}
|
||||
return o.Value
|
||||
}
|
||||
|
||||
// GetValueOk returns a tuple with the Value field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *JsonPatch) GetValueOk() (*interface{}, bool) {
|
||||
if o == nil || IsNil(o.Value) {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Value, true
|
||||
}
|
||||
|
||||
// HasValue returns a boolean if a field has been set.
|
||||
func (o *JsonPatch) HasValue() bool {
|
||||
if o != nil && !IsNil(o.Value) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetValue gets a reference to the given interface{} and assigns it to the Value field.
|
||||
func (o *JsonPatch) SetValue(v interface{}) {
|
||||
o.Value = v
|
||||
}
|
||||
|
||||
func (o JsonPatch) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o JsonPatch) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.From) {
|
||||
toSerialize["from"] = o.From
|
||||
}
|
||||
toSerialize["op"] = o.Op
|
||||
toSerialize["path"] = o.Path
|
||||
if o.Value != nil {
|
||||
toSerialize["value"] = o.Value
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *JsonPatch) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"op",
|
||||
"path",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varJsonPatch := _JsonPatch{}
|
||||
|
||||
err = json.Unmarshal(data, &varJsonPatch)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = JsonPatch(varJsonPatch)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "from")
|
||||
delete(additionalProperties, "op")
|
||||
delete(additionalProperties, "path")
|
||||
delete(additionalProperties, "value")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableJsonPatch struct {
|
||||
value *JsonPatch
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableJsonPatch) Get() *JsonPatch {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableJsonPatch) Set(val *JsonPatch) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableJsonPatch) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableJsonPatch) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableJsonPatch(val *JsonPatch) *NullableJsonPatch {
|
||||
return &NullableJsonPatch{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableJsonPatch) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableJsonPatch) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
113
pkg/httpclient/model_key_state.go
Normal file
113
pkg/httpclient/model_key_state.go
Normal file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// KeyState Only a \"confirmed\" key can be used to authenticate. A \"locked\" key was disabled after too many wrong-PIN attempts; rotating its pin_secret unlocks it.
|
||||
type KeyState string
|
||||
|
||||
// List of KeyState
|
||||
const (
|
||||
KEYSTATE_INITIAL KeyState = "initial"
|
||||
KEYSTATE_CONFIRMED KeyState = "confirmed"
|
||||
KEYSTATE_LOCKED KeyState = "locked"
|
||||
)
|
||||
|
||||
// All allowed values of KeyState enum
|
||||
var AllowedKeyStateEnumValues = []KeyState{
|
||||
"initial",
|
||||
"confirmed",
|
||||
"locked",
|
||||
}
|
||||
|
||||
func (v *KeyState) UnmarshalJSON(src []byte) error {
|
||||
var value string
|
||||
err := json.Unmarshal(src, &value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
enumTypeValue := KeyState(value)
|
||||
for _, existing := range AllowedKeyStateEnumValues {
|
||||
if existing == enumTypeValue {
|
||||
*v = enumTypeValue
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("%+v is not a valid KeyState", value)
|
||||
}
|
||||
|
||||
// NewKeyStateFromValue returns a pointer to a valid KeyState
|
||||
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||
func NewKeyStateFromValue(v string) (*KeyState, error) {
|
||||
ev := KeyState(v)
|
||||
if ev.IsValid() {
|
||||
return &ev, nil
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid value '%v' for KeyState: valid values are %v", v, AllowedKeyStateEnumValues)
|
||||
}
|
||||
}
|
||||
|
||||
// IsValid return true if the value is valid for the enum, false otherwise
|
||||
func (v KeyState) IsValid() bool {
|
||||
for _, existing := range AllowedKeyStateEnumValues {
|
||||
if existing == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Ptr returns reference to KeyState value
|
||||
func (v KeyState) Ptr() *KeyState {
|
||||
return &v
|
||||
}
|
||||
|
||||
type NullableKeyState struct {
|
||||
value *KeyState
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableKeyState) Get() *KeyState {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableKeyState) Set(val *KeyState) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableKeyState) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableKeyState) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableKeyState(val *KeyState) *NullableKeyState {
|
||||
return &NullableKeyState{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableKeyState) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableKeyState) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
853
pkg/httpclient/model_login_flow.go
Normal file
853
pkg/httpclient/model_login_flow.go
Normal file
@@ -0,0 +1,853 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
// checks if the LoginFlow type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &LoginFlow{}
|
||||
|
||||
// LoginFlow This object represents a login flow. A login flow is initiated at the \"Initiate Login API / Browser Flow\" endpoint by a client. Once a login flow is completed successfully, a session cookie or session token will be issued.
|
||||
type LoginFlow struct {
|
||||
// The active login method If set contains the login method used. If the flow is new, it is unset. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth passkey CredentialsTypePasskey profile CredentialsTypeProfile saml CredentialsTypeSAML deviceauthn CredentialsTypeDeviceAuthn identifier_first CredentialsTypeIdentifierFirst link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode
|
||||
Active *string `json:"active,omitempty"`
|
||||
// CreatedAt is a helper struct field for gobuffalo.pop.
|
||||
CreatedAt *time.Time `json:"created_at,omitempty"`
|
||||
// ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in, a new flow has to be initiated.
|
||||
ExpiresAt time.Time `json:"expires_at"`
|
||||
// ID represents the flow's unique ID. When performing the login flow, this represents the id in the login UI's query parameter: http://<selfservice.flows.login.ui_url>/?flow=<flow_id>
|
||||
Id string `json:"id"`
|
||||
// IdentitySchema optionally holds the ID of the identity schema that is used for this flow. This value can be set by the user when creating the flow and should be retained when the flow is saved or converted to another flow.
|
||||
IdentitySchema *string `json:"identity_schema,omitempty"`
|
||||
// IssuedAt is the time (UTC) when the flow started.
|
||||
IssuedAt time.Time `json:"issued_at"`
|
||||
// Ory OAuth 2.0 Login Challenge. This value is set using the `login_challenge` query parameter of the registration and login endpoints. If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider.
|
||||
Oauth2LoginChallenge *string `json:"oauth2_login_challenge,omitempty"`
|
||||
Oauth2LoginRequest *OAuth2LoginRequest `json:"oauth2_login_request,omitempty"`
|
||||
OrganizationId NullableString `json:"organization_id,omitempty"`
|
||||
// Refresh stores whether this login flow should enforce re-authentication.
|
||||
Refresh *bool `json:"refresh,omitempty"`
|
||||
// RequestURL is the initial URL that was requested from Ory Kratos. It can be used to forward information contained in the URL's path or query for example.
|
||||
RequestUrl string `json:"request_url"`
|
||||
RequestedAal *AuthenticatorAssuranceLevel `json:"requested_aal,omitempty"`
|
||||
// ReturnTo contains the requested return_to URL.
|
||||
ReturnTo *string `json:"return_to,omitempty"`
|
||||
// SessionTokenExchangeCode holds the secret code that the client can use to retrieve a session token after the login flow has been completed. This is only set if the client has requested a session token exchange code, and if the flow is of type \"api\", and only on creating the login flow.
|
||||
SessionTokenExchangeCode *string `json:"session_token_exchange_code,omitempty"`
|
||||
// State represents the state of this request: choose_method: ask the user to choose a method to sign in with sent_email: the email has been sent to the user passed_challenge: the request was successful and the login challenge was passed.
|
||||
State interface{} `json:"state"`
|
||||
TestContext *LoginFlowTestContext `json:"test_context,omitempty"`
|
||||
// TransientPayload is used to pass data from the login to hooks and email templates
|
||||
TransientPayload map[string]interface{} `json:"transient_payload,omitempty"`
|
||||
// The flow type can either be `api` or `browser`.
|
||||
Type string `json:"type"`
|
||||
Ui UiContainer `json:"ui"`
|
||||
// UpdatedAt is a helper struct field for gobuffalo.pop.
|
||||
UpdatedAt *time.Time `json:"updated_at,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _LoginFlow LoginFlow
|
||||
|
||||
// NewLoginFlow instantiates a new LoginFlow object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewLoginFlow(expiresAt time.Time, id string, issuedAt time.Time, requestUrl string, state interface{}, type_ string, ui UiContainer) *LoginFlow {
|
||||
this := LoginFlow{}
|
||||
this.ExpiresAt = expiresAt
|
||||
this.Id = id
|
||||
this.IssuedAt = issuedAt
|
||||
this.RequestUrl = requestUrl
|
||||
this.State = state
|
||||
this.Type = type_
|
||||
this.Ui = ui
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewLoginFlowWithDefaults instantiates a new LoginFlow object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewLoginFlowWithDefaults() *LoginFlow {
|
||||
this := LoginFlow{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetActive returns the Active field value if set, zero value otherwise.
|
||||
func (o *LoginFlow) GetActive() string {
|
||||
if o == nil || IsNil(o.Active) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Active
|
||||
}
|
||||
|
||||
// GetActiveOk returns a tuple with the Active field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlow) GetActiveOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Active) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Active, true
|
||||
}
|
||||
|
||||
// HasActive returns a boolean if a field has been set.
|
||||
func (o *LoginFlow) HasActive() bool {
|
||||
if o != nil && !IsNil(o.Active) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetActive gets a reference to the given string and assigns it to the Active field.
|
||||
func (o *LoginFlow) SetActive(v string) {
|
||||
o.Active = &v
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *LoginFlow) GetCreatedAt() time.Time {
|
||||
if o == nil || IsNil(o.CreatedAt) {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
return *o.CreatedAt
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlow) GetCreatedAtOk() (*time.Time, bool) {
|
||||
if o == nil || IsNil(o.CreatedAt) {
|
||||
return nil, false
|
||||
}
|
||||
return o.CreatedAt, true
|
||||
}
|
||||
|
||||
// HasCreatedAt returns a boolean if a field has been set.
|
||||
func (o *LoginFlow) HasCreatedAt() bool {
|
||||
if o != nil && !IsNil(o.CreatedAt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
||||
func (o *LoginFlow) SetCreatedAt(v time.Time) {
|
||||
o.CreatedAt = &v
|
||||
}
|
||||
|
||||
// GetExpiresAt returns the ExpiresAt field value
|
||||
func (o *LoginFlow) GetExpiresAt() time.Time {
|
||||
if o == nil {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.ExpiresAt
|
||||
}
|
||||
|
||||
// GetExpiresAtOk returns a tuple with the ExpiresAt field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlow) GetExpiresAtOk() (*time.Time, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.ExpiresAt, true
|
||||
}
|
||||
|
||||
// SetExpiresAt sets field value
|
||||
func (o *LoginFlow) SetExpiresAt(v time.Time) {
|
||||
o.ExpiresAt = v
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *LoginFlow) GetId() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Id
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlow) GetIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Id, true
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *LoginFlow) SetId(v string) {
|
||||
o.Id = v
|
||||
}
|
||||
|
||||
// GetIdentitySchema returns the IdentitySchema field value if set, zero value otherwise.
|
||||
func (o *LoginFlow) GetIdentitySchema() string {
|
||||
if o == nil || IsNil(o.IdentitySchema) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.IdentitySchema
|
||||
}
|
||||
|
||||
// GetIdentitySchemaOk returns a tuple with the IdentitySchema field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlow) GetIdentitySchemaOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.IdentitySchema) {
|
||||
return nil, false
|
||||
}
|
||||
return o.IdentitySchema, true
|
||||
}
|
||||
|
||||
// HasIdentitySchema returns a boolean if a field has been set.
|
||||
func (o *LoginFlow) HasIdentitySchema() bool {
|
||||
if o != nil && !IsNil(o.IdentitySchema) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetIdentitySchema gets a reference to the given string and assigns it to the IdentitySchema field.
|
||||
func (o *LoginFlow) SetIdentitySchema(v string) {
|
||||
o.IdentitySchema = &v
|
||||
}
|
||||
|
||||
// GetIssuedAt returns the IssuedAt field value
|
||||
func (o *LoginFlow) GetIssuedAt() time.Time {
|
||||
if o == nil {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.IssuedAt
|
||||
}
|
||||
|
||||
// GetIssuedAtOk returns a tuple with the IssuedAt field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlow) GetIssuedAtOk() (*time.Time, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.IssuedAt, true
|
||||
}
|
||||
|
||||
// SetIssuedAt sets field value
|
||||
func (o *LoginFlow) SetIssuedAt(v time.Time) {
|
||||
o.IssuedAt = v
|
||||
}
|
||||
|
||||
// GetOauth2LoginChallenge returns the Oauth2LoginChallenge field value if set, zero value otherwise.
|
||||
func (o *LoginFlow) GetOauth2LoginChallenge() string {
|
||||
if o == nil || IsNil(o.Oauth2LoginChallenge) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Oauth2LoginChallenge
|
||||
}
|
||||
|
||||
// GetOauth2LoginChallengeOk returns a tuple with the Oauth2LoginChallenge field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlow) GetOauth2LoginChallengeOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Oauth2LoginChallenge) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Oauth2LoginChallenge, true
|
||||
}
|
||||
|
||||
// HasOauth2LoginChallenge returns a boolean if a field has been set.
|
||||
func (o *LoginFlow) HasOauth2LoginChallenge() bool {
|
||||
if o != nil && !IsNil(o.Oauth2LoginChallenge) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetOauth2LoginChallenge gets a reference to the given string and assigns it to the Oauth2LoginChallenge field.
|
||||
func (o *LoginFlow) SetOauth2LoginChallenge(v string) {
|
||||
o.Oauth2LoginChallenge = &v
|
||||
}
|
||||
|
||||
// GetOauth2LoginRequest returns the Oauth2LoginRequest field value if set, zero value otherwise.
|
||||
func (o *LoginFlow) GetOauth2LoginRequest() OAuth2LoginRequest {
|
||||
if o == nil || IsNil(o.Oauth2LoginRequest) {
|
||||
var ret OAuth2LoginRequest
|
||||
return ret
|
||||
}
|
||||
return *o.Oauth2LoginRequest
|
||||
}
|
||||
|
||||
// GetOauth2LoginRequestOk returns a tuple with the Oauth2LoginRequest field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlow) GetOauth2LoginRequestOk() (*OAuth2LoginRequest, bool) {
|
||||
if o == nil || IsNil(o.Oauth2LoginRequest) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Oauth2LoginRequest, true
|
||||
}
|
||||
|
||||
// HasOauth2LoginRequest returns a boolean if a field has been set.
|
||||
func (o *LoginFlow) HasOauth2LoginRequest() bool {
|
||||
if o != nil && !IsNil(o.Oauth2LoginRequest) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetOauth2LoginRequest gets a reference to the given OAuth2LoginRequest and assigns it to the Oauth2LoginRequest field.
|
||||
func (o *LoginFlow) SetOauth2LoginRequest(v OAuth2LoginRequest) {
|
||||
o.Oauth2LoginRequest = &v
|
||||
}
|
||||
|
||||
// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *LoginFlow) GetOrganizationId() string {
|
||||
if o == nil || IsNil(o.OrganizationId.Get()) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.OrganizationId.Get()
|
||||
}
|
||||
|
||||
// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *LoginFlow) GetOrganizationIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.OrganizationId.Get(), o.OrganizationId.IsSet()
|
||||
}
|
||||
|
||||
// HasOrganizationId returns a boolean if a field has been set.
|
||||
func (o *LoginFlow) HasOrganizationId() bool {
|
||||
if o != nil && o.OrganizationId.IsSet() {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetOrganizationId gets a reference to the given NullableString and assigns it to the OrganizationId field.
|
||||
func (o *LoginFlow) SetOrganizationId(v string) {
|
||||
o.OrganizationId.Set(&v)
|
||||
}
|
||||
|
||||
// SetOrganizationIdNil sets the value for OrganizationId to be an explicit nil
|
||||
func (o *LoginFlow) SetOrganizationIdNil() {
|
||||
o.OrganizationId.Set(nil)
|
||||
}
|
||||
|
||||
// UnsetOrganizationId ensures that no value is present for OrganizationId, not even an explicit nil
|
||||
func (o *LoginFlow) UnsetOrganizationId() {
|
||||
o.OrganizationId.Unset()
|
||||
}
|
||||
|
||||
// GetRefresh returns the Refresh field value if set, zero value otherwise.
|
||||
func (o *LoginFlow) GetRefresh() bool {
|
||||
if o == nil || IsNil(o.Refresh) {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.Refresh
|
||||
}
|
||||
|
||||
// GetRefreshOk returns a tuple with the Refresh field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlow) GetRefreshOk() (*bool, bool) {
|
||||
if o == nil || IsNil(o.Refresh) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Refresh, true
|
||||
}
|
||||
|
||||
// HasRefresh returns a boolean if a field has been set.
|
||||
func (o *LoginFlow) HasRefresh() bool {
|
||||
if o != nil && !IsNil(o.Refresh) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRefresh gets a reference to the given bool and assigns it to the Refresh field.
|
||||
func (o *LoginFlow) SetRefresh(v bool) {
|
||||
o.Refresh = &v
|
||||
}
|
||||
|
||||
// GetRequestUrl returns the RequestUrl field value
|
||||
func (o *LoginFlow) GetRequestUrl() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.RequestUrl
|
||||
}
|
||||
|
||||
// GetRequestUrlOk returns a tuple with the RequestUrl field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlow) GetRequestUrlOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.RequestUrl, true
|
||||
}
|
||||
|
||||
// SetRequestUrl sets field value
|
||||
func (o *LoginFlow) SetRequestUrl(v string) {
|
||||
o.RequestUrl = v
|
||||
}
|
||||
|
||||
// GetRequestedAal returns the RequestedAal field value if set, zero value otherwise.
|
||||
func (o *LoginFlow) GetRequestedAal() AuthenticatorAssuranceLevel {
|
||||
if o == nil || IsNil(o.RequestedAal) {
|
||||
var ret AuthenticatorAssuranceLevel
|
||||
return ret
|
||||
}
|
||||
return *o.RequestedAal
|
||||
}
|
||||
|
||||
// GetRequestedAalOk returns a tuple with the RequestedAal field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlow) GetRequestedAalOk() (*AuthenticatorAssuranceLevel, bool) {
|
||||
if o == nil || IsNil(o.RequestedAal) {
|
||||
return nil, false
|
||||
}
|
||||
return o.RequestedAal, true
|
||||
}
|
||||
|
||||
// HasRequestedAal returns a boolean if a field has been set.
|
||||
func (o *LoginFlow) HasRequestedAal() bool {
|
||||
if o != nil && !IsNil(o.RequestedAal) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRequestedAal gets a reference to the given AuthenticatorAssuranceLevel and assigns it to the RequestedAal field.
|
||||
func (o *LoginFlow) SetRequestedAal(v AuthenticatorAssuranceLevel) {
|
||||
o.RequestedAal = &v
|
||||
}
|
||||
|
||||
// GetReturnTo returns the ReturnTo field value if set, zero value otherwise.
|
||||
func (o *LoginFlow) GetReturnTo() string {
|
||||
if o == nil || IsNil(o.ReturnTo) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.ReturnTo
|
||||
}
|
||||
|
||||
// GetReturnToOk returns a tuple with the ReturnTo field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlow) GetReturnToOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.ReturnTo) {
|
||||
return nil, false
|
||||
}
|
||||
return o.ReturnTo, true
|
||||
}
|
||||
|
||||
// HasReturnTo returns a boolean if a field has been set.
|
||||
func (o *LoginFlow) HasReturnTo() bool {
|
||||
if o != nil && !IsNil(o.ReturnTo) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetReturnTo gets a reference to the given string and assigns it to the ReturnTo field.
|
||||
func (o *LoginFlow) SetReturnTo(v string) {
|
||||
o.ReturnTo = &v
|
||||
}
|
||||
|
||||
// GetSessionTokenExchangeCode returns the SessionTokenExchangeCode field value if set, zero value otherwise.
|
||||
func (o *LoginFlow) GetSessionTokenExchangeCode() string {
|
||||
if o == nil || IsNil(o.SessionTokenExchangeCode) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.SessionTokenExchangeCode
|
||||
}
|
||||
|
||||
// GetSessionTokenExchangeCodeOk returns a tuple with the SessionTokenExchangeCode field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlow) GetSessionTokenExchangeCodeOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.SessionTokenExchangeCode) {
|
||||
return nil, false
|
||||
}
|
||||
return o.SessionTokenExchangeCode, true
|
||||
}
|
||||
|
||||
// HasSessionTokenExchangeCode returns a boolean if a field has been set.
|
||||
func (o *LoginFlow) HasSessionTokenExchangeCode() bool {
|
||||
if o != nil && !IsNil(o.SessionTokenExchangeCode) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSessionTokenExchangeCode gets a reference to the given string and assigns it to the SessionTokenExchangeCode field.
|
||||
func (o *LoginFlow) SetSessionTokenExchangeCode(v string) {
|
||||
o.SessionTokenExchangeCode = &v
|
||||
}
|
||||
|
||||
// GetState returns the State field value
|
||||
// If the value is explicit nil, the zero value for interface{} will be returned
|
||||
func (o *LoginFlow) GetState() interface{} {
|
||||
if o == nil {
|
||||
var ret interface{}
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.State
|
||||
}
|
||||
|
||||
// GetStateOk returns a tuple with the State field value
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *LoginFlow) GetStateOk() (*interface{}, bool) {
|
||||
if o == nil || IsNil(o.State) {
|
||||
return nil, false
|
||||
}
|
||||
return &o.State, true
|
||||
}
|
||||
|
||||
// SetState sets field value
|
||||
func (o *LoginFlow) SetState(v interface{}) {
|
||||
o.State = v
|
||||
}
|
||||
|
||||
// GetTestContext returns the TestContext field value if set, zero value otherwise.
|
||||
func (o *LoginFlow) GetTestContext() LoginFlowTestContext {
|
||||
if o == nil || IsNil(o.TestContext) {
|
||||
var ret LoginFlowTestContext
|
||||
return ret
|
||||
}
|
||||
return *o.TestContext
|
||||
}
|
||||
|
||||
// GetTestContextOk returns a tuple with the TestContext field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlow) GetTestContextOk() (*LoginFlowTestContext, bool) {
|
||||
if o == nil || IsNil(o.TestContext) {
|
||||
return nil, false
|
||||
}
|
||||
return o.TestContext, true
|
||||
}
|
||||
|
||||
// HasTestContext returns a boolean if a field has been set.
|
||||
func (o *LoginFlow) HasTestContext() bool {
|
||||
if o != nil && !IsNil(o.TestContext) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTestContext gets a reference to the given LoginFlowTestContext and assigns it to the TestContext field.
|
||||
func (o *LoginFlow) SetTestContext(v LoginFlowTestContext) {
|
||||
o.TestContext = &v
|
||||
}
|
||||
|
||||
// GetTransientPayload returns the TransientPayload field value if set, zero value otherwise.
|
||||
func (o *LoginFlow) GetTransientPayload() map[string]interface{} {
|
||||
if o == nil || IsNil(o.TransientPayload) {
|
||||
var ret map[string]interface{}
|
||||
return ret
|
||||
}
|
||||
return o.TransientPayload
|
||||
}
|
||||
|
||||
// GetTransientPayloadOk returns a tuple with the TransientPayload field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlow) GetTransientPayloadOk() (map[string]interface{}, bool) {
|
||||
if o == nil || IsNil(o.TransientPayload) {
|
||||
return map[string]interface{}{}, false
|
||||
}
|
||||
return o.TransientPayload, true
|
||||
}
|
||||
|
||||
// HasTransientPayload returns a boolean if a field has been set.
|
||||
func (o *LoginFlow) HasTransientPayload() bool {
|
||||
if o != nil && !IsNil(o.TransientPayload) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTransientPayload gets a reference to the given map[string]interface{} and assigns it to the TransientPayload field.
|
||||
func (o *LoginFlow) SetTransientPayload(v map[string]interface{}) {
|
||||
o.TransientPayload = v
|
||||
}
|
||||
|
||||
// GetType returns the Type field value
|
||||
func (o *LoginFlow) GetType() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Type
|
||||
}
|
||||
|
||||
// GetTypeOk returns a tuple with the Type field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlow) GetTypeOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Type, true
|
||||
}
|
||||
|
||||
// SetType sets field value
|
||||
func (o *LoginFlow) SetType(v string) {
|
||||
o.Type = v
|
||||
}
|
||||
|
||||
// GetUi returns the Ui field value
|
||||
func (o *LoginFlow) GetUi() UiContainer {
|
||||
if o == nil {
|
||||
var ret UiContainer
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Ui
|
||||
}
|
||||
|
||||
// GetUiOk returns a tuple with the Ui field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlow) GetUiOk() (*UiContainer, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Ui, true
|
||||
}
|
||||
|
||||
// SetUi sets field value
|
||||
func (o *LoginFlow) SetUi(v UiContainer) {
|
||||
o.Ui = v
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
||||
func (o *LoginFlow) GetUpdatedAt() time.Time {
|
||||
if o == nil || IsNil(o.UpdatedAt) {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
return *o.UpdatedAt
|
||||
}
|
||||
|
||||
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlow) GetUpdatedAtOk() (*time.Time, bool) {
|
||||
if o == nil || IsNil(o.UpdatedAt) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UpdatedAt, true
|
||||
}
|
||||
|
||||
// HasUpdatedAt returns a boolean if a field has been set.
|
||||
func (o *LoginFlow) HasUpdatedAt() bool {
|
||||
if o != nil && !IsNil(o.UpdatedAt) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
|
||||
func (o *LoginFlow) SetUpdatedAt(v time.Time) {
|
||||
o.UpdatedAt = &v
|
||||
}
|
||||
|
||||
func (o LoginFlow) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o LoginFlow) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Active) {
|
||||
toSerialize["active"] = o.Active
|
||||
}
|
||||
if !IsNil(o.CreatedAt) {
|
||||
toSerialize["created_at"] = o.CreatedAt
|
||||
}
|
||||
toSerialize["expires_at"] = o.ExpiresAt
|
||||
toSerialize["id"] = o.Id
|
||||
if !IsNil(o.IdentitySchema) {
|
||||
toSerialize["identity_schema"] = o.IdentitySchema
|
||||
}
|
||||
toSerialize["issued_at"] = o.IssuedAt
|
||||
if !IsNil(o.Oauth2LoginChallenge) {
|
||||
toSerialize["oauth2_login_challenge"] = o.Oauth2LoginChallenge
|
||||
}
|
||||
if !IsNil(o.Oauth2LoginRequest) {
|
||||
toSerialize["oauth2_login_request"] = o.Oauth2LoginRequest
|
||||
}
|
||||
if o.OrganizationId.IsSet() {
|
||||
toSerialize["organization_id"] = o.OrganizationId.Get()
|
||||
}
|
||||
if !IsNil(o.Refresh) {
|
||||
toSerialize["refresh"] = o.Refresh
|
||||
}
|
||||
toSerialize["request_url"] = o.RequestUrl
|
||||
if !IsNil(o.RequestedAal) {
|
||||
toSerialize["requested_aal"] = o.RequestedAal
|
||||
}
|
||||
if !IsNil(o.ReturnTo) {
|
||||
toSerialize["return_to"] = o.ReturnTo
|
||||
}
|
||||
if !IsNil(o.SessionTokenExchangeCode) {
|
||||
toSerialize["session_token_exchange_code"] = o.SessionTokenExchangeCode
|
||||
}
|
||||
if o.State != nil {
|
||||
toSerialize["state"] = o.State
|
||||
}
|
||||
if !IsNil(o.TestContext) {
|
||||
toSerialize["test_context"] = o.TestContext
|
||||
}
|
||||
if !IsNil(o.TransientPayload) {
|
||||
toSerialize["transient_payload"] = o.TransientPayload
|
||||
}
|
||||
toSerialize["type"] = o.Type
|
||||
toSerialize["ui"] = o.Ui
|
||||
if !IsNil(o.UpdatedAt) {
|
||||
toSerialize["updated_at"] = o.UpdatedAt
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *LoginFlow) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"expires_at",
|
||||
"id",
|
||||
"issued_at",
|
||||
"request_url",
|
||||
"state",
|
||||
"type",
|
||||
"ui",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varLoginFlow := _LoginFlow{}
|
||||
|
||||
err = json.Unmarshal(data, &varLoginFlow)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = LoginFlow(varLoginFlow)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "active")
|
||||
delete(additionalProperties, "created_at")
|
||||
delete(additionalProperties, "expires_at")
|
||||
delete(additionalProperties, "id")
|
||||
delete(additionalProperties, "identity_schema")
|
||||
delete(additionalProperties, "issued_at")
|
||||
delete(additionalProperties, "oauth2_login_challenge")
|
||||
delete(additionalProperties, "oauth2_login_request")
|
||||
delete(additionalProperties, "organization_id")
|
||||
delete(additionalProperties, "refresh")
|
||||
delete(additionalProperties, "request_url")
|
||||
delete(additionalProperties, "requested_aal")
|
||||
delete(additionalProperties, "return_to")
|
||||
delete(additionalProperties, "session_token_exchange_code")
|
||||
delete(additionalProperties, "state")
|
||||
delete(additionalProperties, "test_context")
|
||||
delete(additionalProperties, "transient_payload")
|
||||
delete(additionalProperties, "type")
|
||||
delete(additionalProperties, "ui")
|
||||
delete(additionalProperties, "updated_at")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableLoginFlow struct {
|
||||
value *LoginFlow
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableLoginFlow) Get() *LoginFlow {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableLoginFlow) Set(val *LoginFlow) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableLoginFlow) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableLoginFlow) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableLoginFlow(val *LoginFlow) *NullableLoginFlow {
|
||||
return &NullableLoginFlow{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableLoginFlow) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableLoginFlow) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
113
pkg/httpclient/model_login_flow_state.go
Normal file
113
pkg/httpclient/model_login_flow_state.go
Normal file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// LoginFlowState The experimental state represents the state of a login flow. This field is EXPERIMENTAL and subject to change!
|
||||
type LoginFlowState string
|
||||
|
||||
// List of loginFlowState
|
||||
const (
|
||||
LOGINFLOWSTATE_CHOOSE_METHOD LoginFlowState = "choose_method"
|
||||
LOGINFLOWSTATE_SENT_EMAIL LoginFlowState = "sent_email"
|
||||
LOGINFLOWSTATE_PASSED_CHALLENGE LoginFlowState = "passed_challenge"
|
||||
)
|
||||
|
||||
// All allowed values of LoginFlowState enum
|
||||
var AllowedLoginFlowStateEnumValues = []LoginFlowState{
|
||||
"choose_method",
|
||||
"sent_email",
|
||||
"passed_challenge",
|
||||
}
|
||||
|
||||
func (v *LoginFlowState) UnmarshalJSON(src []byte) error {
|
||||
var value string
|
||||
err := json.Unmarshal(src, &value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
enumTypeValue := LoginFlowState(value)
|
||||
for _, existing := range AllowedLoginFlowStateEnumValues {
|
||||
if existing == enumTypeValue {
|
||||
*v = enumTypeValue
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("%+v is not a valid LoginFlowState", value)
|
||||
}
|
||||
|
||||
// NewLoginFlowStateFromValue returns a pointer to a valid LoginFlowState
|
||||
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||
func NewLoginFlowStateFromValue(v string) (*LoginFlowState, error) {
|
||||
ev := LoginFlowState(v)
|
||||
if ev.IsValid() {
|
||||
return &ev, nil
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid value '%v' for LoginFlowState: valid values are %v", v, AllowedLoginFlowStateEnumValues)
|
||||
}
|
||||
}
|
||||
|
||||
// IsValid return true if the value is valid for the enum, false otherwise
|
||||
func (v LoginFlowState) IsValid() bool {
|
||||
for _, existing := range AllowedLoginFlowStateEnumValues {
|
||||
if existing == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Ptr returns reference to loginFlowState value
|
||||
func (v LoginFlowState) Ptr() *LoginFlowState {
|
||||
return &v
|
||||
}
|
||||
|
||||
type NullableLoginFlowState struct {
|
||||
value *LoginFlowState
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableLoginFlowState) Get() *LoginFlowState {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableLoginFlowState) Set(val *LoginFlowState) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableLoginFlowState) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableLoginFlowState) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableLoginFlowState(val *LoginFlowState) *NullableLoginFlowState {
|
||||
return &NullableLoginFlowState{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableLoginFlowState) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableLoginFlowState) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
205
pkg/httpclient/model_login_flow_test_context.go
Normal file
205
pkg/httpclient/model_login_flow_test_context.go
Normal file
@@ -0,0 +1,205 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the LoginFlowTestContext type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &LoginFlowTestContext{}
|
||||
|
||||
// LoginFlowTestContext Admin-test extension of a login flow. Populated only for flows created by the admin test endpoint; included in the flow's API response so the admin UI can render the pre-scoped provider and (once captured) the debug round-trip result.
|
||||
type LoginFlowTestContext struct {
|
||||
DebugPayload *LoginFlowTestDebugPayload `json:"debug_payload,omitempty"`
|
||||
// The ID of the OIDC provider this test flow targets.
|
||||
ProviderId string `json:"provider_id"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _LoginFlowTestContext LoginFlowTestContext
|
||||
|
||||
// NewLoginFlowTestContext instantiates a new LoginFlowTestContext object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewLoginFlowTestContext(providerId string) *LoginFlowTestContext {
|
||||
this := LoginFlowTestContext{}
|
||||
this.ProviderId = providerId
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewLoginFlowTestContextWithDefaults instantiates a new LoginFlowTestContext object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewLoginFlowTestContextWithDefaults() *LoginFlowTestContext {
|
||||
this := LoginFlowTestContext{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetDebugPayload returns the DebugPayload field value if set, zero value otherwise.
|
||||
func (o *LoginFlowTestContext) GetDebugPayload() LoginFlowTestDebugPayload {
|
||||
if o == nil || IsNil(o.DebugPayload) {
|
||||
var ret LoginFlowTestDebugPayload
|
||||
return ret
|
||||
}
|
||||
return *o.DebugPayload
|
||||
}
|
||||
|
||||
// GetDebugPayloadOk returns a tuple with the DebugPayload field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlowTestContext) GetDebugPayloadOk() (*LoginFlowTestDebugPayload, bool) {
|
||||
if o == nil || IsNil(o.DebugPayload) {
|
||||
return nil, false
|
||||
}
|
||||
return o.DebugPayload, true
|
||||
}
|
||||
|
||||
// HasDebugPayload returns a boolean if a field has been set.
|
||||
func (o *LoginFlowTestContext) HasDebugPayload() bool {
|
||||
if o != nil && !IsNil(o.DebugPayload) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDebugPayload gets a reference to the given LoginFlowTestDebugPayload and assigns it to the DebugPayload field.
|
||||
func (o *LoginFlowTestContext) SetDebugPayload(v LoginFlowTestDebugPayload) {
|
||||
o.DebugPayload = &v
|
||||
}
|
||||
|
||||
// GetProviderId returns the ProviderId field value
|
||||
func (o *LoginFlowTestContext) GetProviderId() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.ProviderId
|
||||
}
|
||||
|
||||
// GetProviderIdOk returns a tuple with the ProviderId field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlowTestContext) GetProviderIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.ProviderId, true
|
||||
}
|
||||
|
||||
// SetProviderId sets field value
|
||||
func (o *LoginFlowTestContext) SetProviderId(v string) {
|
||||
o.ProviderId = v
|
||||
}
|
||||
|
||||
func (o LoginFlowTestContext) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o LoginFlowTestContext) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.DebugPayload) {
|
||||
toSerialize["debug_payload"] = o.DebugPayload
|
||||
}
|
||||
toSerialize["provider_id"] = o.ProviderId
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *LoginFlowTestContext) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"provider_id",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varLoginFlowTestContext := _LoginFlowTestContext{}
|
||||
|
||||
err = json.Unmarshal(data, &varLoginFlowTestContext)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = LoginFlowTestContext(varLoginFlowTestContext)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "debug_payload")
|
||||
delete(additionalProperties, "provider_id")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableLoginFlowTestContext struct {
|
||||
value *LoginFlowTestContext
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableLoginFlowTestContext) Get() *LoginFlowTestContext {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableLoginFlowTestContext) Set(val *LoginFlowTestContext) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableLoginFlowTestContext) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableLoginFlowTestContext) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableLoginFlowTestContext(val *LoginFlowTestContext) *NullableLoginFlowTestContext {
|
||||
return &NullableLoginFlowTestContext{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableLoginFlowTestContext) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableLoginFlowTestContext) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
420
pkg/httpclient/model_login_flow_test_debug_payload.go
Normal file
420
pkg/httpclient/model_login_flow_test_debug_payload.go
Normal file
@@ -0,0 +1,420 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the LoginFlowTestDebugPayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &LoginFlowTestDebugPayload{}
|
||||
|
||||
// LoginFlowTestDebugPayload Contains the parsed claims, the Jsonnet mapper input and output, and any schema validation errors. Bearer tokens (id_token, access_token, refresh_token) are intentionally excluded to limit the blast radius of the debug payload leaking through audit logs or admin browsers.
|
||||
type LoginFlowTestDebugPayload struct {
|
||||
Error *LoginFlowTestStepError `json:"error,omitempty"`
|
||||
// Claims extracted from the ID token.
|
||||
IdTokenClaims map[string]interface{} `json:"id_token_claims,omitempty"`
|
||||
// Input JSON that was fed into the Jsonnet mapper.
|
||||
JsonnetInput map[string]interface{} `json:"jsonnet_input,omitempty"`
|
||||
// URL of the Jsonnet mapper that was executed on the claims.
|
||||
JsonnetMapperUrl *string `json:"jsonnet_mapper_url,omitempty"`
|
||||
// Output JSON returned by the Jsonnet mapper.
|
||||
JsonnetOutput map[string]interface{} `json:"jsonnet_output,omitempty"`
|
||||
// Anything the Jsonnet mapper wrote to standard error.
|
||||
JsonnetStderr *string `json:"jsonnet_stderr,omitempty"`
|
||||
// Identity-schema validation errors produced from the mapped traits.
|
||||
SchemaValidationErrors []LoginFlowTestSchemaValidationError `json:"schema_validation_errors,omitempty"`
|
||||
// Claims returned from the provider's userinfo endpoint, if any.
|
||||
Userinfo map[string]interface{} `json:"userinfo,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _LoginFlowTestDebugPayload LoginFlowTestDebugPayload
|
||||
|
||||
// NewLoginFlowTestDebugPayload instantiates a new LoginFlowTestDebugPayload object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewLoginFlowTestDebugPayload() *LoginFlowTestDebugPayload {
|
||||
this := LoginFlowTestDebugPayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewLoginFlowTestDebugPayloadWithDefaults instantiates a new LoginFlowTestDebugPayload object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewLoginFlowTestDebugPayloadWithDefaults() *LoginFlowTestDebugPayload {
|
||||
this := LoginFlowTestDebugPayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetError returns the Error field value if set, zero value otherwise.
|
||||
func (o *LoginFlowTestDebugPayload) GetError() LoginFlowTestStepError {
|
||||
if o == nil || IsNil(o.Error) {
|
||||
var ret LoginFlowTestStepError
|
||||
return ret
|
||||
}
|
||||
return *o.Error
|
||||
}
|
||||
|
||||
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlowTestDebugPayload) GetErrorOk() (*LoginFlowTestStepError, bool) {
|
||||
if o == nil || IsNil(o.Error) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Error, true
|
||||
}
|
||||
|
||||
// HasError returns a boolean if a field has been set.
|
||||
func (o *LoginFlowTestDebugPayload) HasError() bool {
|
||||
if o != nil && !IsNil(o.Error) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetError gets a reference to the given LoginFlowTestStepError and assigns it to the Error field.
|
||||
func (o *LoginFlowTestDebugPayload) SetError(v LoginFlowTestStepError) {
|
||||
o.Error = &v
|
||||
}
|
||||
|
||||
// GetIdTokenClaims returns the IdTokenClaims field value if set, zero value otherwise.
|
||||
func (o *LoginFlowTestDebugPayload) GetIdTokenClaims() map[string]interface{} {
|
||||
if o == nil || IsNil(o.IdTokenClaims) {
|
||||
var ret map[string]interface{}
|
||||
return ret
|
||||
}
|
||||
return o.IdTokenClaims
|
||||
}
|
||||
|
||||
// GetIdTokenClaimsOk returns a tuple with the IdTokenClaims field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlowTestDebugPayload) GetIdTokenClaimsOk() (map[string]interface{}, bool) {
|
||||
if o == nil || IsNil(o.IdTokenClaims) {
|
||||
return map[string]interface{}{}, false
|
||||
}
|
||||
return o.IdTokenClaims, true
|
||||
}
|
||||
|
||||
// HasIdTokenClaims returns a boolean if a field has been set.
|
||||
func (o *LoginFlowTestDebugPayload) HasIdTokenClaims() bool {
|
||||
if o != nil && !IsNil(o.IdTokenClaims) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetIdTokenClaims gets a reference to the given map[string]interface{} and assigns it to the IdTokenClaims field.
|
||||
func (o *LoginFlowTestDebugPayload) SetIdTokenClaims(v map[string]interface{}) {
|
||||
o.IdTokenClaims = v
|
||||
}
|
||||
|
||||
// GetJsonnetInput returns the JsonnetInput field value if set, zero value otherwise.
|
||||
func (o *LoginFlowTestDebugPayload) GetJsonnetInput() map[string]interface{} {
|
||||
if o == nil || IsNil(o.JsonnetInput) {
|
||||
var ret map[string]interface{}
|
||||
return ret
|
||||
}
|
||||
return o.JsonnetInput
|
||||
}
|
||||
|
||||
// GetJsonnetInputOk returns a tuple with the JsonnetInput field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlowTestDebugPayload) GetJsonnetInputOk() (map[string]interface{}, bool) {
|
||||
if o == nil || IsNil(o.JsonnetInput) {
|
||||
return map[string]interface{}{}, false
|
||||
}
|
||||
return o.JsonnetInput, true
|
||||
}
|
||||
|
||||
// HasJsonnetInput returns a boolean if a field has been set.
|
||||
func (o *LoginFlowTestDebugPayload) HasJsonnetInput() bool {
|
||||
if o != nil && !IsNil(o.JsonnetInput) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetJsonnetInput gets a reference to the given map[string]interface{} and assigns it to the JsonnetInput field.
|
||||
func (o *LoginFlowTestDebugPayload) SetJsonnetInput(v map[string]interface{}) {
|
||||
o.JsonnetInput = v
|
||||
}
|
||||
|
||||
// GetJsonnetMapperUrl returns the JsonnetMapperUrl field value if set, zero value otherwise.
|
||||
func (o *LoginFlowTestDebugPayload) GetJsonnetMapperUrl() string {
|
||||
if o == nil || IsNil(o.JsonnetMapperUrl) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.JsonnetMapperUrl
|
||||
}
|
||||
|
||||
// GetJsonnetMapperUrlOk returns a tuple with the JsonnetMapperUrl field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlowTestDebugPayload) GetJsonnetMapperUrlOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.JsonnetMapperUrl) {
|
||||
return nil, false
|
||||
}
|
||||
return o.JsonnetMapperUrl, true
|
||||
}
|
||||
|
||||
// HasJsonnetMapperUrl returns a boolean if a field has been set.
|
||||
func (o *LoginFlowTestDebugPayload) HasJsonnetMapperUrl() bool {
|
||||
if o != nil && !IsNil(o.JsonnetMapperUrl) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetJsonnetMapperUrl gets a reference to the given string and assigns it to the JsonnetMapperUrl field.
|
||||
func (o *LoginFlowTestDebugPayload) SetJsonnetMapperUrl(v string) {
|
||||
o.JsonnetMapperUrl = &v
|
||||
}
|
||||
|
||||
// GetJsonnetOutput returns the JsonnetOutput field value if set, zero value otherwise.
|
||||
func (o *LoginFlowTestDebugPayload) GetJsonnetOutput() map[string]interface{} {
|
||||
if o == nil || IsNil(o.JsonnetOutput) {
|
||||
var ret map[string]interface{}
|
||||
return ret
|
||||
}
|
||||
return o.JsonnetOutput
|
||||
}
|
||||
|
||||
// GetJsonnetOutputOk returns a tuple with the JsonnetOutput field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlowTestDebugPayload) GetJsonnetOutputOk() (map[string]interface{}, bool) {
|
||||
if o == nil || IsNil(o.JsonnetOutput) {
|
||||
return map[string]interface{}{}, false
|
||||
}
|
||||
return o.JsonnetOutput, true
|
||||
}
|
||||
|
||||
// HasJsonnetOutput returns a boolean if a field has been set.
|
||||
func (o *LoginFlowTestDebugPayload) HasJsonnetOutput() bool {
|
||||
if o != nil && !IsNil(o.JsonnetOutput) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetJsonnetOutput gets a reference to the given map[string]interface{} and assigns it to the JsonnetOutput field.
|
||||
func (o *LoginFlowTestDebugPayload) SetJsonnetOutput(v map[string]interface{}) {
|
||||
o.JsonnetOutput = v
|
||||
}
|
||||
|
||||
// GetJsonnetStderr returns the JsonnetStderr field value if set, zero value otherwise.
|
||||
func (o *LoginFlowTestDebugPayload) GetJsonnetStderr() string {
|
||||
if o == nil || IsNil(o.JsonnetStderr) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.JsonnetStderr
|
||||
}
|
||||
|
||||
// GetJsonnetStderrOk returns a tuple with the JsonnetStderr field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlowTestDebugPayload) GetJsonnetStderrOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.JsonnetStderr) {
|
||||
return nil, false
|
||||
}
|
||||
return o.JsonnetStderr, true
|
||||
}
|
||||
|
||||
// HasJsonnetStderr returns a boolean if a field has been set.
|
||||
func (o *LoginFlowTestDebugPayload) HasJsonnetStderr() bool {
|
||||
if o != nil && !IsNil(o.JsonnetStderr) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetJsonnetStderr gets a reference to the given string and assigns it to the JsonnetStderr field.
|
||||
func (o *LoginFlowTestDebugPayload) SetJsonnetStderr(v string) {
|
||||
o.JsonnetStderr = &v
|
||||
}
|
||||
|
||||
// GetSchemaValidationErrors returns the SchemaValidationErrors field value if set, zero value otherwise.
|
||||
func (o *LoginFlowTestDebugPayload) GetSchemaValidationErrors() []LoginFlowTestSchemaValidationError {
|
||||
if o == nil || IsNil(o.SchemaValidationErrors) {
|
||||
var ret []LoginFlowTestSchemaValidationError
|
||||
return ret
|
||||
}
|
||||
return o.SchemaValidationErrors
|
||||
}
|
||||
|
||||
// GetSchemaValidationErrorsOk returns a tuple with the SchemaValidationErrors field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlowTestDebugPayload) GetSchemaValidationErrorsOk() ([]LoginFlowTestSchemaValidationError, bool) {
|
||||
if o == nil || IsNil(o.SchemaValidationErrors) {
|
||||
return nil, false
|
||||
}
|
||||
return o.SchemaValidationErrors, true
|
||||
}
|
||||
|
||||
// HasSchemaValidationErrors returns a boolean if a field has been set.
|
||||
func (o *LoginFlowTestDebugPayload) HasSchemaValidationErrors() bool {
|
||||
if o != nil && !IsNil(o.SchemaValidationErrors) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSchemaValidationErrors gets a reference to the given []LoginFlowTestSchemaValidationError and assigns it to the SchemaValidationErrors field.
|
||||
func (o *LoginFlowTestDebugPayload) SetSchemaValidationErrors(v []LoginFlowTestSchemaValidationError) {
|
||||
o.SchemaValidationErrors = v
|
||||
}
|
||||
|
||||
// GetUserinfo returns the Userinfo field value if set, zero value otherwise.
|
||||
func (o *LoginFlowTestDebugPayload) GetUserinfo() map[string]interface{} {
|
||||
if o == nil || IsNil(o.Userinfo) {
|
||||
var ret map[string]interface{}
|
||||
return ret
|
||||
}
|
||||
return o.Userinfo
|
||||
}
|
||||
|
||||
// GetUserinfoOk returns a tuple with the Userinfo field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlowTestDebugPayload) GetUserinfoOk() (map[string]interface{}, bool) {
|
||||
if o == nil || IsNil(o.Userinfo) {
|
||||
return map[string]interface{}{}, false
|
||||
}
|
||||
return o.Userinfo, true
|
||||
}
|
||||
|
||||
// HasUserinfo returns a boolean if a field has been set.
|
||||
func (o *LoginFlowTestDebugPayload) HasUserinfo() bool {
|
||||
if o != nil && !IsNil(o.Userinfo) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUserinfo gets a reference to the given map[string]interface{} and assigns it to the Userinfo field.
|
||||
func (o *LoginFlowTestDebugPayload) SetUserinfo(v map[string]interface{}) {
|
||||
o.Userinfo = v
|
||||
}
|
||||
|
||||
func (o LoginFlowTestDebugPayload) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o LoginFlowTestDebugPayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Error) {
|
||||
toSerialize["error"] = o.Error
|
||||
}
|
||||
if !IsNil(o.IdTokenClaims) {
|
||||
toSerialize["id_token_claims"] = o.IdTokenClaims
|
||||
}
|
||||
if !IsNil(o.JsonnetInput) {
|
||||
toSerialize["jsonnet_input"] = o.JsonnetInput
|
||||
}
|
||||
if !IsNil(o.JsonnetMapperUrl) {
|
||||
toSerialize["jsonnet_mapper_url"] = o.JsonnetMapperUrl
|
||||
}
|
||||
if !IsNil(o.JsonnetOutput) {
|
||||
toSerialize["jsonnet_output"] = o.JsonnetOutput
|
||||
}
|
||||
if !IsNil(o.JsonnetStderr) {
|
||||
toSerialize["jsonnet_stderr"] = o.JsonnetStderr
|
||||
}
|
||||
if !IsNil(o.SchemaValidationErrors) {
|
||||
toSerialize["schema_validation_errors"] = o.SchemaValidationErrors
|
||||
}
|
||||
if !IsNil(o.Userinfo) {
|
||||
toSerialize["userinfo"] = o.Userinfo
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *LoginFlowTestDebugPayload) UnmarshalJSON(data []byte) (err error) {
|
||||
varLoginFlowTestDebugPayload := _LoginFlowTestDebugPayload{}
|
||||
|
||||
err = json.Unmarshal(data, &varLoginFlowTestDebugPayload)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = LoginFlowTestDebugPayload(varLoginFlowTestDebugPayload)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "error")
|
||||
delete(additionalProperties, "id_token_claims")
|
||||
delete(additionalProperties, "jsonnet_input")
|
||||
delete(additionalProperties, "jsonnet_mapper_url")
|
||||
delete(additionalProperties, "jsonnet_output")
|
||||
delete(additionalProperties, "jsonnet_stderr")
|
||||
delete(additionalProperties, "schema_validation_errors")
|
||||
delete(additionalProperties, "userinfo")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableLoginFlowTestDebugPayload struct {
|
||||
value *LoginFlowTestDebugPayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableLoginFlowTestDebugPayload) Get() *LoginFlowTestDebugPayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableLoginFlowTestDebugPayload) Set(val *LoginFlowTestDebugPayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableLoginFlowTestDebugPayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableLoginFlowTestDebugPayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableLoginFlowTestDebugPayload(val *LoginFlowTestDebugPayload) *NullableLoginFlowTestDebugPayload {
|
||||
return &NullableLoginFlowTestDebugPayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableLoginFlowTestDebugPayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableLoginFlowTestDebugPayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
193
pkg/httpclient/model_login_flow_test_schema_validation_error.go
Normal file
193
pkg/httpclient/model_login_flow_test_schema_validation_error.go
Normal file
@@ -0,0 +1,193 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the LoginFlowTestSchemaValidationError type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &LoginFlowTestSchemaValidationError{}
|
||||
|
||||
// LoginFlowTestSchemaValidationError One identity-schema validation failure recorded while evaluating the traits produced by the Jsonnet mapper.
|
||||
type LoginFlowTestSchemaValidationError struct {
|
||||
// Human-readable description of the validation failure.
|
||||
Message *string `json:"message,omitempty"`
|
||||
// JSON pointer to the field that failed validation.
|
||||
Path *string `json:"path,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _LoginFlowTestSchemaValidationError LoginFlowTestSchemaValidationError
|
||||
|
||||
// NewLoginFlowTestSchemaValidationError instantiates a new LoginFlowTestSchemaValidationError object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewLoginFlowTestSchemaValidationError() *LoginFlowTestSchemaValidationError {
|
||||
this := LoginFlowTestSchemaValidationError{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewLoginFlowTestSchemaValidationErrorWithDefaults instantiates a new LoginFlowTestSchemaValidationError object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewLoginFlowTestSchemaValidationErrorWithDefaults() *LoginFlowTestSchemaValidationError {
|
||||
this := LoginFlowTestSchemaValidationError{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetMessage returns the Message field value if set, zero value otherwise.
|
||||
func (o *LoginFlowTestSchemaValidationError) GetMessage() string {
|
||||
if o == nil || IsNil(o.Message) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Message
|
||||
}
|
||||
|
||||
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlowTestSchemaValidationError) GetMessageOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Message) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Message, true
|
||||
}
|
||||
|
||||
// HasMessage returns a boolean if a field has been set.
|
||||
func (o *LoginFlowTestSchemaValidationError) HasMessage() bool {
|
||||
if o != nil && !IsNil(o.Message) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetMessage gets a reference to the given string and assigns it to the Message field.
|
||||
func (o *LoginFlowTestSchemaValidationError) SetMessage(v string) {
|
||||
o.Message = &v
|
||||
}
|
||||
|
||||
// GetPath returns the Path field value if set, zero value otherwise.
|
||||
func (o *LoginFlowTestSchemaValidationError) GetPath() string {
|
||||
if o == nil || IsNil(o.Path) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Path
|
||||
}
|
||||
|
||||
// GetPathOk returns a tuple with the Path field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlowTestSchemaValidationError) GetPathOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Path) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Path, true
|
||||
}
|
||||
|
||||
// HasPath returns a boolean if a field has been set.
|
||||
func (o *LoginFlowTestSchemaValidationError) HasPath() bool {
|
||||
if o != nil && !IsNil(o.Path) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPath gets a reference to the given string and assigns it to the Path field.
|
||||
func (o *LoginFlowTestSchemaValidationError) SetPath(v string) {
|
||||
o.Path = &v
|
||||
}
|
||||
|
||||
func (o LoginFlowTestSchemaValidationError) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o LoginFlowTestSchemaValidationError) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Message) {
|
||||
toSerialize["message"] = o.Message
|
||||
}
|
||||
if !IsNil(o.Path) {
|
||||
toSerialize["path"] = o.Path
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *LoginFlowTestSchemaValidationError) UnmarshalJSON(data []byte) (err error) {
|
||||
varLoginFlowTestSchemaValidationError := _LoginFlowTestSchemaValidationError{}
|
||||
|
||||
err = json.Unmarshal(data, &varLoginFlowTestSchemaValidationError)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = LoginFlowTestSchemaValidationError(varLoginFlowTestSchemaValidationError)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "message")
|
||||
delete(additionalProperties, "path")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableLoginFlowTestSchemaValidationError struct {
|
||||
value *LoginFlowTestSchemaValidationError
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableLoginFlowTestSchemaValidationError) Get() *LoginFlowTestSchemaValidationError {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableLoginFlowTestSchemaValidationError) Set(val *LoginFlowTestSchemaValidationError) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableLoginFlowTestSchemaValidationError) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableLoginFlowTestSchemaValidationError) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableLoginFlowTestSchemaValidationError(val *LoginFlowTestSchemaValidationError) *NullableLoginFlowTestSchemaValidationError {
|
||||
return &NullableLoginFlowTestSchemaValidationError{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableLoginFlowTestSchemaValidationError) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableLoginFlowTestSchemaValidationError) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
231
pkg/httpclient/model_login_flow_test_step_error.go
Normal file
231
pkg/httpclient/model_login_flow_test_step_error.go
Normal file
@@ -0,0 +1,231 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the LoginFlowTestStepError type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &LoginFlowTestStepError{}
|
||||
|
||||
// LoginFlowTestStepError Populated when any step (token exchange, claims decode, Jsonnet evaluation, schema validation) cannot complete.
|
||||
type LoginFlowTestStepError struct {
|
||||
// Human-readable message describing the failure.
|
||||
Message *string `json:"message,omitempty"`
|
||||
// Short classification of the failure cause (for example, \"access_denied\" or \"traits_invalid\").
|
||||
Reason *string `json:"reason,omitempty"`
|
||||
// Machine-readable identifier of the failed step (for example, \"token_exchange\" or \"schema_validate\").
|
||||
Step *string `json:"step,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _LoginFlowTestStepError LoginFlowTestStepError
|
||||
|
||||
// NewLoginFlowTestStepError instantiates a new LoginFlowTestStepError object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewLoginFlowTestStepError() *LoginFlowTestStepError {
|
||||
this := LoginFlowTestStepError{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewLoginFlowTestStepErrorWithDefaults instantiates a new LoginFlowTestStepError object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewLoginFlowTestStepErrorWithDefaults() *LoginFlowTestStepError {
|
||||
this := LoginFlowTestStepError{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetMessage returns the Message field value if set, zero value otherwise.
|
||||
func (o *LoginFlowTestStepError) GetMessage() string {
|
||||
if o == nil || IsNil(o.Message) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Message
|
||||
}
|
||||
|
||||
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlowTestStepError) GetMessageOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Message) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Message, true
|
||||
}
|
||||
|
||||
// HasMessage returns a boolean if a field has been set.
|
||||
func (o *LoginFlowTestStepError) HasMessage() bool {
|
||||
if o != nil && !IsNil(o.Message) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetMessage gets a reference to the given string and assigns it to the Message field.
|
||||
func (o *LoginFlowTestStepError) SetMessage(v string) {
|
||||
o.Message = &v
|
||||
}
|
||||
|
||||
// GetReason returns the Reason field value if set, zero value otherwise.
|
||||
func (o *LoginFlowTestStepError) GetReason() string {
|
||||
if o == nil || IsNil(o.Reason) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Reason
|
||||
}
|
||||
|
||||
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlowTestStepError) GetReasonOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Reason) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Reason, true
|
||||
}
|
||||
|
||||
// HasReason returns a boolean if a field has been set.
|
||||
func (o *LoginFlowTestStepError) HasReason() bool {
|
||||
if o != nil && !IsNil(o.Reason) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetReason gets a reference to the given string and assigns it to the Reason field.
|
||||
func (o *LoginFlowTestStepError) SetReason(v string) {
|
||||
o.Reason = &v
|
||||
}
|
||||
|
||||
// GetStep returns the Step field value if set, zero value otherwise.
|
||||
func (o *LoginFlowTestStepError) GetStep() string {
|
||||
if o == nil || IsNil(o.Step) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Step
|
||||
}
|
||||
|
||||
// GetStepOk returns a tuple with the Step field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LoginFlowTestStepError) GetStepOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Step) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Step, true
|
||||
}
|
||||
|
||||
// HasStep returns a boolean if a field has been set.
|
||||
func (o *LoginFlowTestStepError) HasStep() bool {
|
||||
if o != nil && !IsNil(o.Step) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetStep gets a reference to the given string and assigns it to the Step field.
|
||||
func (o *LoginFlowTestStepError) SetStep(v string) {
|
||||
o.Step = &v
|
||||
}
|
||||
|
||||
func (o LoginFlowTestStepError) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o LoginFlowTestStepError) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Message) {
|
||||
toSerialize["message"] = o.Message
|
||||
}
|
||||
if !IsNil(o.Reason) {
|
||||
toSerialize["reason"] = o.Reason
|
||||
}
|
||||
if !IsNil(o.Step) {
|
||||
toSerialize["step"] = o.Step
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *LoginFlowTestStepError) UnmarshalJSON(data []byte) (err error) {
|
||||
varLoginFlowTestStepError := _LoginFlowTestStepError{}
|
||||
|
||||
err = json.Unmarshal(data, &varLoginFlowTestStepError)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = LoginFlowTestStepError(varLoginFlowTestStepError)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "message")
|
||||
delete(additionalProperties, "reason")
|
||||
delete(additionalProperties, "step")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableLoginFlowTestStepError struct {
|
||||
value *LoginFlowTestStepError
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableLoginFlowTestStepError) Get() *LoginFlowTestStepError {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableLoginFlowTestStepError) Set(val *LoginFlowTestStepError) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableLoginFlowTestStepError) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableLoginFlowTestStepError) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableLoginFlowTestStepError(val *LoginFlowTestStepError) *NullableLoginFlowTestStepError {
|
||||
return &NullableLoginFlowTestStepError{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableLoginFlowTestStepError) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableLoginFlowTestStepError) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
198
pkg/httpclient/model_logout_flow.go
Normal file
198
pkg/httpclient/model_logout_flow.go
Normal file
@@ -0,0 +1,198 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the LogoutFlow type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &LogoutFlow{}
|
||||
|
||||
// LogoutFlow Logout Flow
|
||||
type LogoutFlow struct {
|
||||
// LogoutToken can be used to perform logout using AJAX.
|
||||
LogoutToken string `json:"logout_token"`
|
||||
// LogoutURL can be opened in a browser to sign the user out. format: uri
|
||||
LogoutUrl string `json:"logout_url"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _LogoutFlow LogoutFlow
|
||||
|
||||
// NewLogoutFlow instantiates a new LogoutFlow object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewLogoutFlow(logoutToken string, logoutUrl string) *LogoutFlow {
|
||||
this := LogoutFlow{}
|
||||
this.LogoutToken = logoutToken
|
||||
this.LogoutUrl = logoutUrl
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewLogoutFlowWithDefaults instantiates a new LogoutFlow object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewLogoutFlowWithDefaults() *LogoutFlow {
|
||||
this := LogoutFlow{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetLogoutToken returns the LogoutToken field value
|
||||
func (o *LogoutFlow) GetLogoutToken() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.LogoutToken
|
||||
}
|
||||
|
||||
// GetLogoutTokenOk returns a tuple with the LogoutToken field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LogoutFlow) GetLogoutTokenOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.LogoutToken, true
|
||||
}
|
||||
|
||||
// SetLogoutToken sets field value
|
||||
func (o *LogoutFlow) SetLogoutToken(v string) {
|
||||
o.LogoutToken = v
|
||||
}
|
||||
|
||||
// GetLogoutUrl returns the LogoutUrl field value
|
||||
func (o *LogoutFlow) GetLogoutUrl() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.LogoutUrl
|
||||
}
|
||||
|
||||
// GetLogoutUrlOk returns a tuple with the LogoutUrl field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *LogoutFlow) GetLogoutUrlOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.LogoutUrl, true
|
||||
}
|
||||
|
||||
// SetLogoutUrl sets field value
|
||||
func (o *LogoutFlow) SetLogoutUrl(v string) {
|
||||
o.LogoutUrl = v
|
||||
}
|
||||
|
||||
func (o LogoutFlow) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o LogoutFlow) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["logout_token"] = o.LogoutToken
|
||||
toSerialize["logout_url"] = o.LogoutUrl
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *LogoutFlow) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"logout_token",
|
||||
"logout_url",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varLogoutFlow := _LogoutFlow{}
|
||||
|
||||
err = json.Unmarshal(data, &varLogoutFlow)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = LogoutFlow(varLogoutFlow)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "logout_token")
|
||||
delete(additionalProperties, "logout_url")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableLogoutFlow struct {
|
||||
value *LogoutFlow
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableLogoutFlow) Get() *LogoutFlow {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableLogoutFlow) Set(val *LogoutFlow) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableLogoutFlow) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableLogoutFlow) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableLogoutFlow(val *LogoutFlow) *NullableLogoutFlow {
|
||||
return &NullableLogoutFlow{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableLogoutFlow) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableLogoutFlow) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
244
pkg/httpclient/model_manage_sessions_body.go
Normal file
244
pkg/httpclient/model_manage_sessions_body.go
Normal file
@@ -0,0 +1,244 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the ManageSessionsBody type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ManageSessionsBody{}
|
||||
|
||||
// ManageSessionsBody Body for the bulk session management endpoint. Exactly one of `identities` or `sessions` must be provided. To operate on every session in the network, pass `identities: [\"*\"]` — the wildcard must appear alone, never mixed with explicit IDs.
|
||||
type ManageSessionsBody struct {
|
||||
// Action to perform on the matching sessions. disable ManageSessionsActionDisable delete ManageSessionsActionDelete
|
||||
Action string `json:"action"`
|
||||
// Identity IDs whose sessions should be disabled or deleted, or `[\"*\"]` to operate on every session in the network. Mutually exclusive with `sessions`.
|
||||
Identities []string `json:"identities,omitempty"`
|
||||
// Session IDs to disable or delete. Mutually exclusive with `identities`. The wildcard `[\"*\"]` is not accepted in this field — pass `identities: [\"*\"]` to scope the operation to every session in the network.
|
||||
Sessions []string `json:"sessions,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _ManageSessionsBody ManageSessionsBody
|
||||
|
||||
// NewManageSessionsBody instantiates a new ManageSessionsBody object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewManageSessionsBody(action string) *ManageSessionsBody {
|
||||
this := ManageSessionsBody{}
|
||||
this.Action = action
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewManageSessionsBodyWithDefaults instantiates a new ManageSessionsBody object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewManageSessionsBodyWithDefaults() *ManageSessionsBody {
|
||||
this := ManageSessionsBody{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAction returns the Action field value
|
||||
func (o *ManageSessionsBody) GetAction() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Action
|
||||
}
|
||||
|
||||
// GetActionOk returns a tuple with the Action field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ManageSessionsBody) GetActionOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Action, true
|
||||
}
|
||||
|
||||
// SetAction sets field value
|
||||
func (o *ManageSessionsBody) SetAction(v string) {
|
||||
o.Action = v
|
||||
}
|
||||
|
||||
// GetIdentities returns the Identities field value if set, zero value otherwise.
|
||||
func (o *ManageSessionsBody) GetIdentities() []string {
|
||||
if o == nil || IsNil(o.Identities) {
|
||||
var ret []string
|
||||
return ret
|
||||
}
|
||||
return o.Identities
|
||||
}
|
||||
|
||||
// GetIdentitiesOk returns a tuple with the Identities field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ManageSessionsBody) GetIdentitiesOk() ([]string, bool) {
|
||||
if o == nil || IsNil(o.Identities) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Identities, true
|
||||
}
|
||||
|
||||
// HasIdentities returns a boolean if a field has been set.
|
||||
func (o *ManageSessionsBody) HasIdentities() bool {
|
||||
if o != nil && !IsNil(o.Identities) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetIdentities gets a reference to the given []string and assigns it to the Identities field.
|
||||
func (o *ManageSessionsBody) SetIdentities(v []string) {
|
||||
o.Identities = v
|
||||
}
|
||||
|
||||
// GetSessions returns the Sessions field value if set, zero value otherwise.
|
||||
func (o *ManageSessionsBody) GetSessions() []string {
|
||||
if o == nil || IsNil(o.Sessions) {
|
||||
var ret []string
|
||||
return ret
|
||||
}
|
||||
return o.Sessions
|
||||
}
|
||||
|
||||
// GetSessionsOk returns a tuple with the Sessions field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ManageSessionsBody) GetSessionsOk() ([]string, bool) {
|
||||
if o == nil || IsNil(o.Sessions) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Sessions, true
|
||||
}
|
||||
|
||||
// HasSessions returns a boolean if a field has been set.
|
||||
func (o *ManageSessionsBody) HasSessions() bool {
|
||||
if o != nil && !IsNil(o.Sessions) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSessions gets a reference to the given []string and assigns it to the Sessions field.
|
||||
func (o *ManageSessionsBody) SetSessions(v []string) {
|
||||
o.Sessions = v
|
||||
}
|
||||
|
||||
func (o ManageSessionsBody) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o ManageSessionsBody) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["action"] = o.Action
|
||||
if !IsNil(o.Identities) {
|
||||
toSerialize["identities"] = o.Identities
|
||||
}
|
||||
if !IsNil(o.Sessions) {
|
||||
toSerialize["sessions"] = o.Sessions
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *ManageSessionsBody) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"action",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varManageSessionsBody := _ManageSessionsBody{}
|
||||
|
||||
err = json.Unmarshal(data, &varManageSessionsBody)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = ManageSessionsBody(varManageSessionsBody)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "action")
|
||||
delete(additionalProperties, "identities")
|
||||
delete(additionalProperties, "sessions")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableManageSessionsBody struct {
|
||||
value *ManageSessionsBody
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableManageSessionsBody) Get() *ManageSessionsBody {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableManageSessionsBody) Set(val *ManageSessionsBody) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableManageSessionsBody) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableManageSessionsBody) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableManageSessionsBody(val *ManageSessionsBody) *NullableManageSessionsBody {
|
||||
return &NullableManageSessionsBody{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableManageSessionsBody) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableManageSessionsBody) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
193
pkg/httpclient/model_manage_sessions_response.go
Normal file
193
pkg/httpclient/model_manage_sessions_response.go
Normal file
@@ -0,0 +1,193 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the ManageSessionsResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ManageSessionsResponse{}
|
||||
|
||||
// ManageSessionsResponse Response body for the bulk session management endpoint. Reports how many rows the call processed and, for the wildcard variant, whether the network still has matching rows left. Explicit-IDs requests always return `more: false`. Wildcard callers drain the network by re-issuing the same request while `more` is `true`.
|
||||
type ManageSessionsResponse struct {
|
||||
// True when the call reached the per-call batch limit and additional matching rows may remain. Always false for explicit-IDs requests.
|
||||
More *bool `json:"more,omitempty"`
|
||||
// Number of sessions processed in this call. For `disable`, counts only sessions that were active before the call (already-inactive sessions are skipped). For `delete`, counts every matching row removed.
|
||||
Processed *int64 `json:"processed,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _ManageSessionsResponse ManageSessionsResponse
|
||||
|
||||
// NewManageSessionsResponse instantiates a new ManageSessionsResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewManageSessionsResponse() *ManageSessionsResponse {
|
||||
this := ManageSessionsResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewManageSessionsResponseWithDefaults instantiates a new ManageSessionsResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewManageSessionsResponseWithDefaults() *ManageSessionsResponse {
|
||||
this := ManageSessionsResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetMore returns the More field value if set, zero value otherwise.
|
||||
func (o *ManageSessionsResponse) GetMore() bool {
|
||||
if o == nil || IsNil(o.More) {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.More
|
||||
}
|
||||
|
||||
// GetMoreOk returns a tuple with the More field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ManageSessionsResponse) GetMoreOk() (*bool, bool) {
|
||||
if o == nil || IsNil(o.More) {
|
||||
return nil, false
|
||||
}
|
||||
return o.More, true
|
||||
}
|
||||
|
||||
// HasMore returns a boolean if a field has been set.
|
||||
func (o *ManageSessionsResponse) HasMore() bool {
|
||||
if o != nil && !IsNil(o.More) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetMore gets a reference to the given bool and assigns it to the More field.
|
||||
func (o *ManageSessionsResponse) SetMore(v bool) {
|
||||
o.More = &v
|
||||
}
|
||||
|
||||
// GetProcessed returns the Processed field value if set, zero value otherwise.
|
||||
func (o *ManageSessionsResponse) GetProcessed() int64 {
|
||||
if o == nil || IsNil(o.Processed) {
|
||||
var ret int64
|
||||
return ret
|
||||
}
|
||||
return *o.Processed
|
||||
}
|
||||
|
||||
// GetProcessedOk returns a tuple with the Processed field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ManageSessionsResponse) GetProcessedOk() (*int64, bool) {
|
||||
if o == nil || IsNil(o.Processed) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Processed, true
|
||||
}
|
||||
|
||||
// HasProcessed returns a boolean if a field has been set.
|
||||
func (o *ManageSessionsResponse) HasProcessed() bool {
|
||||
if o != nil && !IsNil(o.Processed) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetProcessed gets a reference to the given int64 and assigns it to the Processed field.
|
||||
func (o *ManageSessionsResponse) SetProcessed(v int64) {
|
||||
o.Processed = &v
|
||||
}
|
||||
|
||||
func (o ManageSessionsResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o ManageSessionsResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.More) {
|
||||
toSerialize["more"] = o.More
|
||||
}
|
||||
if !IsNil(o.Processed) {
|
||||
toSerialize["processed"] = o.Processed
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *ManageSessionsResponse) UnmarshalJSON(data []byte) (err error) {
|
||||
varManageSessionsResponse := _ManageSessionsResponse{}
|
||||
|
||||
err = json.Unmarshal(data, &varManageSessionsResponse)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = ManageSessionsResponse(varManageSessionsResponse)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "more")
|
||||
delete(additionalProperties, "processed")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableManageSessionsResponse struct {
|
||||
value *ManageSessionsResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableManageSessionsResponse) Get() *ManageSessionsResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableManageSessionsResponse) Set(val *ManageSessionsResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableManageSessionsResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableManageSessionsResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableManageSessionsResponse(val *ManageSessionsResponse) *NullableManageSessionsResponse {
|
||||
return &NullableManageSessionsResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableManageSessionsResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableManageSessionsResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
507
pkg/httpclient/model_message.go
Normal file
507
pkg/httpclient/model_message.go
Normal file
@@ -0,0 +1,507 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
// checks if the Message type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &Message{}
|
||||
|
||||
// Message struct for Message
|
||||
type Message struct {
|
||||
Body string `json:"body"`
|
||||
Channel *string `json:"channel,omitempty"`
|
||||
// CreatedAt is a helper struct field for gobuffalo.pop.
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
// Dispatches store information about the attempts of delivering a message May contain an error if any happened, or just the `success` state.
|
||||
Dispatches []MessageDispatch `json:"dispatches,omitempty"`
|
||||
Id string `json:"id"`
|
||||
Recipient string `json:"recipient"`
|
||||
SendCount int64 `json:"send_count"`
|
||||
Status CourierMessageStatus `json:"status"`
|
||||
Subject string `json:"subject"`
|
||||
// recovery_invalid TypeRecoveryInvalid recovery_valid TypeRecoveryValid recovery_code_invalid TypeRecoveryCodeInvalid recovery_code_valid TypeRecoveryCodeValid verification_invalid TypeVerificationInvalid verification_valid TypeVerificationValid verification_code_invalid TypeVerificationCodeInvalid verification_code_valid TypeVerificationCodeValid stub TypeTestStub login_code_valid TypeLoginCodeValid registration_code_valid TypeRegistrationCodeValid verifiable_address_changed TypeVerifiableAddressChanged authenticator_key_added TypeAuthenticatorKeyAdded
|
||||
TemplateType string `json:"template_type"`
|
||||
Type CourierMessageType `json:"type"`
|
||||
// UpdatedAt is a helper struct field for gobuffalo.pop.
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _Message Message
|
||||
|
||||
// NewMessage instantiates a new Message object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewMessage(body string, createdAt time.Time, id string, recipient string, sendCount int64, status CourierMessageStatus, subject string, templateType string, type_ CourierMessageType, updatedAt time.Time) *Message {
|
||||
this := Message{}
|
||||
this.Body = body
|
||||
this.CreatedAt = createdAt
|
||||
this.Id = id
|
||||
this.Recipient = recipient
|
||||
this.SendCount = sendCount
|
||||
this.Status = status
|
||||
this.Subject = subject
|
||||
this.TemplateType = templateType
|
||||
this.Type = type_
|
||||
this.UpdatedAt = updatedAt
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewMessageWithDefaults instantiates a new Message object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewMessageWithDefaults() *Message {
|
||||
this := Message{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetBody returns the Body field value
|
||||
func (o *Message) GetBody() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Body
|
||||
}
|
||||
|
||||
// GetBodyOk returns a tuple with the Body field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Message) GetBodyOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Body, true
|
||||
}
|
||||
|
||||
// SetBody sets field value
|
||||
func (o *Message) SetBody(v string) {
|
||||
o.Body = v
|
||||
}
|
||||
|
||||
// GetChannel returns the Channel field value if set, zero value otherwise.
|
||||
func (o *Message) GetChannel() string {
|
||||
if o == nil || IsNil(o.Channel) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Channel
|
||||
}
|
||||
|
||||
// GetChannelOk returns a tuple with the Channel field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Message) GetChannelOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Channel) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Channel, true
|
||||
}
|
||||
|
||||
// HasChannel returns a boolean if a field has been set.
|
||||
func (o *Message) HasChannel() bool {
|
||||
if o != nil && !IsNil(o.Channel) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetChannel gets a reference to the given string and assigns it to the Channel field.
|
||||
func (o *Message) SetChannel(v string) {
|
||||
o.Channel = &v
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value
|
||||
func (o *Message) GetCreatedAt() time.Time {
|
||||
if o == nil {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.CreatedAt
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Message) GetCreatedAtOk() (*time.Time, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.CreatedAt, true
|
||||
}
|
||||
|
||||
// SetCreatedAt sets field value
|
||||
func (o *Message) SetCreatedAt(v time.Time) {
|
||||
o.CreatedAt = v
|
||||
}
|
||||
|
||||
// GetDispatches returns the Dispatches field value if set, zero value otherwise.
|
||||
func (o *Message) GetDispatches() []MessageDispatch {
|
||||
if o == nil || IsNil(o.Dispatches) {
|
||||
var ret []MessageDispatch
|
||||
return ret
|
||||
}
|
||||
return o.Dispatches
|
||||
}
|
||||
|
||||
// GetDispatchesOk returns a tuple with the Dispatches field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Message) GetDispatchesOk() ([]MessageDispatch, bool) {
|
||||
if o == nil || IsNil(o.Dispatches) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Dispatches, true
|
||||
}
|
||||
|
||||
// HasDispatches returns a boolean if a field has been set.
|
||||
func (o *Message) HasDispatches() bool {
|
||||
if o != nil && !IsNil(o.Dispatches) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDispatches gets a reference to the given []MessageDispatch and assigns it to the Dispatches field.
|
||||
func (o *Message) SetDispatches(v []MessageDispatch) {
|
||||
o.Dispatches = v
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *Message) GetId() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Id
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Message) GetIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Id, true
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *Message) SetId(v string) {
|
||||
o.Id = v
|
||||
}
|
||||
|
||||
// GetRecipient returns the Recipient field value
|
||||
func (o *Message) GetRecipient() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Recipient
|
||||
}
|
||||
|
||||
// GetRecipientOk returns a tuple with the Recipient field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Message) GetRecipientOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Recipient, true
|
||||
}
|
||||
|
||||
// SetRecipient sets field value
|
||||
func (o *Message) SetRecipient(v string) {
|
||||
o.Recipient = v
|
||||
}
|
||||
|
||||
// GetSendCount returns the SendCount field value
|
||||
func (o *Message) GetSendCount() int64 {
|
||||
if o == nil {
|
||||
var ret int64
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.SendCount
|
||||
}
|
||||
|
||||
// GetSendCountOk returns a tuple with the SendCount field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Message) GetSendCountOk() (*int64, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.SendCount, true
|
||||
}
|
||||
|
||||
// SetSendCount sets field value
|
||||
func (o *Message) SetSendCount(v int64) {
|
||||
o.SendCount = v
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value
|
||||
func (o *Message) GetStatus() CourierMessageStatus {
|
||||
if o == nil {
|
||||
var ret CourierMessageStatus
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Status
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Message) GetStatusOk() (*CourierMessageStatus, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Status, true
|
||||
}
|
||||
|
||||
// SetStatus sets field value
|
||||
func (o *Message) SetStatus(v CourierMessageStatus) {
|
||||
o.Status = v
|
||||
}
|
||||
|
||||
// GetSubject returns the Subject field value
|
||||
func (o *Message) GetSubject() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Subject
|
||||
}
|
||||
|
||||
// GetSubjectOk returns a tuple with the Subject field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Message) GetSubjectOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Subject, true
|
||||
}
|
||||
|
||||
// SetSubject sets field value
|
||||
func (o *Message) SetSubject(v string) {
|
||||
o.Subject = v
|
||||
}
|
||||
|
||||
// GetTemplateType returns the TemplateType field value
|
||||
func (o *Message) GetTemplateType() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.TemplateType
|
||||
}
|
||||
|
||||
// GetTemplateTypeOk returns a tuple with the TemplateType field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Message) GetTemplateTypeOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.TemplateType, true
|
||||
}
|
||||
|
||||
// SetTemplateType sets field value
|
||||
func (o *Message) SetTemplateType(v string) {
|
||||
o.TemplateType = v
|
||||
}
|
||||
|
||||
// GetType returns the Type field value
|
||||
func (o *Message) GetType() CourierMessageType {
|
||||
if o == nil {
|
||||
var ret CourierMessageType
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Type
|
||||
}
|
||||
|
||||
// GetTypeOk returns a tuple with the Type field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Message) GetTypeOk() (*CourierMessageType, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Type, true
|
||||
}
|
||||
|
||||
// SetType sets field value
|
||||
func (o *Message) SetType(v CourierMessageType) {
|
||||
o.Type = v
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the UpdatedAt field value
|
||||
func (o *Message) GetUpdatedAt() time.Time {
|
||||
if o == nil {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.UpdatedAt
|
||||
}
|
||||
|
||||
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Message) GetUpdatedAtOk() (*time.Time, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.UpdatedAt, true
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets field value
|
||||
func (o *Message) SetUpdatedAt(v time.Time) {
|
||||
o.UpdatedAt = v
|
||||
}
|
||||
|
||||
func (o Message) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o Message) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["body"] = o.Body
|
||||
if !IsNil(o.Channel) {
|
||||
toSerialize["channel"] = o.Channel
|
||||
}
|
||||
toSerialize["created_at"] = o.CreatedAt
|
||||
if !IsNil(o.Dispatches) {
|
||||
toSerialize["dispatches"] = o.Dispatches
|
||||
}
|
||||
toSerialize["id"] = o.Id
|
||||
toSerialize["recipient"] = o.Recipient
|
||||
toSerialize["send_count"] = o.SendCount
|
||||
toSerialize["status"] = o.Status
|
||||
toSerialize["subject"] = o.Subject
|
||||
toSerialize["template_type"] = o.TemplateType
|
||||
toSerialize["type"] = o.Type
|
||||
toSerialize["updated_at"] = o.UpdatedAt
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *Message) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"body",
|
||||
"created_at",
|
||||
"id",
|
||||
"recipient",
|
||||
"send_count",
|
||||
"status",
|
||||
"subject",
|
||||
"template_type",
|
||||
"type",
|
||||
"updated_at",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varMessage := _Message{}
|
||||
|
||||
err = json.Unmarshal(data, &varMessage)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = Message(varMessage)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "body")
|
||||
delete(additionalProperties, "channel")
|
||||
delete(additionalProperties, "created_at")
|
||||
delete(additionalProperties, "dispatches")
|
||||
delete(additionalProperties, "id")
|
||||
delete(additionalProperties, "recipient")
|
||||
delete(additionalProperties, "send_count")
|
||||
delete(additionalProperties, "status")
|
||||
delete(additionalProperties, "subject")
|
||||
delete(additionalProperties, "template_type")
|
||||
delete(additionalProperties, "type")
|
||||
delete(additionalProperties, "updated_at")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableMessage struct {
|
||||
value *Message
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableMessage) Get() *Message {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableMessage) Set(val *Message) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableMessage) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableMessage) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableMessage(val *Message) *NullableMessage {
|
||||
return &NullableMessage{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableMessage) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableMessage) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
326
pkg/httpclient/model_message_dispatch.go
Normal file
326
pkg/httpclient/model_message_dispatch.go
Normal file
@@ -0,0 +1,326 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
// checks if the MessageDispatch type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &MessageDispatch{}
|
||||
|
||||
// MessageDispatch MessageDispatch represents an attempt of sending a courier message It contains the status of the attempt (failed or successful) and the error if any occured
|
||||
type MessageDispatch struct {
|
||||
// CreatedAt is a helper struct field for gobuffalo.pop.
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
Error map[string]interface{} `json:"error,omitempty"`
|
||||
// The ID of this message dispatch
|
||||
Id string `json:"id"`
|
||||
// The ID of the message being dispatched
|
||||
MessageId string `json:"message_id"`
|
||||
// The status of this dispatch Either \"failed\" or \"success\" failed CourierMessageDispatchStatusFailed success CourierMessageDispatchStatusSuccess
|
||||
Status string `json:"status"`
|
||||
// UpdatedAt is a helper struct field for gobuffalo.pop.
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _MessageDispatch MessageDispatch
|
||||
|
||||
// NewMessageDispatch instantiates a new MessageDispatch object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewMessageDispatch(createdAt time.Time, id string, messageId string, status string, updatedAt time.Time) *MessageDispatch {
|
||||
this := MessageDispatch{}
|
||||
this.CreatedAt = createdAt
|
||||
this.Id = id
|
||||
this.MessageId = messageId
|
||||
this.Status = status
|
||||
this.UpdatedAt = updatedAt
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewMessageDispatchWithDefaults instantiates a new MessageDispatch object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewMessageDispatchWithDefaults() *MessageDispatch {
|
||||
this := MessageDispatch{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value
|
||||
func (o *MessageDispatch) GetCreatedAt() time.Time {
|
||||
if o == nil {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.CreatedAt
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *MessageDispatch) GetCreatedAtOk() (*time.Time, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.CreatedAt, true
|
||||
}
|
||||
|
||||
// SetCreatedAt sets field value
|
||||
func (o *MessageDispatch) SetCreatedAt(v time.Time) {
|
||||
o.CreatedAt = v
|
||||
}
|
||||
|
||||
// GetError returns the Error field value if set, zero value otherwise.
|
||||
func (o *MessageDispatch) GetError() map[string]interface{} {
|
||||
if o == nil || IsNil(o.Error) {
|
||||
var ret map[string]interface{}
|
||||
return ret
|
||||
}
|
||||
return o.Error
|
||||
}
|
||||
|
||||
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *MessageDispatch) GetErrorOk() (map[string]interface{}, bool) {
|
||||
if o == nil || IsNil(o.Error) {
|
||||
return map[string]interface{}{}, false
|
||||
}
|
||||
return o.Error, true
|
||||
}
|
||||
|
||||
// HasError returns a boolean if a field has been set.
|
||||
func (o *MessageDispatch) HasError() bool {
|
||||
if o != nil && !IsNil(o.Error) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetError gets a reference to the given map[string]interface{} and assigns it to the Error field.
|
||||
func (o *MessageDispatch) SetError(v map[string]interface{}) {
|
||||
o.Error = v
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *MessageDispatch) GetId() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Id
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *MessageDispatch) GetIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Id, true
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *MessageDispatch) SetId(v string) {
|
||||
o.Id = v
|
||||
}
|
||||
|
||||
// GetMessageId returns the MessageId field value
|
||||
func (o *MessageDispatch) GetMessageId() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.MessageId
|
||||
}
|
||||
|
||||
// GetMessageIdOk returns a tuple with the MessageId field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *MessageDispatch) GetMessageIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.MessageId, true
|
||||
}
|
||||
|
||||
// SetMessageId sets field value
|
||||
func (o *MessageDispatch) SetMessageId(v string) {
|
||||
o.MessageId = v
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value
|
||||
func (o *MessageDispatch) GetStatus() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Status
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *MessageDispatch) GetStatusOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Status, true
|
||||
}
|
||||
|
||||
// SetStatus sets field value
|
||||
func (o *MessageDispatch) SetStatus(v string) {
|
||||
o.Status = v
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the UpdatedAt field value
|
||||
func (o *MessageDispatch) GetUpdatedAt() time.Time {
|
||||
if o == nil {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.UpdatedAt
|
||||
}
|
||||
|
||||
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *MessageDispatch) GetUpdatedAtOk() (*time.Time, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.UpdatedAt, true
|
||||
}
|
||||
|
||||
// SetUpdatedAt sets field value
|
||||
func (o *MessageDispatch) SetUpdatedAt(v time.Time) {
|
||||
o.UpdatedAt = v
|
||||
}
|
||||
|
||||
func (o MessageDispatch) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o MessageDispatch) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["created_at"] = o.CreatedAt
|
||||
if !IsNil(o.Error) {
|
||||
toSerialize["error"] = o.Error
|
||||
}
|
||||
toSerialize["id"] = o.Id
|
||||
toSerialize["message_id"] = o.MessageId
|
||||
toSerialize["status"] = o.Status
|
||||
toSerialize["updated_at"] = o.UpdatedAt
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *MessageDispatch) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"created_at",
|
||||
"id",
|
||||
"message_id",
|
||||
"status",
|
||||
"updated_at",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varMessageDispatch := _MessageDispatch{}
|
||||
|
||||
err = json.Unmarshal(data, &varMessageDispatch)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = MessageDispatch(varMessageDispatch)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "created_at")
|
||||
delete(additionalProperties, "error")
|
||||
delete(additionalProperties, "id")
|
||||
delete(additionalProperties, "message_id")
|
||||
delete(additionalProperties, "status")
|
||||
delete(additionalProperties, "updated_at")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableMessageDispatch struct {
|
||||
value *MessageDispatch
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableMessageDispatch) Get() *MessageDispatch {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableMessageDispatch) Set(val *MessageDispatch) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableMessageDispatch) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableMessageDispatch) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableMessageDispatch(val *MessageDispatch) *NullableMessageDispatch {
|
||||
return &NullableMessageDispatch{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableMessageDispatch) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableMessageDispatch) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
205
pkg/httpclient/model_needs_privileged_session_error.go
Normal file
205
pkg/httpclient/model_needs_privileged_session_error.go
Normal file
@@ -0,0 +1,205 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// checks if the NeedsPrivilegedSessionError type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &NeedsPrivilegedSessionError{}
|
||||
|
||||
// NeedsPrivilegedSessionError struct for NeedsPrivilegedSessionError
|
||||
type NeedsPrivilegedSessionError struct {
|
||||
Error *GenericError `json:"error,omitempty"`
|
||||
// Points to where to redirect the user to next.
|
||||
RedirectBrowserTo string `json:"redirect_browser_to"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _NeedsPrivilegedSessionError NeedsPrivilegedSessionError
|
||||
|
||||
// NewNeedsPrivilegedSessionError instantiates a new NeedsPrivilegedSessionError object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewNeedsPrivilegedSessionError(redirectBrowserTo string) *NeedsPrivilegedSessionError {
|
||||
this := NeedsPrivilegedSessionError{}
|
||||
this.RedirectBrowserTo = redirectBrowserTo
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewNeedsPrivilegedSessionErrorWithDefaults instantiates a new NeedsPrivilegedSessionError object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewNeedsPrivilegedSessionErrorWithDefaults() *NeedsPrivilegedSessionError {
|
||||
this := NeedsPrivilegedSessionError{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetError returns the Error field value if set, zero value otherwise.
|
||||
func (o *NeedsPrivilegedSessionError) GetError() GenericError {
|
||||
if o == nil || IsNil(o.Error) {
|
||||
var ret GenericError
|
||||
return ret
|
||||
}
|
||||
return *o.Error
|
||||
}
|
||||
|
||||
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *NeedsPrivilegedSessionError) GetErrorOk() (*GenericError, bool) {
|
||||
if o == nil || IsNil(o.Error) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Error, true
|
||||
}
|
||||
|
||||
// HasError returns a boolean if a field has been set.
|
||||
func (o *NeedsPrivilegedSessionError) HasError() bool {
|
||||
if o != nil && !IsNil(o.Error) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetError gets a reference to the given GenericError and assigns it to the Error field.
|
||||
func (o *NeedsPrivilegedSessionError) SetError(v GenericError) {
|
||||
o.Error = &v
|
||||
}
|
||||
|
||||
// GetRedirectBrowserTo returns the RedirectBrowserTo field value
|
||||
func (o *NeedsPrivilegedSessionError) GetRedirectBrowserTo() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.RedirectBrowserTo
|
||||
}
|
||||
|
||||
// GetRedirectBrowserToOk returns a tuple with the RedirectBrowserTo field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *NeedsPrivilegedSessionError) GetRedirectBrowserToOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.RedirectBrowserTo, true
|
||||
}
|
||||
|
||||
// SetRedirectBrowserTo sets field value
|
||||
func (o *NeedsPrivilegedSessionError) SetRedirectBrowserTo(v string) {
|
||||
o.RedirectBrowserTo = v
|
||||
}
|
||||
|
||||
func (o NeedsPrivilegedSessionError) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o NeedsPrivilegedSessionError) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Error) {
|
||||
toSerialize["error"] = o.Error
|
||||
}
|
||||
toSerialize["redirect_browser_to"] = o.RedirectBrowserTo
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *NeedsPrivilegedSessionError) UnmarshalJSON(data []byte) (err error) {
|
||||
// This validates that all required properties are included in the JSON object
|
||||
// by unmarshalling the object into a generic map with string keys and checking
|
||||
// that every required field exists as a key in the generic map.
|
||||
requiredProperties := []string{
|
||||
"redirect_browser_to",
|
||||
}
|
||||
|
||||
allProperties := make(map[string]interface{})
|
||||
|
||||
err = json.Unmarshal(data, &allProperties)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, requiredProperty := range requiredProperties {
|
||||
if _, exists := allProperties[requiredProperty]; !exists {
|
||||
return fmt.Errorf("no value given for required property %v", requiredProperty)
|
||||
}
|
||||
}
|
||||
|
||||
varNeedsPrivilegedSessionError := _NeedsPrivilegedSessionError{}
|
||||
|
||||
err = json.Unmarshal(data, &varNeedsPrivilegedSessionError)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = NeedsPrivilegedSessionError(varNeedsPrivilegedSessionError)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "error")
|
||||
delete(additionalProperties, "redirect_browser_to")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableNeedsPrivilegedSessionError struct {
|
||||
value *NeedsPrivilegedSessionError
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableNeedsPrivilegedSessionError) Get() *NeedsPrivilegedSessionError {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableNeedsPrivilegedSessionError) Set(val *NeedsPrivilegedSessionError) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableNeedsPrivilegedSessionError) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableNeedsPrivilegedSessionError) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableNeedsPrivilegedSessionError(val *NeedsPrivilegedSessionError) *NullableNeedsPrivilegedSessionError {
|
||||
return &NullableNeedsPrivilegedSessionError{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableNeedsPrivilegedSessionError) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableNeedsPrivilegedSessionError) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
1935
pkg/httpclient/model_o_auth2_client.go
Normal file
1935
pkg/httpclient/model_o_auth2_client.go
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,307 @@
|
||||
/*
|
||||
Ory Identities API
|
||||
|
||||
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
|
||||
|
||||
API version:
|
||||
Contact: office@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the OAuth2ConsentRequestOpenIDConnectContext type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &OAuth2ConsentRequestOpenIDConnectContext{}
|
||||
|
||||
// OAuth2ConsentRequestOpenIDConnectContext OAuth2ConsentRequestOpenIDConnectContext struct for OAuth2ConsentRequestOpenIDConnectContext
|
||||
type OAuth2ConsentRequestOpenIDConnectContext struct {
|
||||
// ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter.
|
||||
AcrValues []string `json:"acr_values,omitempty"`
|
||||
// Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. The defined values are: page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode. popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over. touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface. wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \\\"feature phone\\\" type display. The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display.
|
||||
Display *string `json:"display,omitempty"`
|
||||
// IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client.
|
||||
IdTokenHintClaims map[string]interface{} `json:"id_token_hint_claims,omitempty"`
|
||||
// LoginHint hints about the login identifier the End-User might use to log in (if necessary). This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a phone number in the format specified for the phone_number Claim. The use of this parameter is optional.
|
||||
LoginHint *string `json:"login_hint,omitempty"`
|
||||
// UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value \\\"fr-CA fr en\\\" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider.
|
||||
UiLocales []string `json:"ui_locales,omitempty"`
|
||||
AdditionalProperties map[string]interface{}
|
||||
}
|
||||
|
||||
type _OAuth2ConsentRequestOpenIDConnectContext OAuth2ConsentRequestOpenIDConnectContext
|
||||
|
||||
// NewOAuth2ConsentRequestOpenIDConnectContext instantiates a new OAuth2ConsentRequestOpenIDConnectContext object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewOAuth2ConsentRequestOpenIDConnectContext() *OAuth2ConsentRequestOpenIDConnectContext {
|
||||
this := OAuth2ConsentRequestOpenIDConnectContext{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewOAuth2ConsentRequestOpenIDConnectContextWithDefaults instantiates a new OAuth2ConsentRequestOpenIDConnectContext object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewOAuth2ConsentRequestOpenIDConnectContextWithDefaults() *OAuth2ConsentRequestOpenIDConnectContext {
|
||||
this := OAuth2ConsentRequestOpenIDConnectContext{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAcrValues returns the AcrValues field value if set, zero value otherwise.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetAcrValues() []string {
|
||||
if o == nil || IsNil(o.AcrValues) {
|
||||
var ret []string
|
||||
return ret
|
||||
}
|
||||
return o.AcrValues
|
||||
}
|
||||
|
||||
// GetAcrValuesOk returns a tuple with the AcrValues field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetAcrValuesOk() ([]string, bool) {
|
||||
if o == nil || IsNil(o.AcrValues) {
|
||||
return nil, false
|
||||
}
|
||||
return o.AcrValues, true
|
||||
}
|
||||
|
||||
// HasAcrValues returns a boolean if a field has been set.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) HasAcrValues() bool {
|
||||
if o != nil && !IsNil(o.AcrValues) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAcrValues gets a reference to the given []string and assigns it to the AcrValues field.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) SetAcrValues(v []string) {
|
||||
o.AcrValues = v
|
||||
}
|
||||
|
||||
// GetDisplay returns the Display field value if set, zero value otherwise.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetDisplay() string {
|
||||
if o == nil || IsNil(o.Display) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Display
|
||||
}
|
||||
|
||||
// GetDisplayOk returns a tuple with the Display field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetDisplayOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Display) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Display, true
|
||||
}
|
||||
|
||||
// HasDisplay returns a boolean if a field has been set.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) HasDisplay() bool {
|
||||
if o != nil && !IsNil(o.Display) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDisplay gets a reference to the given string and assigns it to the Display field.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) SetDisplay(v string) {
|
||||
o.Display = &v
|
||||
}
|
||||
|
||||
// GetIdTokenHintClaims returns the IdTokenHintClaims field value if set, zero value otherwise.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetIdTokenHintClaims() map[string]interface{} {
|
||||
if o == nil || IsNil(o.IdTokenHintClaims) {
|
||||
var ret map[string]interface{}
|
||||
return ret
|
||||
}
|
||||
return o.IdTokenHintClaims
|
||||
}
|
||||
|
||||
// GetIdTokenHintClaimsOk returns a tuple with the IdTokenHintClaims field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetIdTokenHintClaimsOk() (map[string]interface{}, bool) {
|
||||
if o == nil || IsNil(o.IdTokenHintClaims) {
|
||||
return map[string]interface{}{}, false
|
||||
}
|
||||
return o.IdTokenHintClaims, true
|
||||
}
|
||||
|
||||
// HasIdTokenHintClaims returns a boolean if a field has been set.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) HasIdTokenHintClaims() bool {
|
||||
if o != nil && !IsNil(o.IdTokenHintClaims) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetIdTokenHintClaims gets a reference to the given map[string]interface{} and assigns it to the IdTokenHintClaims field.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) SetIdTokenHintClaims(v map[string]interface{}) {
|
||||
o.IdTokenHintClaims = v
|
||||
}
|
||||
|
||||
// GetLoginHint returns the LoginHint field value if set, zero value otherwise.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetLoginHint() string {
|
||||
if o == nil || IsNil(o.LoginHint) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.LoginHint
|
||||
}
|
||||
|
||||
// GetLoginHintOk returns a tuple with the LoginHint field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetLoginHintOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.LoginHint) {
|
||||
return nil, false
|
||||
}
|
||||
return o.LoginHint, true
|
||||
}
|
||||
|
||||
// HasLoginHint returns a boolean if a field has been set.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) HasLoginHint() bool {
|
||||
if o != nil && !IsNil(o.LoginHint) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetLoginHint gets a reference to the given string and assigns it to the LoginHint field.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) SetLoginHint(v string) {
|
||||
o.LoginHint = &v
|
||||
}
|
||||
|
||||
// GetUiLocales returns the UiLocales field value if set, zero value otherwise.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetUiLocales() []string {
|
||||
if o == nil || IsNil(o.UiLocales) {
|
||||
var ret []string
|
||||
return ret
|
||||
}
|
||||
return o.UiLocales
|
||||
}
|
||||
|
||||
// GetUiLocalesOk returns a tuple with the UiLocales field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetUiLocalesOk() ([]string, bool) {
|
||||
if o == nil || IsNil(o.UiLocales) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UiLocales, true
|
||||
}
|
||||
|
||||
// HasUiLocales returns a boolean if a field has been set.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) HasUiLocales() bool {
|
||||
if o != nil && !IsNil(o.UiLocales) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUiLocales gets a reference to the given []string and assigns it to the UiLocales field.
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) SetUiLocales(v []string) {
|
||||
o.UiLocales = v
|
||||
}
|
||||
|
||||
func (o OAuth2ConsentRequestOpenIDConnectContext) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o OAuth2ConsentRequestOpenIDConnectContext) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.AcrValues) {
|
||||
toSerialize["acr_values"] = o.AcrValues
|
||||
}
|
||||
if !IsNil(o.Display) {
|
||||
toSerialize["display"] = o.Display
|
||||
}
|
||||
if !IsNil(o.IdTokenHintClaims) {
|
||||
toSerialize["id_token_hint_claims"] = o.IdTokenHintClaims
|
||||
}
|
||||
if !IsNil(o.LoginHint) {
|
||||
toSerialize["login_hint"] = o.LoginHint
|
||||
}
|
||||
if !IsNil(o.UiLocales) {
|
||||
toSerialize["ui_locales"] = o.UiLocales
|
||||
}
|
||||
|
||||
for key, value := range o.AdditionalProperties {
|
||||
toSerialize[key] = value
|
||||
}
|
||||
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
func (o *OAuth2ConsentRequestOpenIDConnectContext) UnmarshalJSON(data []byte) (err error) {
|
||||
varOAuth2ConsentRequestOpenIDConnectContext := _OAuth2ConsentRequestOpenIDConnectContext{}
|
||||
|
||||
err = json.Unmarshal(data, &varOAuth2ConsentRequestOpenIDConnectContext)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = OAuth2ConsentRequestOpenIDConnectContext(varOAuth2ConsentRequestOpenIDConnectContext)
|
||||
|
||||
additionalProperties := make(map[string]interface{})
|
||||
|
||||
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
||||
delete(additionalProperties, "acr_values")
|
||||
delete(additionalProperties, "display")
|
||||
delete(additionalProperties, "id_token_hint_claims")
|
||||
delete(additionalProperties, "login_hint")
|
||||
delete(additionalProperties, "ui_locales")
|
||||
o.AdditionalProperties = additionalProperties
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type NullableOAuth2ConsentRequestOpenIDConnectContext struct {
|
||||
value *OAuth2ConsentRequestOpenIDConnectContext
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableOAuth2ConsentRequestOpenIDConnectContext) Get() *OAuth2ConsentRequestOpenIDConnectContext {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableOAuth2ConsentRequestOpenIDConnectContext) Set(val *OAuth2ConsentRequestOpenIDConnectContext) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableOAuth2ConsentRequestOpenIDConnectContext) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableOAuth2ConsentRequestOpenIDConnectContext) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableOAuth2ConsentRequestOpenIDConnectContext(val *OAuth2ConsentRequestOpenIDConnectContext) *NullableOAuth2ConsentRequestOpenIDConnectContext {
|
||||
return &NullableOAuth2ConsentRequestOpenIDConnectContext{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableOAuth2ConsentRequestOpenIDConnectContext) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableOAuth2ConsentRequestOpenIDConnectContext) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user