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

544 lines
15 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 ApplicationRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ApplicationRequest{}
// ApplicationRequest Application Serializer
type ApplicationRequest struct {
// Application's display Name.
Name string `json:"name"`
// Internal application name, used in URLs.
Slug string `json:"slug" validate:"regexp=^[-a-zA-Z0-9_]+$"`
Provider NullableInt32 `json:"provider,omitempty"`
BackchannelProviders []int32 `json:"backchannel_providers,omitempty"`
// Open launch URL in a new browser tab or window.
OpenInNewTab *bool `json:"open_in_new_tab,omitempty"`
MetaLaunchUrl *string `json:"meta_launch_url,omitempty"`
MetaIcon *string `json:"meta_icon,omitempty"`
MetaDescription *string `json:"meta_description,omitempty"`
MetaPublisher *string `json:"meta_publisher,omitempty"`
PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"`
Group *string `json:"group,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ApplicationRequest ApplicationRequest
// NewApplicationRequest instantiates a new ApplicationRequest 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 NewApplicationRequest(name string, slug string) *ApplicationRequest {
this := ApplicationRequest{}
this.Name = name
this.Slug = slug
return &this
}
// NewApplicationRequestWithDefaults instantiates a new ApplicationRequest 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 NewApplicationRequestWithDefaults() *ApplicationRequest {
this := ApplicationRequest{}
return &this
}
// GetName returns the Name field value
func (o *ApplicationRequest) 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 *ApplicationRequest) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *ApplicationRequest) SetName(v string) {
o.Name = v
}
// GetSlug returns the Slug field value
func (o *ApplicationRequest) 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 *ApplicationRequest) GetSlugOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Slug, true
}
// SetSlug sets field value
func (o *ApplicationRequest) SetSlug(v string) {
o.Slug = v
}
// GetProvider returns the Provider field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ApplicationRequest) GetProvider() int32 {
if o == nil || IsNil(o.Provider.Get()) {
var ret int32
return ret
}
return *o.Provider.Get()
}
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *ApplicationRequest) GetProviderOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.Provider.Get(), o.Provider.IsSet()
}
// HasProvider returns a boolean if a field has been set.
func (o *ApplicationRequest) HasProvider() bool {
if o != nil && o.Provider.IsSet() {
return true
}
return false
}
// SetProvider gets a reference to the given NullableInt32 and assigns it to the Provider field.
func (o *ApplicationRequest) SetProvider(v int32) {
o.Provider.Set(&v)
}
// SetProviderNil sets the value for Provider to be an explicit nil
func (o *ApplicationRequest) SetProviderNil() {
o.Provider.Set(nil)
}
// UnsetProvider ensures that no value is present for Provider, not even an explicit nil
func (o *ApplicationRequest) UnsetProvider() {
o.Provider.Unset()
}
// GetBackchannelProviders returns the BackchannelProviders field value if set, zero value otherwise.
func (o *ApplicationRequest) GetBackchannelProviders() []int32 {
if o == nil || IsNil(o.BackchannelProviders) {
var ret []int32
return ret
}
return o.BackchannelProviders
}
// GetBackchannelProvidersOk returns a tuple with the BackchannelProviders field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationRequest) GetBackchannelProvidersOk() ([]int32, bool) {
if o == nil || IsNil(o.BackchannelProviders) {
return nil, false
}
return o.BackchannelProviders, true
}
// HasBackchannelProviders returns a boolean if a field has been set.
func (o *ApplicationRequest) HasBackchannelProviders() bool {
if o != nil && !IsNil(o.BackchannelProviders) {
return true
}
return false
}
// SetBackchannelProviders gets a reference to the given []int32 and assigns it to the BackchannelProviders field.
func (o *ApplicationRequest) SetBackchannelProviders(v []int32) {
o.BackchannelProviders = v
}
// GetOpenInNewTab returns the OpenInNewTab field value if set, zero value otherwise.
func (o *ApplicationRequest) GetOpenInNewTab() bool {
if o == nil || IsNil(o.OpenInNewTab) {
var ret bool
return ret
}
return *o.OpenInNewTab
}
// GetOpenInNewTabOk returns a tuple with the OpenInNewTab field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationRequest) GetOpenInNewTabOk() (*bool, bool) {
if o == nil || IsNil(o.OpenInNewTab) {
return nil, false
}
return o.OpenInNewTab, true
}
// HasOpenInNewTab returns a boolean if a field has been set.
func (o *ApplicationRequest) HasOpenInNewTab() bool {
if o != nil && !IsNil(o.OpenInNewTab) {
return true
}
return false
}
// SetOpenInNewTab gets a reference to the given bool and assigns it to the OpenInNewTab field.
func (o *ApplicationRequest) SetOpenInNewTab(v bool) {
o.OpenInNewTab = &v
}
// GetMetaLaunchUrl returns the MetaLaunchUrl field value if set, zero value otherwise.
func (o *ApplicationRequest) GetMetaLaunchUrl() string {
if o == nil || IsNil(o.MetaLaunchUrl) {
var ret string
return ret
}
return *o.MetaLaunchUrl
}
// GetMetaLaunchUrlOk returns a tuple with the MetaLaunchUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationRequest) GetMetaLaunchUrlOk() (*string, bool) {
if o == nil || IsNil(o.MetaLaunchUrl) {
return nil, false
}
return o.MetaLaunchUrl, true
}
// HasMetaLaunchUrl returns a boolean if a field has been set.
func (o *ApplicationRequest) HasMetaLaunchUrl() bool {
if o != nil && !IsNil(o.MetaLaunchUrl) {
return true
}
return false
}
// SetMetaLaunchUrl gets a reference to the given string and assigns it to the MetaLaunchUrl field.
func (o *ApplicationRequest) SetMetaLaunchUrl(v string) {
o.MetaLaunchUrl = &v
}
// GetMetaIcon returns the MetaIcon field value if set, zero value otherwise.
func (o *ApplicationRequest) GetMetaIcon() string {
if o == nil || IsNil(o.MetaIcon) {
var ret string
return ret
}
return *o.MetaIcon
}
// GetMetaIconOk returns a tuple with the MetaIcon field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationRequest) GetMetaIconOk() (*string, bool) {
if o == nil || IsNil(o.MetaIcon) {
return nil, false
}
return o.MetaIcon, true
}
// HasMetaIcon returns a boolean if a field has been set.
func (o *ApplicationRequest) HasMetaIcon() bool {
if o != nil && !IsNil(o.MetaIcon) {
return true
}
return false
}
// SetMetaIcon gets a reference to the given string and assigns it to the MetaIcon field.
func (o *ApplicationRequest) SetMetaIcon(v string) {
o.MetaIcon = &v
}
// GetMetaDescription returns the MetaDescription field value if set, zero value otherwise.
func (o *ApplicationRequest) GetMetaDescription() string {
if o == nil || IsNil(o.MetaDescription) {
var ret string
return ret
}
return *o.MetaDescription
}
// GetMetaDescriptionOk returns a tuple with the MetaDescription field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationRequest) GetMetaDescriptionOk() (*string, bool) {
if o == nil || IsNil(o.MetaDescription) {
return nil, false
}
return o.MetaDescription, true
}
// HasMetaDescription returns a boolean if a field has been set.
func (o *ApplicationRequest) HasMetaDescription() bool {
if o != nil && !IsNil(o.MetaDescription) {
return true
}
return false
}
// SetMetaDescription gets a reference to the given string and assigns it to the MetaDescription field.
func (o *ApplicationRequest) SetMetaDescription(v string) {
o.MetaDescription = &v
}
// GetMetaPublisher returns the MetaPublisher field value if set, zero value otherwise.
func (o *ApplicationRequest) GetMetaPublisher() string {
if o == nil || IsNil(o.MetaPublisher) {
var ret string
return ret
}
return *o.MetaPublisher
}
// GetMetaPublisherOk returns a tuple with the MetaPublisher field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationRequest) GetMetaPublisherOk() (*string, bool) {
if o == nil || IsNil(o.MetaPublisher) {
return nil, false
}
return o.MetaPublisher, true
}
// HasMetaPublisher returns a boolean if a field has been set.
func (o *ApplicationRequest) HasMetaPublisher() bool {
if o != nil && !IsNil(o.MetaPublisher) {
return true
}
return false
}
// SetMetaPublisher gets a reference to the given string and assigns it to the MetaPublisher field.
func (o *ApplicationRequest) SetMetaPublisher(v string) {
o.MetaPublisher = &v
}
// GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise.
func (o *ApplicationRequest) 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 *ApplicationRequest) 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 *ApplicationRequest) 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 *ApplicationRequest) SetPolicyEngineMode(v PolicyEngineMode) {
o.PolicyEngineMode = &v
}
// GetGroup returns the Group field value if set, zero value otherwise.
func (o *ApplicationRequest) GetGroup() string {
if o == nil || IsNil(o.Group) {
var ret string
return ret
}
return *o.Group
}
// GetGroupOk returns a tuple with the Group field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationRequest) GetGroupOk() (*string, bool) {
if o == nil || IsNil(o.Group) {
return nil, false
}
return o.Group, true
}
// HasGroup returns a boolean if a field has been set.
func (o *ApplicationRequest) HasGroup() bool {
if o != nil && !IsNil(o.Group) {
return true
}
return false
}
// SetGroup gets a reference to the given string and assigns it to the Group field.
func (o *ApplicationRequest) SetGroup(v string) {
o.Group = &v
}
func (o ApplicationRequest) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ApplicationRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["name"] = o.Name
toSerialize["slug"] = o.Slug
if o.Provider.IsSet() {
toSerialize["provider"] = o.Provider.Get()
}
if !IsNil(o.BackchannelProviders) {
toSerialize["backchannel_providers"] = o.BackchannelProviders
}
if !IsNil(o.OpenInNewTab) {
toSerialize["open_in_new_tab"] = o.OpenInNewTab
}
if !IsNil(o.MetaLaunchUrl) {
toSerialize["meta_launch_url"] = o.MetaLaunchUrl
}
if !IsNil(o.MetaIcon) {
toSerialize["meta_icon"] = o.MetaIcon
}
if !IsNil(o.MetaDescription) {
toSerialize["meta_description"] = o.MetaDescription
}
if !IsNil(o.MetaPublisher) {
toSerialize["meta_publisher"] = o.MetaPublisher
}
if !IsNil(o.PolicyEngineMode) {
toSerialize["policy_engine_mode"] = o.PolicyEngineMode
}
if !IsNil(o.Group) {
toSerialize["group"] = o.Group
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ApplicationRequest) 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",
}
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)
}
}
varApplicationRequest := _ApplicationRequest{}
err = json.Unmarshal(data, &varApplicationRequest)
if err != nil {
return err
}
*o = ApplicationRequest(varApplicationRequest)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "name")
delete(additionalProperties, "slug")
delete(additionalProperties, "provider")
delete(additionalProperties, "backchannel_providers")
delete(additionalProperties, "open_in_new_tab")
delete(additionalProperties, "meta_launch_url")
delete(additionalProperties, "meta_icon")
delete(additionalProperties, "meta_description")
delete(additionalProperties, "meta_publisher")
delete(additionalProperties, "policy_engine_mode")
delete(additionalProperties, "group")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableApplicationRequest struct {
value *ApplicationRequest
isSet bool
}
func (v NullableApplicationRequest) Get() *ApplicationRequest {
return v.value
}
func (v *NullableApplicationRequest) Set(val *ApplicationRequest) {
v.value = val
v.isSet = true
}
func (v NullableApplicationRequest) IsSet() bool {
return v.isSet
}
func (v *NullableApplicationRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableApplicationRequest(val *ApplicationRequest) *NullableApplicationRequest {
return &NullableApplicationRequest{value: val, isSet: true}
}
func (v NullableApplicationRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableApplicationRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}