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

400 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"
"time"
)
// checks if the PatchedEndpointDeviceRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PatchedEndpointDeviceRequest{}
// PatchedEndpointDeviceRequest struct for PatchedEndpointDeviceRequest
type PatchedEndpointDeviceRequest struct {
DeviceUuid *string `json:"device_uuid,omitempty"`
Name *string `json:"name,omitempty"`
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 _PatchedEndpointDeviceRequest PatchedEndpointDeviceRequest
// NewPatchedEndpointDeviceRequest instantiates a new PatchedEndpointDeviceRequest 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 NewPatchedEndpointDeviceRequest() *PatchedEndpointDeviceRequest {
this := PatchedEndpointDeviceRequest{}
return &this
}
// NewPatchedEndpointDeviceRequestWithDefaults instantiates a new PatchedEndpointDeviceRequest 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 NewPatchedEndpointDeviceRequestWithDefaults() *PatchedEndpointDeviceRequest {
this := PatchedEndpointDeviceRequest{}
return &this
}
// GetDeviceUuid returns the DeviceUuid field value if set, zero value otherwise.
func (o *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) SetDeviceUuid(v string) {
o.DeviceUuid = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) SetAccessGroup(v string) {
o.AccessGroup.Set(&v)
}
// SetAccessGroupNil sets the value for AccessGroup to be an explicit nil
func (o *PatchedEndpointDeviceRequest) SetAccessGroupNil() {
o.AccessGroup.Set(nil)
}
// UnsetAccessGroup ensures that no value is present for AccessGroup, not even an explicit nil
func (o *PatchedEndpointDeviceRequest) UnsetAccessGroup() {
o.AccessGroup.Unset()
}
// GetAccessGroupObj returns the AccessGroupObj field value if set, zero value otherwise.
func (o *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) SetAccessGroupObj(v DeviceAccessGroupRequest) {
o.AccessGroupObj = &v
}
// GetExpiring returns the Expiring field value if set, zero value otherwise.
func (o *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) SetExpires(v time.Time) {
o.Expires.Set(&v)
}
// SetExpiresNil sets the value for Expires to be an explicit nil
func (o *PatchedEndpointDeviceRequest) SetExpiresNil() {
o.Expires.Set(nil)
}
// UnsetExpires ensures that no value is present for Expires, not even an explicit nil
func (o *PatchedEndpointDeviceRequest) UnsetExpires() {
o.Expires.Unset()
}
// GetAttributes returns the Attributes field value if set, zero value otherwise.
func (o *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) 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 *PatchedEndpointDeviceRequest) SetAttributes(v map[string]interface{}) {
o.Attributes = v
}
func (o PatchedEndpointDeviceRequest) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PatchedEndpointDeviceRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.DeviceUuid) {
toSerialize["device_uuid"] = o.DeviceUuid
}
if !IsNil(o.Name) {
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 *PatchedEndpointDeviceRequest) UnmarshalJSON(data []byte) (err error) {
varPatchedEndpointDeviceRequest := _PatchedEndpointDeviceRequest{}
err = json.Unmarshal(data, &varPatchedEndpointDeviceRequest)
if err != nil {
return err
}
*o = PatchedEndpointDeviceRequest(varPatchedEndpointDeviceRequest)
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 NullablePatchedEndpointDeviceRequest struct {
value *PatchedEndpointDeviceRequest
isSet bool
}
func (v NullablePatchedEndpointDeviceRequest) Get() *PatchedEndpointDeviceRequest {
return v.value
}
func (v *NullablePatchedEndpointDeviceRequest) Set(val *PatchedEndpointDeviceRequest) {
v.value = val
v.isSet = true
}
func (v NullablePatchedEndpointDeviceRequest) IsSet() bool {
return v.isSet
}
func (v *NullablePatchedEndpointDeviceRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePatchedEndpointDeviceRequest(val *PatchedEndpointDeviceRequest) *NullablePatchedEndpointDeviceRequest {
return &NullablePatchedEndpointDeviceRequest{value: val, isSet: true}
}
func (v NullablePatchedEndpointDeviceRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePatchedEndpointDeviceRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}