/* 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) }