Files
authentik/packages/client-go/model_endpoint_device.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

471 lines
13 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"
"time"
)
// checks if the EndpointDevice type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EndpointDevice{}
// EndpointDevice struct for EndpointDevice
type EndpointDevice struct {
DeviceUuid *string `json:"device_uuid,omitempty"`
PbmUuid string `json:"pbm_uuid"`
Name string `json:"name"`
AccessGroup NullableString `json:"access_group,omitempty"`
AccessGroupObj *DeviceAccessGroup `json:"access_group_obj,omitempty"`
Expiring *bool `json:"expiring,omitempty"`
Expires NullableTime `json:"expires,omitempty"`
Facts DeviceFactSnapshot `json:"facts"`
Attributes map[string]interface{} `json:"attributes,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EndpointDevice EndpointDevice
// NewEndpointDevice instantiates a new EndpointDevice 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 NewEndpointDevice(pbmUuid string, name string, facts DeviceFactSnapshot) *EndpointDevice {
this := EndpointDevice{}
this.PbmUuid = pbmUuid
this.Name = name
this.Facts = facts
return &this
}
// NewEndpointDeviceWithDefaults instantiates a new EndpointDevice 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 NewEndpointDeviceWithDefaults() *EndpointDevice {
this := EndpointDevice{}
return &this
}
// GetDeviceUuid returns the DeviceUuid field value if set, zero value otherwise.
func (o *EndpointDevice) GetDeviceUuid() string {
if o == nil || IsNil(o.DeviceUuid) {
var ret string
return ret
}
return *o.DeviceUuid
}
// GetDeviceUuidOk returns a tuple with the DeviceUuid field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EndpointDevice) GetDeviceUuidOk() (*string, bool) {
if o == nil || IsNil(o.DeviceUuid) {
return nil, false
}
return o.DeviceUuid, true
}
// HasDeviceUuid returns a boolean if a field has been set.
func (o *EndpointDevice) HasDeviceUuid() bool {
if o != nil && !IsNil(o.DeviceUuid) {
return true
}
return false
}
// SetDeviceUuid gets a reference to the given string and assigns it to the DeviceUuid field.
func (o *EndpointDevice) SetDeviceUuid(v string) {
o.DeviceUuid = &v
}
// GetPbmUuid returns the PbmUuid field value
func (o *EndpointDevice) GetPbmUuid() string {
if o == nil {
var ret string
return ret
}
return o.PbmUuid
}
// GetPbmUuidOk returns a tuple with the PbmUuid field value
// and a boolean to check if the value has been set.
func (o *EndpointDevice) GetPbmUuidOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.PbmUuid, true
}
// SetPbmUuid sets field value
func (o *EndpointDevice) SetPbmUuid(v string) {
o.PbmUuid = v
}
// GetName returns the Name field value
func (o *EndpointDevice) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *EndpointDevice) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *EndpointDevice) SetName(v string) {
o.Name = v
}
// GetAccessGroup returns the AccessGroup field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *EndpointDevice) GetAccessGroup() string {
if o == nil || IsNil(o.AccessGroup.Get()) {
var ret string
return ret
}
return *o.AccessGroup.Get()
}
// GetAccessGroupOk returns a tuple with the AccessGroup field value if set, nil otherwise
// 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 *EndpointDevice) GetAccessGroupOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.AccessGroup.Get(), o.AccessGroup.IsSet()
}
// HasAccessGroup returns a boolean if a field has been set.
func (o *EndpointDevice) HasAccessGroup() bool {
if o != nil && o.AccessGroup.IsSet() {
return true
}
return false
}
// SetAccessGroup gets a reference to the given NullableString and assigns it to the AccessGroup field.
func (o *EndpointDevice) SetAccessGroup(v string) {
o.AccessGroup.Set(&v)
}
// SetAccessGroupNil sets the value for AccessGroup to be an explicit nil
func (o *EndpointDevice) SetAccessGroupNil() {
o.AccessGroup.Set(nil)
}
// UnsetAccessGroup ensures that no value is present for AccessGroup, not even an explicit nil
func (o *EndpointDevice) UnsetAccessGroup() {
o.AccessGroup.Unset()
}
// GetAccessGroupObj returns the AccessGroupObj field value if set, zero value otherwise.
func (o *EndpointDevice) GetAccessGroupObj() DeviceAccessGroup {
if o == nil || IsNil(o.AccessGroupObj) {
var ret DeviceAccessGroup
return ret
}
return *o.AccessGroupObj
}
// GetAccessGroupObjOk returns a tuple with the AccessGroupObj field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EndpointDevice) GetAccessGroupObjOk() (*DeviceAccessGroup, bool) {
if o == nil || IsNil(o.AccessGroupObj) {
return nil, false
}
return o.AccessGroupObj, true
}
// HasAccessGroupObj returns a boolean if a field has been set.
func (o *EndpointDevice) HasAccessGroupObj() bool {
if o != nil && !IsNil(o.AccessGroupObj) {
return true
}
return false
}
// SetAccessGroupObj gets a reference to the given DeviceAccessGroup and assigns it to the AccessGroupObj field.
func (o *EndpointDevice) SetAccessGroupObj(v DeviceAccessGroup) {
o.AccessGroupObj = &v
}
// GetExpiring returns the Expiring field value if set, zero value otherwise.
func (o *EndpointDevice) GetExpiring() bool {
if o == nil || IsNil(o.Expiring) {
var ret bool
return ret
}
return *o.Expiring
}
// GetExpiringOk returns a tuple with the Expiring field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EndpointDevice) GetExpiringOk() (*bool, bool) {
if o == nil || IsNil(o.Expiring) {
return nil, false
}
return o.Expiring, true
}
// HasExpiring returns a boolean if a field has been set.
func (o *EndpointDevice) HasExpiring() bool {
if o != nil && !IsNil(o.Expiring) {
return true
}
return false
}
// SetExpiring gets a reference to the given bool and assigns it to the Expiring field.
func (o *EndpointDevice) SetExpiring(v bool) {
o.Expiring = &v
}
// GetExpires returns the Expires field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *EndpointDevice) GetExpires() time.Time {
if o == nil || IsNil(o.Expires.Get()) {
var ret time.Time
return ret
}
return *o.Expires.Get()
}
// GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise
// 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 *EndpointDevice) GetExpiresOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return o.Expires.Get(), o.Expires.IsSet()
}
// HasExpires returns a boolean if a field has been set.
func (o *EndpointDevice) HasExpires() bool {
if o != nil && o.Expires.IsSet() {
return true
}
return false
}
// SetExpires gets a reference to the given NullableTime and assigns it to the Expires field.
func (o *EndpointDevice) SetExpires(v time.Time) {
o.Expires.Set(&v)
}
// SetExpiresNil sets the value for Expires to be an explicit nil
func (o *EndpointDevice) SetExpiresNil() {
o.Expires.Set(nil)
}
// UnsetExpires ensures that no value is present for Expires, not even an explicit nil
func (o *EndpointDevice) UnsetExpires() {
o.Expires.Unset()
}
// GetFacts returns the Facts field value
func (o *EndpointDevice) GetFacts() DeviceFactSnapshot {
if o == nil {
var ret DeviceFactSnapshot
return ret
}
return o.Facts
}
// GetFactsOk returns a tuple with the Facts field value
// and a boolean to check if the value has been set.
func (o *EndpointDevice) GetFactsOk() (*DeviceFactSnapshot, bool) {
if o == nil {
return nil, false
}
return &o.Facts, true
}
// SetFacts sets field value
func (o *EndpointDevice) SetFacts(v DeviceFactSnapshot) {
o.Facts = v
}
// GetAttributes returns the Attributes field value if set, zero value otherwise.
func (o *EndpointDevice) GetAttributes() map[string]interface{} {
if o == nil || IsNil(o.Attributes) {
var ret map[string]interface{}
return ret
}
return o.Attributes
}
// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EndpointDevice) GetAttributesOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.Attributes) {
return map[string]interface{}{}, false
}
return o.Attributes, true
}
// HasAttributes returns a boolean if a field has been set.
func (o *EndpointDevice) HasAttributes() bool {
if o != nil && !IsNil(o.Attributes) {
return true
}
return false
}
// SetAttributes gets a reference to the given map[string]interface{} and assigns it to the Attributes field.
func (o *EndpointDevice) SetAttributes(v map[string]interface{}) {
o.Attributes = v
}
func (o EndpointDevice) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EndpointDevice) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.DeviceUuid) {
toSerialize["device_uuid"] = o.DeviceUuid
}
toSerialize["pbm_uuid"] = o.PbmUuid
toSerialize["name"] = o.Name
if o.AccessGroup.IsSet() {
toSerialize["access_group"] = o.AccessGroup.Get()
}
if !IsNil(o.AccessGroupObj) {
toSerialize["access_group_obj"] = o.AccessGroupObj
}
if !IsNil(o.Expiring) {
toSerialize["expiring"] = o.Expiring
}
if o.Expires.IsSet() {
toSerialize["expires"] = o.Expires.Get()
}
toSerialize["facts"] = o.Facts
if !IsNil(o.Attributes) {
toSerialize["attributes"] = o.Attributes
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *EndpointDevice) 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{
"pbm_uuid",
"name",
"facts",
}
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)
}
}
varEndpointDevice := _EndpointDevice{}
err = json.Unmarshal(data, &varEndpointDevice)
if err != nil {
return err
}
*o = EndpointDevice(varEndpointDevice)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "device_uuid")
delete(additionalProperties, "pbm_uuid")
delete(additionalProperties, "name")
delete(additionalProperties, "access_group")
delete(additionalProperties, "access_group_obj")
delete(additionalProperties, "expiring")
delete(additionalProperties, "expires")
delete(additionalProperties, "facts")
delete(additionalProperties, "attributes")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEndpointDevice struct {
value *EndpointDevice
isSet bool
}
func (v NullableEndpointDevice) Get() *EndpointDevice {
return v.value
}
func (v *NullableEndpointDevice) Set(val *EndpointDevice) {
v.value = val
v.isSet = true
}
func (v NullableEndpointDevice) IsSet() bool {
return v.isSet
}
func (v *NullableEndpointDevice) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEndpointDevice(val *EndpointDevice) *NullableEndpointDevice {
return &NullableEndpointDevice{value: val, isSet: true}
}
func (v NullableEndpointDevice) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEndpointDevice) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}