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