/* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 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 SchemaCollectionSwitchResp type satisfies the MappedNullable interface at compile time var _ MappedNullable = &SchemaCollectionSwitchResp{} // SchemaCollectionSwitchResp struct for SchemaCollectionSwitchResp type SchemaCollectionSwitchResp struct { ObjectCollectionCount *string `json:"object_collection_count,omitempty"` ObjectId *string `json:"object_id,omitempty"` Switch *bool `json:"switch,omitempty"` } // NewSchemaCollectionSwitchResp instantiates a new SchemaCollectionSwitchResp 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 NewSchemaCollectionSwitchResp() *SchemaCollectionSwitchResp { this := SchemaCollectionSwitchResp{} return &this } // NewSchemaCollectionSwitchRespWithDefaults instantiates a new SchemaCollectionSwitchResp 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 NewSchemaCollectionSwitchRespWithDefaults() *SchemaCollectionSwitchResp { this := SchemaCollectionSwitchResp{} return &this } // GetObjectCollectionCount returns the ObjectCollectionCount field value if set, zero value otherwise. func (o *SchemaCollectionSwitchResp) GetObjectCollectionCount() string { if o == nil || IsNil(o.ObjectCollectionCount) { var ret string return ret } return *o.ObjectCollectionCount } // GetObjectCollectionCountOk returns a tuple with the ObjectCollectionCount field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SchemaCollectionSwitchResp) GetObjectCollectionCountOk() (*string, bool) { if o == nil || IsNil(o.ObjectCollectionCount) { return nil, false } return o.ObjectCollectionCount, true } // HasObjectCollectionCount returns a boolean if a field has been set. func (o *SchemaCollectionSwitchResp) HasObjectCollectionCount() bool { if o != nil && !IsNil(o.ObjectCollectionCount) { return true } return false } // SetObjectCollectionCount gets a reference to the given string and assigns it to the ObjectCollectionCount field. func (o *SchemaCollectionSwitchResp) SetObjectCollectionCount(v string) { o.ObjectCollectionCount = &v } // GetObjectId returns the ObjectId field value if set, zero value otherwise. func (o *SchemaCollectionSwitchResp) GetObjectId() string { if o == nil || IsNil(o.ObjectId) { var ret string return ret } return *o.ObjectId } // GetObjectIdOk returns a tuple with the ObjectId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SchemaCollectionSwitchResp) GetObjectIdOk() (*string, bool) { if o == nil || IsNil(o.ObjectId) { return nil, false } return o.ObjectId, true } // HasObjectId returns a boolean if a field has been set. func (o *SchemaCollectionSwitchResp) HasObjectId() bool { if o != nil && !IsNil(o.ObjectId) { return true } return false } // SetObjectId gets a reference to the given string and assigns it to the ObjectId field. func (o *SchemaCollectionSwitchResp) SetObjectId(v string) { o.ObjectId = &v } // GetSwitch returns the Switch field value if set, zero value otherwise. func (o *SchemaCollectionSwitchResp) GetSwitch() bool { if o == nil || IsNil(o.Switch) { var ret bool return ret } return *o.Switch } // GetSwitchOk returns a tuple with the Switch field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SchemaCollectionSwitchResp) GetSwitchOk() (*bool, bool) { if o == nil || IsNil(o.Switch) { return nil, false } return o.Switch, true } // HasSwitch returns a boolean if a field has been set. func (o *SchemaCollectionSwitchResp) HasSwitch() bool { if o != nil && !IsNil(o.Switch) { return true } return false } // SetSwitch gets a reference to the given bool and assigns it to the Switch field. func (o *SchemaCollectionSwitchResp) SetSwitch(v bool) { o.Switch = &v } func (o SchemaCollectionSwitchResp) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } return json.Marshal(toSerialize) } func (o SchemaCollectionSwitchResp) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.ObjectCollectionCount) { toSerialize["object_collection_count"] = o.ObjectCollectionCount } if !IsNil(o.ObjectId) { toSerialize["object_id"] = o.ObjectId } if !IsNil(o.Switch) { toSerialize["switch"] = o.Switch } return toSerialize, nil } type NullableSchemaCollectionSwitchResp struct { value *SchemaCollectionSwitchResp isSet bool } func (v NullableSchemaCollectionSwitchResp) Get() *SchemaCollectionSwitchResp { return v.value } func (v *NullableSchemaCollectionSwitchResp) Set(val *SchemaCollectionSwitchResp) { v.value = val v.isSet = true } func (v NullableSchemaCollectionSwitchResp) IsSet() bool { return v.isSet } func (v *NullableSchemaCollectionSwitchResp) Unset() { v.value = nil v.isSet = false } func NewNullableSchemaCollectionSwitchResp(val *SchemaCollectionSwitchResp) *NullableSchemaCollectionSwitchResp { return &NullableSchemaCollectionSwitchResp{value: val, isSet: true} } func (v NullableSchemaCollectionSwitchResp) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableSchemaCollectionSwitchResp) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }