/*
 * IONOS Cloud - Network File Storage API
 *
 * The RESTful API for managing Network File Storage.
 *
 * API version: 0.1.1
 * Contact: support@cloud.ionos.com
 */

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

package ionoscloud

import (
	"encoding/json"
)

// ShareClientGroupsNfs NFS specific configurations.
type ShareClientGroupsNfs struct {
	// The squash mode for the export. The squash mode can be: * `none` - No squash mode. no mapping * `root-anonymous` - Map root user to anonymous uid. * `all-anonymous` - Map all users to anonymous uid.
	Squash *string `json:"squash,omitempty"`
}

// NewShareClientGroupsNfs instantiates a new ShareClientGroupsNfs 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 NewShareClientGroupsNfs() *ShareClientGroupsNfs {
	this := ShareClientGroupsNfs{}

	var squash string = "none"
	this.Squash = &squash

	return &this
}

// NewShareClientGroupsNfsWithDefaults instantiates a new ShareClientGroupsNfs 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 NewShareClientGroupsNfsWithDefaults() *ShareClientGroupsNfs {
	this := ShareClientGroupsNfs{}
	var squash string = "none"
	this.Squash = &squash
	return &this
}

// GetSquash returns the Squash field value
// If the value is explicit nil, the zero value for string will be returned
func (o *ShareClientGroupsNfs) GetSquash() *string {
	if o == nil {
		return nil
	}

	return o.Squash

}

// GetSquashOk returns a tuple with the Squash field value
// 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 *ShareClientGroupsNfs) GetSquashOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.Squash, true
}

// SetSquash sets field value
func (o *ShareClientGroupsNfs) SetSquash(v string) {

	o.Squash = &v

}

// HasSquash returns a boolean if a field has been set.
func (o *ShareClientGroupsNfs) HasSquash() bool {
	if o != nil && o.Squash != nil {
		return true
	}

	return false
}

func (o ShareClientGroupsNfs) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Squash != nil {
		toSerialize["squash"] = o.Squash
	}

	return json.Marshal(toSerialize)
}

type NullableShareClientGroupsNfs struct {
	value *ShareClientGroupsNfs
	isSet bool
}

func (v NullableShareClientGroupsNfs) Get() *ShareClientGroupsNfs {
	return v.value
}

func (v *NullableShareClientGroupsNfs) Set(val *ShareClientGroupsNfs) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableShareClientGroupsNfs(val *ShareClientGroupsNfs) *NullableShareClientGroupsNfs {
	return &NullableShareClientGroupsNfs{value: val, isSet: true}
}

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

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