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>
484 lines
13 KiB
Go
Generated
484 lines
13 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 FlowRequest type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FlowRequest{}
|
|
|
|
// FlowRequest Flow Serializer
|
|
type FlowRequest struct {
|
|
Name string `json:"name"`
|
|
// Visible in the URL.
|
|
Slug string `json:"slug" validate:"regexp=^[-a-zA-Z0-9_]+$"`
|
|
// Shown as the Title in Flow pages.
|
|
Title string `json:"title"`
|
|
// Decides what this Flow is used for. For example, the Authentication flow is redirect to when an un-authenticated user visits authentik.
|
|
Designation FlowDesignationEnum `json:"designation"`
|
|
// Background shown during execution
|
|
Background *string `json:"background,omitempty"`
|
|
PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"`
|
|
// Enable compatibility mode, increases compatibility with password managers on mobile devices.
|
|
CompatibilityMode *bool `json:"compatibility_mode,omitempty"`
|
|
Layout *FlowLayoutEnum `json:"layout,omitempty"`
|
|
// Configure what should happen when a flow denies access to a user.
|
|
DeniedAction *DeniedActionEnum `json:"denied_action,omitempty"`
|
|
// Required level of authentication and authorization to access a flow.
|
|
Authentication *AuthenticationEnum `json:"authentication,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FlowRequest FlowRequest
|
|
|
|
// NewFlowRequest instantiates a new FlowRequest 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 NewFlowRequest(name string, slug string, title string, designation FlowDesignationEnum) *FlowRequest {
|
|
this := FlowRequest{}
|
|
this.Name = name
|
|
this.Slug = slug
|
|
this.Title = title
|
|
this.Designation = designation
|
|
return &this
|
|
}
|
|
|
|
// NewFlowRequestWithDefaults instantiates a new FlowRequest 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 NewFlowRequestWithDefaults() *FlowRequest {
|
|
this := FlowRequest{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *FlowRequest) 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 *FlowRequest) GetNameOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Name, true
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *FlowRequest) SetName(v string) {
|
|
o.Name = v
|
|
}
|
|
|
|
// GetSlug returns the Slug field value
|
|
func (o *FlowRequest) GetSlug() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Slug
|
|
}
|
|
|
|
// GetSlugOk returns a tuple with the Slug field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FlowRequest) GetSlugOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Slug, true
|
|
}
|
|
|
|
// SetSlug sets field value
|
|
func (o *FlowRequest) SetSlug(v string) {
|
|
o.Slug = v
|
|
}
|
|
|
|
// GetTitle returns the Title field value
|
|
func (o *FlowRequest) GetTitle() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Title
|
|
}
|
|
|
|
// GetTitleOk returns a tuple with the Title field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FlowRequest) GetTitleOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Title, true
|
|
}
|
|
|
|
// SetTitle sets field value
|
|
func (o *FlowRequest) SetTitle(v string) {
|
|
o.Title = v
|
|
}
|
|
|
|
// GetDesignation returns the Designation field value
|
|
func (o *FlowRequest) GetDesignation() FlowDesignationEnum {
|
|
if o == nil {
|
|
var ret FlowDesignationEnum
|
|
return ret
|
|
}
|
|
|
|
return o.Designation
|
|
}
|
|
|
|
// GetDesignationOk returns a tuple with the Designation field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FlowRequest) GetDesignationOk() (*FlowDesignationEnum, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Designation, true
|
|
}
|
|
|
|
// SetDesignation sets field value
|
|
func (o *FlowRequest) SetDesignation(v FlowDesignationEnum) {
|
|
o.Designation = v
|
|
}
|
|
|
|
// GetBackground returns the Background field value if set, zero value otherwise.
|
|
func (o *FlowRequest) GetBackground() string {
|
|
if o == nil || IsNil(o.Background) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Background
|
|
}
|
|
|
|
// GetBackgroundOk returns a tuple with the Background field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FlowRequest) GetBackgroundOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Background) {
|
|
return nil, false
|
|
}
|
|
return o.Background, true
|
|
}
|
|
|
|
// HasBackground returns a boolean if a field has been set.
|
|
func (o *FlowRequest) HasBackground() bool {
|
|
if o != nil && !IsNil(o.Background) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBackground gets a reference to the given string and assigns it to the Background field.
|
|
func (o *FlowRequest) SetBackground(v string) {
|
|
o.Background = &v
|
|
}
|
|
|
|
// GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise.
|
|
func (o *FlowRequest) GetPolicyEngineMode() PolicyEngineMode {
|
|
if o == nil || IsNil(o.PolicyEngineMode) {
|
|
var ret PolicyEngineMode
|
|
return ret
|
|
}
|
|
return *o.PolicyEngineMode
|
|
}
|
|
|
|
// GetPolicyEngineModeOk returns a tuple with the PolicyEngineMode field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FlowRequest) GetPolicyEngineModeOk() (*PolicyEngineMode, bool) {
|
|
if o == nil || IsNil(o.PolicyEngineMode) {
|
|
return nil, false
|
|
}
|
|
return o.PolicyEngineMode, true
|
|
}
|
|
|
|
// HasPolicyEngineMode returns a boolean if a field has been set.
|
|
func (o *FlowRequest) HasPolicyEngineMode() bool {
|
|
if o != nil && !IsNil(o.PolicyEngineMode) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPolicyEngineMode gets a reference to the given PolicyEngineMode and assigns it to the PolicyEngineMode field.
|
|
func (o *FlowRequest) SetPolicyEngineMode(v PolicyEngineMode) {
|
|
o.PolicyEngineMode = &v
|
|
}
|
|
|
|
// GetCompatibilityMode returns the CompatibilityMode field value if set, zero value otherwise.
|
|
func (o *FlowRequest) GetCompatibilityMode() bool {
|
|
if o == nil || IsNil(o.CompatibilityMode) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.CompatibilityMode
|
|
}
|
|
|
|
// GetCompatibilityModeOk returns a tuple with the CompatibilityMode field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FlowRequest) GetCompatibilityModeOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.CompatibilityMode) {
|
|
return nil, false
|
|
}
|
|
return o.CompatibilityMode, true
|
|
}
|
|
|
|
// HasCompatibilityMode returns a boolean if a field has been set.
|
|
func (o *FlowRequest) HasCompatibilityMode() bool {
|
|
if o != nil && !IsNil(o.CompatibilityMode) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCompatibilityMode gets a reference to the given bool and assigns it to the CompatibilityMode field.
|
|
func (o *FlowRequest) SetCompatibilityMode(v bool) {
|
|
o.CompatibilityMode = &v
|
|
}
|
|
|
|
// GetLayout returns the Layout field value if set, zero value otherwise.
|
|
func (o *FlowRequest) GetLayout() FlowLayoutEnum {
|
|
if o == nil || IsNil(o.Layout) {
|
|
var ret FlowLayoutEnum
|
|
return ret
|
|
}
|
|
return *o.Layout
|
|
}
|
|
|
|
// GetLayoutOk returns a tuple with the Layout field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FlowRequest) GetLayoutOk() (*FlowLayoutEnum, bool) {
|
|
if o == nil || IsNil(o.Layout) {
|
|
return nil, false
|
|
}
|
|
return o.Layout, true
|
|
}
|
|
|
|
// HasLayout returns a boolean if a field has been set.
|
|
func (o *FlowRequest) HasLayout() bool {
|
|
if o != nil && !IsNil(o.Layout) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLayout gets a reference to the given FlowLayoutEnum and assigns it to the Layout field.
|
|
func (o *FlowRequest) SetLayout(v FlowLayoutEnum) {
|
|
o.Layout = &v
|
|
}
|
|
|
|
// GetDeniedAction returns the DeniedAction field value if set, zero value otherwise.
|
|
func (o *FlowRequest) GetDeniedAction() DeniedActionEnum {
|
|
if o == nil || IsNil(o.DeniedAction) {
|
|
var ret DeniedActionEnum
|
|
return ret
|
|
}
|
|
return *o.DeniedAction
|
|
}
|
|
|
|
// GetDeniedActionOk returns a tuple with the DeniedAction field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FlowRequest) GetDeniedActionOk() (*DeniedActionEnum, bool) {
|
|
if o == nil || IsNil(o.DeniedAction) {
|
|
return nil, false
|
|
}
|
|
return o.DeniedAction, true
|
|
}
|
|
|
|
// HasDeniedAction returns a boolean if a field has been set.
|
|
func (o *FlowRequest) HasDeniedAction() bool {
|
|
if o != nil && !IsNil(o.DeniedAction) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDeniedAction gets a reference to the given DeniedActionEnum and assigns it to the DeniedAction field.
|
|
func (o *FlowRequest) SetDeniedAction(v DeniedActionEnum) {
|
|
o.DeniedAction = &v
|
|
}
|
|
|
|
// GetAuthentication returns the Authentication field value if set, zero value otherwise.
|
|
func (o *FlowRequest) GetAuthentication() AuthenticationEnum {
|
|
if o == nil || IsNil(o.Authentication) {
|
|
var ret AuthenticationEnum
|
|
return ret
|
|
}
|
|
return *o.Authentication
|
|
}
|
|
|
|
// GetAuthenticationOk returns a tuple with the Authentication field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FlowRequest) GetAuthenticationOk() (*AuthenticationEnum, bool) {
|
|
if o == nil || IsNil(o.Authentication) {
|
|
return nil, false
|
|
}
|
|
return o.Authentication, true
|
|
}
|
|
|
|
// HasAuthentication returns a boolean if a field has been set.
|
|
func (o *FlowRequest) HasAuthentication() bool {
|
|
if o != nil && !IsNil(o.Authentication) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAuthentication gets a reference to the given AuthenticationEnum and assigns it to the Authentication field.
|
|
func (o *FlowRequest) SetAuthentication(v AuthenticationEnum) {
|
|
o.Authentication = &v
|
|
}
|
|
|
|
func (o FlowRequest) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FlowRequest) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["name"] = o.Name
|
|
toSerialize["slug"] = o.Slug
|
|
toSerialize["title"] = o.Title
|
|
toSerialize["designation"] = o.Designation
|
|
if !IsNil(o.Background) {
|
|
toSerialize["background"] = o.Background
|
|
}
|
|
if !IsNil(o.PolicyEngineMode) {
|
|
toSerialize["policy_engine_mode"] = o.PolicyEngineMode
|
|
}
|
|
if !IsNil(o.CompatibilityMode) {
|
|
toSerialize["compatibility_mode"] = o.CompatibilityMode
|
|
}
|
|
if !IsNil(o.Layout) {
|
|
toSerialize["layout"] = o.Layout
|
|
}
|
|
if !IsNil(o.DeniedAction) {
|
|
toSerialize["denied_action"] = o.DeniedAction
|
|
}
|
|
if !IsNil(o.Authentication) {
|
|
toSerialize["authentication"] = o.Authentication
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FlowRequest) 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",
|
|
"slug",
|
|
"title",
|
|
"designation",
|
|
}
|
|
|
|
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)
|
|
}
|
|
}
|
|
|
|
varFlowRequest := _FlowRequest{}
|
|
|
|
err = json.Unmarshal(data, &varFlowRequest)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FlowRequest(varFlowRequest)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "slug")
|
|
delete(additionalProperties, "title")
|
|
delete(additionalProperties, "designation")
|
|
delete(additionalProperties, "background")
|
|
delete(additionalProperties, "policy_engine_mode")
|
|
delete(additionalProperties, "compatibility_mode")
|
|
delete(additionalProperties, "layout")
|
|
delete(additionalProperties, "denied_action")
|
|
delete(additionalProperties, "authentication")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFlowRequest struct {
|
|
value *FlowRequest
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFlowRequest) Get() *FlowRequest {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFlowRequest) Set(val *FlowRequest) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFlowRequest) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFlowRequest) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFlowRequest(val *FlowRequest) *NullableFlowRequest {
|
|
return &NullableFlowRequest{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFlowRequest) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFlowRequest) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|