229 lines
5.9 KiB
Go
229 lines
5.9 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 CardUpdate type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &CardUpdate{}
|
|
|
|
// CardUpdate struct for CardUpdate
|
|
type CardUpdate struct {
|
|
Name NullableString `json:"name,omitempty"`
|
|
Enabled NullableBool `json:"enabled,omitempty"`
|
|
GroupId NullableInt32 `json:"group_id,omitempty"`
|
|
}
|
|
|
|
// NewCardUpdate instantiates a new CardUpdate 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 NewCardUpdate() *CardUpdate {
|
|
this := CardUpdate{}
|
|
return &this
|
|
}
|
|
|
|
// NewCardUpdateWithDefaults instantiates a new CardUpdate 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 NewCardUpdateWithDefaults() *CardUpdate {
|
|
this := CardUpdate{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *CardUpdate) 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 *CardUpdate) 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 *CardUpdate) 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 *CardUpdate) SetName(v string) {
|
|
o.Name.Set(&v)
|
|
}
|
|
// SetNameNil sets the value for Name to be an explicit nil
|
|
func (o *CardUpdate) SetNameNil() {
|
|
o.Name.Set(nil)
|
|
}
|
|
|
|
// UnsetName ensures that no value is present for Name, not even an explicit nil
|
|
func (o *CardUpdate) UnsetName() {
|
|
o.Name.Unset()
|
|
}
|
|
|
|
// GetEnabled returns the Enabled field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *CardUpdate) GetEnabled() bool {
|
|
if o == nil || IsNil(o.Enabled.Get()) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Enabled.Get()
|
|
}
|
|
|
|
// GetEnabledOk returns a tuple with the Enabled 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 *CardUpdate) GetEnabledOk() (*bool, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.Enabled.Get(), o.Enabled.IsSet()
|
|
}
|
|
|
|
// HasEnabled returns a boolean if a field has been set.
|
|
func (o *CardUpdate) HasEnabled() bool {
|
|
if o != nil && o.Enabled.IsSet() {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEnabled gets a reference to the given NullableBool and assigns it to the Enabled field.
|
|
func (o *CardUpdate) SetEnabled(v bool) {
|
|
o.Enabled.Set(&v)
|
|
}
|
|
// SetEnabledNil sets the value for Enabled to be an explicit nil
|
|
func (o *CardUpdate) SetEnabledNil() {
|
|
o.Enabled.Set(nil)
|
|
}
|
|
|
|
// UnsetEnabled ensures that no value is present for Enabled, not even an explicit nil
|
|
func (o *CardUpdate) UnsetEnabled() {
|
|
o.Enabled.Unset()
|
|
}
|
|
|
|
// GetGroupId returns the GroupId field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *CardUpdate) GetGroupId() int32 {
|
|
if o == nil || IsNil(o.GroupId.Get()) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.GroupId.Get()
|
|
}
|
|
|
|
// GetGroupIdOk returns a tuple with the GroupId 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 *CardUpdate) GetGroupIdOk() (*int32, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.GroupId.Get(), o.GroupId.IsSet()
|
|
}
|
|
|
|
// HasGroupId returns a boolean if a field has been set.
|
|
func (o *CardUpdate) HasGroupId() bool {
|
|
if o != nil && o.GroupId.IsSet() {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetGroupId gets a reference to the given NullableInt32 and assigns it to the GroupId field.
|
|
func (o *CardUpdate) SetGroupId(v int32) {
|
|
o.GroupId.Set(&v)
|
|
}
|
|
// SetGroupIdNil sets the value for GroupId to be an explicit nil
|
|
func (o *CardUpdate) SetGroupIdNil() {
|
|
o.GroupId.Set(nil)
|
|
}
|
|
|
|
// UnsetGroupId ensures that no value is present for GroupId, not even an explicit nil
|
|
func (o *CardUpdate) UnsetGroupId() {
|
|
o.GroupId.Unset()
|
|
}
|
|
|
|
func (o CardUpdate) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o CardUpdate) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if o.Name.IsSet() {
|
|
toSerialize["name"] = o.Name.Get()
|
|
}
|
|
if o.Enabled.IsSet() {
|
|
toSerialize["enabled"] = o.Enabled.Get()
|
|
}
|
|
if o.GroupId.IsSet() {
|
|
toSerialize["group_id"] = o.GroupId.Get()
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableCardUpdate struct {
|
|
value *CardUpdate
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableCardUpdate) Get() *CardUpdate {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableCardUpdate) Set(val *CardUpdate) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableCardUpdate) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableCardUpdate) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableCardUpdate(val *CardUpdate) *NullableCardUpdate {
|
|
return &NullableCardUpdate{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableCardUpdate) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableCardUpdate) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|