Files
authentik/packages/client-go/model_user_setting.go
T
Marc 'risson' Schmitt 2f70351c90 packages/client-go: init (#21139)
* 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>
2026-03-25 15:26:50 +01:00

300 lines
7.2 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 UserSetting type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UserSetting{}
// UserSetting Serializer for User settings for stages and sources
type UserSetting struct {
ObjectUid string `json:"object_uid"`
Component string `json:"component"`
Title string `json:"title"`
ConfigureUrl *string `json:"configure_url,omitempty"`
IconUrl *string `json:"icon_url,omitempty"`
AdditionalProperties map[string]interface{}
}
type _UserSetting UserSetting
// NewUserSetting instantiates a new UserSetting 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 NewUserSetting(objectUid string, component string, title string) *UserSetting {
this := UserSetting{}
this.ObjectUid = objectUid
this.Component = component
this.Title = title
return &this
}
// NewUserSettingWithDefaults instantiates a new UserSetting 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 NewUserSettingWithDefaults() *UserSetting {
this := UserSetting{}
return &this
}
// GetObjectUid returns the ObjectUid field value
func (o *UserSetting) GetObjectUid() string {
if o == nil {
var ret string
return ret
}
return o.ObjectUid
}
// GetObjectUidOk returns a tuple with the ObjectUid field value
// and a boolean to check if the value has been set.
func (o *UserSetting) GetObjectUidOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ObjectUid, true
}
// SetObjectUid sets field value
func (o *UserSetting) SetObjectUid(v string) {
o.ObjectUid = v
}
// GetComponent returns the Component field value
func (o *UserSetting) GetComponent() string {
if o == nil {
var ret string
return ret
}
return o.Component
}
// GetComponentOk returns a tuple with the Component field value
// and a boolean to check if the value has been set.
func (o *UserSetting) GetComponentOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Component, true
}
// SetComponent sets field value
func (o *UserSetting) SetComponent(v string) {
o.Component = v
}
// GetTitle returns the Title field value
func (o *UserSetting) GetTitle() string {
if o == nil {
var ret string
return ret
}
return o.Title
}
// GetTitleOk returns a tuple with the Title field value
// and a boolean to check if the value has been set.
func (o *UserSetting) GetTitleOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Title, true
}
// SetTitle sets field value
func (o *UserSetting) SetTitle(v string) {
o.Title = v
}
// GetConfigureUrl returns the ConfigureUrl field value if set, zero value otherwise.
func (o *UserSetting) GetConfigureUrl() string {
if o == nil || IsNil(o.ConfigureUrl) {
var ret string
return ret
}
return *o.ConfigureUrl
}
// GetConfigureUrlOk returns a tuple with the ConfigureUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UserSetting) GetConfigureUrlOk() (*string, bool) {
if o == nil || IsNil(o.ConfigureUrl) {
return nil, false
}
return o.ConfigureUrl, true
}
// HasConfigureUrl returns a boolean if a field has been set.
func (o *UserSetting) HasConfigureUrl() bool {
if o != nil && !IsNil(o.ConfigureUrl) {
return true
}
return false
}
// SetConfigureUrl gets a reference to the given string and assigns it to the ConfigureUrl field.
func (o *UserSetting) SetConfigureUrl(v string) {
o.ConfigureUrl = &v
}
// GetIconUrl returns the IconUrl field value if set, zero value otherwise.
func (o *UserSetting) GetIconUrl() string {
if o == nil || IsNil(o.IconUrl) {
var ret string
return ret
}
return *o.IconUrl
}
// GetIconUrlOk returns a tuple with the IconUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UserSetting) GetIconUrlOk() (*string, bool) {
if o == nil || IsNil(o.IconUrl) {
return nil, false
}
return o.IconUrl, true
}
// HasIconUrl returns a boolean if a field has been set.
func (o *UserSetting) HasIconUrl() bool {
if o != nil && !IsNil(o.IconUrl) {
return true
}
return false
}
// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field.
func (o *UserSetting) SetIconUrl(v string) {
o.IconUrl = &v
}
func (o UserSetting) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o UserSetting) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["object_uid"] = o.ObjectUid
toSerialize["component"] = o.Component
toSerialize["title"] = o.Title
if !IsNil(o.ConfigureUrl) {
toSerialize["configure_url"] = o.ConfigureUrl
}
if !IsNil(o.IconUrl) {
toSerialize["icon_url"] = o.IconUrl
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *UserSetting) 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{
"object_uid",
"component",
"title",
}
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)
}
}
varUserSetting := _UserSetting{}
err = json.Unmarshal(data, &varUserSetting)
if err != nil {
return err
}
*o = UserSetting(varUserSetting)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "object_uid")
delete(additionalProperties, "component")
delete(additionalProperties, "title")
delete(additionalProperties, "configure_url")
delete(additionalProperties, "icon_url")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableUserSetting struct {
value *UserSetting
isSet bool
}
func (v NullableUserSetting) Get() *UserSetting {
return v.value
}
func (v *NullableUserSetting) Set(val *UserSetting) {
v.value = val
v.isSet = true
}
func (v NullableUserSetting) IsSet() bool {
return v.isSet
}
func (v *NullableUserSetting) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUserSetting(val *UserSetting) *NullableUserSetting {
return &NullableUserSetting{value: val, isSet: true}
}
func (v NullableUserSetting) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUserSetting) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}