Files
stack/components/fctl/membershipclient/model_module.go
2024-05-02 15:23:36 +00:00

227 lines
5.0 KiB
Go

/*
Membership API
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 membershipclient
import (
"encoding/json"
"time"
)
// checks if the Module type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Module{}
// Module struct for Module
type Module struct {
Name string `json:"name"`
State string `json:"state"`
Status string `json:"status"`
LastStatusUpdate time.Time `json:"lastStatusUpdate"`
LastStateUpdate time.Time `json:"lastStateUpdate"`
}
// NewModule instantiates a new Module 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 NewModule(name string, state string, status string, lastStatusUpdate time.Time, lastStateUpdate time.Time) *Module {
this := Module{}
this.Name = name
this.State = state
this.Status = status
this.LastStatusUpdate = lastStatusUpdate
this.LastStateUpdate = lastStateUpdate
return &this
}
// NewModuleWithDefaults instantiates a new Module 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 NewModuleWithDefaults() *Module {
this := Module{}
return &this
}
// GetName returns the Name field value
func (o *Module) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *Module) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *Module) SetName(v string) {
o.Name = v
}
// GetState returns the State field value
func (o *Module) GetState() string {
if o == nil {
var ret string
return ret
}
return o.State
}
// GetStateOk returns a tuple with the State field value
// and a boolean to check if the value has been set.
func (o *Module) GetStateOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.State, true
}
// SetState sets field value
func (o *Module) SetState(v string) {
o.State = v
}
// GetStatus returns the Status field value
func (o *Module) GetStatus() string {
if o == nil {
var ret string
return ret
}
return o.Status
}
// GetStatusOk returns a tuple with the Status field value
// and a boolean to check if the value has been set.
func (o *Module) GetStatusOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Status, true
}
// SetStatus sets field value
func (o *Module) SetStatus(v string) {
o.Status = v
}
// GetLastStatusUpdate returns the LastStatusUpdate field value
func (o *Module) GetLastStatusUpdate() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.LastStatusUpdate
}
// GetLastStatusUpdateOk returns a tuple with the LastStatusUpdate field value
// and a boolean to check if the value has been set.
func (o *Module) GetLastStatusUpdateOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.LastStatusUpdate, true
}
// SetLastStatusUpdate sets field value
func (o *Module) SetLastStatusUpdate(v time.Time) {
o.LastStatusUpdate = v
}
// GetLastStateUpdate returns the LastStateUpdate field value
func (o *Module) GetLastStateUpdate() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.LastStateUpdate
}
// GetLastStateUpdateOk returns a tuple with the LastStateUpdate field value
// and a boolean to check if the value has been set.
func (o *Module) GetLastStateUpdateOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.LastStateUpdate, true
}
// SetLastStateUpdate sets field value
func (o *Module) SetLastStateUpdate(v time.Time) {
o.LastStateUpdate = v
}
func (o Module) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Module) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["name"] = o.Name
toSerialize["state"] = o.State
toSerialize["status"] = o.Status
toSerialize["lastStatusUpdate"] = o.LastStatusUpdate
toSerialize["lastStateUpdate"] = o.LastStateUpdate
return toSerialize, nil
}
type NullableModule struct {
value *Module
isSet bool
}
func (v NullableModule) Get() *Module {
return v.value
}
func (v *NullableModule) Set(val *Module) {
v.value = val
v.isSet = true
}
func (v NullableModule) IsSet() bool {
return v.isSet
}
func (v *NullableModule) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableModule(val *Module) *NullableModule {
return &NullableModule{value: val, isSet: true}
}
func (v NullableModule) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableModule) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}