func (o *CloudRoute) Validate() error {

	errors := elemental.Errors{}
	requiredErrors := elemental.Errors{}

	if err := ValidateOptionalCIDRorIP("destinationIPv4CIDR", o.DestinationIPv4CIDR); err != nil {
		errors = errors.Append(err)
	}

	if err := ValidateOptionalCIDRorIP("destinationIPv6CIDR", o.DestinationIPv6CIDR); err != nil {
		errors = errors.Append(err)
	}

	if err := elemental.ValidateRequiredString("nextHopType", string(o.NextHopType)); err != nil {
		requiredErrors = requiredErrors.Append(err)
	}

	if err := elemental.ValidateStringInList("nextHopType", string(o.NextHopType), []string{"EgressOnlyGateway", "Gateway", "Instance", "LocalGateway", "NATGateway", "NetworkInterface", "TransitGateway", "VPCPeeringConnection", "TransitGatewayAttachment"}, false); err != nil {
		errors = errors.Append(err)
	}

	if len(requiredErrors) > 0 {
		return requiredErrors
	}

	if len(errors) > 0 {
		return errors
	}

	return nil
}
// Validate valides the current information stored into the structure.
Validate valides the current information stored into the structure.
// Validate valides the current information stored into the structure .
func (o *CloudRoute) Validate() error {
	errors := elemental.Errors{}
	requiredErrors := elemental.Errors{}
	if err := ValidateOptionalCIDRorIP("destinationIPv4CIDR", o.DestinationIPv4CIDR); err != nil {
		errors = errors.Append(err)
	}
	if err := ValidateOptionalCIDRorIP("destinationIPv6CIDR", o.DestinationIPv6CIDR); err != nil {
		errors = errors.Append(err)
	}
	if err := elemental.ValidateRequiredString("nextHopType", string(o.NextHopType)); err != nil {
		requiredErrors = requiredErrors.Append(err)
	}
	if err := elemental.ValidateStringInList("nextHopType", string(o.NextHopType), []string{"EgressOnlyGateway", "Gateway", "Instance", "LocalGateway", "NATGateway", "NetworkInterface", "TransitGateway", "VPCPeeringConnection", "TransitGatewayAttachment"}, false); err != nil {
		errors = errors.Append(err)
	}
	if len(requiredErrors) > 0 {
		return requiredErrors
	}
	if len(errors) > 0 {
		return errors
	}
	return nil
}
func ( o * CloudRoute ) Validate ( ) error { errors := elemental . Errors { } requiredErrors := elemental . Errors { } if err := ValidateOptionalCIDRorIP ( " " , o . DestinationIPv4CIDR ) ; err != nil { errors = errors . Append ( err ) } if err := ValidateOptionalCIDRorIP ( " " , o . DestinationIPv6CIDR ) ; err != nil { errors = errors . Append ( err ) } if err := elemental . ValidateRequiredString ( " " , string ( o . NextHopType ) ) ; err != nil { requiredErrors = requiredErrors . Append ( err ) } if err := elemental . ValidateStringInList ( " " , string ( o . NextHopType ) , [ ] string { " " , " " , " " , " " , " " , " " , " " , " " , " " } , false ) ; err != nil { errors = errors . Append ( err ) } if len ( requiredErrors ) > 0 { return requiredErrors } if len ( errors ) > 0 { return errors } return nil }
Validate valides the current information stored into the structure.
Validate valides the current information stored into the structure .