/*
Services 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 services

import (
	"encoding/json"
)

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

// ServiceResponse struct for ServiceResponse
type ServiceResponse struct {
	Active bool `json:"active"`
	BoundNodes int64 `json:"bound_nodes"`
	Id int64 `json:"id"`
	LastEditor string `json:"last_editor"`
	Name string `json:"name"`
	Permissions []string `json:"permissions"`
	UpdatedAt string `json:"updated_at"`
	Variables []Variable `json:"variables,omitempty"`
}

// NewServiceResponse instantiates a new ServiceResponse 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 NewServiceResponse(active bool, boundNodes int64, id int64, lastEditor string, name string, permissions []string, updatedAt string) *ServiceResponse {
	this := ServiceResponse{}
	this.Active = active
	this.BoundNodes = boundNodes
	this.Id = id
	this.LastEditor = lastEditor
	this.Name = name
	this.Permissions = permissions
	this.UpdatedAt = updatedAt
	return &this
}

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

// GetActive returns the Active field value
func (o *ServiceResponse) GetActive() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.Active
}

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

// SetActive sets field value
func (o *ServiceResponse) SetActive(v bool) {
	o.Active = v
}

// GetBoundNodes returns the BoundNodes field value
func (o *ServiceResponse) GetBoundNodes() int64 {
	if o == nil {
		var ret int64
		return ret
	}

	return o.BoundNodes
}

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

// SetBoundNodes sets field value
func (o *ServiceResponse) SetBoundNodes(v int64) {
	o.BoundNodes = v
}

// GetId returns the Id field value
func (o *ServiceResponse) GetId() int64 {
	if o == nil {
		var ret int64
		return ret
	}

	return o.Id
}

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

// SetId sets field value
func (o *ServiceResponse) SetId(v int64) {
	o.Id = v
}

// GetLastEditor returns the LastEditor field value
func (o *ServiceResponse) GetLastEditor() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.LastEditor
}

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

// SetLastEditor sets field value
func (o *ServiceResponse) SetLastEditor(v string) {
	o.LastEditor = v
}

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

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

// GetPermissions returns the Permissions field value
func (o *ServiceResponse) GetPermissions() []string {
	if o == nil {
		var ret []string
		return ret
	}

	return o.Permissions
}

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

// SetPermissions sets field value
func (o *ServiceResponse) SetPermissions(v []string) {
	o.Permissions = v
}

// GetUpdatedAt returns the UpdatedAt field value
func (o *ServiceResponse) GetUpdatedAt() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.UpdatedAt
}

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

// SetUpdatedAt sets field value
func (o *ServiceResponse) SetUpdatedAt(v string) {
	o.UpdatedAt = v
}

// GetVariables returns the Variables field value if set, zero value otherwise.
func (o *ServiceResponse) GetVariables() []Variable {
	if o == nil || IsNil(o.Variables) {
		var ret []Variable
		return ret
	}
	return o.Variables
}

// GetVariablesOk returns a tuple with the Variables field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServiceResponse) GetVariablesOk() ([]Variable, bool) {
	if o == nil || IsNil(o.Variables) {
		return nil, false
	}
	return o.Variables, true
}

// HasVariables returns a boolean if a field has been set.
func (o *ServiceResponse) HasVariables() bool {
	if o != nil && !IsNil(o.Variables) {
		return true
	}

	return false
}

// SetVariables gets a reference to the given []Variable and assigns it to the Variables field.
func (o *ServiceResponse) SetVariables(v []Variable) {
	o.Variables = v
}

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

func (o ServiceResponse) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["active"] = o.Active
	toSerialize["bound_nodes"] = o.BoundNodes
	toSerialize["id"] = o.Id
	toSerialize["last_editor"] = o.LastEditor
	toSerialize["name"] = o.Name
	toSerialize["permissions"] = o.Permissions
	toSerialize["updated_at"] = o.UpdatedAt
	if !IsNil(o.Variables) {
		toSerialize["variables"] = o.Variables
	}
	return toSerialize, nil
}

type NullableServiceResponse struct {
	value *ServiceResponse
	isSet bool
}

func (v NullableServiceResponse) Get() *ServiceResponse {
	return v.value
}

func (v *NullableServiceResponse) Set(val *ServiceResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableServiceResponse(val *ServiceResponse) *NullableServiceResponse {
	return &NullableServiceResponse{value: val, isSet: true}
}

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

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


