42 lines
962 B
Go
42 lines
962 B
Go
/*
|
|
* Solidarity Mobility API
|
|
*
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* API version: 1.0.0
|
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
*/
|
|
|
|
package openapi
|
|
|
|
type DriverTrip struct {
|
|
User User `json:"user"`
|
|
|
|
Car Car `json:"car,omitempty"`
|
|
}
|
|
|
|
// AssertDriverTripRequired checks if the required fields are not zero-ed
|
|
func AssertDriverTripRequired(obj DriverTrip) error {
|
|
elements := map[string]interface{}{
|
|
"user": obj.User,
|
|
}
|
|
for name, el := range elements {
|
|
if isZero := IsZeroValue(el); isZero {
|
|
return &RequiredError{Field: name}
|
|
}
|
|
}
|
|
|
|
if err := AssertUserRequired(obj.User); err != nil {
|
|
return err
|
|
}
|
|
if err := AssertCarRequired(obj.Car); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// AssertDriverTripConstraints checks if the values respects the defined constraints
|
|
func AssertDriverTripConstraints(obj DriverTrip) error {
|
|
return nil
|
|
}
|