/*
 * VM Auto Scaling API
 *
 * The VM Auto Scaling Service enables IONOS clients to horizontally scale the number of VM replicas based on configured rules. You can use VM Auto Scaling to ensure that you have a sufficient number of replicas to handle your application loads at all times.  For this purpose, create a VM Auto Scaling Group that contains the server replicas. The VM Auto Scaling Service ensures that the number of replicas in the group is always within the defined limits.   When scaling policies are set, VM Auto Scaling creates or deletes replicas according to the requirements of your applications. For each policy, specified 'scale-in' and 'scale-out' actions are performed when the corresponding thresholds are reached.
 *
 * API version: 1-SDK.1
 * Contact: support@cloud.ionos.com
 */

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

package ionoscloud

import (
	"encoding/json"
)

// ErrorGroupValidate struct for ErrorGroupValidate
type ErrorGroupValidate struct {
	HttpStatus *int32                       `json:"httpStatus,omitempty"`
	Messages   *[]ErrorGroupValidateMessage `json:"messages,omitempty"`
}

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

	return &this
}

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

// GetHttpStatus returns the HttpStatus field value
// If the value is explicit nil, the zero value for int32 will be returned
func (o *ErrorGroupValidate) GetHttpStatus() *int32 {
	if o == nil {
		return nil
	}

	return o.HttpStatus

}

// GetHttpStatusOk returns a tuple with the HttpStatus 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 *ErrorGroupValidate) GetHttpStatusOk() (*int32, bool) {
	if o == nil {
		return nil, false
	}

	return o.HttpStatus, true
}

// SetHttpStatus sets field value
func (o *ErrorGroupValidate) SetHttpStatus(v int32) {

	o.HttpStatus = &v

}

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

	return false
}

// GetMessages returns the Messages field value
// If the value is explicit nil, the zero value for []ErrorGroupValidateMessage will be returned
func (o *ErrorGroupValidate) GetMessages() *[]ErrorGroupValidateMessage {
	if o == nil {
		return nil
	}

	return o.Messages

}

// GetMessagesOk returns a tuple with the Messages 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 *ErrorGroupValidate) GetMessagesOk() (*[]ErrorGroupValidateMessage, bool) {
	if o == nil {
		return nil, false
	}

	return o.Messages, true
}

// SetMessages sets field value
func (o *ErrorGroupValidate) SetMessages(v []ErrorGroupValidateMessage) {

	o.Messages = &v

}

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

	return false
}

func (o ErrorGroupValidate) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.HttpStatus != nil {
		toSerialize["httpStatus"] = o.HttpStatus
	}

	if o.Messages != nil {
		toSerialize["messages"] = o.Messages
	}

	return json.Marshal(toSerialize)
}

type NullableErrorGroupValidate struct {
	value *ErrorGroupValidate
	isSet bool
}

func (v NullableErrorGroupValidate) Get() *ErrorGroupValidate {
	return v.value
}

func (v *NullableErrorGroupValidate) Set(val *ErrorGroupValidate) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableErrorGroupValidate(val *ErrorGroupValidate) *NullableErrorGroupValidate {
	return &NullableErrorGroupValidate{value: val, isSet: true}
}

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

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