/*
Edge Node API

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 edgenode

import (
	"encoding/json"
)

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

// ServiceResponseWithTotal struct for ServiceResponseWithTotal
type ServiceResponseWithTotal struct {
	Services []ServiceResponse `json:"services"`
	Total int64 `json:"total"`
}

// NewServiceResponseWithTotal instantiates a new ServiceResponseWithTotal 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 NewServiceResponseWithTotal(services []ServiceResponse, total int64) *ServiceResponseWithTotal {
	this := ServiceResponseWithTotal{}
	this.Services = services
	this.Total = total
	return &this
}

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

// GetServices returns the Services field value
func (o *ServiceResponseWithTotal) GetServices() []ServiceResponse {
	if o == nil {
		var ret []ServiceResponse
		return ret
	}

	return o.Services
}

// GetServicesOk returns a tuple with the Services field value
// and a boolean to check if the value has been set.
func (o *ServiceResponseWithTotal) GetServicesOk() ([]ServiceResponse, bool) {
	if o == nil {
		return nil, false
	}
	return o.Services, true
}

// SetServices sets field value
func (o *ServiceResponseWithTotal) SetServices(v []ServiceResponse) {
	o.Services = v
}

// GetTotal returns the Total field value
func (o *ServiceResponseWithTotal) GetTotal() int64 {
	if o == nil {
		var ret int64
		return ret
	}

	return o.Total
}

// GetTotalOk returns a tuple with the Total field value
// and a boolean to check if the value has been set.
func (o *ServiceResponseWithTotal) GetTotalOk() (*int64, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Total, true
}

// SetTotal sets field value
func (o *ServiceResponseWithTotal) SetTotal(v int64) {
	o.Total = v
}

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

func (o ServiceResponseWithTotal) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["services"] = o.Services
	toSerialize["total"] = o.Total
	return toSerialize, nil
}

type NullableServiceResponseWithTotal struct {
	value *ServiceResponseWithTotal
	isSet bool
}

func (v NullableServiceResponseWithTotal) Get() *ServiceResponseWithTotal {
	return v.value
}

func (v *NullableServiceResponseWithTotal) Set(val *ServiceResponseWithTotal) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableServiceResponseWithTotal(val *ServiceResponseWithTotal) *NullableServiceResponseWithTotal {
	return &NullableServiceResponseWithTotal{value: val, isSet: true}
}

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

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


