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

271 lines
6.9 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 NetworkInterface type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &NetworkInterface{}
// NetworkInterface struct for NetworkInterface
type NetworkInterface 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 _NetworkInterface NetworkInterface
// NewNetworkInterface instantiates a new NetworkInterface 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 NewNetworkInterface(name string, hardwareAddress string) *NetworkInterface {
this := NetworkInterface{}
this.Name = name
this.HardwareAddress = hardwareAddress
return &this
}
// NewNetworkInterfaceWithDefaults instantiates a new NetworkInterface 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 NewNetworkInterfaceWithDefaults() *NetworkInterface {
this := NetworkInterface{}
return &this
}
// GetName returns the Name field value
func (o *NetworkInterface) 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 *NetworkInterface) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *NetworkInterface) SetName(v string) {
o.Name = v
}
// GetHardwareAddress returns the HardwareAddress field value
func (o *NetworkInterface) 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 *NetworkInterface) GetHardwareAddressOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.HardwareAddress, true
}
// SetHardwareAddress sets field value
func (o *NetworkInterface) SetHardwareAddress(v string) {
o.HardwareAddress = v
}
// GetIpAddresses returns the IpAddresses field value if set, zero value otherwise.
func (o *NetworkInterface) 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 *NetworkInterface) 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 *NetworkInterface) 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 *NetworkInterface) SetIpAddresses(v []string) {
o.IpAddresses = v
}
// GetDnsServers returns the DnsServers field value if set, zero value otherwise.
func (o *NetworkInterface) 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 *NetworkInterface) 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 *NetworkInterface) 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 *NetworkInterface) SetDnsServers(v []string) {
o.DnsServers = v
}
func (o NetworkInterface) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o NetworkInterface) 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 *NetworkInterface) 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)
}
}
varNetworkInterface := _NetworkInterface{}
err = json.Unmarshal(data, &varNetworkInterface)
if err != nil {
return err
}
*o = NetworkInterface(varNetworkInterface)
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 NullableNetworkInterface struct {
value *NetworkInterface
isSet bool
}
func (v NullableNetworkInterface) Get() *NetworkInterface {
return v.value
}
func (v *NullableNetworkInterface) Set(val *NetworkInterface) {
v.value = val
v.isSet = true
}
func (v NullableNetworkInterface) IsSet() bool {
return v.isSet
}
func (v *NullableNetworkInterface) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableNetworkInterface(val *NetworkInterface) *NullableNetworkInterface {
return &NullableNetworkInterface{value: val, isSet: true}
}
func (v NullableNetworkInterface) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableNetworkInterface) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}