mirror of
https://github.com/goauthentik/authentik.git
synced 2026-06-18 03:19:51 +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>
279 lines
6.8 KiB
Go
Generated
279 lines
6.8 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 DeviceUserRequest type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DeviceUserRequest{}
|
|
|
|
// DeviceUserRequest struct for DeviceUserRequest
|
|
type DeviceUserRequest struct {
|
|
Id string `json:"id"`
|
|
Username *string `json:"username,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
Home *string `json:"home,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DeviceUserRequest DeviceUserRequest
|
|
|
|
// NewDeviceUserRequest instantiates a new DeviceUserRequest 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 NewDeviceUserRequest(id string) *DeviceUserRequest {
|
|
this := DeviceUserRequest{}
|
|
this.Id = id
|
|
return &this
|
|
}
|
|
|
|
// NewDeviceUserRequestWithDefaults instantiates a new DeviceUserRequest 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 NewDeviceUserRequestWithDefaults() *DeviceUserRequest {
|
|
this := DeviceUserRequest{}
|
|
return &this
|
|
}
|
|
|
|
// GetId returns the Id field value
|
|
func (o *DeviceUserRequest) GetId() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeviceUserRequest) GetIdOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Id, true
|
|
}
|
|
|
|
// SetId sets field value
|
|
func (o *DeviceUserRequest) SetId(v string) {
|
|
o.Id = v
|
|
}
|
|
|
|
// GetUsername returns the Username field value if set, zero value otherwise.
|
|
func (o *DeviceUserRequest) GetUsername() string {
|
|
if o == nil || IsNil(o.Username) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Username
|
|
}
|
|
|
|
// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeviceUserRequest) GetUsernameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Username) {
|
|
return nil, false
|
|
}
|
|
return o.Username, true
|
|
}
|
|
|
|
// HasUsername returns a boolean if a field has been set.
|
|
func (o *DeviceUserRequest) HasUsername() bool {
|
|
if o != nil && !IsNil(o.Username) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUsername gets a reference to the given string and assigns it to the Username field.
|
|
func (o *DeviceUserRequest) SetUsername(v string) {
|
|
o.Username = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *DeviceUserRequest) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeviceUserRequest) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *DeviceUserRequest) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *DeviceUserRequest) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetHome returns the Home field value if set, zero value otherwise.
|
|
func (o *DeviceUserRequest) GetHome() string {
|
|
if o == nil || IsNil(o.Home) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Home
|
|
}
|
|
|
|
// GetHomeOk returns a tuple with the Home field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeviceUserRequest) GetHomeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Home) {
|
|
return nil, false
|
|
}
|
|
return o.Home, true
|
|
}
|
|
|
|
// HasHome returns a boolean if a field has been set.
|
|
func (o *DeviceUserRequest) HasHome() bool {
|
|
if o != nil && !IsNil(o.Home) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHome gets a reference to the given string and assigns it to the Home field.
|
|
func (o *DeviceUserRequest) SetHome(v string) {
|
|
o.Home = &v
|
|
}
|
|
|
|
func (o DeviceUserRequest) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DeviceUserRequest) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["id"] = o.Id
|
|
if !IsNil(o.Username) {
|
|
toSerialize["username"] = o.Username
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Home) {
|
|
toSerialize["home"] = o.Home
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DeviceUserRequest) 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{
|
|
"id",
|
|
}
|
|
|
|
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)
|
|
}
|
|
}
|
|
|
|
varDeviceUserRequest := _DeviceUserRequest{}
|
|
|
|
err = json.Unmarshal(data, &varDeviceUserRequest)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DeviceUserRequest(varDeviceUserRequest)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "username")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "home")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDeviceUserRequest struct {
|
|
value *DeviceUserRequest
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDeviceUserRequest) Get() *DeviceUserRequest {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDeviceUserRequest) Set(val *DeviceUserRequest) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDeviceUserRequest) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDeviceUserRequest) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDeviceUserRequest(val *DeviceUserRequest) *NullableDeviceUserRequest {
|
|
return &NullableDeviceUserRequest{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDeviceUserRequest) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDeviceUserRequest) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|