// Code generated by go-swagger; DO NOT EDIT.

package models

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)

// CentralAwsVpcPeering central aws vpc peering
//
// swagger:model centralAwsVpcPeering
type CentralAwsVpcPeering struct {

	// id
	// Required: true
	ID *string `json:"id"`

	// private host zone
	// Required: true
	PrivateHostZone *string `json:"private_host_zone"`

	// region
	// Required: true
	Region *string `json:"region"`

	// status
	// Required: true
	Status *string `json:"status"`

	// tenant vpc cidr
	// Required: true
	TenantVpcCidr *string `json:"tenant_vpc_cidr"`

	// tenant vpc id
	// Required: true
	TenantVpcID *string `json:"tenant_vpc_id"`

	// vpc cidr
	// Required: true
	VpcCidr *string `json:"vpc_cidr"`

	// vpc peering id
	// Required: true
	VpcPeeringID *string `json:"vpc_peering_id"`
}

// Validate validates this central aws vpc peering
func (m *CentralAwsVpcPeering) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateID(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validatePrivateHostZone(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateRegion(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateStatus(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateTenantVpcCidr(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateTenantVpcID(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateVpcCidr(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateVpcPeeringID(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *CentralAwsVpcPeering) validateID(formats strfmt.Registry) error {

	if err := validate.Required("id", "body", m.ID); err != nil {
		return err
	}

	return nil
}

func (m *CentralAwsVpcPeering) validatePrivateHostZone(formats strfmt.Registry) error {

	if err := validate.Required("private_host_zone", "body", m.PrivateHostZone); err != nil {
		return err
	}

	return nil
}

func (m *CentralAwsVpcPeering) validateRegion(formats strfmt.Registry) error {

	if err := validate.Required("region", "body", m.Region); err != nil {
		return err
	}

	return nil
}

func (m *CentralAwsVpcPeering) validateStatus(formats strfmt.Registry) error {

	if err := validate.Required("status", "body", m.Status); err != nil {
		return err
	}

	return nil
}

func (m *CentralAwsVpcPeering) validateTenantVpcCidr(formats strfmt.Registry) error {

	if err := validate.Required("tenant_vpc_cidr", "body", m.TenantVpcCidr); err != nil {
		return err
	}

	return nil
}

func (m *CentralAwsVpcPeering) validateTenantVpcID(formats strfmt.Registry) error {

	if err := validate.Required("tenant_vpc_id", "body", m.TenantVpcID); err != nil {
		return err
	}

	return nil
}

func (m *CentralAwsVpcPeering) validateVpcCidr(formats strfmt.Registry) error {

	if err := validate.Required("vpc_cidr", "body", m.VpcCidr); err != nil {
		return err
	}

	return nil
}

func (m *CentralAwsVpcPeering) validateVpcPeeringID(formats strfmt.Registry) error {

	if err := validate.Required("vpc_peering_id", "body", m.VpcPeeringID); err != nil {
		return err
	}

	return nil
}

// MarshalBinary interface implementation
func (m *CentralAwsVpcPeering) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *CentralAwsVpcPeering) UnmarshalBinary(b []byte) error {
	var res CentralAwsVpcPeering
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
