mirror of
https://github.com/goauthentik/authentik.git
synced 2026-06-18 11:29:26 +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>
243 lines
6.3 KiB
Go
Generated
243 lines
6.3 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 SyncStatus type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SyncStatus{}
|
|
|
|
// SyncStatus Provider/source sync status
|
|
type SyncStatus struct {
|
|
IsRunning bool `json:"is_running"`
|
|
LastSuccessfulSync *time.Time `json:"last_successful_sync,omitempty"`
|
|
LastSyncStatus *TaskAggregatedStatusEnum `json:"last_sync_status,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _SyncStatus SyncStatus
|
|
|
|
// NewSyncStatus instantiates a new SyncStatus 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 NewSyncStatus(isRunning bool) *SyncStatus {
|
|
this := SyncStatus{}
|
|
this.IsRunning = isRunning
|
|
return &this
|
|
}
|
|
|
|
// NewSyncStatusWithDefaults instantiates a new SyncStatus 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 NewSyncStatusWithDefaults() *SyncStatus {
|
|
this := SyncStatus{}
|
|
return &this
|
|
}
|
|
|
|
// GetIsRunning returns the IsRunning field value
|
|
func (o *SyncStatus) GetIsRunning() bool {
|
|
if o == nil {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
|
|
return o.IsRunning
|
|
}
|
|
|
|
// GetIsRunningOk returns a tuple with the IsRunning field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SyncStatus) GetIsRunningOk() (*bool, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.IsRunning, true
|
|
}
|
|
|
|
// SetIsRunning sets field value
|
|
func (o *SyncStatus) SetIsRunning(v bool) {
|
|
o.IsRunning = v
|
|
}
|
|
|
|
// GetLastSuccessfulSync returns the LastSuccessfulSync field value if set, zero value otherwise.
|
|
func (o *SyncStatus) GetLastSuccessfulSync() time.Time {
|
|
if o == nil || IsNil(o.LastSuccessfulSync) {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.LastSuccessfulSync
|
|
}
|
|
|
|
// GetLastSuccessfulSyncOk returns a tuple with the LastSuccessfulSync field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SyncStatus) GetLastSuccessfulSyncOk() (*time.Time, bool) {
|
|
if o == nil || IsNil(o.LastSuccessfulSync) {
|
|
return nil, false
|
|
}
|
|
return o.LastSuccessfulSync, true
|
|
}
|
|
|
|
// HasLastSuccessfulSync returns a boolean if a field has been set.
|
|
func (o *SyncStatus) HasLastSuccessfulSync() bool {
|
|
if o != nil && !IsNil(o.LastSuccessfulSync) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLastSuccessfulSync gets a reference to the given time.Time and assigns it to the LastSuccessfulSync field.
|
|
func (o *SyncStatus) SetLastSuccessfulSync(v time.Time) {
|
|
o.LastSuccessfulSync = &v
|
|
}
|
|
|
|
// GetLastSyncStatus returns the LastSyncStatus field value if set, zero value otherwise.
|
|
func (o *SyncStatus) GetLastSyncStatus() TaskAggregatedStatusEnum {
|
|
if o == nil || IsNil(o.LastSyncStatus) {
|
|
var ret TaskAggregatedStatusEnum
|
|
return ret
|
|
}
|
|
return *o.LastSyncStatus
|
|
}
|
|
|
|
// GetLastSyncStatusOk returns a tuple with the LastSyncStatus field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SyncStatus) GetLastSyncStatusOk() (*TaskAggregatedStatusEnum, bool) {
|
|
if o == nil || IsNil(o.LastSyncStatus) {
|
|
return nil, false
|
|
}
|
|
return o.LastSyncStatus, true
|
|
}
|
|
|
|
// HasLastSyncStatus returns a boolean if a field has been set.
|
|
func (o *SyncStatus) HasLastSyncStatus() bool {
|
|
if o != nil && !IsNil(o.LastSyncStatus) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLastSyncStatus gets a reference to the given TaskAggregatedStatusEnum and assigns it to the LastSyncStatus field.
|
|
func (o *SyncStatus) SetLastSyncStatus(v TaskAggregatedStatusEnum) {
|
|
o.LastSyncStatus = &v
|
|
}
|
|
|
|
func (o SyncStatus) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SyncStatus) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["is_running"] = o.IsRunning
|
|
if !IsNil(o.LastSuccessfulSync) {
|
|
toSerialize["last_successful_sync"] = o.LastSuccessfulSync
|
|
}
|
|
if !IsNil(o.LastSyncStatus) {
|
|
toSerialize["last_sync_status"] = o.LastSyncStatus
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *SyncStatus) 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{
|
|
"is_running",
|
|
}
|
|
|
|
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)
|
|
}
|
|
}
|
|
|
|
varSyncStatus := _SyncStatus{}
|
|
|
|
err = json.Unmarshal(data, &varSyncStatus)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = SyncStatus(varSyncStatus)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "is_running")
|
|
delete(additionalProperties, "last_successful_sync")
|
|
delete(additionalProperties, "last_sync_status")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableSyncStatus struct {
|
|
value *SyncStatus
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSyncStatus) Get() *SyncStatus {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSyncStatus) Set(val *SyncStatus) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSyncStatus) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSyncStatus) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSyncStatus(val *SyncStatus) *NullableSyncStatus {
|
|
return &NullableSyncStatus{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSyncStatus) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSyncStatus) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|