Files
portal/openapi/model_access_authorization_update.go
2026-06-22 11:38:29 +02:00

220 lines
6.4 KiB
Go

/*
FastAPI
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: 0.1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// checks if the AccessAuthorizationUpdate type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AccessAuthorizationUpdate{}
// AccessAuthorizationUpdate struct for AccessAuthorizationUpdate
type AccessAuthorizationUpdate struct {
Name NullableString `json:"name,omitempty"`
IsActive NullableBool `json:"is_active,omitempty"`
Timetables []TimetableCreate `json:"timetables,omitempty"`
}
// NewAccessAuthorizationUpdate instantiates a new AccessAuthorizationUpdate 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 NewAccessAuthorizationUpdate() *AccessAuthorizationUpdate {
this := AccessAuthorizationUpdate{}
return &this
}
// NewAccessAuthorizationUpdateWithDefaults instantiates a new AccessAuthorizationUpdate 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 NewAccessAuthorizationUpdateWithDefaults() *AccessAuthorizationUpdate {
this := AccessAuthorizationUpdate{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AccessAuthorizationUpdate) GetName() string {
if o == nil || IsNil(o.Name.Get()) {
var ret string
return ret
}
return *o.Name.Get()
}
// GetNameOk returns a tuple with the Name 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 *AccessAuthorizationUpdate) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Name.Get(), o.Name.IsSet()
}
// HasName returns a boolean if a field has been set.
func (o *AccessAuthorizationUpdate) HasName() bool {
if o != nil && o.Name.IsSet() {
return true
}
return false
}
// SetName gets a reference to the given NullableString and assigns it to the Name field.
func (o *AccessAuthorizationUpdate) SetName(v string) {
o.Name.Set(&v)
}
// SetNameNil sets the value for Name to be an explicit nil
func (o *AccessAuthorizationUpdate) SetNameNil() {
o.Name.Set(nil)
}
// UnsetName ensures that no value is present for Name, not even an explicit nil
func (o *AccessAuthorizationUpdate) UnsetName() {
o.Name.Unset()
}
// GetIsActive returns the IsActive field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AccessAuthorizationUpdate) GetIsActive() bool {
if o == nil || IsNil(o.IsActive.Get()) {
var ret bool
return ret
}
return *o.IsActive.Get()
}
// GetIsActiveOk returns a tuple with the IsActive 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 *AccessAuthorizationUpdate) GetIsActiveOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.IsActive.Get(), o.IsActive.IsSet()
}
// HasIsActive returns a boolean if a field has been set.
func (o *AccessAuthorizationUpdate) HasIsActive() bool {
if o != nil && o.IsActive.IsSet() {
return true
}
return false
}
// SetIsActive gets a reference to the given NullableBool and assigns it to the IsActive field.
func (o *AccessAuthorizationUpdate) SetIsActive(v bool) {
o.IsActive.Set(&v)
}
// SetIsActiveNil sets the value for IsActive to be an explicit nil
func (o *AccessAuthorizationUpdate) SetIsActiveNil() {
o.IsActive.Set(nil)
}
// UnsetIsActive ensures that no value is present for IsActive, not even an explicit nil
func (o *AccessAuthorizationUpdate) UnsetIsActive() {
o.IsActive.Unset()
}
// GetTimetables returns the Timetables field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AccessAuthorizationUpdate) GetTimetables() []TimetableCreate {
if o == nil {
var ret []TimetableCreate
return ret
}
return o.Timetables
}
// GetTimetablesOk returns a tuple with the Timetables 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 *AccessAuthorizationUpdate) GetTimetablesOk() ([]TimetableCreate, bool) {
if o == nil || IsNil(o.Timetables) {
return nil, false
}
return o.Timetables, true
}
// HasTimetables returns a boolean if a field has been set.
func (o *AccessAuthorizationUpdate) HasTimetables() bool {
if o != nil && !IsNil(o.Timetables) {
return true
}
return false
}
// SetTimetables gets a reference to the given []TimetableCreate and assigns it to the Timetables field.
func (o *AccessAuthorizationUpdate) SetTimetables(v []TimetableCreate) {
o.Timetables = v
}
func (o AccessAuthorizationUpdate) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AccessAuthorizationUpdate) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.Name.IsSet() {
toSerialize["name"] = o.Name.Get()
}
if o.IsActive.IsSet() {
toSerialize["is_active"] = o.IsActive.Get()
}
if o.Timetables != nil {
toSerialize["timetables"] = o.Timetables
}
return toSerialize, nil
}
type NullableAccessAuthorizationUpdate struct {
value *AccessAuthorizationUpdate
isSet bool
}
func (v NullableAccessAuthorizationUpdate) Get() *AccessAuthorizationUpdate {
return v.value
}
func (v *NullableAccessAuthorizationUpdate) Set(val *AccessAuthorizationUpdate) {
v.value = val
v.isSet = true
}
func (v NullableAccessAuthorizationUpdate) IsSet() bool {
return v.isSet
}
func (v *NullableAccessAuthorizationUpdate) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAccessAuthorizationUpdate(val *AccessAuthorizationUpdate) *NullableAccessAuthorizationUpdate {
return &NullableAccessAuthorizationUpdate{value: val, isSet: true}
}
func (v NullableAccessAuthorizationUpdate) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAccessAuthorizationUpdate) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}