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>
271 lines
7.3 KiB
Go
Generated
271 lines
7.3 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 NetworkInterfaceRequest type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &NetworkInterfaceRequest{}
|
|
|
|
// NetworkInterfaceRequest struct for NetworkInterfaceRequest
|
|
type NetworkInterfaceRequest struct {
|
|
Name string `json:"name"`
|
|
HardwareAddress string `json:"hardware_address"`
|
|
IpAddresses []string `json:"ip_addresses,omitempty"`
|
|
DnsServers []string `json:"dns_servers,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _NetworkInterfaceRequest NetworkInterfaceRequest
|
|
|
|
// NewNetworkInterfaceRequest instantiates a new NetworkInterfaceRequest 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 NewNetworkInterfaceRequest(name string, hardwareAddress string) *NetworkInterfaceRequest {
|
|
this := NetworkInterfaceRequest{}
|
|
this.Name = name
|
|
this.HardwareAddress = hardwareAddress
|
|
return &this
|
|
}
|
|
|
|
// NewNetworkInterfaceRequestWithDefaults instantiates a new NetworkInterfaceRequest 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 NewNetworkInterfaceRequestWithDefaults() *NetworkInterfaceRequest {
|
|
this := NetworkInterfaceRequest{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *NetworkInterfaceRequest) 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 *NetworkInterfaceRequest) GetNameOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Name, true
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *NetworkInterfaceRequest) SetName(v string) {
|
|
o.Name = v
|
|
}
|
|
|
|
// GetHardwareAddress returns the HardwareAddress field value
|
|
func (o *NetworkInterfaceRequest) GetHardwareAddress() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.HardwareAddress
|
|
}
|
|
|
|
// GetHardwareAddressOk returns a tuple with the HardwareAddress field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *NetworkInterfaceRequest) GetHardwareAddressOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.HardwareAddress, true
|
|
}
|
|
|
|
// SetHardwareAddress sets field value
|
|
func (o *NetworkInterfaceRequest) SetHardwareAddress(v string) {
|
|
o.HardwareAddress = v
|
|
}
|
|
|
|
// GetIpAddresses returns the IpAddresses field value if set, zero value otherwise.
|
|
func (o *NetworkInterfaceRequest) GetIpAddresses() []string {
|
|
if o == nil || IsNil(o.IpAddresses) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.IpAddresses
|
|
}
|
|
|
|
// GetIpAddressesOk returns a tuple with the IpAddresses field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *NetworkInterfaceRequest) GetIpAddressesOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.IpAddresses) {
|
|
return nil, false
|
|
}
|
|
return o.IpAddresses, true
|
|
}
|
|
|
|
// HasIpAddresses returns a boolean if a field has been set.
|
|
func (o *NetworkInterfaceRequest) HasIpAddresses() bool {
|
|
if o != nil && !IsNil(o.IpAddresses) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIpAddresses gets a reference to the given []string and assigns it to the IpAddresses field.
|
|
func (o *NetworkInterfaceRequest) SetIpAddresses(v []string) {
|
|
o.IpAddresses = v
|
|
}
|
|
|
|
// GetDnsServers returns the DnsServers field value if set, zero value otherwise.
|
|
func (o *NetworkInterfaceRequest) GetDnsServers() []string {
|
|
if o == nil || IsNil(o.DnsServers) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.DnsServers
|
|
}
|
|
|
|
// GetDnsServersOk returns a tuple with the DnsServers field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *NetworkInterfaceRequest) GetDnsServersOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.DnsServers) {
|
|
return nil, false
|
|
}
|
|
return o.DnsServers, true
|
|
}
|
|
|
|
// HasDnsServers returns a boolean if a field has been set.
|
|
func (o *NetworkInterfaceRequest) HasDnsServers() bool {
|
|
if o != nil && !IsNil(o.DnsServers) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDnsServers gets a reference to the given []string and assigns it to the DnsServers field.
|
|
func (o *NetworkInterfaceRequest) SetDnsServers(v []string) {
|
|
o.DnsServers = v
|
|
}
|
|
|
|
func (o NetworkInterfaceRequest) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o NetworkInterfaceRequest) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["name"] = o.Name
|
|
toSerialize["hardware_address"] = o.HardwareAddress
|
|
if !IsNil(o.IpAddresses) {
|
|
toSerialize["ip_addresses"] = o.IpAddresses
|
|
}
|
|
if !IsNil(o.DnsServers) {
|
|
toSerialize["dns_servers"] = o.DnsServers
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *NetworkInterfaceRequest) 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",
|
|
"hardware_address",
|
|
}
|
|
|
|
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)
|
|
}
|
|
}
|
|
|
|
varNetworkInterfaceRequest := _NetworkInterfaceRequest{}
|
|
|
|
err = json.Unmarshal(data, &varNetworkInterfaceRequest)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = NetworkInterfaceRequest(varNetworkInterfaceRequest)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "hardware_address")
|
|
delete(additionalProperties, "ip_addresses")
|
|
delete(additionalProperties, "dns_servers")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableNetworkInterfaceRequest struct {
|
|
value *NetworkInterfaceRequest
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableNetworkInterfaceRequest) Get() *NetworkInterfaceRequest {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableNetworkInterfaceRequest) Set(val *NetworkInterfaceRequest) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableNetworkInterfaceRequest) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableNetworkInterfaceRequest) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableNetworkInterfaceRequest(val *NetworkInterfaceRequest) *NullableNetworkInterfaceRequest {
|
|
return &NullableNetworkInterfaceRequest{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableNetworkInterfaceRequest) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableNetworkInterfaceRequest) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|