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
377 lines
11 KiB
Go
377 lines
11 KiB
Go
/*
|
|
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)
|
|
}
|