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>
349 lines
8.6 KiB
Go
Generated
349 lines
8.6 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 Disk type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &Disk{}
|
|
|
|
// Disk struct for Disk
|
|
type Disk struct {
|
|
Name string `json:"name"`
|
|
Mountpoint string `json:"mountpoint"`
|
|
Label *string `json:"label,omitempty"`
|
|
CapacityTotalBytes *int64 `json:"capacity_total_bytes,omitempty"`
|
|
CapacityUsedBytes *int64 `json:"capacity_used_bytes,omitempty"`
|
|
EncryptionEnabled *bool `json:"encryption_enabled,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _Disk Disk
|
|
|
|
// NewDisk instantiates a new Disk 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 NewDisk(name string, mountpoint string) *Disk {
|
|
this := Disk{}
|
|
this.Name = name
|
|
this.Mountpoint = mountpoint
|
|
var encryptionEnabled bool = false
|
|
this.EncryptionEnabled = &encryptionEnabled
|
|
return &this
|
|
}
|
|
|
|
// NewDiskWithDefaults instantiates a new Disk 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 NewDiskWithDefaults() *Disk {
|
|
this := Disk{}
|
|
var encryptionEnabled bool = false
|
|
this.EncryptionEnabled = &encryptionEnabled
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *Disk) 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 *Disk) GetNameOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Name, true
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *Disk) SetName(v string) {
|
|
o.Name = v
|
|
}
|
|
|
|
// GetMountpoint returns the Mountpoint field value
|
|
func (o *Disk) GetMountpoint() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Mountpoint
|
|
}
|
|
|
|
// GetMountpointOk returns a tuple with the Mountpoint field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Disk) GetMountpointOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Mountpoint, true
|
|
}
|
|
|
|
// SetMountpoint sets field value
|
|
func (o *Disk) SetMountpoint(v string) {
|
|
o.Mountpoint = v
|
|
}
|
|
|
|
// GetLabel returns the Label field value if set, zero value otherwise.
|
|
func (o *Disk) GetLabel() string {
|
|
if o == nil || IsNil(o.Label) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Label
|
|
}
|
|
|
|
// GetLabelOk returns a tuple with the Label field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Disk) GetLabelOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Label) {
|
|
return nil, false
|
|
}
|
|
return o.Label, true
|
|
}
|
|
|
|
// HasLabel returns a boolean if a field has been set.
|
|
func (o *Disk) HasLabel() bool {
|
|
if o != nil && !IsNil(o.Label) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLabel gets a reference to the given string and assigns it to the Label field.
|
|
func (o *Disk) SetLabel(v string) {
|
|
o.Label = &v
|
|
}
|
|
|
|
// GetCapacityTotalBytes returns the CapacityTotalBytes field value if set, zero value otherwise.
|
|
func (o *Disk) GetCapacityTotalBytes() int64 {
|
|
if o == nil || IsNil(o.CapacityTotalBytes) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.CapacityTotalBytes
|
|
}
|
|
|
|
// GetCapacityTotalBytesOk returns a tuple with the CapacityTotalBytes field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Disk) GetCapacityTotalBytesOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.CapacityTotalBytes) {
|
|
return nil, false
|
|
}
|
|
return o.CapacityTotalBytes, true
|
|
}
|
|
|
|
// HasCapacityTotalBytes returns a boolean if a field has been set.
|
|
func (o *Disk) HasCapacityTotalBytes() bool {
|
|
if o != nil && !IsNil(o.CapacityTotalBytes) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCapacityTotalBytes gets a reference to the given int64 and assigns it to the CapacityTotalBytes field.
|
|
func (o *Disk) SetCapacityTotalBytes(v int64) {
|
|
o.CapacityTotalBytes = &v
|
|
}
|
|
|
|
// GetCapacityUsedBytes returns the CapacityUsedBytes field value if set, zero value otherwise.
|
|
func (o *Disk) GetCapacityUsedBytes() int64 {
|
|
if o == nil || IsNil(o.CapacityUsedBytes) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.CapacityUsedBytes
|
|
}
|
|
|
|
// GetCapacityUsedBytesOk returns a tuple with the CapacityUsedBytes field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Disk) GetCapacityUsedBytesOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.CapacityUsedBytes) {
|
|
return nil, false
|
|
}
|
|
return o.CapacityUsedBytes, true
|
|
}
|
|
|
|
// HasCapacityUsedBytes returns a boolean if a field has been set.
|
|
func (o *Disk) HasCapacityUsedBytes() bool {
|
|
if o != nil && !IsNil(o.CapacityUsedBytes) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCapacityUsedBytes gets a reference to the given int64 and assigns it to the CapacityUsedBytes field.
|
|
func (o *Disk) SetCapacityUsedBytes(v int64) {
|
|
o.CapacityUsedBytes = &v
|
|
}
|
|
|
|
// GetEncryptionEnabled returns the EncryptionEnabled field value if set, zero value otherwise.
|
|
func (o *Disk) GetEncryptionEnabled() bool {
|
|
if o == nil || IsNil(o.EncryptionEnabled) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.EncryptionEnabled
|
|
}
|
|
|
|
// GetEncryptionEnabledOk returns a tuple with the EncryptionEnabled field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Disk) GetEncryptionEnabledOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.EncryptionEnabled) {
|
|
return nil, false
|
|
}
|
|
return o.EncryptionEnabled, true
|
|
}
|
|
|
|
// HasEncryptionEnabled returns a boolean if a field has been set.
|
|
func (o *Disk) HasEncryptionEnabled() bool {
|
|
if o != nil && !IsNil(o.EncryptionEnabled) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEncryptionEnabled gets a reference to the given bool and assigns it to the EncryptionEnabled field.
|
|
func (o *Disk) SetEncryptionEnabled(v bool) {
|
|
o.EncryptionEnabled = &v
|
|
}
|
|
|
|
func (o Disk) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o Disk) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["name"] = o.Name
|
|
toSerialize["mountpoint"] = o.Mountpoint
|
|
if !IsNil(o.Label) {
|
|
toSerialize["label"] = o.Label
|
|
}
|
|
if !IsNil(o.CapacityTotalBytes) {
|
|
toSerialize["capacity_total_bytes"] = o.CapacityTotalBytes
|
|
}
|
|
if !IsNil(o.CapacityUsedBytes) {
|
|
toSerialize["capacity_used_bytes"] = o.CapacityUsedBytes
|
|
}
|
|
if !IsNil(o.EncryptionEnabled) {
|
|
toSerialize["encryption_enabled"] = o.EncryptionEnabled
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *Disk) 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",
|
|
"mountpoint",
|
|
}
|
|
|
|
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)
|
|
}
|
|
}
|
|
|
|
varDisk := _Disk{}
|
|
|
|
err = json.Unmarshal(data, &varDisk)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = Disk(varDisk)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "mountpoint")
|
|
delete(additionalProperties, "label")
|
|
delete(additionalProperties, "capacity_total_bytes")
|
|
delete(additionalProperties, "capacity_used_bytes")
|
|
delete(additionalProperties, "encryption_enabled")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDisk struct {
|
|
value *Disk
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDisk) Get() *Disk {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDisk) Set(val *Disk) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDisk) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDisk) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDisk(val *Disk) *NullableDisk {
|
|
return &NullableDisk{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDisk) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDisk) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|