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>
257 lines
6.7 KiB
Go
Generated
257 lines
6.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 DeviceConnection type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DeviceConnection{}
|
|
|
|
// DeviceConnection struct for DeviceConnection
|
|
type DeviceConnection struct {
|
|
Device string `json:"device"`
|
|
Connector string `json:"connector"`
|
|
ConnectorObj Connector `json:"connector_obj"`
|
|
LatestSnapshot NullableDeviceFactSnapshot `json:"latest_snapshot"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DeviceConnection DeviceConnection
|
|
|
|
// NewDeviceConnection instantiates a new DeviceConnection 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 NewDeviceConnection(device string, connector string, connectorObj Connector, latestSnapshot NullableDeviceFactSnapshot) *DeviceConnection {
|
|
this := DeviceConnection{}
|
|
this.Device = device
|
|
this.Connector = connector
|
|
this.ConnectorObj = connectorObj
|
|
this.LatestSnapshot = latestSnapshot
|
|
return &this
|
|
}
|
|
|
|
// NewDeviceConnectionWithDefaults instantiates a new DeviceConnection 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 NewDeviceConnectionWithDefaults() *DeviceConnection {
|
|
this := DeviceConnection{}
|
|
return &this
|
|
}
|
|
|
|
// GetDevice returns the Device field value
|
|
func (o *DeviceConnection) GetDevice() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Device
|
|
}
|
|
|
|
// GetDeviceOk returns a tuple with the Device field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeviceConnection) GetDeviceOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Device, true
|
|
}
|
|
|
|
// SetDevice sets field value
|
|
func (o *DeviceConnection) SetDevice(v string) {
|
|
o.Device = v
|
|
}
|
|
|
|
// GetConnector returns the Connector field value
|
|
func (o *DeviceConnection) GetConnector() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Connector
|
|
}
|
|
|
|
// GetConnectorOk returns a tuple with the Connector field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeviceConnection) GetConnectorOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Connector, true
|
|
}
|
|
|
|
// SetConnector sets field value
|
|
func (o *DeviceConnection) SetConnector(v string) {
|
|
o.Connector = v
|
|
}
|
|
|
|
// GetConnectorObj returns the ConnectorObj field value
|
|
func (o *DeviceConnection) GetConnectorObj() Connector {
|
|
if o == nil {
|
|
var ret Connector
|
|
return ret
|
|
}
|
|
|
|
return o.ConnectorObj
|
|
}
|
|
|
|
// GetConnectorObjOk returns a tuple with the ConnectorObj field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeviceConnection) GetConnectorObjOk() (*Connector, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.ConnectorObj, true
|
|
}
|
|
|
|
// SetConnectorObj sets field value
|
|
func (o *DeviceConnection) SetConnectorObj(v Connector) {
|
|
o.ConnectorObj = v
|
|
}
|
|
|
|
// GetLatestSnapshot returns the LatestSnapshot field value
|
|
// If the value is explicit nil, the zero value for DeviceFactSnapshot will be returned
|
|
func (o *DeviceConnection) GetLatestSnapshot() DeviceFactSnapshot {
|
|
if o == nil || o.LatestSnapshot.Get() == nil {
|
|
var ret DeviceFactSnapshot
|
|
return ret
|
|
}
|
|
|
|
return *o.LatestSnapshot.Get()
|
|
}
|
|
|
|
// GetLatestSnapshotOk returns a tuple with the LatestSnapshot field value
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *DeviceConnection) GetLatestSnapshotOk() (*DeviceFactSnapshot, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.LatestSnapshot.Get(), o.LatestSnapshot.IsSet()
|
|
}
|
|
|
|
// SetLatestSnapshot sets field value
|
|
func (o *DeviceConnection) SetLatestSnapshot(v DeviceFactSnapshot) {
|
|
o.LatestSnapshot.Set(&v)
|
|
}
|
|
|
|
func (o DeviceConnection) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DeviceConnection) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["device"] = o.Device
|
|
toSerialize["connector"] = o.Connector
|
|
toSerialize["connector_obj"] = o.ConnectorObj
|
|
toSerialize["latest_snapshot"] = o.LatestSnapshot.Get()
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DeviceConnection) 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{
|
|
"device",
|
|
"connector",
|
|
"connector_obj",
|
|
"latest_snapshot",
|
|
}
|
|
|
|
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)
|
|
}
|
|
}
|
|
|
|
varDeviceConnection := _DeviceConnection{}
|
|
|
|
err = json.Unmarshal(data, &varDeviceConnection)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DeviceConnection(varDeviceConnection)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "device")
|
|
delete(additionalProperties, "connector")
|
|
delete(additionalProperties, "connector_obj")
|
|
delete(additionalProperties, "latest_snapshot")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDeviceConnection struct {
|
|
value *DeviceConnection
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDeviceConnection) Get() *DeviceConnection {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDeviceConnection) Set(val *DeviceConnection) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDeviceConnection) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDeviceConnection) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDeviceConnection(val *DeviceConnection) *NullableDeviceConnection {
|
|
return &NullableDeviceConnection{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDeviceConnection) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDeviceConnection) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|