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>
742 lines
23 KiB
Go
Generated
742 lines
23 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"
|
|
)
|
|
|
|
// checks if the PatchedTelegramSourceRequest type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &PatchedTelegramSourceRequest{}
|
|
|
|
// PatchedTelegramSourceRequest Source Serializer
|
|
type PatchedTelegramSourceRequest struct {
|
|
// Source's display Name.
|
|
Name *string `json:"name,omitempty"`
|
|
// Internal source name, used in URLs.
|
|
Slug *string `json:"slug,omitempty" 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"`
|
|
// Telegram bot username
|
|
BotUsername *string `json:"bot_username,omitempty"`
|
|
// Telegram bot token
|
|
BotToken *string `json:"bot_token,omitempty"`
|
|
// Request access to send messages from your bot.
|
|
RequestMessageAccess *bool `json:"request_message_access,omitempty"`
|
|
// Flow used before authentication.
|
|
PreAuthenticationFlow *string `json:"pre_authentication_flow,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _PatchedTelegramSourceRequest PatchedTelegramSourceRequest
|
|
|
|
// NewPatchedTelegramSourceRequest instantiates a new PatchedTelegramSourceRequest 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 NewPatchedTelegramSourceRequest() *PatchedTelegramSourceRequest {
|
|
this := PatchedTelegramSourceRequest{}
|
|
return &this
|
|
}
|
|
|
|
// NewPatchedTelegramSourceRequestWithDefaults instantiates a new PatchedTelegramSourceRequest 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 NewPatchedTelegramSourceRequestWithDefaults() *PatchedTelegramSourceRequest {
|
|
this := PatchedTelegramSourceRequest{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *PatchedTelegramSourceRequest) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PatchedTelegramSourceRequest) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *PatchedTelegramSourceRequest) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *PatchedTelegramSourceRequest) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetSlug returns the Slug field value if set, zero value otherwise.
|
|
func (o *PatchedTelegramSourceRequest) GetSlug() string {
|
|
if o == nil || IsNil(o.Slug) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Slug
|
|
}
|
|
|
|
// GetSlugOk returns a tuple with the Slug field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PatchedTelegramSourceRequest) GetSlugOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Slug) {
|
|
return nil, false
|
|
}
|
|
return o.Slug, true
|
|
}
|
|
|
|
// HasSlug returns a boolean if a field has been set.
|
|
func (o *PatchedTelegramSourceRequest) HasSlug() bool {
|
|
if o != nil && !IsNil(o.Slug) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSlug gets a reference to the given string and assigns it to the Slug field.
|
|
func (o *PatchedTelegramSourceRequest) SetSlug(v string) {
|
|
o.Slug = &v
|
|
}
|
|
|
|
// GetEnabled returns the Enabled field value if set, zero value otherwise.
|
|
func (o *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) SetEnabled(v bool) {
|
|
o.Enabled = &v
|
|
}
|
|
|
|
// GetPromoted returns the Promoted field value if set, zero value otherwise.
|
|
func (o *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) SetAuthenticationFlow(v string) {
|
|
o.AuthenticationFlow.Set(&v)
|
|
}
|
|
|
|
// SetAuthenticationFlowNil sets the value for AuthenticationFlow to be an explicit nil
|
|
func (o *PatchedTelegramSourceRequest) SetAuthenticationFlowNil() {
|
|
o.AuthenticationFlow.Set(nil)
|
|
}
|
|
|
|
// UnsetAuthenticationFlow ensures that no value is present for AuthenticationFlow, not even an explicit nil
|
|
func (o *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) SetEnrollmentFlow(v string) {
|
|
o.EnrollmentFlow.Set(&v)
|
|
}
|
|
|
|
// SetEnrollmentFlowNil sets the value for EnrollmentFlow to be an explicit nil
|
|
func (o *PatchedTelegramSourceRequest) SetEnrollmentFlowNil() {
|
|
o.EnrollmentFlow.Set(nil)
|
|
}
|
|
|
|
// UnsetEnrollmentFlow ensures that no value is present for EnrollmentFlow, not even an explicit nil
|
|
func (o *PatchedTelegramSourceRequest) UnsetEnrollmentFlow() {
|
|
o.EnrollmentFlow.Unset()
|
|
}
|
|
|
|
// GetUserPropertyMappings returns the UserPropertyMappings field value if set, zero value otherwise.
|
|
func (o *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) SetUserPropertyMappings(v []string) {
|
|
o.UserPropertyMappings = v
|
|
}
|
|
|
|
// GetGroupPropertyMappings returns the GroupPropertyMappings field value if set, zero value otherwise.
|
|
func (o *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) SetGroupPropertyMappings(v []string) {
|
|
o.GroupPropertyMappings = v
|
|
}
|
|
|
|
// GetPolicyEngineMode returns the PolicyEngineMode field value if set, zero value otherwise.
|
|
func (o *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) SetPolicyEngineMode(v PolicyEngineMode) {
|
|
o.PolicyEngineMode = &v
|
|
}
|
|
|
|
// GetUserMatchingMode returns the UserMatchingMode field value if set, zero value otherwise.
|
|
func (o *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) SetUserMatchingMode(v UserMatchingModeEnum) {
|
|
o.UserMatchingMode = &v
|
|
}
|
|
|
|
// GetUserPathTemplate returns the UserPathTemplate field value if set, zero value otherwise.
|
|
func (o *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) SetUserPathTemplate(v string) {
|
|
o.UserPathTemplate = &v
|
|
}
|
|
|
|
// GetIcon returns the Icon field value if set, zero value otherwise.
|
|
func (o *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) 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 *PatchedTelegramSourceRequest) SetIcon(v string) {
|
|
o.Icon = &v
|
|
}
|
|
|
|
// GetBotUsername returns the BotUsername field value if set, zero value otherwise.
|
|
func (o *PatchedTelegramSourceRequest) GetBotUsername() string {
|
|
if o == nil || IsNil(o.BotUsername) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.BotUsername
|
|
}
|
|
|
|
// GetBotUsernameOk returns a tuple with the BotUsername field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PatchedTelegramSourceRequest) GetBotUsernameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.BotUsername) {
|
|
return nil, false
|
|
}
|
|
return o.BotUsername, true
|
|
}
|
|
|
|
// HasBotUsername returns a boolean if a field has been set.
|
|
func (o *PatchedTelegramSourceRequest) HasBotUsername() bool {
|
|
if o != nil && !IsNil(o.BotUsername) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBotUsername gets a reference to the given string and assigns it to the BotUsername field.
|
|
func (o *PatchedTelegramSourceRequest) SetBotUsername(v string) {
|
|
o.BotUsername = &v
|
|
}
|
|
|
|
// GetBotToken returns the BotToken field value if set, zero value otherwise.
|
|
func (o *PatchedTelegramSourceRequest) GetBotToken() string {
|
|
if o == nil || IsNil(o.BotToken) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.BotToken
|
|
}
|
|
|
|
// GetBotTokenOk returns a tuple with the BotToken field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PatchedTelegramSourceRequest) GetBotTokenOk() (*string, bool) {
|
|
if o == nil || IsNil(o.BotToken) {
|
|
return nil, false
|
|
}
|
|
return o.BotToken, true
|
|
}
|
|
|
|
// HasBotToken returns a boolean if a field has been set.
|
|
func (o *PatchedTelegramSourceRequest) HasBotToken() bool {
|
|
if o != nil && !IsNil(o.BotToken) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBotToken gets a reference to the given string and assigns it to the BotToken field.
|
|
func (o *PatchedTelegramSourceRequest) SetBotToken(v string) {
|
|
o.BotToken = &v
|
|
}
|
|
|
|
// GetRequestMessageAccess returns the RequestMessageAccess field value if set, zero value otherwise.
|
|
func (o *PatchedTelegramSourceRequest) GetRequestMessageAccess() bool {
|
|
if o == nil || IsNil(o.RequestMessageAccess) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.RequestMessageAccess
|
|
}
|
|
|
|
// GetRequestMessageAccessOk returns a tuple with the RequestMessageAccess field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PatchedTelegramSourceRequest) GetRequestMessageAccessOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.RequestMessageAccess) {
|
|
return nil, false
|
|
}
|
|
return o.RequestMessageAccess, true
|
|
}
|
|
|
|
// HasRequestMessageAccess returns a boolean if a field has been set.
|
|
func (o *PatchedTelegramSourceRequest) HasRequestMessageAccess() bool {
|
|
if o != nil && !IsNil(o.RequestMessageAccess) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRequestMessageAccess gets a reference to the given bool and assigns it to the RequestMessageAccess field.
|
|
func (o *PatchedTelegramSourceRequest) SetRequestMessageAccess(v bool) {
|
|
o.RequestMessageAccess = &v
|
|
}
|
|
|
|
// GetPreAuthenticationFlow returns the PreAuthenticationFlow field value if set, zero value otherwise.
|
|
func (o *PatchedTelegramSourceRequest) GetPreAuthenticationFlow() string {
|
|
if o == nil || IsNil(o.PreAuthenticationFlow) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.PreAuthenticationFlow
|
|
}
|
|
|
|
// GetPreAuthenticationFlowOk returns a tuple with the PreAuthenticationFlow field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PatchedTelegramSourceRequest) GetPreAuthenticationFlowOk() (*string, bool) {
|
|
if o == nil || IsNil(o.PreAuthenticationFlow) {
|
|
return nil, false
|
|
}
|
|
return o.PreAuthenticationFlow, true
|
|
}
|
|
|
|
// HasPreAuthenticationFlow returns a boolean if a field has been set.
|
|
func (o *PatchedTelegramSourceRequest) HasPreAuthenticationFlow() bool {
|
|
if o != nil && !IsNil(o.PreAuthenticationFlow) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPreAuthenticationFlow gets a reference to the given string and assigns it to the PreAuthenticationFlow field.
|
|
func (o *PatchedTelegramSourceRequest) SetPreAuthenticationFlow(v string) {
|
|
o.PreAuthenticationFlow = &v
|
|
}
|
|
|
|
func (o PatchedTelegramSourceRequest) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o PatchedTelegramSourceRequest) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Slug) {
|
|
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.BotUsername) {
|
|
toSerialize["bot_username"] = o.BotUsername
|
|
}
|
|
if !IsNil(o.BotToken) {
|
|
toSerialize["bot_token"] = o.BotToken
|
|
}
|
|
if !IsNil(o.RequestMessageAccess) {
|
|
toSerialize["request_message_access"] = o.RequestMessageAccess
|
|
}
|
|
if !IsNil(o.PreAuthenticationFlow) {
|
|
toSerialize["pre_authentication_flow"] = o.PreAuthenticationFlow
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *PatchedTelegramSourceRequest) UnmarshalJSON(data []byte) (err error) {
|
|
varPatchedTelegramSourceRequest := _PatchedTelegramSourceRequest{}
|
|
|
|
err = json.Unmarshal(data, &varPatchedTelegramSourceRequest)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = PatchedTelegramSourceRequest(varPatchedTelegramSourceRequest)
|
|
|
|
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, "bot_username")
|
|
delete(additionalProperties, "bot_token")
|
|
delete(additionalProperties, "request_message_access")
|
|
delete(additionalProperties, "pre_authentication_flow")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullablePatchedTelegramSourceRequest struct {
|
|
value *PatchedTelegramSourceRequest
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullablePatchedTelegramSourceRequest) Get() *PatchedTelegramSourceRequest {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullablePatchedTelegramSourceRequest) Set(val *PatchedTelegramSourceRequest) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullablePatchedTelegramSourceRequest) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullablePatchedTelegramSourceRequest) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullablePatchedTelegramSourceRequest(val *PatchedTelegramSourceRequest) *NullablePatchedTelegramSourceRequest {
|
|
return &NullablePatchedTelegramSourceRequest{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullablePatchedTelegramSourceRequest) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullablePatchedTelegramSourceRequest) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|