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

881 lines
28 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 ProxyProviderRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProxyProviderRequest{}
// ProxyProviderRequest ProxyProvider Serializer
type ProxyProviderRequest struct {
Name string `json:"name"`
// Flow used for authentication when the associated application is accessed by an un-authenticated user.
AuthenticationFlow NullableString `json:"authentication_flow,omitempty"`
// Flow used when authorizing this provider.
AuthorizationFlow string `json:"authorization_flow"`
// Flow used ending the session from a provider.
InvalidationFlow string `json:"invalidation_flow"`
PropertyMappings []string `json:"property_mappings,omitempty"`
InternalHost *string `json:"internal_host,omitempty"`
ExternalHost string `json:"external_host"`
// Validate SSL Certificates of upstream servers
InternalHostSslValidation *bool `json:"internal_host_ssl_validation,omitempty"`
Certificate NullableString `json:"certificate,omitempty"`
// Regular expressions for which authentication is not required. Each new line is interpreted as a new Regular Expression.
SkipPathRegex *string `json:"skip_path_regex,omitempty"`
// Set a custom HTTP-Basic Authentication header based on values from authentik.
BasicAuthEnabled *bool `json:"basic_auth_enabled,omitempty"`
// User/Group Attribute used for the password part of the HTTP-Basic Header.
BasicAuthPasswordAttribute *string `json:"basic_auth_password_attribute,omitempty"`
// User/Group Attribute used for the user part of the HTTP-Basic Header. If not set, the user's Email address is used.
BasicAuthUserAttribute *string `json:"basic_auth_user_attribute,omitempty"`
// Enable support for forwardAuth in traefik and nginx auth_request. Exclusive with internal_host.
Mode *ProxyMode `json:"mode,omitempty"`
// When enabled, this provider will intercept the authorization header and authenticate requests based on its value.
InterceptHeaderAuth *bool `json:"intercept_header_auth,omitempty"`
CookieDomain *string `json:"cookie_domain,omitempty"`
JwtFederationSources []string `json:"jwt_federation_sources,omitempty"`
JwtFederationProviders []int32 `json:"jwt_federation_providers,omitempty"`
// Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).
AccessTokenValidity *string `json:"access_token_validity,omitempty"`
// Tokens not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).
RefreshTokenValidity *string `json:"refresh_token_validity,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProxyProviderRequest ProxyProviderRequest
// NewProxyProviderRequest instantiates a new ProxyProviderRequest 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 NewProxyProviderRequest(name string, authorizationFlow string, invalidationFlow string, externalHost string) *ProxyProviderRequest {
this := ProxyProviderRequest{}
this.Name = name
this.AuthorizationFlow = authorizationFlow
this.InvalidationFlow = invalidationFlow
this.ExternalHost = externalHost
return &this
}
// NewProxyProviderRequestWithDefaults instantiates a new ProxyProviderRequest 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 NewProxyProviderRequestWithDefaults() *ProxyProviderRequest {
this := ProxyProviderRequest{}
return &this
}
// GetName returns the Name field value
func (o *ProxyProviderRequest) 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 *ProxyProviderRequest) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *ProxyProviderRequest) SetName(v string) {
o.Name = v
}
// GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ProxyProviderRequest) GetAuthenticationFlow() string {
if o == nil || IsNil(o.AuthenticationFlow.Get()) {
var ret string
return ret
}
return *o.AuthenticationFlow.Get()
}
// GetAuthenticationFlowOk returns a tuple with the AuthenticationFlow 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 *ProxyProviderRequest) GetAuthenticationFlowOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.AuthenticationFlow.Get(), o.AuthenticationFlow.IsSet()
}
// HasAuthenticationFlow returns a boolean if a field has been set.
func (o *ProxyProviderRequest) HasAuthenticationFlow() bool {
if o != nil && o.AuthenticationFlow.IsSet() {
return true
}
return false
}
// SetAuthenticationFlow gets a reference to the given NullableString and assigns it to the AuthenticationFlow field.
func (o *ProxyProviderRequest) SetAuthenticationFlow(v string) {
o.AuthenticationFlow.Set(&v)
}
// SetAuthenticationFlowNil sets the value for AuthenticationFlow to be an explicit nil
func (o *ProxyProviderRequest) SetAuthenticationFlowNil() {
o.AuthenticationFlow.Set(nil)
}
// UnsetAuthenticationFlow ensures that no value is present for AuthenticationFlow, not even an explicit nil
func (o *ProxyProviderRequest) UnsetAuthenticationFlow() {
o.AuthenticationFlow.Unset()
}
// GetAuthorizationFlow returns the AuthorizationFlow field value
func (o *ProxyProviderRequest) GetAuthorizationFlow() string {
if o == nil {
var ret string
return ret
}
return o.AuthorizationFlow
}
// GetAuthorizationFlowOk returns a tuple with the AuthorizationFlow field value
// and a boolean to check if the value has been set.
func (o *ProxyProviderRequest) GetAuthorizationFlowOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.AuthorizationFlow, true
}
// SetAuthorizationFlow sets field value
func (o *ProxyProviderRequest) SetAuthorizationFlow(v string) {
o.AuthorizationFlow = v
}
// GetInvalidationFlow returns the InvalidationFlow field value
func (o *ProxyProviderRequest) GetInvalidationFlow() string {
if o == nil {
var ret string
return ret
}
return o.InvalidationFlow
}
// GetInvalidationFlowOk returns a tuple with the InvalidationFlow field value
// and a boolean to check if the value has been set.
func (o *ProxyProviderRequest) GetInvalidationFlowOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.InvalidationFlow, true
}
// SetInvalidationFlow sets field value
func (o *ProxyProviderRequest) SetInvalidationFlow(v string) {
o.InvalidationFlow = v
}
// GetPropertyMappings returns the PropertyMappings field value if set, zero value otherwise.
func (o *ProxyProviderRequest) 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 *ProxyProviderRequest) 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 *ProxyProviderRequest) 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 *ProxyProviderRequest) SetPropertyMappings(v []string) {
o.PropertyMappings = v
}
// GetInternalHost returns the InternalHost field value if set, zero value otherwise.
func (o *ProxyProviderRequest) GetInternalHost() string {
if o == nil || IsNil(o.InternalHost) {
var ret string
return ret
}
return *o.InternalHost
}
// GetInternalHostOk returns a tuple with the InternalHost field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProxyProviderRequest) GetInternalHostOk() (*string, bool) {
if o == nil || IsNil(o.InternalHost) {
return nil, false
}
return o.InternalHost, true
}
// HasInternalHost returns a boolean if a field has been set.
func (o *ProxyProviderRequest) HasInternalHost() bool {
if o != nil && !IsNil(o.InternalHost) {
return true
}
return false
}
// SetInternalHost gets a reference to the given string and assigns it to the InternalHost field.
func (o *ProxyProviderRequest) SetInternalHost(v string) {
o.InternalHost = &v
}
// GetExternalHost returns the ExternalHost field value
func (o *ProxyProviderRequest) GetExternalHost() string {
if o == nil {
var ret string
return ret
}
return o.ExternalHost
}
// GetExternalHostOk returns a tuple with the ExternalHost field value
// and a boolean to check if the value has been set.
func (o *ProxyProviderRequest) GetExternalHostOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ExternalHost, true
}
// SetExternalHost sets field value
func (o *ProxyProviderRequest) SetExternalHost(v string) {
o.ExternalHost = v
}
// GetInternalHostSslValidation returns the InternalHostSslValidation field value if set, zero value otherwise.
func (o *ProxyProviderRequest) GetInternalHostSslValidation() bool {
if o == nil || IsNil(o.InternalHostSslValidation) {
var ret bool
return ret
}
return *o.InternalHostSslValidation
}
// GetInternalHostSslValidationOk returns a tuple with the InternalHostSslValidation field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProxyProviderRequest) GetInternalHostSslValidationOk() (*bool, bool) {
if o == nil || IsNil(o.InternalHostSslValidation) {
return nil, false
}
return o.InternalHostSslValidation, true
}
// HasInternalHostSslValidation returns a boolean if a field has been set.
func (o *ProxyProviderRequest) HasInternalHostSslValidation() bool {
if o != nil && !IsNil(o.InternalHostSslValidation) {
return true
}
return false
}
// SetInternalHostSslValidation gets a reference to the given bool and assigns it to the InternalHostSslValidation field.
func (o *ProxyProviderRequest) SetInternalHostSslValidation(v bool) {
o.InternalHostSslValidation = &v
}
// GetCertificate returns the Certificate field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ProxyProviderRequest) GetCertificate() string {
if o == nil || IsNil(o.Certificate.Get()) {
var ret string
return ret
}
return *o.Certificate.Get()
}
// GetCertificateOk returns a tuple with the Certificate 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 *ProxyProviderRequest) GetCertificateOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Certificate.Get(), o.Certificate.IsSet()
}
// HasCertificate returns a boolean if a field has been set.
func (o *ProxyProviderRequest) HasCertificate() bool {
if o != nil && o.Certificate.IsSet() {
return true
}
return false
}
// SetCertificate gets a reference to the given NullableString and assigns it to the Certificate field.
func (o *ProxyProviderRequest) SetCertificate(v string) {
o.Certificate.Set(&v)
}
// SetCertificateNil sets the value for Certificate to be an explicit nil
func (o *ProxyProviderRequest) SetCertificateNil() {
o.Certificate.Set(nil)
}
// UnsetCertificate ensures that no value is present for Certificate, not even an explicit nil
func (o *ProxyProviderRequest) UnsetCertificate() {
o.Certificate.Unset()
}
// GetSkipPathRegex returns the SkipPathRegex field value if set, zero value otherwise.
func (o *ProxyProviderRequest) GetSkipPathRegex() string {
if o == nil || IsNil(o.SkipPathRegex) {
var ret string
return ret
}
return *o.SkipPathRegex
}
// GetSkipPathRegexOk returns a tuple with the SkipPathRegex field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProxyProviderRequest) GetSkipPathRegexOk() (*string, bool) {
if o == nil || IsNil(o.SkipPathRegex) {
return nil, false
}
return o.SkipPathRegex, true
}
// HasSkipPathRegex returns a boolean if a field has been set.
func (o *ProxyProviderRequest) HasSkipPathRegex() bool {
if o != nil && !IsNil(o.SkipPathRegex) {
return true
}
return false
}
// SetSkipPathRegex gets a reference to the given string and assigns it to the SkipPathRegex field.
func (o *ProxyProviderRequest) SetSkipPathRegex(v string) {
o.SkipPathRegex = &v
}
// GetBasicAuthEnabled returns the BasicAuthEnabled field value if set, zero value otherwise.
func (o *ProxyProviderRequest) GetBasicAuthEnabled() bool {
if o == nil || IsNil(o.BasicAuthEnabled) {
var ret bool
return ret
}
return *o.BasicAuthEnabled
}
// GetBasicAuthEnabledOk returns a tuple with the BasicAuthEnabled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProxyProviderRequest) GetBasicAuthEnabledOk() (*bool, bool) {
if o == nil || IsNil(o.BasicAuthEnabled) {
return nil, false
}
return o.BasicAuthEnabled, true
}
// HasBasicAuthEnabled returns a boolean if a field has been set.
func (o *ProxyProviderRequest) HasBasicAuthEnabled() bool {
if o != nil && !IsNil(o.BasicAuthEnabled) {
return true
}
return false
}
// SetBasicAuthEnabled gets a reference to the given bool and assigns it to the BasicAuthEnabled field.
func (o *ProxyProviderRequest) SetBasicAuthEnabled(v bool) {
o.BasicAuthEnabled = &v
}
// GetBasicAuthPasswordAttribute returns the BasicAuthPasswordAttribute field value if set, zero value otherwise.
func (o *ProxyProviderRequest) GetBasicAuthPasswordAttribute() string {
if o == nil || IsNil(o.BasicAuthPasswordAttribute) {
var ret string
return ret
}
return *o.BasicAuthPasswordAttribute
}
// GetBasicAuthPasswordAttributeOk returns a tuple with the BasicAuthPasswordAttribute field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProxyProviderRequest) GetBasicAuthPasswordAttributeOk() (*string, bool) {
if o == nil || IsNil(o.BasicAuthPasswordAttribute) {
return nil, false
}
return o.BasicAuthPasswordAttribute, true
}
// HasBasicAuthPasswordAttribute returns a boolean if a field has been set.
func (o *ProxyProviderRequest) HasBasicAuthPasswordAttribute() bool {
if o != nil && !IsNil(o.BasicAuthPasswordAttribute) {
return true
}
return false
}
// SetBasicAuthPasswordAttribute gets a reference to the given string and assigns it to the BasicAuthPasswordAttribute field.
func (o *ProxyProviderRequest) SetBasicAuthPasswordAttribute(v string) {
o.BasicAuthPasswordAttribute = &v
}
// GetBasicAuthUserAttribute returns the BasicAuthUserAttribute field value if set, zero value otherwise.
func (o *ProxyProviderRequest) GetBasicAuthUserAttribute() string {
if o == nil || IsNil(o.BasicAuthUserAttribute) {
var ret string
return ret
}
return *o.BasicAuthUserAttribute
}
// GetBasicAuthUserAttributeOk returns a tuple with the BasicAuthUserAttribute field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProxyProviderRequest) GetBasicAuthUserAttributeOk() (*string, bool) {
if o == nil || IsNil(o.BasicAuthUserAttribute) {
return nil, false
}
return o.BasicAuthUserAttribute, true
}
// HasBasicAuthUserAttribute returns a boolean if a field has been set.
func (o *ProxyProviderRequest) HasBasicAuthUserAttribute() bool {
if o != nil && !IsNil(o.BasicAuthUserAttribute) {
return true
}
return false
}
// SetBasicAuthUserAttribute gets a reference to the given string and assigns it to the BasicAuthUserAttribute field.
func (o *ProxyProviderRequest) SetBasicAuthUserAttribute(v string) {
o.BasicAuthUserAttribute = &v
}
// GetMode returns the Mode field value if set, zero value otherwise.
func (o *ProxyProviderRequest) GetMode() ProxyMode {
if o == nil || IsNil(o.Mode) {
var ret ProxyMode
return ret
}
return *o.Mode
}
// GetModeOk returns a tuple with the Mode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProxyProviderRequest) GetModeOk() (*ProxyMode, bool) {
if o == nil || IsNil(o.Mode) {
return nil, false
}
return o.Mode, true
}
// HasMode returns a boolean if a field has been set.
func (o *ProxyProviderRequest) HasMode() bool {
if o != nil && !IsNil(o.Mode) {
return true
}
return false
}
// SetMode gets a reference to the given ProxyMode and assigns it to the Mode field.
func (o *ProxyProviderRequest) SetMode(v ProxyMode) {
o.Mode = &v
}
// GetInterceptHeaderAuth returns the InterceptHeaderAuth field value if set, zero value otherwise.
func (o *ProxyProviderRequest) GetInterceptHeaderAuth() bool {
if o == nil || IsNil(o.InterceptHeaderAuth) {
var ret bool
return ret
}
return *o.InterceptHeaderAuth
}
// GetInterceptHeaderAuthOk returns a tuple with the InterceptHeaderAuth field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProxyProviderRequest) GetInterceptHeaderAuthOk() (*bool, bool) {
if o == nil || IsNil(o.InterceptHeaderAuth) {
return nil, false
}
return o.InterceptHeaderAuth, true
}
// HasInterceptHeaderAuth returns a boolean if a field has been set.
func (o *ProxyProviderRequest) HasInterceptHeaderAuth() bool {
if o != nil && !IsNil(o.InterceptHeaderAuth) {
return true
}
return false
}
// SetInterceptHeaderAuth gets a reference to the given bool and assigns it to the InterceptHeaderAuth field.
func (o *ProxyProviderRequest) SetInterceptHeaderAuth(v bool) {
o.InterceptHeaderAuth = &v
}
// GetCookieDomain returns the CookieDomain field value if set, zero value otherwise.
func (o *ProxyProviderRequest) GetCookieDomain() string {
if o == nil || IsNil(o.CookieDomain) {
var ret string
return ret
}
return *o.CookieDomain
}
// GetCookieDomainOk returns a tuple with the CookieDomain field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProxyProviderRequest) GetCookieDomainOk() (*string, bool) {
if o == nil || IsNil(o.CookieDomain) {
return nil, false
}
return o.CookieDomain, true
}
// HasCookieDomain returns a boolean if a field has been set.
func (o *ProxyProviderRequest) HasCookieDomain() bool {
if o != nil && !IsNil(o.CookieDomain) {
return true
}
return false
}
// SetCookieDomain gets a reference to the given string and assigns it to the CookieDomain field.
func (o *ProxyProviderRequest) SetCookieDomain(v string) {
o.CookieDomain = &v
}
// GetJwtFederationSources returns the JwtFederationSources field value if set, zero value otherwise.
func (o *ProxyProviderRequest) GetJwtFederationSources() []string {
if o == nil || IsNil(o.JwtFederationSources) {
var ret []string
return ret
}
return o.JwtFederationSources
}
// GetJwtFederationSourcesOk returns a tuple with the JwtFederationSources field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProxyProviderRequest) GetJwtFederationSourcesOk() ([]string, bool) {
if o == nil || IsNil(o.JwtFederationSources) {
return nil, false
}
return o.JwtFederationSources, true
}
// HasJwtFederationSources returns a boolean if a field has been set.
func (o *ProxyProviderRequest) HasJwtFederationSources() bool {
if o != nil && !IsNil(o.JwtFederationSources) {
return true
}
return false
}
// SetJwtFederationSources gets a reference to the given []string and assigns it to the JwtFederationSources field.
func (o *ProxyProviderRequest) SetJwtFederationSources(v []string) {
o.JwtFederationSources = v
}
// GetJwtFederationProviders returns the JwtFederationProviders field value if set, zero value otherwise.
func (o *ProxyProviderRequest) GetJwtFederationProviders() []int32 {
if o == nil || IsNil(o.JwtFederationProviders) {
var ret []int32
return ret
}
return o.JwtFederationProviders
}
// GetJwtFederationProvidersOk returns a tuple with the JwtFederationProviders field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProxyProviderRequest) GetJwtFederationProvidersOk() ([]int32, bool) {
if o == nil || IsNil(o.JwtFederationProviders) {
return nil, false
}
return o.JwtFederationProviders, true
}
// HasJwtFederationProviders returns a boolean if a field has been set.
func (o *ProxyProviderRequest) HasJwtFederationProviders() bool {
if o != nil && !IsNil(o.JwtFederationProviders) {
return true
}
return false
}
// SetJwtFederationProviders gets a reference to the given []int32 and assigns it to the JwtFederationProviders field.
func (o *ProxyProviderRequest) SetJwtFederationProviders(v []int32) {
o.JwtFederationProviders = v
}
// GetAccessTokenValidity returns the AccessTokenValidity field value if set, zero value otherwise.
func (o *ProxyProviderRequest) GetAccessTokenValidity() string {
if o == nil || IsNil(o.AccessTokenValidity) {
var ret string
return ret
}
return *o.AccessTokenValidity
}
// GetAccessTokenValidityOk returns a tuple with the AccessTokenValidity field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProxyProviderRequest) GetAccessTokenValidityOk() (*string, bool) {
if o == nil || IsNil(o.AccessTokenValidity) {
return nil, false
}
return o.AccessTokenValidity, true
}
// HasAccessTokenValidity returns a boolean if a field has been set.
func (o *ProxyProviderRequest) HasAccessTokenValidity() bool {
if o != nil && !IsNil(o.AccessTokenValidity) {
return true
}
return false
}
// SetAccessTokenValidity gets a reference to the given string and assigns it to the AccessTokenValidity field.
func (o *ProxyProviderRequest) SetAccessTokenValidity(v string) {
o.AccessTokenValidity = &v
}
// GetRefreshTokenValidity returns the RefreshTokenValidity field value if set, zero value otherwise.
func (o *ProxyProviderRequest) GetRefreshTokenValidity() string {
if o == nil || IsNil(o.RefreshTokenValidity) {
var ret string
return ret
}
return *o.RefreshTokenValidity
}
// GetRefreshTokenValidityOk returns a tuple with the RefreshTokenValidity field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProxyProviderRequest) GetRefreshTokenValidityOk() (*string, bool) {
if o == nil || IsNil(o.RefreshTokenValidity) {
return nil, false
}
return o.RefreshTokenValidity, true
}
// HasRefreshTokenValidity returns a boolean if a field has been set.
func (o *ProxyProviderRequest) HasRefreshTokenValidity() bool {
if o != nil && !IsNil(o.RefreshTokenValidity) {
return true
}
return false
}
// SetRefreshTokenValidity gets a reference to the given string and assigns it to the RefreshTokenValidity field.
func (o *ProxyProviderRequest) SetRefreshTokenValidity(v string) {
o.RefreshTokenValidity = &v
}
func (o ProxyProviderRequest) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProxyProviderRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["name"] = o.Name
if o.AuthenticationFlow.IsSet() {
toSerialize["authentication_flow"] = o.AuthenticationFlow.Get()
}
toSerialize["authorization_flow"] = o.AuthorizationFlow
toSerialize["invalidation_flow"] = o.InvalidationFlow
if !IsNil(o.PropertyMappings) {
toSerialize["property_mappings"] = o.PropertyMappings
}
if !IsNil(o.InternalHost) {
toSerialize["internal_host"] = o.InternalHost
}
toSerialize["external_host"] = o.ExternalHost
if !IsNil(o.InternalHostSslValidation) {
toSerialize["internal_host_ssl_validation"] = o.InternalHostSslValidation
}
if o.Certificate.IsSet() {
toSerialize["certificate"] = o.Certificate.Get()
}
if !IsNil(o.SkipPathRegex) {
toSerialize["skip_path_regex"] = o.SkipPathRegex
}
if !IsNil(o.BasicAuthEnabled) {
toSerialize["basic_auth_enabled"] = o.BasicAuthEnabled
}
if !IsNil(o.BasicAuthPasswordAttribute) {
toSerialize["basic_auth_password_attribute"] = o.BasicAuthPasswordAttribute
}
if !IsNil(o.BasicAuthUserAttribute) {
toSerialize["basic_auth_user_attribute"] = o.BasicAuthUserAttribute
}
if !IsNil(o.Mode) {
toSerialize["mode"] = o.Mode
}
if !IsNil(o.InterceptHeaderAuth) {
toSerialize["intercept_header_auth"] = o.InterceptHeaderAuth
}
if !IsNil(o.CookieDomain) {
toSerialize["cookie_domain"] = o.CookieDomain
}
if !IsNil(o.JwtFederationSources) {
toSerialize["jwt_federation_sources"] = o.JwtFederationSources
}
if !IsNil(o.JwtFederationProviders) {
toSerialize["jwt_federation_providers"] = o.JwtFederationProviders
}
if !IsNil(o.AccessTokenValidity) {
toSerialize["access_token_validity"] = o.AccessTokenValidity
}
if !IsNil(o.RefreshTokenValidity) {
toSerialize["refresh_token_validity"] = o.RefreshTokenValidity
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ProxyProviderRequest) 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",
"authorization_flow",
"invalidation_flow",
"external_host",
}
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)
}
}
varProxyProviderRequest := _ProxyProviderRequest{}
err = json.Unmarshal(data, &varProxyProviderRequest)
if err != nil {
return err
}
*o = ProxyProviderRequest(varProxyProviderRequest)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "name")
delete(additionalProperties, "authentication_flow")
delete(additionalProperties, "authorization_flow")
delete(additionalProperties, "invalidation_flow")
delete(additionalProperties, "property_mappings")
delete(additionalProperties, "internal_host")
delete(additionalProperties, "external_host")
delete(additionalProperties, "internal_host_ssl_validation")
delete(additionalProperties, "certificate")
delete(additionalProperties, "skip_path_regex")
delete(additionalProperties, "basic_auth_enabled")
delete(additionalProperties, "basic_auth_password_attribute")
delete(additionalProperties, "basic_auth_user_attribute")
delete(additionalProperties, "mode")
delete(additionalProperties, "intercept_header_auth")
delete(additionalProperties, "cookie_domain")
delete(additionalProperties, "jwt_federation_sources")
delete(additionalProperties, "jwt_federation_providers")
delete(additionalProperties, "access_token_validity")
delete(additionalProperties, "refresh_token_validity")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProxyProviderRequest struct {
value *ProxyProviderRequest
isSet bool
}
func (v NullableProxyProviderRequest) Get() *ProxyProviderRequest {
return v.value
}
func (v *NullableProxyProviderRequest) Set(val *ProxyProviderRequest) {
v.value = val
v.isSet = true
}
func (v NullableProxyProviderRequest) IsSet() bool {
return v.isSet
}
func (v *NullableProxyProviderRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProxyProviderRequest(val *ProxyProviderRequest) *NullableProxyProviderRequest {
return &NullableProxyProviderRequest{value: val, isSet: true}
}
func (v NullableProxyProviderRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProxyProviderRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}