Files
authentik/packages/client-go/model_schedule_request.go
T
Marc 'risson' Schmitt 2f70351c90 packages/client-go: init (#21139)
* 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>
2026-03-25 15:26:50 +01:00

255 lines
6.4 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 ScheduleRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ScheduleRequest{}
// ScheduleRequest struct for ScheduleRequest
type ScheduleRequest struct {
RelObjId NullableString `json:"rel_obj_id,omitempty"`
// When to schedule tasks
Crontab string `json:"crontab"`
// Pause this schedule
Paused *bool `json:"paused,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ScheduleRequest ScheduleRequest
// NewScheduleRequest instantiates a new ScheduleRequest 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 NewScheduleRequest(crontab string) *ScheduleRequest {
this := ScheduleRequest{}
this.Crontab = crontab
return &this
}
// NewScheduleRequestWithDefaults instantiates a new ScheduleRequest 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 NewScheduleRequestWithDefaults() *ScheduleRequest {
this := ScheduleRequest{}
return &this
}
// GetRelObjId returns the RelObjId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ScheduleRequest) GetRelObjId() string {
if o == nil || IsNil(o.RelObjId.Get()) {
var ret string
return ret
}
return *o.RelObjId.Get()
}
// GetRelObjIdOk returns a tuple with the RelObjId 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 *ScheduleRequest) GetRelObjIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.RelObjId.Get(), o.RelObjId.IsSet()
}
// HasRelObjId returns a boolean if a field has been set.
func (o *ScheduleRequest) HasRelObjId() bool {
if o != nil && o.RelObjId.IsSet() {
return true
}
return false
}
// SetRelObjId gets a reference to the given NullableString and assigns it to the RelObjId field.
func (o *ScheduleRequest) SetRelObjId(v string) {
o.RelObjId.Set(&v)
}
// SetRelObjIdNil sets the value for RelObjId to be an explicit nil
func (o *ScheduleRequest) SetRelObjIdNil() {
o.RelObjId.Set(nil)
}
// UnsetRelObjId ensures that no value is present for RelObjId, not even an explicit nil
func (o *ScheduleRequest) UnsetRelObjId() {
o.RelObjId.Unset()
}
// GetCrontab returns the Crontab field value
func (o *ScheduleRequest) GetCrontab() string {
if o == nil {
var ret string
return ret
}
return o.Crontab
}
// GetCrontabOk returns a tuple with the Crontab field value
// and a boolean to check if the value has been set.
func (o *ScheduleRequest) GetCrontabOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Crontab, true
}
// SetCrontab sets field value
func (o *ScheduleRequest) SetCrontab(v string) {
o.Crontab = v
}
// GetPaused returns the Paused field value if set, zero value otherwise.
func (o *ScheduleRequest) GetPaused() bool {
if o == nil || IsNil(o.Paused) {
var ret bool
return ret
}
return *o.Paused
}
// GetPausedOk returns a tuple with the Paused field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScheduleRequest) GetPausedOk() (*bool, bool) {
if o == nil || IsNil(o.Paused) {
return nil, false
}
return o.Paused, true
}
// HasPaused returns a boolean if a field has been set.
func (o *ScheduleRequest) HasPaused() bool {
if o != nil && !IsNil(o.Paused) {
return true
}
return false
}
// SetPaused gets a reference to the given bool and assigns it to the Paused field.
func (o *ScheduleRequest) SetPaused(v bool) {
o.Paused = &v
}
func (o ScheduleRequest) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ScheduleRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.RelObjId.IsSet() {
toSerialize["rel_obj_id"] = o.RelObjId.Get()
}
toSerialize["crontab"] = o.Crontab
if !IsNil(o.Paused) {
toSerialize["paused"] = o.Paused
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ScheduleRequest) 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{
"crontab",
}
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)
}
}
varScheduleRequest := _ScheduleRequest{}
err = json.Unmarshal(data, &varScheduleRequest)
if err != nil {
return err
}
*o = ScheduleRequest(varScheduleRequest)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "rel_obj_id")
delete(additionalProperties, "crontab")
delete(additionalProperties, "paused")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableScheduleRequest struct {
value *ScheduleRequest
isSet bool
}
func (v NullableScheduleRequest) Get() *ScheduleRequest {
return v.value
}
func (v *NullableScheduleRequest) Set(val *ScheduleRequest) {
v.value = val
v.isSet = true
}
func (v NullableScheduleRequest) IsSet() bool {
return v.isSet
}
func (v *NullableScheduleRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableScheduleRequest(val *ScheduleRequest) *NullableScheduleRequest {
return &NullableScheduleRequest{value: val, isSet: true}
}
func (v NullableScheduleRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableScheduleRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}