func (o *CloudEndpointData) Validate() error {

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

	for _, sub := range o.ProductInfo {
		if sub == nil {
			continue
		}
		elemental.ResetDefaultForZeroValues(sub)
		if err := sub.Validate(); err != nil {
			errors = errors.Append(err)
		}
	}

	if err := elemental.ValidateStringInList("serviceType", string(o.ServiceType), []string{"Interface", "Gateway", "GatewayLoadBalancer", "NotApplicable"}, false); err != nil {
		errors = errors.Append(err)
	}

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

	if err := elemental.ValidateStringInList("type", string(o.Type), []string{"Instance", "LoadBalancer", "PeeringConnection", "Service", "Gateway", "TransitGateway", "NATGateway"}, 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 *CloudEndpointData) Validate() error {
	errors := elemental.Errors{}
	requiredErrors := elemental.Errors{}
	for _, sub := range o.ProductInfo {
		if sub == nil {
			continue
		}
		elemental.ResetDefaultForZeroValues(sub)
		if err := sub.Validate(); err != nil {
			errors = errors.Append(err)
		}
	}
	if err := elemental.ValidateStringInList("serviceType", string(o.ServiceType), []string{"Interface", "Gateway", "GatewayLoadBalancer", "NotApplicable"}, false); err != nil {
		errors = errors.Append(err)
	}
	if err := elemental.ValidateRequiredString("type", string(o.Type)); err != nil {
		requiredErrors = requiredErrors.Append(err)
	}
	if err := elemental.ValidateStringInList("type", string(o.Type), []string{"Instance", "LoadBalancer", "PeeringConnection", "Service", "Gateway", "TransitGateway", "NATGateway"}, false); err != nil {
		errors = errors.Append(err)
	}
	if len(requiredErrors) > 0 {
		return requiredErrors
	}
	if len(errors) > 0 {
		return errors
	}
	return nil
}
func ( o * CloudEndpointData ) Validate ( ) error { errors := elemental . Errors { } requiredErrors := elemental . Errors { } for _ , sub := range o . ProductInfo { if sub == nil { continue } elemental . ResetDefaultForZeroValues ( sub ) if err := sub . Validate ( ) ; err != nil { errors = errors . Append ( err ) } } if err := elemental . ValidateStringInList ( " " , string ( o . ServiceType ) , [ ] string { " " , " " , " " , " " } , false ) ; err != nil { errors = errors . Append ( err ) } if err := elemental . ValidateRequiredString ( " " , string ( o . Type ) ) ; err != nil { requiredErrors = requiredErrors . Append ( err ) } if err := elemental . ValidateStringInList ( " " , string ( o . Type ) , [ ] 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 .