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

413 lines
12 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 EndpointDeviceRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EndpointDeviceRequest{}
// EndpointDeviceRequest struct for EndpointDeviceRequest
type EndpointDeviceRequest struct {
DeviceUuid *string `json:"device_uuid,omitempty"`
Name string `json:"name"`
AccessGroup NullableString `json:"access_group,omitempty"`
AccessGroupObj *DeviceAccessGroupRequest `json:"access_group_obj,omitempty"`
Expiring *bool `json:"expiring,omitempty"`
Expires NullableTime `json:"expires,omitempty"`
Attributes map[string]interface{} `json:"attributes,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EndpointDeviceRequest EndpointDeviceRequest
// NewEndpointDeviceRequest instantiates a new EndpointDeviceRequest 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 NewEndpointDeviceRequest(name string) *EndpointDeviceRequest {
this := EndpointDeviceRequest{}
this.Name = name
return &this
}
// NewEndpointDeviceRequestWithDefaults instantiates a new EndpointDeviceRequest 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 NewEndpointDeviceRequestWithDefaults() *EndpointDeviceRequest {
this := EndpointDeviceRequest{}
return &this
}
// GetDeviceUuid returns the DeviceUuid field value if set, zero value otherwise.
func (o *EndpointDeviceRequest) 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 *EndpointDeviceRequest) 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 *EndpointDeviceRequest) 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 *EndpointDeviceRequest) SetDeviceUuid(v string) {
o.DeviceUuid = &v
}
// GetName returns the Name field value
func (o *EndpointDeviceRequest) 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 *EndpointDeviceRequest) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *EndpointDeviceRequest) 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 *EndpointDeviceRequest) 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 *EndpointDeviceRequest) 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 *EndpointDeviceRequest) 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 *EndpointDeviceRequest) SetAccessGroup(v string) {
o.AccessGroup.Set(&v)
}
// SetAccessGroupNil sets the value for AccessGroup to be an explicit nil
func (o *EndpointDeviceRequest) SetAccessGroupNil() {
o.AccessGroup.Set(nil)
}
// UnsetAccessGroup ensures that no value is present for AccessGroup, not even an explicit nil
func (o *EndpointDeviceRequest) UnsetAccessGroup() {
o.AccessGroup.Unset()
}
// GetAccessGroupObj returns the AccessGroupObj field value if set, zero value otherwise.
func (o *EndpointDeviceRequest) GetAccessGroupObj() DeviceAccessGroupRequest {
if o == nil || IsNil(o.AccessGroupObj) {
var ret DeviceAccessGroupRequest
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 *EndpointDeviceRequest) GetAccessGroupObjOk() (*DeviceAccessGroupRequest, 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 *EndpointDeviceRequest) HasAccessGroupObj() bool {
if o != nil && !IsNil(o.AccessGroupObj) {
return true
}
return false
}
// SetAccessGroupObj gets a reference to the given DeviceAccessGroupRequest and assigns it to the AccessGroupObj field.
func (o *EndpointDeviceRequest) SetAccessGroupObj(v DeviceAccessGroupRequest) {
o.AccessGroupObj = &v
}
// GetExpiring returns the Expiring field value if set, zero value otherwise.
func (o *EndpointDeviceRequest) 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 *EndpointDeviceRequest) 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 *EndpointDeviceRequest) 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 *EndpointDeviceRequest) 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 *EndpointDeviceRequest) 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 *EndpointDeviceRequest) 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 *EndpointDeviceRequest) 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 *EndpointDeviceRequest) SetExpires(v time.Time) {
o.Expires.Set(&v)
}
// SetExpiresNil sets the value for Expires to be an explicit nil
func (o *EndpointDeviceRequest) SetExpiresNil() {
o.Expires.Set(nil)
}
// UnsetExpires ensures that no value is present for Expires, not even an explicit nil
func (o *EndpointDeviceRequest) UnsetExpires() {
o.Expires.Unset()
}
// GetAttributes returns the Attributes field value if set, zero value otherwise.
func (o *EndpointDeviceRequest) 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 *EndpointDeviceRequest) 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 *EndpointDeviceRequest) 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 *EndpointDeviceRequest) SetAttributes(v map[string]interface{}) {
o.Attributes = v
}
func (o EndpointDeviceRequest) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EndpointDeviceRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.DeviceUuid) {
toSerialize["device_uuid"] = o.DeviceUuid
}
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()
}
if !IsNil(o.Attributes) {
toSerialize["attributes"] = o.Attributes
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *EndpointDeviceRequest) 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{
"name",
}
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)
}
}
varEndpointDeviceRequest := _EndpointDeviceRequest{}
err = json.Unmarshal(data, &varEndpointDeviceRequest)
if err != nil {
return err
}
*o = EndpointDeviceRequest(varEndpointDeviceRequest)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "device_uuid")
delete(additionalProperties, "name")
delete(additionalProperties, "access_group")
delete(additionalProperties, "access_group_obj")
delete(additionalProperties, "expiring")
delete(additionalProperties, "expires")
delete(additionalProperties, "attributes")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEndpointDeviceRequest struct {
value *EndpointDeviceRequest
isSet bool
}
func (v NullableEndpointDeviceRequest) Get() *EndpointDeviceRequest {
return v.value
}
func (v *NullableEndpointDeviceRequest) Set(val *EndpointDeviceRequest) {
v.value = val
v.isSet = true
}
func (v NullableEndpointDeviceRequest) IsSet() bool {
return v.isSet
}
func (v *NullableEndpointDeviceRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEndpointDeviceRequest(val *EndpointDeviceRequest) *NullableEndpointDeviceRequest {
return &NullableEndpointDeviceRequest{value: val, isSet: true}
}
func (v NullableEndpointDeviceRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEndpointDeviceRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}