solidarity-service/interoperability/solidarity-api/server/openapi/model_passenger_trip_reques...

41 lines
1.1 KiB
Go
Raw Normal View History

2023-10-20 11:41:39 +00:00
/*
* 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 PassengerTripRequest struct {
2023-12-08 06:31:41 +00:00
User User `json:"user"`
2023-10-20 11:41:39 +00:00
Preferences Preferences `json:"preferences,omitempty"`
}
// AssertPassengerTripRequestRequired checks if the required fields are not zero-ed
func AssertPassengerTripRequestRequired(obj PassengerTripRequest) error {
elements := map[string]interface{}{
2023-12-08 06:31:41 +00:00
"user": obj.User,
2023-10-20 11:41:39 +00:00
}
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 := AssertPreferencesRequired(obj.Preferences); err != nil {
return err
}
return nil
}
// AssertPassengerTripRequestConstraints checks if the values respects the defined constraints
func AssertPassengerTripRequestConstraints(obj PassengerTripRequest) error {
return nil
}