mirror of
https://github.com/goauthentik/authentik.git
synced 2026-06-18 11:29:26 +03:00
2f70351c90
* packages/client-go: init Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> * format Signed-off-by: Jens Langhammer <jens@goauthentik.io> * remove mod/sum Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix translate Signed-off-by: Jens Langhammer <jens@goauthentik.io> * no go replace Signed-off-by: Jens Langhammer <jens@goauthentik.io> * update rust makefile with pwd Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> * fix build Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix docs Signed-off-by: Jens Langhammer <jens@goauthentik.io> * don't need a version ig? Signed-off-by: Jens Langhammer <jens@goauthentik.io> * exclude go client from cspell Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix main docker build Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> Signed-off-by: Jens Langhammer <jens@goauthentik.io> Co-authored-by: Jens Langhammer <jens@goauthentik.io>
226 lines
6.1 KiB
Go
Generated
226 lines
6.1 KiB
Go
Generated
/*
|
|
authentik
|
|
|
|
Making authentication simple.
|
|
|
|
API version: 2026.5.0-rc1
|
|
Contact: hello@goauthentik.io
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package api
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
)
|
|
|
|
// checks if the AuthenticatedSessionUserAgentDevice type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AuthenticatedSessionUserAgentDevice{}
|
|
|
|
// AuthenticatedSessionUserAgentDevice User agent device
|
|
type AuthenticatedSessionUserAgentDevice struct {
|
|
Brand string `json:"brand"`
|
|
Family string `json:"family"`
|
|
Model string `json:"model"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AuthenticatedSessionUserAgentDevice AuthenticatedSessionUserAgentDevice
|
|
|
|
// NewAuthenticatedSessionUserAgentDevice instantiates a new AuthenticatedSessionUserAgentDevice 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 NewAuthenticatedSessionUserAgentDevice(brand string, family string, model string) *AuthenticatedSessionUserAgentDevice {
|
|
this := AuthenticatedSessionUserAgentDevice{}
|
|
this.Brand = brand
|
|
this.Family = family
|
|
this.Model = model
|
|
return &this
|
|
}
|
|
|
|
// NewAuthenticatedSessionUserAgentDeviceWithDefaults instantiates a new AuthenticatedSessionUserAgentDevice 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 NewAuthenticatedSessionUserAgentDeviceWithDefaults() *AuthenticatedSessionUserAgentDevice {
|
|
this := AuthenticatedSessionUserAgentDevice{}
|
|
return &this
|
|
}
|
|
|
|
// GetBrand returns the Brand field value
|
|
func (o *AuthenticatedSessionUserAgentDevice) GetBrand() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Brand
|
|
}
|
|
|
|
// GetBrandOk returns a tuple with the Brand field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuthenticatedSessionUserAgentDevice) GetBrandOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Brand, true
|
|
}
|
|
|
|
// SetBrand sets field value
|
|
func (o *AuthenticatedSessionUserAgentDevice) SetBrand(v string) {
|
|
o.Brand = v
|
|
}
|
|
|
|
// GetFamily returns the Family field value
|
|
func (o *AuthenticatedSessionUserAgentDevice) GetFamily() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Family
|
|
}
|
|
|
|
// GetFamilyOk returns a tuple with the Family field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuthenticatedSessionUserAgentDevice) GetFamilyOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Family, true
|
|
}
|
|
|
|
// SetFamily sets field value
|
|
func (o *AuthenticatedSessionUserAgentDevice) SetFamily(v string) {
|
|
o.Family = v
|
|
}
|
|
|
|
// GetModel returns the Model field value
|
|
func (o *AuthenticatedSessionUserAgentDevice) GetModel() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Model
|
|
}
|
|
|
|
// GetModelOk returns a tuple with the Model field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AuthenticatedSessionUserAgentDevice) GetModelOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Model, true
|
|
}
|
|
|
|
// SetModel sets field value
|
|
func (o *AuthenticatedSessionUserAgentDevice) SetModel(v string) {
|
|
o.Model = v
|
|
}
|
|
|
|
func (o AuthenticatedSessionUserAgentDevice) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AuthenticatedSessionUserAgentDevice) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["brand"] = o.Brand
|
|
toSerialize["family"] = o.Family
|
|
toSerialize["model"] = o.Model
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AuthenticatedSessionUserAgentDevice) 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{
|
|
"brand",
|
|
"family",
|
|
"model",
|
|
}
|
|
|
|
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)
|
|
}
|
|
}
|
|
|
|
varAuthenticatedSessionUserAgentDevice := _AuthenticatedSessionUserAgentDevice{}
|
|
|
|
err = json.Unmarshal(data, &varAuthenticatedSessionUserAgentDevice)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AuthenticatedSessionUserAgentDevice(varAuthenticatedSessionUserAgentDevice)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "brand")
|
|
delete(additionalProperties, "family")
|
|
delete(additionalProperties, "model")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAuthenticatedSessionUserAgentDevice struct {
|
|
value *AuthenticatedSessionUserAgentDevice
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAuthenticatedSessionUserAgentDevice) Get() *AuthenticatedSessionUserAgentDevice {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAuthenticatedSessionUserAgentDevice) Set(val *AuthenticatedSessionUserAgentDevice) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAuthenticatedSessionUserAgentDevice) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAuthenticatedSessionUserAgentDevice) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAuthenticatedSessionUserAgentDevice(val *AuthenticatedSessionUserAgentDevice) *NullableAuthenticatedSessionUserAgentDevice {
|
|
return &NullableAuthenticatedSessionUserAgentDevice{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAuthenticatedSessionUserAgentDevice) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAuthenticatedSessionUserAgentDevice) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|