/*
ChromaDB API

This is OpenAPI schema for ChromaDB API.

API version: 1.0.0
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package openapi

import (
	"encoding/json"
)

// checks if the CreateTenant type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateTenant{}

// CreateTenant struct for CreateTenant
type CreateTenant struct {
	Name string `json:"name"`
}

// NewCreateTenant instantiates a new CreateTenant 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 NewCreateTenant(name string) *CreateTenant {
	this := CreateTenant{}
	this.Name = name
	return &this
}

// NewCreateTenantWithDefaults instantiates a new CreateTenant 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 NewCreateTenantWithDefaults() *CreateTenant {
	this := CreateTenant{}
	return &this
}

// GetName returns the Name field value
func (o *CreateTenant) 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 *CreateTenant) GetNameOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Name, true
}

// SetName sets field value
func (o *CreateTenant) SetName(v string) {
	o.Name = v
}

func (o CreateTenant) MarshalJSON() ([]byte, error) {
	toSerialize, err := o.ToMap()
	if err != nil {
		return []byte{}, err
	}
	return json.Marshal(toSerialize)
}

func (o CreateTenant) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["name"] = o.Name
	return toSerialize, nil
}

type NullableCreateTenant struct {
	value *CreateTenant
	isSet bool
}

func (v NullableCreateTenant) Get() *CreateTenant {
	return v.value
}

func (v *NullableCreateTenant) Set(val *CreateTenant) {
	v.value = val
	v.isSet = true
}

func (v NullableCreateTenant) IsSet() bool {
	return v.isSet
}

func (v *NullableCreateTenant) Unset() {
	v.value = nil
	v.isSet = false
}

func NewNullableCreateTenant(val *CreateTenant) *NullableCreateTenant {
	return &NullableCreateTenant{value: val, isSet: true}
}

func (v NullableCreateTenant) MarshalJSON() ([]byte, error) {
	return json.Marshal(v.value)
}

func (v *NullableCreateTenant) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}
