init
This commit is contained in:
274
openapi/model_user_update.go
Normal file
274
openapi/model_user_update.go
Normal file
@@ -0,0 +1,274 @@
|
||||
/*
|
||||
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 UserUpdate type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &UserUpdate{}
|
||||
|
||||
// UserUpdate struct for UserUpdate
|
||||
type UserUpdate struct {
|
||||
Name NullableString `json:"name,omitempty"`
|
||||
Email NullableString `json:"email,omitempty"`
|
||||
IsAdmin NullableBool `json:"is_admin,omitempty"`
|
||||
Password NullableString `json:"password,omitempty"`
|
||||
}
|
||||
|
||||
// NewUserUpdate instantiates a new UserUpdate 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 NewUserUpdate() *UserUpdate {
|
||||
this := UserUpdate{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewUserUpdateWithDefaults instantiates a new UserUpdate 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 NewUserUpdateWithDefaults() *UserUpdate {
|
||||
this := UserUpdate{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *UserUpdate) 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 *UserUpdate) 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 *UserUpdate) 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 *UserUpdate) SetName(v string) {
|
||||
o.Name.Set(&v)
|
||||
}
|
||||
// SetNameNil sets the value for Name to be an explicit nil
|
||||
func (o *UserUpdate) SetNameNil() {
|
||||
o.Name.Set(nil)
|
||||
}
|
||||
|
||||
// UnsetName ensures that no value is present for Name, not even an explicit nil
|
||||
func (o *UserUpdate) UnsetName() {
|
||||
o.Name.Unset()
|
||||
}
|
||||
|
||||
// GetEmail returns the Email field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *UserUpdate) GetEmail() string {
|
||||
if o == nil || IsNil(o.Email.Get()) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Email.Get()
|
||||
}
|
||||
|
||||
// GetEmailOk returns a tuple with the Email 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 *UserUpdate) GetEmailOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Email.Get(), o.Email.IsSet()
|
||||
}
|
||||
|
||||
// HasEmail returns a boolean if a field has been set.
|
||||
func (o *UserUpdate) HasEmail() bool {
|
||||
if o != nil && o.Email.IsSet() {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetEmail gets a reference to the given NullableString and assigns it to the Email field.
|
||||
func (o *UserUpdate) SetEmail(v string) {
|
||||
o.Email.Set(&v)
|
||||
}
|
||||
// SetEmailNil sets the value for Email to be an explicit nil
|
||||
func (o *UserUpdate) SetEmailNil() {
|
||||
o.Email.Set(nil)
|
||||
}
|
||||
|
||||
// UnsetEmail ensures that no value is present for Email, not even an explicit nil
|
||||
func (o *UserUpdate) UnsetEmail() {
|
||||
o.Email.Unset()
|
||||
}
|
||||
|
||||
// GetIsAdmin returns the IsAdmin field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *UserUpdate) GetIsAdmin() bool {
|
||||
if o == nil || IsNil(o.IsAdmin.Get()) {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.IsAdmin.Get()
|
||||
}
|
||||
|
||||
// GetIsAdminOk returns a tuple with the IsAdmin 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 *UserUpdate) GetIsAdminOk() (*bool, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.IsAdmin.Get(), o.IsAdmin.IsSet()
|
||||
}
|
||||
|
||||
// HasIsAdmin returns a boolean if a field has been set.
|
||||
func (o *UserUpdate) HasIsAdmin() bool {
|
||||
if o != nil && o.IsAdmin.IsSet() {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetIsAdmin gets a reference to the given NullableBool and assigns it to the IsAdmin field.
|
||||
func (o *UserUpdate) SetIsAdmin(v bool) {
|
||||
o.IsAdmin.Set(&v)
|
||||
}
|
||||
// SetIsAdminNil sets the value for IsAdmin to be an explicit nil
|
||||
func (o *UserUpdate) SetIsAdminNil() {
|
||||
o.IsAdmin.Set(nil)
|
||||
}
|
||||
|
||||
// UnsetIsAdmin ensures that no value is present for IsAdmin, not even an explicit nil
|
||||
func (o *UserUpdate) UnsetIsAdmin() {
|
||||
o.IsAdmin.Unset()
|
||||
}
|
||||
|
||||
// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *UserUpdate) GetPassword() string {
|
||||
if o == nil || IsNil(o.Password.Get()) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Password.Get()
|
||||
}
|
||||
|
||||
// GetPasswordOk returns a tuple with the Password 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 *UserUpdate) GetPasswordOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Password.Get(), o.Password.IsSet()
|
||||
}
|
||||
|
||||
// HasPassword returns a boolean if a field has been set.
|
||||
func (o *UserUpdate) HasPassword() bool {
|
||||
if o != nil && o.Password.IsSet() {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPassword gets a reference to the given NullableString and assigns it to the Password field.
|
||||
func (o *UserUpdate) SetPassword(v string) {
|
||||
o.Password.Set(&v)
|
||||
}
|
||||
// SetPasswordNil sets the value for Password to be an explicit nil
|
||||
func (o *UserUpdate) SetPasswordNil() {
|
||||
o.Password.Set(nil)
|
||||
}
|
||||
|
||||
// UnsetPassword ensures that no value is present for Password, not even an explicit nil
|
||||
func (o *UserUpdate) UnsetPassword() {
|
||||
o.Password.Unset()
|
||||
}
|
||||
|
||||
func (o UserUpdate) MarshalJSON() ([]byte, error) {
|
||||
toSerialize,err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o UserUpdate) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Name.IsSet() {
|
||||
toSerialize["name"] = o.Name.Get()
|
||||
}
|
||||
if o.Email.IsSet() {
|
||||
toSerialize["email"] = o.Email.Get()
|
||||
}
|
||||
if o.IsAdmin.IsSet() {
|
||||
toSerialize["is_admin"] = o.IsAdmin.Get()
|
||||
}
|
||||
if o.Password.IsSet() {
|
||||
toSerialize["password"] = o.Password.Get()
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableUserUpdate struct {
|
||||
value *UserUpdate
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableUserUpdate) Get() *UserUpdate {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableUserUpdate) Set(val *UserUpdate) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableUserUpdate) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableUserUpdate) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableUserUpdate(val *UserUpdate) *NullableUserUpdate {
|
||||
return &NullableUserUpdate{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableUserUpdate) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableUserUpdate) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user