mirror of
https://github.com/goauthentik/authentik.git
synced 2026-06-17 19:09:11 +03:00
8dddc05bc0
* source/saml: Add ForceAuthn support to SAML AuthnRequest
1264 lines
39 KiB
Go
Generated
1264 lines
39 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 SAMLSourceRequest type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SAMLSourceRequest{}
|
|
|
|
// SAMLSourceRequest SAMLSource Serializer
|
|
type SAMLSourceRequest struct {
|
|
// Source's display Name.
|
|
Name string `json:"name"`
|
|
// Internal source name, used in URLs.
|
|
Slug string `json:"slug" validate:"regexp=^[-a-zA-Z0-9_]+$"`
|
|
Enabled *bool `json:"enabled,omitempty"`
|
|
// When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon.
|
|
Promoted *bool `json:"promoted,omitempty"`
|
|
// Flow to use when authenticating existing users.
|
|
AuthenticationFlow NullableString `json:"authentication_flow,omitempty"`
|
|
// Flow to use when enrolling new users.
|
|
EnrollmentFlow NullableString `json:"enrollment_flow,omitempty"`
|
|
UserPropertyMappings []string `json:"user_property_mappings,omitempty"`
|
|
GroupPropertyMappings []string `json:"group_property_mappings,omitempty"`
|
|
PolicyEngineMode *PolicyEngineMode `json:"policy_engine_mode,omitempty"`
|
|
// How the source determines if an existing user should be authenticated or a new user enrolled.
|
|
UserMatchingMode *UserMatchingModeEnum `json:"user_matching_mode,omitempty"`
|
|
UserPathTemplate *string `json:"user_path_template,omitempty"`
|
|
Icon *string `json:"icon,omitempty"`
|
|
// How the source determines if an existing group should be used or a new group created.
|
|
GroupMatchingMode *GroupMatchingModeEnum `json:"group_matching_mode,omitempty"`
|
|
// Flow used before authentication.
|
|
PreAuthenticationFlow string `json:"pre_authentication_flow"`
|
|
// Also known as Entity ID. Defaults the Metadata URL.
|
|
Issuer *string `json:"issuer,omitempty"`
|
|
// URL that the initial Login request is sent to.
|
|
SsoUrl string `json:"sso_url"`
|
|
// Optional URL if your IDP supports Single-Logout.
|
|
SloUrl NullableString `json:"slo_url,omitempty"`
|
|
// Allows authentication flows initiated by the IdP. This can be a security risk, as no validation of the request ID is done.
|
|
AllowIdpInitiated *bool `json:"allow_idp_initiated,omitempty"`
|
|
// When enabled, the IdP will re-authenticate the user even if a session exists.
|
|
ForceAuthn *bool `json:"force_authn,omitempty"`
|
|
// NameID Policy sent to the IdP. Can be unset, in which case no Policy is sent.
|
|
NameIdPolicy *SAMLNameIDPolicyEnum `json:"name_id_policy,omitempty"`
|
|
BindingType *BindingTypeEnum `json:"binding_type,omitempty"`
|
|
// When selected, incoming assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default.
|
|
VerificationKp NullableString `json:"verification_kp,omitempty"`
|
|
// Keypair used to sign outgoing Responses going to the Identity Provider.
|
|
SigningKp NullableString `json:"signing_kp,omitempty"`
|
|
DigestAlgorithm *DigestAlgorithmEnum `json:"digest_algorithm,omitempty"`
|
|
SignatureAlgorithm *SignatureAlgorithmEnum `json:"signature_algorithm,omitempty"`
|
|
// Time offset when temporary users should be deleted. This only applies if your IDP uses the NameID Format 'transient', and the user doesn't log out manually. (Format: hours=1;minutes=2;seconds=3).
|
|
TemporaryUserDeleteAfter *string `json:"temporary_user_delete_after,omitempty"`
|
|
// When selected, incoming assertions are encrypted by the IdP using the public key of the encryption keypair. The assertion is decrypted by the SP using the the private key.
|
|
EncryptionKp NullableString `json:"encryption_kp,omitempty"`
|
|
SignedAssertion *bool `json:"signed_assertion,omitempty"`
|
|
SignedResponse *bool `json:"signed_response,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _SAMLSourceRequest SAMLSourceRequest
|
|
|
|
// NewSAMLSourceRequest instantiates a new SAMLSourceRequest 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 NewSAMLSourceRequest(name string, slug string, preAuthenticationFlow string, ssoUrl string) *SAMLSourceRequest {
|
|
this := SAMLSourceRequest{}
|
|
this.Name = name
|
|
this.Slug = slug
|
|
this.PreAuthenticationFlow = preAuthenticationFlow
|
|
this.SsoUrl = ssoUrl
|
|
return &this
|
|
}
|
|
|
|
// NewSAMLSourceRequestWithDefaults instantiates a new SAMLSourceRequest 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 NewSAMLSourceRequestWithDefaults() *SAMLSourceRequest {
|
|
this := SAMLSourceRequest{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *SAMLSourceRequest) 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 *SAMLSourceRequest) GetNameOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Name, true
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *SAMLSourceRequest) SetName(v string) {
|
|
o.Name = v
|
|
}
|
|
|
|
// GetSlug returns the Slug field value
|
|
func (o *SAMLSourceRequest) 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 *SAMLSourceRequest) GetSlugOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Slug, true
|
|
}
|
|
|
|
// SetSlug sets field value
|
|
func (o *SAMLSourceRequest) SetSlug(v string) {
|
|
o.Slug = v
|
|
}
|
|
|
|
// GetEnabled returns the Enabled field value if set, zero value otherwise.
|
|
func (o *SAMLSourceRequest) GetEnabled() bool {
|
|
if o == nil || IsNil(o.Enabled) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Enabled
|
|
}
|
|
|
|
// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetEnabledOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Enabled) {
|
|
return nil, false
|
|
}
|
|
return o.Enabled, true
|
|
}
|
|
|
|
// HasEnabled returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasEnabled() bool {
|
|
if o != nil && !IsNil(o.Enabled) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEnabled gets a reference to the given bool and assigns it to the Enabled field.
|
|
func (o *SAMLSourceRequest) SetEnabled(v bool) {
|
|
o.Enabled = &v
|
|
}
|
|
|
|
// GetPromoted returns the Promoted field value if set, zero value otherwise.
|
|
func (o *SAMLSourceRequest) GetPromoted() bool {
|
|
if o == nil || IsNil(o.Promoted) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Promoted
|
|
}
|
|
|
|
// GetPromotedOk returns a tuple with the Promoted field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetPromotedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Promoted) {
|
|
return nil, false
|
|
}
|
|
return o.Promoted, true
|
|
}
|
|
|
|
// HasPromoted returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasPromoted() bool {
|
|
if o != nil && !IsNil(o.Promoted) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPromoted gets a reference to the given bool and assigns it to the Promoted field.
|
|
func (o *SAMLSourceRequest) SetPromoted(v bool) {
|
|
o.Promoted = &v
|
|
}
|
|
|
|
// GetAuthenticationFlow returns the AuthenticationFlow field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *SAMLSourceRequest) 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 *SAMLSourceRequest) 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 *SAMLSourceRequest) 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 *SAMLSourceRequest) SetAuthenticationFlow(v string) {
|
|
o.AuthenticationFlow.Set(&v)
|
|
}
|
|
|
|
// SetAuthenticationFlowNil sets the value for AuthenticationFlow to be an explicit nil
|
|
func (o *SAMLSourceRequest) SetAuthenticationFlowNil() {
|
|
o.AuthenticationFlow.Set(nil)
|
|
}
|
|
|
|
// UnsetAuthenticationFlow ensures that no value is present for AuthenticationFlow, not even an explicit nil
|
|
func (o *SAMLSourceRequest) UnsetAuthenticationFlow() {
|
|
o.AuthenticationFlow.Unset()
|
|
}
|
|
|
|
// GetEnrollmentFlow returns the EnrollmentFlow field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *SAMLSourceRequest) GetEnrollmentFlow() string {
|
|
if o == nil || IsNil(o.EnrollmentFlow.Get()) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.EnrollmentFlow.Get()
|
|
}
|
|
|
|
// GetEnrollmentFlowOk returns a tuple with the EnrollmentFlow 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 *SAMLSourceRequest) GetEnrollmentFlowOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.EnrollmentFlow.Get(), o.EnrollmentFlow.IsSet()
|
|
}
|
|
|
|
// HasEnrollmentFlow returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasEnrollmentFlow() bool {
|
|
if o != nil && o.EnrollmentFlow.IsSet() {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEnrollmentFlow gets a reference to the given NullableString and assigns it to the EnrollmentFlow field.
|
|
func (o *SAMLSourceRequest) SetEnrollmentFlow(v string) {
|
|
o.EnrollmentFlow.Set(&v)
|
|
}
|
|
|
|
// SetEnrollmentFlowNil sets the value for EnrollmentFlow to be an explicit nil
|
|
func (o *SAMLSourceRequest) SetEnrollmentFlowNil() {
|
|
o.EnrollmentFlow.Set(nil)
|
|
}
|
|
|
|
// UnsetEnrollmentFlow ensures that no value is present for EnrollmentFlow, not even an explicit nil
|
|
func (o *SAMLSourceRequest) UnsetEnrollmentFlow() {
|
|
o.EnrollmentFlow.Unset()
|
|
}
|
|
|
|
// GetUserPropertyMappings returns the UserPropertyMappings field value if set, zero value otherwise.
|
|
func (o *SAMLSourceRequest) GetUserPropertyMappings() []string {
|
|
if o == nil || IsNil(o.UserPropertyMappings) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.UserPropertyMappings
|
|
}
|
|
|
|
// GetUserPropertyMappingsOk returns a tuple with the UserPropertyMappings field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetUserPropertyMappingsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.UserPropertyMappings) {
|
|
return nil, false
|
|
}
|
|
return o.UserPropertyMappings, true
|
|
}
|
|
|
|
// HasUserPropertyMappings returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasUserPropertyMappings() bool {
|
|
if o != nil && !IsNil(o.UserPropertyMappings) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUserPropertyMappings gets a reference to the given []string and assigns it to the UserPropertyMappings field.
|
|
func (o *SAMLSourceRequest) SetUserPropertyMappings(v []string) {
|
|
o.UserPropertyMappings = v
|
|
}
|
|
|
|
// GetGroupPropertyMappings returns the GroupPropertyMappings field value if set, zero value otherwise.
|
|
func (o *SAMLSourceRequest) GetGroupPropertyMappings() []string {
|
|
if o == nil || IsNil(o.GroupPropertyMappings) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.GroupPropertyMappings
|
|
}
|
|
|
|
// GetGroupPropertyMappingsOk returns a tuple with the GroupPropertyMappings field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetGroupPropertyMappingsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.GroupPropertyMappings) {
|
|
return nil, false
|
|
}
|
|
return o.GroupPropertyMappings, true
|
|
}
|
|
|
|
// HasGroupPropertyMappings returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasGroupPropertyMappings() bool {
|
|
if o != nil && !IsNil(o.GroupPropertyMappings) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetGroupPropertyMappings gets a reference to the given []string and assigns it to the GroupPropertyMappings field.
|
|
func (o *SAMLSourceRequest) SetGroupPropertyMappings(v []string) {
|
|
o.GroupPropertyMappings = v
|
|
}
|
|
|
|
// GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise.
|
|
func (o *SAMLSourceRequest) 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 *SAMLSourceRequest) 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 *SAMLSourceRequest) 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 *SAMLSourceRequest) SetPolicyEngineMode(v PolicyEngineMode) {
|
|
o.PolicyEngineMode = &v
|
|
}
|
|
|
|
// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise.
|
|
func (o *SAMLSourceRequest) GetUserMatchingMode() UserMatchingModeEnum {
|
|
if o == nil || IsNil(o.UserMatchingMode) {
|
|
var ret UserMatchingModeEnum
|
|
return ret
|
|
}
|
|
return *o.UserMatchingMode
|
|
}
|
|
|
|
// GetUserMatchingModeOk returns a tuple with the UserMatchingMode field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetUserMatchingModeOk() (*UserMatchingModeEnum, bool) {
|
|
if o == nil || IsNil(o.UserMatchingMode) {
|
|
return nil, false
|
|
}
|
|
return o.UserMatchingMode, true
|
|
}
|
|
|
|
// HasUserMatchingMode returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasUserMatchingMode() bool {
|
|
if o != nil && !IsNil(o.UserMatchingMode) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUserMatchingMode gets a reference to the given UserMatchingModeEnum and assigns it to the UserMatchingMode field.
|
|
func (o *SAMLSourceRequest) SetUserMatchingMode(v UserMatchingModeEnum) {
|
|
o.UserMatchingMode = &v
|
|
}
|
|
|
|
// GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise.
|
|
func (o *SAMLSourceRequest) GetUserPathTemplate() string {
|
|
if o == nil || IsNil(o.UserPathTemplate) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.UserPathTemplate
|
|
}
|
|
|
|
// GetUserPathTemplateOk returns a tuple with the UserPathTemplate field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetUserPathTemplateOk() (*string, bool) {
|
|
if o == nil || IsNil(o.UserPathTemplate) {
|
|
return nil, false
|
|
}
|
|
return o.UserPathTemplate, true
|
|
}
|
|
|
|
// HasUserPathTemplate returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasUserPathTemplate() bool {
|
|
if o != nil && !IsNil(o.UserPathTemplate) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUserPathTemplate gets a reference to the given string and assigns it to the UserPathTemplate field.
|
|
func (o *SAMLSourceRequest) SetUserPathTemplate(v string) {
|
|
o.UserPathTemplate = &v
|
|
}
|
|
|
|
// GetIcon returns the Icon field value if set, zero value otherwise.
|
|
func (o *SAMLSourceRequest) GetIcon() string {
|
|
if o == nil || IsNil(o.Icon) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Icon
|
|
}
|
|
|
|
// GetIconOk returns a tuple with the Icon field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetIconOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Icon) {
|
|
return nil, false
|
|
}
|
|
return o.Icon, true
|
|
}
|
|
|
|
// HasIcon returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasIcon() bool {
|
|
if o != nil && !IsNil(o.Icon) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIcon gets a reference to the given string and assigns it to the Icon field.
|
|
func (o *SAMLSourceRequest) SetIcon(v string) {
|
|
o.Icon = &v
|
|
}
|
|
|
|
// GetGroupMatchingMode returns the GroupMatchingMode field value if set, zero value otherwise.
|
|
func (o *SAMLSourceRequest) GetGroupMatchingMode() GroupMatchingModeEnum {
|
|
if o == nil || IsNil(o.GroupMatchingMode) {
|
|
var ret GroupMatchingModeEnum
|
|
return ret
|
|
}
|
|
return *o.GroupMatchingMode
|
|
}
|
|
|
|
// GetGroupMatchingModeOk returns a tuple with the GroupMatchingMode field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetGroupMatchingModeOk() (*GroupMatchingModeEnum, bool) {
|
|
if o == nil || IsNil(o.GroupMatchingMode) {
|
|
return nil, false
|
|
}
|
|
return o.GroupMatchingMode, true
|
|
}
|
|
|
|
// HasGroupMatchingMode returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasGroupMatchingMode() bool {
|
|
if o != nil && !IsNil(o.GroupMatchingMode) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetGroupMatchingMode gets a reference to the given GroupMatchingModeEnum and assigns it to the GroupMatchingMode field.
|
|
func (o *SAMLSourceRequest) SetGroupMatchingMode(v GroupMatchingModeEnum) {
|
|
o.GroupMatchingMode = &v
|
|
}
|
|
|
|
// GetPreAuthenticationFlow returns the PreAuthenticationFlow field value
|
|
func (o *SAMLSourceRequest) GetPreAuthenticationFlow() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.PreAuthenticationFlow
|
|
}
|
|
|
|
// GetPreAuthenticationFlowOk returns a tuple with the PreAuthenticationFlow field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetPreAuthenticationFlowOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.PreAuthenticationFlow, true
|
|
}
|
|
|
|
// SetPreAuthenticationFlow sets field value
|
|
func (o *SAMLSourceRequest) SetPreAuthenticationFlow(v string) {
|
|
o.PreAuthenticationFlow = v
|
|
}
|
|
|
|
// GetIssuer returns the Issuer field value if set, zero value otherwise.
|
|
func (o *SAMLSourceRequest) GetIssuer() string {
|
|
if o == nil || IsNil(o.Issuer) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Issuer
|
|
}
|
|
|
|
// GetIssuerOk returns a tuple with the Issuer field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetIssuerOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Issuer) {
|
|
return nil, false
|
|
}
|
|
return o.Issuer, true
|
|
}
|
|
|
|
// HasIssuer returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasIssuer() bool {
|
|
if o != nil && !IsNil(o.Issuer) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIssuer gets a reference to the given string and assigns it to the Issuer field.
|
|
func (o *SAMLSourceRequest) SetIssuer(v string) {
|
|
o.Issuer = &v
|
|
}
|
|
|
|
// GetSsoUrl returns the SsoUrl field value
|
|
func (o *SAMLSourceRequest) GetSsoUrl() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.SsoUrl
|
|
}
|
|
|
|
// GetSsoUrlOk returns a tuple with the SsoUrl field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetSsoUrlOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.SsoUrl, true
|
|
}
|
|
|
|
// SetSsoUrl sets field value
|
|
func (o *SAMLSourceRequest) SetSsoUrl(v string) {
|
|
o.SsoUrl = v
|
|
}
|
|
|
|
// GetSloUrl returns the SloUrl field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *SAMLSourceRequest) GetSloUrl() string {
|
|
if o == nil || IsNil(o.SloUrl.Get()) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.SloUrl.Get()
|
|
}
|
|
|
|
// GetSloUrlOk returns a tuple with the SloUrl 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 *SAMLSourceRequest) GetSloUrlOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.SloUrl.Get(), o.SloUrl.IsSet()
|
|
}
|
|
|
|
// HasSloUrl returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasSloUrl() bool {
|
|
if o != nil && o.SloUrl.IsSet() {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSloUrl gets a reference to the given NullableString and assigns it to the SloUrl field.
|
|
func (o *SAMLSourceRequest) SetSloUrl(v string) {
|
|
o.SloUrl.Set(&v)
|
|
}
|
|
|
|
// SetSloUrlNil sets the value for SloUrl to be an explicit nil
|
|
func (o *SAMLSourceRequest) SetSloUrlNil() {
|
|
o.SloUrl.Set(nil)
|
|
}
|
|
|
|
// UnsetSloUrl ensures that no value is present for SloUrl, not even an explicit nil
|
|
func (o *SAMLSourceRequest) UnsetSloUrl() {
|
|
o.SloUrl.Unset()
|
|
}
|
|
|
|
// GetAllowIdpInitiated returns the AllowIdpInitiated field value if set, zero value otherwise.
|
|
func (o *SAMLSourceRequest) GetAllowIdpInitiated() bool {
|
|
if o == nil || IsNil(o.AllowIdpInitiated) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.AllowIdpInitiated
|
|
}
|
|
|
|
// GetAllowIdpInitiatedOk returns a tuple with the AllowIdpInitiated field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetAllowIdpInitiatedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.AllowIdpInitiated) {
|
|
return nil, false
|
|
}
|
|
return o.AllowIdpInitiated, true
|
|
}
|
|
|
|
// HasAllowIdpInitiated returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasAllowIdpInitiated() bool {
|
|
if o != nil && !IsNil(o.AllowIdpInitiated) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAllowIdpInitiated gets a reference to the given bool and assigns it to the AllowIdpInitiated field.
|
|
func (o *SAMLSourceRequest) SetAllowIdpInitiated(v bool) {
|
|
o.AllowIdpInitiated = &v
|
|
}
|
|
|
|
// GetForceAuthn returns the ForceAuthn field value if set, zero value otherwise.
|
|
func (o *SAMLSourceRequest) GetForceAuthn() bool {
|
|
if o == nil || IsNil(o.ForceAuthn) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.ForceAuthn
|
|
}
|
|
|
|
// GetForceAuthnOk returns a tuple with the ForceAuthn field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetForceAuthnOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.ForceAuthn) {
|
|
return nil, false
|
|
}
|
|
return o.ForceAuthn, true
|
|
}
|
|
|
|
// HasForceAuthn returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasForceAuthn() bool {
|
|
if o != nil && !IsNil(o.ForceAuthn) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetForceAuthn gets a reference to the given bool and assigns it to the ForceAuthn field.
|
|
func (o *SAMLSourceRequest) SetForceAuthn(v bool) {
|
|
o.ForceAuthn = &v
|
|
}
|
|
|
|
// GetNameIdPolicy returns the NameIdPolicy field value if set, zero value otherwise.
|
|
func (o *SAMLSourceRequest) GetNameIdPolicy() SAMLNameIDPolicyEnum {
|
|
if o == nil || IsNil(o.NameIdPolicy) {
|
|
var ret SAMLNameIDPolicyEnum
|
|
return ret
|
|
}
|
|
return *o.NameIdPolicy
|
|
}
|
|
|
|
// GetNameIdPolicyOk returns a tuple with the NameIdPolicy field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetNameIdPolicyOk() (*SAMLNameIDPolicyEnum, bool) {
|
|
if o == nil || IsNil(o.NameIdPolicy) {
|
|
return nil, false
|
|
}
|
|
return o.NameIdPolicy, true
|
|
}
|
|
|
|
// HasNameIdPolicy returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasNameIdPolicy() bool {
|
|
if o != nil && !IsNil(o.NameIdPolicy) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNameIdPolicy gets a reference to the given SAMLNameIDPolicyEnum and assigns it to the NameIdPolicy field.
|
|
func (o *SAMLSourceRequest) SetNameIdPolicy(v SAMLNameIDPolicyEnum) {
|
|
o.NameIdPolicy = &v
|
|
}
|
|
|
|
// GetBindingType returns the BindingType field value if set, zero value otherwise.
|
|
func (o *SAMLSourceRequest) GetBindingType() BindingTypeEnum {
|
|
if o == nil || IsNil(o.BindingType) {
|
|
var ret BindingTypeEnum
|
|
return ret
|
|
}
|
|
return *o.BindingType
|
|
}
|
|
|
|
// GetBindingTypeOk returns a tuple with the BindingType field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetBindingTypeOk() (*BindingTypeEnum, bool) {
|
|
if o == nil || IsNil(o.BindingType) {
|
|
return nil, false
|
|
}
|
|
return o.BindingType, true
|
|
}
|
|
|
|
// HasBindingType returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasBindingType() bool {
|
|
if o != nil && !IsNil(o.BindingType) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBindingType gets a reference to the given BindingTypeEnum and assigns it to the BindingType field.
|
|
func (o *SAMLSourceRequest) SetBindingType(v BindingTypeEnum) {
|
|
o.BindingType = &v
|
|
}
|
|
|
|
// GetVerificationKp returns the VerificationKp field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *SAMLSourceRequest) GetVerificationKp() string {
|
|
if o == nil || IsNil(o.VerificationKp.Get()) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.VerificationKp.Get()
|
|
}
|
|
|
|
// GetVerificationKpOk returns a tuple with the VerificationKp 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 *SAMLSourceRequest) GetVerificationKpOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.VerificationKp.Get(), o.VerificationKp.IsSet()
|
|
}
|
|
|
|
// HasVerificationKp returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasVerificationKp() bool {
|
|
if o != nil && o.VerificationKp.IsSet() {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVerificationKp gets a reference to the given NullableString and assigns it to the VerificationKp field.
|
|
func (o *SAMLSourceRequest) SetVerificationKp(v string) {
|
|
o.VerificationKp.Set(&v)
|
|
}
|
|
|
|
// SetVerificationKpNil sets the value for VerificationKp to be an explicit nil
|
|
func (o *SAMLSourceRequest) SetVerificationKpNil() {
|
|
o.VerificationKp.Set(nil)
|
|
}
|
|
|
|
// UnsetVerificationKp ensures that no value is present for VerificationKp, not even an explicit nil
|
|
func (o *SAMLSourceRequest) UnsetVerificationKp() {
|
|
o.VerificationKp.Unset()
|
|
}
|
|
|
|
// GetSigningKp returns the SigningKp field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *SAMLSourceRequest) GetSigningKp() string {
|
|
if o == nil || IsNil(o.SigningKp.Get()) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.SigningKp.Get()
|
|
}
|
|
|
|
// GetSigningKpOk returns a tuple with the SigningKp 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 *SAMLSourceRequest) GetSigningKpOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.SigningKp.Get(), o.SigningKp.IsSet()
|
|
}
|
|
|
|
// HasSigningKp returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasSigningKp() bool {
|
|
if o != nil && o.SigningKp.IsSet() {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSigningKp gets a reference to the given NullableString and assigns it to the SigningKp field.
|
|
func (o *SAMLSourceRequest) SetSigningKp(v string) {
|
|
o.SigningKp.Set(&v)
|
|
}
|
|
|
|
// SetSigningKpNil sets the value for SigningKp to be an explicit nil
|
|
func (o *SAMLSourceRequest) SetSigningKpNil() {
|
|
o.SigningKp.Set(nil)
|
|
}
|
|
|
|
// UnsetSigningKp ensures that no value is present for SigningKp, not even an explicit nil
|
|
func (o *SAMLSourceRequest) UnsetSigningKp() {
|
|
o.SigningKp.Unset()
|
|
}
|
|
|
|
// GetDigestAlgorithm returns the DigestAlgorithm field value if set, zero value otherwise.
|
|
func (o *SAMLSourceRequest) GetDigestAlgorithm() DigestAlgorithmEnum {
|
|
if o == nil || IsNil(o.DigestAlgorithm) {
|
|
var ret DigestAlgorithmEnum
|
|
return ret
|
|
}
|
|
return *o.DigestAlgorithm
|
|
}
|
|
|
|
// GetDigestAlgorithmOk returns a tuple with the DigestAlgorithm field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetDigestAlgorithmOk() (*DigestAlgorithmEnum, bool) {
|
|
if o == nil || IsNil(o.DigestAlgorithm) {
|
|
return nil, false
|
|
}
|
|
return o.DigestAlgorithm, true
|
|
}
|
|
|
|
// HasDigestAlgorithm returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasDigestAlgorithm() bool {
|
|
if o != nil && !IsNil(o.DigestAlgorithm) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDigestAlgorithm gets a reference to the given DigestAlgorithmEnum and assigns it to the DigestAlgorithm field.
|
|
func (o *SAMLSourceRequest) SetDigestAlgorithm(v DigestAlgorithmEnum) {
|
|
o.DigestAlgorithm = &v
|
|
}
|
|
|
|
// GetSignatureAlgorithm returns the SignatureAlgorithm field value if set, zero value otherwise.
|
|
func (o *SAMLSourceRequest) GetSignatureAlgorithm() SignatureAlgorithmEnum {
|
|
if o == nil || IsNil(o.SignatureAlgorithm) {
|
|
var ret SignatureAlgorithmEnum
|
|
return ret
|
|
}
|
|
return *o.SignatureAlgorithm
|
|
}
|
|
|
|
// GetSignatureAlgorithmOk returns a tuple with the SignatureAlgorithm field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetSignatureAlgorithmOk() (*SignatureAlgorithmEnum, bool) {
|
|
if o == nil || IsNil(o.SignatureAlgorithm) {
|
|
return nil, false
|
|
}
|
|
return o.SignatureAlgorithm, true
|
|
}
|
|
|
|
// HasSignatureAlgorithm returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasSignatureAlgorithm() bool {
|
|
if o != nil && !IsNil(o.SignatureAlgorithm) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSignatureAlgorithm gets a reference to the given SignatureAlgorithmEnum and assigns it to the SignatureAlgorithm field.
|
|
func (o *SAMLSourceRequest) SetSignatureAlgorithm(v SignatureAlgorithmEnum) {
|
|
o.SignatureAlgorithm = &v
|
|
}
|
|
|
|
// GetTemporaryUserDeleteAfter returns the TemporaryUserDeleteAfter field value if set, zero value otherwise.
|
|
func (o *SAMLSourceRequest) GetTemporaryUserDeleteAfter() string {
|
|
if o == nil || IsNil(o.TemporaryUserDeleteAfter) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.TemporaryUserDeleteAfter
|
|
}
|
|
|
|
// GetTemporaryUserDeleteAfterOk returns a tuple with the TemporaryUserDeleteAfter field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetTemporaryUserDeleteAfterOk() (*string, bool) {
|
|
if o == nil || IsNil(o.TemporaryUserDeleteAfter) {
|
|
return nil, false
|
|
}
|
|
return o.TemporaryUserDeleteAfter, true
|
|
}
|
|
|
|
// HasTemporaryUserDeleteAfter returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasTemporaryUserDeleteAfter() bool {
|
|
if o != nil && !IsNil(o.TemporaryUserDeleteAfter) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTemporaryUserDeleteAfter gets a reference to the given string and assigns it to the TemporaryUserDeleteAfter field.
|
|
func (o *SAMLSourceRequest) SetTemporaryUserDeleteAfter(v string) {
|
|
o.TemporaryUserDeleteAfter = &v
|
|
}
|
|
|
|
// GetEncryptionKp returns the EncryptionKp field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *SAMLSourceRequest) GetEncryptionKp() string {
|
|
if o == nil || IsNil(o.EncryptionKp.Get()) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.EncryptionKp.Get()
|
|
}
|
|
|
|
// GetEncryptionKpOk returns a tuple with the EncryptionKp 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 *SAMLSourceRequest) GetEncryptionKpOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.EncryptionKp.Get(), o.EncryptionKp.IsSet()
|
|
}
|
|
|
|
// HasEncryptionKp returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasEncryptionKp() bool {
|
|
if o != nil && o.EncryptionKp.IsSet() {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEncryptionKp gets a reference to the given NullableString and assigns it to the EncryptionKp field.
|
|
func (o *SAMLSourceRequest) SetEncryptionKp(v string) {
|
|
o.EncryptionKp.Set(&v)
|
|
}
|
|
|
|
// SetEncryptionKpNil sets the value for EncryptionKp to be an explicit nil
|
|
func (o *SAMLSourceRequest) SetEncryptionKpNil() {
|
|
o.EncryptionKp.Set(nil)
|
|
}
|
|
|
|
// UnsetEncryptionKp ensures that no value is present for EncryptionKp, not even an explicit nil
|
|
func (o *SAMLSourceRequest) UnsetEncryptionKp() {
|
|
o.EncryptionKp.Unset()
|
|
}
|
|
|
|
// GetSignedAssertion returns the SignedAssertion field value if set, zero value otherwise.
|
|
func (o *SAMLSourceRequest) GetSignedAssertion() bool {
|
|
if o == nil || IsNil(o.SignedAssertion) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.SignedAssertion
|
|
}
|
|
|
|
// GetSignedAssertionOk returns a tuple with the SignedAssertion field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetSignedAssertionOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.SignedAssertion) {
|
|
return nil, false
|
|
}
|
|
return o.SignedAssertion, true
|
|
}
|
|
|
|
// HasSignedAssertion returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasSignedAssertion() bool {
|
|
if o != nil && !IsNil(o.SignedAssertion) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSignedAssertion gets a reference to the given bool and assigns it to the SignedAssertion field.
|
|
func (o *SAMLSourceRequest) SetSignedAssertion(v bool) {
|
|
o.SignedAssertion = &v
|
|
}
|
|
|
|
// GetSignedResponse returns the SignedResponse field value if set, zero value otherwise.
|
|
func (o *SAMLSourceRequest) GetSignedResponse() bool {
|
|
if o == nil || IsNil(o.SignedResponse) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.SignedResponse
|
|
}
|
|
|
|
// GetSignedResponseOk returns a tuple with the SignedResponse field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SAMLSourceRequest) GetSignedResponseOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.SignedResponse) {
|
|
return nil, false
|
|
}
|
|
return o.SignedResponse, true
|
|
}
|
|
|
|
// HasSignedResponse returns a boolean if a field has been set.
|
|
func (o *SAMLSourceRequest) HasSignedResponse() bool {
|
|
if o != nil && !IsNil(o.SignedResponse) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSignedResponse gets a reference to the given bool and assigns it to the SignedResponse field.
|
|
func (o *SAMLSourceRequest) SetSignedResponse(v bool) {
|
|
o.SignedResponse = &v
|
|
}
|
|
|
|
func (o SAMLSourceRequest) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SAMLSourceRequest) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["name"] = o.Name
|
|
toSerialize["slug"] = o.Slug
|
|
if !IsNil(o.Enabled) {
|
|
toSerialize["enabled"] = o.Enabled
|
|
}
|
|
if !IsNil(o.Promoted) {
|
|
toSerialize["promoted"] = o.Promoted
|
|
}
|
|
if o.AuthenticationFlow.IsSet() {
|
|
toSerialize["authentication_flow"] = o.AuthenticationFlow.Get()
|
|
}
|
|
if o.EnrollmentFlow.IsSet() {
|
|
toSerialize["enrollment_flow"] = o.EnrollmentFlow.Get()
|
|
}
|
|
if !IsNil(o.UserPropertyMappings) {
|
|
toSerialize["user_property_mappings"] = o.UserPropertyMappings
|
|
}
|
|
if !IsNil(o.GroupPropertyMappings) {
|
|
toSerialize["group_property_mappings"] = o.GroupPropertyMappings
|
|
}
|
|
if !IsNil(o.PolicyEngineMode) {
|
|
toSerialize["policy_engine_mode"] = o.PolicyEngineMode
|
|
}
|
|
if !IsNil(o.UserMatchingMode) {
|
|
toSerialize["user_matching_mode"] = o.UserMatchingMode
|
|
}
|
|
if !IsNil(o.UserPathTemplate) {
|
|
toSerialize["user_path_template"] = o.UserPathTemplate
|
|
}
|
|
if !IsNil(o.Icon) {
|
|
toSerialize["icon"] = o.Icon
|
|
}
|
|
if !IsNil(o.GroupMatchingMode) {
|
|
toSerialize["group_matching_mode"] = o.GroupMatchingMode
|
|
}
|
|
toSerialize["pre_authentication_flow"] = o.PreAuthenticationFlow
|
|
if !IsNil(o.Issuer) {
|
|
toSerialize["issuer"] = o.Issuer
|
|
}
|
|
toSerialize["sso_url"] = o.SsoUrl
|
|
if o.SloUrl.IsSet() {
|
|
toSerialize["slo_url"] = o.SloUrl.Get()
|
|
}
|
|
if !IsNil(o.AllowIdpInitiated) {
|
|
toSerialize["allow_idp_initiated"] = o.AllowIdpInitiated
|
|
}
|
|
if !IsNil(o.ForceAuthn) {
|
|
toSerialize["force_authn"] = o.ForceAuthn
|
|
}
|
|
if !IsNil(o.NameIdPolicy) {
|
|
toSerialize["name_id_policy"] = o.NameIdPolicy
|
|
}
|
|
if !IsNil(o.BindingType) {
|
|
toSerialize["binding_type"] = o.BindingType
|
|
}
|
|
if o.VerificationKp.IsSet() {
|
|
toSerialize["verification_kp"] = o.VerificationKp.Get()
|
|
}
|
|
if o.SigningKp.IsSet() {
|
|
toSerialize["signing_kp"] = o.SigningKp.Get()
|
|
}
|
|
if !IsNil(o.DigestAlgorithm) {
|
|
toSerialize["digest_algorithm"] = o.DigestAlgorithm
|
|
}
|
|
if !IsNil(o.SignatureAlgorithm) {
|
|
toSerialize["signature_algorithm"] = o.SignatureAlgorithm
|
|
}
|
|
if !IsNil(o.TemporaryUserDeleteAfter) {
|
|
toSerialize["temporary_user_delete_after"] = o.TemporaryUserDeleteAfter
|
|
}
|
|
if o.EncryptionKp.IsSet() {
|
|
toSerialize["encryption_kp"] = o.EncryptionKp.Get()
|
|
}
|
|
if !IsNil(o.SignedAssertion) {
|
|
toSerialize["signed_assertion"] = o.SignedAssertion
|
|
}
|
|
if !IsNil(o.SignedResponse) {
|
|
toSerialize["signed_response"] = o.SignedResponse
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *SAMLSourceRequest) 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",
|
|
"pre_authentication_flow",
|
|
"sso_url",
|
|
}
|
|
|
|
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)
|
|
}
|
|
}
|
|
|
|
varSAMLSourceRequest := _SAMLSourceRequest{}
|
|
|
|
err = json.Unmarshal(data, &varSAMLSourceRequest)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = SAMLSourceRequest(varSAMLSourceRequest)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "slug")
|
|
delete(additionalProperties, "enabled")
|
|
delete(additionalProperties, "promoted")
|
|
delete(additionalProperties, "authentication_flow")
|
|
delete(additionalProperties, "enrollment_flow")
|
|
delete(additionalProperties, "user_property_mappings")
|
|
delete(additionalProperties, "group_property_mappings")
|
|
delete(additionalProperties, "policy_engine_mode")
|
|
delete(additionalProperties, "user_matching_mode")
|
|
delete(additionalProperties, "user_path_template")
|
|
delete(additionalProperties, "icon")
|
|
delete(additionalProperties, "group_matching_mode")
|
|
delete(additionalProperties, "pre_authentication_flow")
|
|
delete(additionalProperties, "issuer")
|
|
delete(additionalProperties, "sso_url")
|
|
delete(additionalProperties, "slo_url")
|
|
delete(additionalProperties, "allow_idp_initiated")
|
|
delete(additionalProperties, "force_authn")
|
|
delete(additionalProperties, "name_id_policy")
|
|
delete(additionalProperties, "binding_type")
|
|
delete(additionalProperties, "verification_kp")
|
|
delete(additionalProperties, "signing_kp")
|
|
delete(additionalProperties, "digest_algorithm")
|
|
delete(additionalProperties, "signature_algorithm")
|
|
delete(additionalProperties, "temporary_user_delete_after")
|
|
delete(additionalProperties, "encryption_kp")
|
|
delete(additionalProperties, "signed_assertion")
|
|
delete(additionalProperties, "signed_response")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableSAMLSourceRequest struct {
|
|
value *SAMLSourceRequest
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSAMLSourceRequest) Get() *SAMLSourceRequest {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSAMLSourceRequest) Set(val *SAMLSourceRequest) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSAMLSourceRequest) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSAMLSourceRequest) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSAMLSourceRequest(val *SAMLSourceRequest) *NullableSAMLSourceRequest {
|
|
return &NullableSAMLSourceRequest{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSAMLSourceRequest) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSAMLSourceRequest) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|