/* STACKIT Git API STACKIT Git management API. API version: 1beta.0.4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package gitbeta import ( "encoding/json" "time" ) // checks if the Authentication type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Authentication{} /* types and functions for auto_discover_url */ // isNotNullableString type AuthenticationGetAutoDiscoverUrlAttributeType = *string func getAuthenticationGetAutoDiscoverUrlAttributeTypeOk(arg AuthenticationGetAutoDiscoverUrlAttributeType) (ret AuthenticationGetAutoDiscoverUrlRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setAuthenticationGetAutoDiscoverUrlAttributeType(arg *AuthenticationGetAutoDiscoverUrlAttributeType, val AuthenticationGetAutoDiscoverUrlRetType) { *arg = &val } type AuthenticationGetAutoDiscoverUrlArgType = string type AuthenticationGetAutoDiscoverUrlRetType = string /* types and functions for client_id */ // isNotNullableString type AuthenticationGetClientIdAttributeType = *string func getAuthenticationGetClientIdAttributeTypeOk(arg AuthenticationGetClientIdAttributeType) (ret AuthenticationGetClientIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setAuthenticationGetClientIdAttributeType(arg *AuthenticationGetClientIdAttributeType, val AuthenticationGetClientIdRetType) { *arg = &val } type AuthenticationGetClientIdArgType = string type AuthenticationGetClientIdRetType = string /* types and functions for created_at */ // isDateTime type AuthenticationGetCreatedAtAttributeType = *time.Time type AuthenticationGetCreatedAtArgType = time.Time type AuthenticationGetCreatedAtRetType = time.Time func getAuthenticationGetCreatedAtAttributeTypeOk(arg AuthenticationGetCreatedAtAttributeType) (ret AuthenticationGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setAuthenticationGetCreatedAtAttributeType(arg *AuthenticationGetCreatedAtAttributeType, val AuthenticationGetCreatedAtRetType) { *arg = &val } /* types and functions for icon_url */ // isNotNullableString type AuthenticationGetIconUrlAttributeType = *string func getAuthenticationGetIconUrlAttributeTypeOk(arg AuthenticationGetIconUrlAttributeType) (ret AuthenticationGetIconUrlRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setAuthenticationGetIconUrlAttributeType(arg *AuthenticationGetIconUrlAttributeType, val AuthenticationGetIconUrlRetType) { *arg = &val } type AuthenticationGetIconUrlArgType = string type AuthenticationGetIconUrlRetType = string /* types and functions for id */ // isNotNullableString type AuthenticationGetIdAttributeType = *string func getAuthenticationGetIdAttributeTypeOk(arg AuthenticationGetIdAttributeType) (ret AuthenticationGetIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setAuthenticationGetIdAttributeType(arg *AuthenticationGetIdAttributeType, val AuthenticationGetIdRetType) { *arg = &val } type AuthenticationGetIdArgType = string type AuthenticationGetIdRetType = string /* types and functions for name */ // isNotNullableString type AuthenticationGetNameAttributeType = *string func getAuthenticationGetNameAttributeTypeOk(arg AuthenticationGetNameAttributeType) (ret AuthenticationGetNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setAuthenticationGetNameAttributeType(arg *AuthenticationGetNameAttributeType, val AuthenticationGetNameRetType) { *arg = &val } type AuthenticationGetNameArgType = string type AuthenticationGetNameRetType = string /* types and functions for provider */ // isNotNullableString type AuthenticationGetProviderAttributeType = *string func getAuthenticationGetProviderAttributeTypeOk(arg AuthenticationGetProviderAttributeType) (ret AuthenticationGetProviderRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setAuthenticationGetProviderAttributeType(arg *AuthenticationGetProviderAttributeType, val AuthenticationGetProviderRetType) { *arg = &val } type AuthenticationGetProviderArgType = string type AuthenticationGetProviderRetType = string /* types and functions for scopes */ // isNotNullableString type AuthenticationGetScopesAttributeType = *string func getAuthenticationGetScopesAttributeTypeOk(arg AuthenticationGetScopesAttributeType) (ret AuthenticationGetScopesRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setAuthenticationGetScopesAttributeType(arg *AuthenticationGetScopesAttributeType, val AuthenticationGetScopesRetType) { *arg = &val } type AuthenticationGetScopesArgType = string type AuthenticationGetScopesRetType = string /* types and functions for status */ // isNotNullableString type AuthenticationGetStatusAttributeType = *string func getAuthenticationGetStatusAttributeTypeOk(arg AuthenticationGetStatusAttributeType) (ret AuthenticationGetStatusRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setAuthenticationGetStatusAttributeType(arg *AuthenticationGetStatusAttributeType, val AuthenticationGetStatusRetType) { *arg = &val } type AuthenticationGetStatusArgType = string type AuthenticationGetStatusRetType = string // Authentication Describes an authentication definition associated to a STACKIT Git instance. The provider type will be an openidConnect type. type Authentication struct { // The well-known configuration url to use for this authentication definition. // REQUIRED AutoDiscoverUrl AuthenticationGetAutoDiscoverUrlAttributeType `json:"auto_discover_url" required:"true"` // The IDP client id to use. // REQUIRED ClientId AuthenticationGetClientIdAttributeType `json:"client_id" required:"true"` // REQUIRED CreatedAt AuthenticationGetCreatedAtAttributeType `json:"created_at" required:"true"` // The url of the icon to use for this authentication definition. // REQUIRED IconUrl AuthenticationGetIconUrlAttributeType `json:"icon_url" required:"true"` // An auto generated unique uuid which identifies the authentication definition in STACKIT Git instances. // REQUIRED Id AuthenticationGetIdAttributeType `json:"id" required:"true"` // The name to identify an authentication definition associated with a STACKIT Git instance. // REQUIRED Name AuthenticationGetNameAttributeType `json:"name" required:"true"` // The Oauth2 provider to use. // REQUIRED Provider AuthenticationGetProviderAttributeType `json:"provider" required:"true"` // Scopes defines the OIDC scopes to request. // REQUIRED Scopes AuthenticationGetScopesAttributeType `json:"scopes" required:"true"` // The current status of the authentication definition. // REQUIRED Status AuthenticationGetStatusAttributeType `json:"status" required:"true"` } type _Authentication Authentication // NewAuthentication instantiates a new Authentication 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 NewAuthentication(autoDiscoverUrl AuthenticationGetAutoDiscoverUrlArgType, clientId AuthenticationGetClientIdArgType, createdAt AuthenticationGetCreatedAtArgType, iconUrl AuthenticationGetIconUrlArgType, id AuthenticationGetIdArgType, name AuthenticationGetNameArgType, provider AuthenticationGetProviderArgType, scopes AuthenticationGetScopesArgType, status AuthenticationGetStatusArgType) *Authentication { this := Authentication{} setAuthenticationGetAutoDiscoverUrlAttributeType(&this.AutoDiscoverUrl, autoDiscoverUrl) setAuthenticationGetClientIdAttributeType(&this.ClientId, clientId) setAuthenticationGetCreatedAtAttributeType(&this.CreatedAt, createdAt) setAuthenticationGetIconUrlAttributeType(&this.IconUrl, iconUrl) setAuthenticationGetIdAttributeType(&this.Id, id) setAuthenticationGetNameAttributeType(&this.Name, name) setAuthenticationGetProviderAttributeType(&this.Provider, provider) setAuthenticationGetScopesAttributeType(&this.Scopes, scopes) setAuthenticationGetStatusAttributeType(&this.Status, status) return &this } // NewAuthenticationWithDefaults instantiates a new Authentication 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 NewAuthenticationWithDefaults() *Authentication { this := Authentication{} return &this } // GetAutoDiscoverUrl returns the AutoDiscoverUrl field value func (o *Authentication) GetAutoDiscoverUrl() (ret AuthenticationGetAutoDiscoverUrlRetType) { ret, _ = o.GetAutoDiscoverUrlOk() return ret } // GetAutoDiscoverUrlOk returns a tuple with the AutoDiscoverUrl field value // and a boolean to check if the value has been set. func (o *Authentication) GetAutoDiscoverUrlOk() (ret AuthenticationGetAutoDiscoverUrlRetType, ok bool) { return getAuthenticationGetAutoDiscoverUrlAttributeTypeOk(o.AutoDiscoverUrl) } // SetAutoDiscoverUrl sets field value func (o *Authentication) SetAutoDiscoverUrl(v AuthenticationGetAutoDiscoverUrlRetType) { setAuthenticationGetAutoDiscoverUrlAttributeType(&o.AutoDiscoverUrl, v) } // GetClientId returns the ClientId field value func (o *Authentication) GetClientId() (ret AuthenticationGetClientIdRetType) { ret, _ = o.GetClientIdOk() return ret } // GetClientIdOk returns a tuple with the ClientId field value // and a boolean to check if the value has been set. func (o *Authentication) GetClientIdOk() (ret AuthenticationGetClientIdRetType, ok bool) { return getAuthenticationGetClientIdAttributeTypeOk(o.ClientId) } // SetClientId sets field value func (o *Authentication) SetClientId(v AuthenticationGetClientIdRetType) { setAuthenticationGetClientIdAttributeType(&o.ClientId, v) } // GetCreatedAt returns the CreatedAt field value func (o *Authentication) GetCreatedAt() (ret AuthenticationGetCreatedAtRetType) { ret, _ = o.GetCreatedAtOk() return ret } // GetCreatedAtOk returns a tuple with the CreatedAt field value // and a boolean to check if the value has been set. func (o *Authentication) GetCreatedAtOk() (ret AuthenticationGetCreatedAtRetType, ok bool) { return getAuthenticationGetCreatedAtAttributeTypeOk(o.CreatedAt) } // SetCreatedAt sets field value func (o *Authentication) SetCreatedAt(v AuthenticationGetCreatedAtRetType) { setAuthenticationGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetIconUrl returns the IconUrl field value func (o *Authentication) GetIconUrl() (ret AuthenticationGetIconUrlRetType) { ret, _ = o.GetIconUrlOk() return ret } // GetIconUrlOk returns a tuple with the IconUrl field value // and a boolean to check if the value has been set. func (o *Authentication) GetIconUrlOk() (ret AuthenticationGetIconUrlRetType, ok bool) { return getAuthenticationGetIconUrlAttributeTypeOk(o.IconUrl) } // SetIconUrl sets field value func (o *Authentication) SetIconUrl(v AuthenticationGetIconUrlRetType) { setAuthenticationGetIconUrlAttributeType(&o.IconUrl, v) } // GetId returns the Id field value func (o *Authentication) GetId() (ret AuthenticationGetIdRetType) { ret, _ = o.GetIdOk() return ret } // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. func (o *Authentication) GetIdOk() (ret AuthenticationGetIdRetType, ok bool) { return getAuthenticationGetIdAttributeTypeOk(o.Id) } // SetId sets field value func (o *Authentication) SetId(v AuthenticationGetIdRetType) { setAuthenticationGetIdAttributeType(&o.Id, v) } // GetName returns the Name field value func (o *Authentication) GetName() (ret AuthenticationGetNameRetType) { ret, _ = o.GetNameOk() return ret } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. func (o *Authentication) GetNameOk() (ret AuthenticationGetNameRetType, ok bool) { return getAuthenticationGetNameAttributeTypeOk(o.Name) } // SetName sets field value func (o *Authentication) SetName(v AuthenticationGetNameRetType) { setAuthenticationGetNameAttributeType(&o.Name, v) } // GetProvider returns the Provider field value func (o *Authentication) GetProvider() (ret AuthenticationGetProviderRetType) { ret, _ = o.GetProviderOk() return ret } // GetProviderOk returns a tuple with the Provider field value // and a boolean to check if the value has been set. func (o *Authentication) GetProviderOk() (ret AuthenticationGetProviderRetType, ok bool) { return getAuthenticationGetProviderAttributeTypeOk(o.Provider) } // SetProvider sets field value func (o *Authentication) SetProvider(v AuthenticationGetProviderRetType) { setAuthenticationGetProviderAttributeType(&o.Provider, v) } // GetScopes returns the Scopes field value func (o *Authentication) GetScopes() (ret AuthenticationGetScopesRetType) { ret, _ = o.GetScopesOk() return ret } // GetScopesOk returns a tuple with the Scopes field value // and a boolean to check if the value has been set. func (o *Authentication) GetScopesOk() (ret AuthenticationGetScopesRetType, ok bool) { return getAuthenticationGetScopesAttributeTypeOk(o.Scopes) } // SetScopes sets field value func (o *Authentication) SetScopes(v AuthenticationGetScopesRetType) { setAuthenticationGetScopesAttributeType(&o.Scopes, v) } // GetStatus returns the Status field value func (o *Authentication) GetStatus() (ret AuthenticationGetStatusRetType) { ret, _ = o.GetStatusOk() return ret } // GetStatusOk returns a tuple with the Status field value // and a boolean to check if the value has been set. func (o *Authentication) GetStatusOk() (ret AuthenticationGetStatusRetType, ok bool) { return getAuthenticationGetStatusAttributeTypeOk(o.Status) } // SetStatus sets field value func (o *Authentication) SetStatus(v AuthenticationGetStatusRetType) { setAuthenticationGetStatusAttributeType(&o.Status, v) } func (o Authentication) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getAuthenticationGetAutoDiscoverUrlAttributeTypeOk(o.AutoDiscoverUrl); ok { toSerialize["AutoDiscoverUrl"] = val } if val, ok := getAuthenticationGetClientIdAttributeTypeOk(o.ClientId); ok { toSerialize["ClientId"] = val } if val, ok := getAuthenticationGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { toSerialize["CreatedAt"] = val } if val, ok := getAuthenticationGetIconUrlAttributeTypeOk(o.IconUrl); ok { toSerialize["IconUrl"] = val } if val, ok := getAuthenticationGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } if val, ok := getAuthenticationGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } if val, ok := getAuthenticationGetProviderAttributeTypeOk(o.Provider); ok { toSerialize["Provider"] = val } if val, ok := getAuthenticationGetScopesAttributeTypeOk(o.Scopes); ok { toSerialize["Scopes"] = val } if val, ok := getAuthenticationGetStatusAttributeTypeOk(o.Status); ok { toSerialize["Status"] = val } return toSerialize, nil } type NullableAuthentication struct { value *Authentication isSet bool } func (v NullableAuthentication) Get() *Authentication { return v.value } func (v *NullableAuthentication) Set(val *Authentication) { v.value = val v.isSet = true } func (v NullableAuthentication) IsSet() bool { return v.isSet } func (v *NullableAuthentication) Unset() { v.value = nil v.isSet = false } func NewNullableAuthentication(val *Authentication) *NullableAuthentication { return &NullableAuthentication{value: val, isSet: true} } func (v NullableAuthentication) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableAuthentication) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }