Files
sdk/model_model_access.go

376 lines
9.4 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the ModelAccess type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ModelAccess{}
// ModelAccess struct for ModelAccess
type ModelAccess struct {
CreatedTime *string `json:"createdTime,omitempty"`
Email *string `json:"email,omitempty"`
Model *string `json:"model,omitempty"`
Owner *string `json:"owner,omitempty"`
Status *string `json:"status,omitempty"`
UpdatedTime *string `json:"updatedTime,omitempty"`
User *string `json:"user,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ModelAccess ModelAccess
// NewModelAccess instantiates a new ModelAccess 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 NewModelAccess() *ModelAccess {
this := ModelAccess{}
return &this
}
// NewModelAccessWithDefaults instantiates a new ModelAccess 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 NewModelAccessWithDefaults() *ModelAccess {
this := ModelAccess{}
return &this
}
// GetCreatedTime returns the CreatedTime field value if set, zero value otherwise.
func (o *ModelAccess) GetCreatedTime() string {
if o == nil || IsNil(o.CreatedTime) {
var ret string
return ret
}
return *o.CreatedTime
}
// GetCreatedTimeOk returns a tuple with the CreatedTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ModelAccess) GetCreatedTimeOk() (*string, bool) {
if o == nil || IsNil(o.CreatedTime) {
return nil, false
}
return o.CreatedTime, true
}
// HasCreatedTime returns a boolean if a field has been set.
func (o *ModelAccess) HasCreatedTime() bool {
if o != nil && !IsNil(o.CreatedTime) {
return true
}
return false
}
// SetCreatedTime gets a reference to the given string and assigns it to the CreatedTime field.
func (o *ModelAccess) SetCreatedTime(v string) {
o.CreatedTime = &v
}
// GetEmail returns the Email field value if set, zero value otherwise.
func (o *ModelAccess) GetEmail() string {
if o == nil || IsNil(o.Email) {
var ret string
return ret
}
return *o.Email
}
// GetEmailOk returns a tuple with the Email field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ModelAccess) GetEmailOk() (*string, bool) {
if o == nil || IsNil(o.Email) {
return nil, false
}
return o.Email, true
}
// HasEmail returns a boolean if a field has been set.
func (o *ModelAccess) HasEmail() bool {
if o != nil && !IsNil(o.Email) {
return true
}
return false
}
// SetEmail gets a reference to the given string and assigns it to the Email field.
func (o *ModelAccess) SetEmail(v string) {
o.Email = &v
}
// GetModel returns the Model field value if set, zero value otherwise.
func (o *ModelAccess) GetModel() string {
if o == nil || IsNil(o.Model) {
var ret string
return ret
}
return *o.Model
}
// GetModelOk returns a tuple with the Model field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ModelAccess) GetModelOk() (*string, bool) {
if o == nil || IsNil(o.Model) {
return nil, false
}
return o.Model, true
}
// HasModel returns a boolean if a field has been set.
func (o *ModelAccess) HasModel() bool {
if o != nil && !IsNil(o.Model) {
return true
}
return false
}
// SetModel gets a reference to the given string and assigns it to the Model field.
func (o *ModelAccess) SetModel(v string) {
o.Model = &v
}
// GetOwner returns the Owner field value if set, zero value otherwise.
func (o *ModelAccess) GetOwner() string {
if o == nil || IsNil(o.Owner) {
var ret string
return ret
}
return *o.Owner
}
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ModelAccess) GetOwnerOk() (*string, bool) {
if o == nil || IsNil(o.Owner) {
return nil, false
}
return o.Owner, true
}
// HasOwner returns a boolean if a field has been set.
func (o *ModelAccess) HasOwner() bool {
if o != nil && !IsNil(o.Owner) {
return true
}
return false
}
// SetOwner gets a reference to the given string and assigns it to the Owner field.
func (o *ModelAccess) SetOwner(v string) {
o.Owner = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *ModelAccess) GetStatus() string {
if o == nil || IsNil(o.Status) {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ModelAccess) GetStatusOk() (*string, bool) {
if o == nil || IsNil(o.Status) {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *ModelAccess) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *ModelAccess) SetStatus(v string) {
o.Status = &v
}
// GetUpdatedTime returns the UpdatedTime field value if set, zero value otherwise.
func (o *ModelAccess) GetUpdatedTime() string {
if o == nil || IsNil(o.UpdatedTime) {
var ret string
return ret
}
return *o.UpdatedTime
}
// GetUpdatedTimeOk returns a tuple with the UpdatedTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ModelAccess) GetUpdatedTimeOk() (*string, bool) {
if o == nil || IsNil(o.UpdatedTime) {
return nil, false
}
return o.UpdatedTime, true
}
// HasUpdatedTime returns a boolean if a field has been set.
func (o *ModelAccess) HasUpdatedTime() bool {
if o != nil && !IsNil(o.UpdatedTime) {
return true
}
return false
}
// SetUpdatedTime gets a reference to the given string and assigns it to the UpdatedTime field.
func (o *ModelAccess) SetUpdatedTime(v string) {
o.UpdatedTime = &v
}
// GetUser returns the User field value if set, zero value otherwise.
func (o *ModelAccess) GetUser() string {
if o == nil || IsNil(o.User) {
var ret string
return ret
}
return *o.User
}
// GetUserOk returns a tuple with the User field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ModelAccess) GetUserOk() (*string, bool) {
if o == nil || IsNil(o.User) {
return nil, false
}
return o.User, true
}
// HasUser returns a boolean if a field has been set.
func (o *ModelAccess) HasUser() bool {
if o != nil && !IsNil(o.User) {
return true
}
return false
}
// SetUser gets a reference to the given string and assigns it to the User field.
func (o *ModelAccess) SetUser(v string) {
o.User = &v
}
func (o ModelAccess) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ModelAccess) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.CreatedTime) {
toSerialize["createdTime"] = o.CreatedTime
}
if !IsNil(o.Email) {
toSerialize["email"] = o.Email
}
if !IsNil(o.Model) {
toSerialize["model"] = o.Model
}
if !IsNil(o.Owner) {
toSerialize["owner"] = o.Owner
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.UpdatedTime) {
toSerialize["updatedTime"] = o.UpdatedTime
}
if !IsNil(o.User) {
toSerialize["user"] = o.User
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ModelAccess) UnmarshalJSON(data []byte) (err error) {
varModelAccess := _ModelAccess{}
err = json.Unmarshal(data, &varModelAccess)
if err != nil {
return err
}
*o = ModelAccess(varModelAccess)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "createdTime")
delete(additionalProperties, "email")
delete(additionalProperties, "model")
delete(additionalProperties, "owner")
delete(additionalProperties, "status")
delete(additionalProperties, "updatedTime")
delete(additionalProperties, "user")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableModelAccess struct {
value *ModelAccess
isSet bool
}
func (v NullableModelAccess) Get() *ModelAccess {
return v.value
}
func (v *NullableModelAccess) Set(val *ModelAccess) {
v.value = val
v.isSet = true
}
func (v NullableModelAccess) IsSet() bool {
return v.isSet
}
func (v *NullableModelAccess) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableModelAccess(val *ModelAccess) *NullableModelAccess {
return &NullableModelAccess{value: val, isSet: true}
}
func (v NullableModelAccess) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableModelAccess) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}