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>
281 lines
7.7 KiB
Go
Generated
281 lines
7.7 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 OperatingSystemRequest type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &OperatingSystemRequest{}
|
|
|
|
// OperatingSystemRequest For example: {\"family\":\"linux\",\"name\":\"Ubuntu\",\"version\":\"24.04.3 LTS (Noble Numbat)\",\"arch\":\"amd64\"} {\"family\": \"windows\",\"name\":\"Server 2022 Datacenter\",\"version\":\"10.0.20348.4405\",\"arch\":\"amd64\"} {\"family\": \"windows\",\"name\":\"Server 2022 Datacenter\",\"version\":\"10.0.20348.4405\",\"arch\":\"amd64\"} {\"family\": \"mac_os\", \"name\": \"\", \"version\": \"26.2\", \"arch\": \"arm64\"}
|
|
type OperatingSystemRequest struct {
|
|
Family DeviceFactsOSFamily `json:"family"`
|
|
// Operating System name, such as 'Server 2022' or 'Ubuntu'
|
|
Name *string `json:"name,omitempty"`
|
|
// Operating System version, must always be the version number but may contain build name
|
|
Version *string `json:"version,omitempty"`
|
|
Arch *string `json:"arch,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _OperatingSystemRequest OperatingSystemRequest
|
|
|
|
// NewOperatingSystemRequest instantiates a new OperatingSystemRequest 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 NewOperatingSystemRequest(family DeviceFactsOSFamily) *OperatingSystemRequest {
|
|
this := OperatingSystemRequest{}
|
|
this.Family = family
|
|
return &this
|
|
}
|
|
|
|
// NewOperatingSystemRequestWithDefaults instantiates a new OperatingSystemRequest 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 NewOperatingSystemRequestWithDefaults() *OperatingSystemRequest {
|
|
this := OperatingSystemRequest{}
|
|
return &this
|
|
}
|
|
|
|
// GetFamily returns the Family field value
|
|
func (o *OperatingSystemRequest) GetFamily() DeviceFactsOSFamily {
|
|
if o == nil {
|
|
var ret DeviceFactsOSFamily
|
|
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 *OperatingSystemRequest) GetFamilyOk() (*DeviceFactsOSFamily, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Family, true
|
|
}
|
|
|
|
// SetFamily sets field value
|
|
func (o *OperatingSystemRequest) SetFamily(v DeviceFactsOSFamily) {
|
|
o.Family = v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *OperatingSystemRequest) 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 *OperatingSystemRequest) 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 *OperatingSystemRequest) 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 *OperatingSystemRequest) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetVersion returns the Version field value if set, zero value otherwise.
|
|
func (o *OperatingSystemRequest) GetVersion() string {
|
|
if o == nil || IsNil(o.Version) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Version
|
|
}
|
|
|
|
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *OperatingSystemRequest) GetVersionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Version) {
|
|
return nil, false
|
|
}
|
|
return o.Version, true
|
|
}
|
|
|
|
// HasVersion returns a boolean if a field has been set.
|
|
func (o *OperatingSystemRequest) HasVersion() bool {
|
|
if o != nil && !IsNil(o.Version) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVersion gets a reference to the given string and assigns it to the Version field.
|
|
func (o *OperatingSystemRequest) SetVersion(v string) {
|
|
o.Version = &v
|
|
}
|
|
|
|
// GetArch returns the Arch field value if set, zero value otherwise.
|
|
func (o *OperatingSystemRequest) GetArch() string {
|
|
if o == nil || IsNil(o.Arch) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Arch
|
|
}
|
|
|
|
// GetArchOk returns a tuple with the Arch field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *OperatingSystemRequest) GetArchOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Arch) {
|
|
return nil, false
|
|
}
|
|
return o.Arch, true
|
|
}
|
|
|
|
// HasArch returns a boolean if a field has been set.
|
|
func (o *OperatingSystemRequest) HasArch() bool {
|
|
if o != nil && !IsNil(o.Arch) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetArch gets a reference to the given string and assigns it to the Arch field.
|
|
func (o *OperatingSystemRequest) SetArch(v string) {
|
|
o.Arch = &v
|
|
}
|
|
|
|
func (o OperatingSystemRequest) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o OperatingSystemRequest) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["family"] = o.Family
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Version) {
|
|
toSerialize["version"] = o.Version
|
|
}
|
|
if !IsNil(o.Arch) {
|
|
toSerialize["arch"] = o.Arch
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *OperatingSystemRequest) 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{
|
|
"family",
|
|
}
|
|
|
|
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)
|
|
}
|
|
}
|
|
|
|
varOperatingSystemRequest := _OperatingSystemRequest{}
|
|
|
|
err = json.Unmarshal(data, &varOperatingSystemRequest)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = OperatingSystemRequest(varOperatingSystemRequest)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "family")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "version")
|
|
delete(additionalProperties, "arch")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableOperatingSystemRequest struct {
|
|
value *OperatingSystemRequest
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableOperatingSystemRequest) Get() *OperatingSystemRequest {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableOperatingSystemRequest) Set(val *OperatingSystemRequest) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableOperatingSystemRequest) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableOperatingSystemRequest) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableOperatingSystemRequest(val *OperatingSystemRequest) *NullableOperatingSystemRequest {
|
|
return &NullableOperatingSystemRequest{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableOperatingSystemRequest) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableOperatingSystemRequest) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|