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

395 lines
10 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 EndpointRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EndpointRequest{}
// EndpointRequest Endpoint Serializer
type EndpointRequest struct {
Name string `json:"name"`
Provider int32 `json:"provider"`
Protocol ProtocolEnum `json:"protocol"`
Host string `json:"host"`
Settings map[string]interface{} `json:"settings,omitempty"`
PropertyMappings []string `json:"property_mappings,omitempty"`
AuthMode EndpointAuthModeEnum `json:"auth_mode"`
MaximumConnections *int32 `json:"maximum_connections,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EndpointRequest EndpointRequest
// NewEndpointRequest instantiates a new EndpointRequest 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 NewEndpointRequest(name string, provider int32, protocol ProtocolEnum, host string, authMode EndpointAuthModeEnum) *EndpointRequest {
this := EndpointRequest{}
this.Name = name
this.Provider = provider
this.Protocol = protocol
this.Host = host
this.AuthMode = authMode
return &this
}
// NewEndpointRequestWithDefaults instantiates a new EndpointRequest 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 NewEndpointRequestWithDefaults() *EndpointRequest {
this := EndpointRequest{}
return &this
}
// GetName returns the Name field value
func (o *EndpointRequest) 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 *EndpointRequest) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *EndpointRequest) SetName(v string) {
o.Name = v
}
// GetProvider returns the Provider field value
func (o *EndpointRequest) GetProvider() int32 {
if o == nil {
var ret int32
return ret
}
return o.Provider
}
// GetProviderOk returns a tuple with the Provider field value
// and a boolean to check if the value has been set.
func (o *EndpointRequest) GetProviderOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.Provider, true
}
// SetProvider sets field value
func (o *EndpointRequest) SetProvider(v int32) {
o.Provider = v
}
// GetProtocol returns the Protocol field value
func (o *EndpointRequest) GetProtocol() ProtocolEnum {
if o == nil {
var ret ProtocolEnum
return ret
}
return o.Protocol
}
// GetProtocolOk returns a tuple with the Protocol field value
// and a boolean to check if the value has been set.
func (o *EndpointRequest) GetProtocolOk() (*ProtocolEnum, bool) {
if o == nil {
return nil, false
}
return &o.Protocol, true
}
// SetProtocol sets field value
func (o *EndpointRequest) SetProtocol(v ProtocolEnum) {
o.Protocol = v
}
// GetHost returns the Host field value
func (o *EndpointRequest) GetHost() string {
if o == nil {
var ret string
return ret
}
return o.Host
}
// GetHostOk returns a tuple with the Host field value
// and a boolean to check if the value has been set.
func (o *EndpointRequest) GetHostOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Host, true
}
// SetHost sets field value
func (o *EndpointRequest) SetHost(v string) {
o.Host = v
}
// GetSettings returns the Settings field value if set, zero value otherwise.
func (o *EndpointRequest) GetSettings() map[string]interface{} {
if o == nil || IsNil(o.Settings) {
var ret map[string]interface{}
return ret
}
return o.Settings
}
// GetSettingsOk returns a tuple with the Settings field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EndpointRequest) GetSettingsOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.Settings) {
return map[string]interface{}{}, false
}
return o.Settings, true
}
// HasSettings returns a boolean if a field has been set.
func (o *EndpointRequest) HasSettings() bool {
if o != nil && !IsNil(o.Settings) {
return true
}
return false
}
// SetSettings gets a reference to the given map[string]interface{} and assigns it to the Settings field.
func (o *EndpointRequest) SetSettings(v map[string]interface{}) {
o.Settings = v
}
// GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise.
func (o *EndpointRequest) GetPropertyMappings() []string {
if o == nil || IsNil(o.PropertyMappings) {
var ret []string
return ret
}
return o.PropertyMappings
}
// GetPropertyMappingsOk returns a tuple with the PropertyMappings field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EndpointRequest) GetPropertyMappingsOk() ([]string, bool) {
if o == nil || IsNil(o.PropertyMappings) {
return nil, false
}
return o.PropertyMappings, true
}
// HasPropertyMappings returns a boolean if a field has been set.
func (o *EndpointRequest) HasPropertyMappings() bool {
if o != nil && !IsNil(o.PropertyMappings) {
return true
}
return false
}
// SetPropertyMappings gets a reference to the given []string and assigns it to the PropertyMappings field.
func (o *EndpointRequest) SetPropertyMappings(v []string) {
o.PropertyMappings = v
}
// GetAuthMode returns the AuthMode field value
func (o *EndpointRequest) GetAuthMode() EndpointAuthModeEnum {
if o == nil {
var ret EndpointAuthModeEnum
return ret
}
return o.AuthMode
}
// GetAuthModeOk returns a tuple with the AuthMode field value
// and a boolean to check if the value has been set.
func (o *EndpointRequest) GetAuthModeOk() (*EndpointAuthModeEnum, bool) {
if o == nil {
return nil, false
}
return &o.AuthMode, true
}
// SetAuthMode sets field value
func (o *EndpointRequest) SetAuthMode(v EndpointAuthModeEnum) {
o.AuthMode = v
}
// GetMaximumConnections returns the MaximumConnections field value if set, zero value otherwise.
func (o *EndpointRequest) GetMaximumConnections() int32 {
if o == nil || IsNil(o.MaximumConnections) {
var ret int32
return ret
}
return *o.MaximumConnections
}
// GetMaximumConnectionsOk returns a tuple with the MaximumConnections field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EndpointRequest) GetMaximumConnectionsOk() (*int32, bool) {
if o == nil || IsNil(o.MaximumConnections) {
return nil, false
}
return o.MaximumConnections, true
}
// HasMaximumConnections returns a boolean if a field has been set.
func (o *EndpointRequest) HasMaximumConnections() bool {
if o != nil && !IsNil(o.MaximumConnections) {
return true
}
return false
}
// SetMaximumConnections gets a reference to the given int32 and assigns it to the MaximumConnections field.
func (o *EndpointRequest) SetMaximumConnections(v int32) {
o.MaximumConnections = &v
}
func (o EndpointRequest) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EndpointRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["name"] = o.Name
toSerialize["provider"] = o.Provider
toSerialize["protocol"] = o.Protocol
toSerialize["host"] = o.Host
if !IsNil(o.Settings) {
toSerialize["settings"] = o.Settings
}
if !IsNil(o.PropertyMappings) {
toSerialize["property_mappings"] = o.PropertyMappings
}
toSerialize["auth_mode"] = o.AuthMode
if !IsNil(o.MaximumConnections) {
toSerialize["maximum_connections"] = o.MaximumConnections
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *EndpointRequest) 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",
"provider",
"protocol",
"host",
"auth_mode",
}
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)
}
}
varEndpointRequest := _EndpointRequest{}
err = json.Unmarshal(data, &varEndpointRequest)
if err != nil {
return err
}
*o = EndpointRequest(varEndpointRequest)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "name")
delete(additionalProperties, "provider")
delete(additionalProperties, "protocol")
delete(additionalProperties, "host")
delete(additionalProperties, "settings")
delete(additionalProperties, "property_mappings")
delete(additionalProperties, "auth_mode")
delete(additionalProperties, "maximum_connections")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEndpointRequest struct {
value *EndpointRequest
isSet bool
}
func (v NullableEndpointRequest) Get() *EndpointRequest {
return v.value
}
func (v *NullableEndpointRequest) Set(val *EndpointRequest) {
v.value = val
v.isSet = true
}
func (v NullableEndpointRequest) IsSet() bool {
return v.isSet
}
func (v *NullableEndpointRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEndpointRequest(val *EndpointRequest) *NullableEndpointRequest {
return &NullableEndpointRequest{value: val, isSet: true}
}
func (v NullableEndpointRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEndpointRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}