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>
343 lines
8.9 KiB
Go
Generated
343 lines
8.9 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"
|
|
"time"
|
|
)
|
|
|
|
// checks if the GroupTelegramSourceConnection type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GroupTelegramSourceConnection{}
|
|
|
|
// GroupTelegramSourceConnection Group Source Connection
|
|
type GroupTelegramSourceConnection struct {
|
|
Pk int32 `json:"pk"`
|
|
Group string `json:"group"`
|
|
Source string `json:"source"`
|
|
SourceObj Source `json:"source_obj"`
|
|
Identifier string `json:"identifier"`
|
|
Created time.Time `json:"created"`
|
|
LastUpdated time.Time `json:"last_updated"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GroupTelegramSourceConnection GroupTelegramSourceConnection
|
|
|
|
// NewGroupTelegramSourceConnection instantiates a new GroupTelegramSourceConnection 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 NewGroupTelegramSourceConnection(pk int32, group string, source string, sourceObj Source, identifier string, created time.Time, lastUpdated time.Time) *GroupTelegramSourceConnection {
|
|
this := GroupTelegramSourceConnection{}
|
|
this.Pk = pk
|
|
this.Group = group
|
|
this.Source = source
|
|
this.SourceObj = sourceObj
|
|
this.Identifier = identifier
|
|
this.Created = created
|
|
this.LastUpdated = lastUpdated
|
|
return &this
|
|
}
|
|
|
|
// NewGroupTelegramSourceConnectionWithDefaults instantiates a new GroupTelegramSourceConnection 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 NewGroupTelegramSourceConnectionWithDefaults() *GroupTelegramSourceConnection {
|
|
this := GroupTelegramSourceConnection{}
|
|
return &this
|
|
}
|
|
|
|
// GetPk returns the Pk field value
|
|
func (o *GroupTelegramSourceConnection) GetPk() int32 {
|
|
if o == nil {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
|
|
return o.Pk
|
|
}
|
|
|
|
// GetPkOk returns a tuple with the Pk field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GroupTelegramSourceConnection) GetPkOk() (*int32, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Pk, true
|
|
}
|
|
|
|
// SetPk sets field value
|
|
func (o *GroupTelegramSourceConnection) SetPk(v int32) {
|
|
o.Pk = v
|
|
}
|
|
|
|
// GetGroup returns the Group field value
|
|
func (o *GroupTelegramSourceConnection) GetGroup() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Group
|
|
}
|
|
|
|
// GetGroupOk returns a tuple with the Group field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GroupTelegramSourceConnection) GetGroupOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Group, true
|
|
}
|
|
|
|
// SetGroup sets field value
|
|
func (o *GroupTelegramSourceConnection) SetGroup(v string) {
|
|
o.Group = v
|
|
}
|
|
|
|
// GetSource returns the Source field value
|
|
func (o *GroupTelegramSourceConnection) GetSource() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Source
|
|
}
|
|
|
|
// GetSourceOk returns a tuple with the Source field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GroupTelegramSourceConnection) GetSourceOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Source, true
|
|
}
|
|
|
|
// SetSource sets field value
|
|
func (o *GroupTelegramSourceConnection) SetSource(v string) {
|
|
o.Source = v
|
|
}
|
|
|
|
// GetSourceObj returns the SourceObj field value
|
|
func (o *GroupTelegramSourceConnection) GetSourceObj() Source {
|
|
if o == nil {
|
|
var ret Source
|
|
return ret
|
|
}
|
|
|
|
return o.SourceObj
|
|
}
|
|
|
|
// GetSourceObjOk returns a tuple with the SourceObj field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GroupTelegramSourceConnection) GetSourceObjOk() (*Source, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.SourceObj, true
|
|
}
|
|
|
|
// SetSourceObj sets field value
|
|
func (o *GroupTelegramSourceConnection) SetSourceObj(v Source) {
|
|
o.SourceObj = v
|
|
}
|
|
|
|
// GetIdentifier returns the Identifier field value
|
|
func (o *GroupTelegramSourceConnection) GetIdentifier() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Identifier
|
|
}
|
|
|
|
// GetIdentifierOk returns a tuple with the Identifier field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GroupTelegramSourceConnection) GetIdentifierOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Identifier, true
|
|
}
|
|
|
|
// SetIdentifier sets field value
|
|
func (o *GroupTelegramSourceConnection) SetIdentifier(v string) {
|
|
o.Identifier = v
|
|
}
|
|
|
|
// GetCreated returns the Created field value
|
|
func (o *GroupTelegramSourceConnection) GetCreated() time.Time {
|
|
if o == nil {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
|
|
return o.Created
|
|
}
|
|
|
|
// GetCreatedOk returns a tuple with the Created field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GroupTelegramSourceConnection) GetCreatedOk() (*time.Time, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Created, true
|
|
}
|
|
|
|
// SetCreated sets field value
|
|
func (o *GroupTelegramSourceConnection) SetCreated(v time.Time) {
|
|
o.Created = v
|
|
}
|
|
|
|
// GetLastUpdated returns the LastUpdated field value
|
|
func (o *GroupTelegramSourceConnection) GetLastUpdated() time.Time {
|
|
if o == nil {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
|
|
return o.LastUpdated
|
|
}
|
|
|
|
// GetLastUpdatedOk returns a tuple with the LastUpdated field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GroupTelegramSourceConnection) GetLastUpdatedOk() (*time.Time, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.LastUpdated, true
|
|
}
|
|
|
|
// SetLastUpdated sets field value
|
|
func (o *GroupTelegramSourceConnection) SetLastUpdated(v time.Time) {
|
|
o.LastUpdated = v
|
|
}
|
|
|
|
func (o GroupTelegramSourceConnection) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GroupTelegramSourceConnection) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["pk"] = o.Pk
|
|
toSerialize["group"] = o.Group
|
|
toSerialize["source"] = o.Source
|
|
toSerialize["source_obj"] = o.SourceObj
|
|
toSerialize["identifier"] = o.Identifier
|
|
toSerialize["created"] = o.Created
|
|
toSerialize["last_updated"] = o.LastUpdated
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GroupTelegramSourceConnection) 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{
|
|
"pk",
|
|
"group",
|
|
"source",
|
|
"source_obj",
|
|
"identifier",
|
|
"created",
|
|
"last_updated",
|
|
}
|
|
|
|
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)
|
|
}
|
|
}
|
|
|
|
varGroupTelegramSourceConnection := _GroupTelegramSourceConnection{}
|
|
|
|
err = json.Unmarshal(data, &varGroupTelegramSourceConnection)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GroupTelegramSourceConnection(varGroupTelegramSourceConnection)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "pk")
|
|
delete(additionalProperties, "group")
|
|
delete(additionalProperties, "source")
|
|
delete(additionalProperties, "source_obj")
|
|
delete(additionalProperties, "identifier")
|
|
delete(additionalProperties, "created")
|
|
delete(additionalProperties, "last_updated")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGroupTelegramSourceConnection struct {
|
|
value *GroupTelegramSourceConnection
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGroupTelegramSourceConnection) Get() *GroupTelegramSourceConnection {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGroupTelegramSourceConnection) Set(val *GroupTelegramSourceConnection) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGroupTelegramSourceConnection) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGroupTelegramSourceConnection) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGroupTelegramSourceConnection(val *GroupTelegramSourceConnection) *NullableGroupTelegramSourceConnection {
|
|
return &NullableGroupTelegramSourceConnection{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGroupTelegramSourceConnection) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGroupTelegramSourceConnection) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|