Protocol DocumentationBooking.protoBooking related messages.This file is really just an example. The data model is completelyfictional.BookingRepresents the booking of a vehicle.Vehicles are some cool shit. But drive carefully!
Booking FieldsFieldTypeLabelDescriptionvehicle_idint32ID of booked vehicle.customer_idint32Customer that booked the vehicle.statusBookingStatusStatus of the booking.confirmation_sentboolHas booking confirmation been sent?payment_receivedboolHas payment been received?color_preferencestringDeprecated.Color preference of the customer.
BookingStatusRepresents the status of a vehicle booking.
BookingStatus FieldsFieldTypeLabelDescriptionidint32Unique booking status ID.descriptionstringBooking status description. E.g. "Active".
BookingStatusIDRepresents the booking status ID.
BookingStatusID FieldsFieldTypeLabelDescriptionidint32Unique booking status ID.
EmptyBookingMessageAn empty message for testingBookingServiceService for handling vehicle bookings.
BookingService MethodsMethod NameRequest TypeResponse TypeDescriptionBookVehicleBookingBookingStatusUsed to book a vehicle. Pass in a Booking and a BookingStatus will be returned.BookingUpdatesBookingStatusIDBookingStatus streamUsed to subscribe to updates of the BookingStatus.
Customer.protoThis file has messages for describing a customer.AddressRepresents a mail address.
Address FieldsFieldTypeLabelDescriptionaddress_line_1stringrequiredFirst address line.address_line_2stringoptionalSecond address line.address_line_3stringoptionalSecond address line.townstringrequiredAddress town.countystringoptionalAddress county, if applicable.countrystringrequiredAddress country.
CustomerRepresents a customer.
Customer FieldsFieldTypeLabelDescriptionidint32requiredUnique customer ID.first_namestringrequiredCustomer first name.last_namestringrequiredCustomer last name.detailsstringoptionalCustomer details.email_addressstringoptionalCustomer e-mail address.phone_numberstringrepeatedCustomer phone numbers, primary first.mail_addressesAddressrepeatedCustomer mail addresses, primary first.
Vehicle.protoMessages describing manufacturers / vehicles.ManufacturerRepresents a manufacturer of cars.
Model FieldsFieldTypeLabelDescriptionidstringrequiredThe unique model ID.model_codestringrequiredThe car model code, e.g. "PZ003".model_namestringrequiredThe car model name, e.g. "Z3".daily_hire_rate_dollarssint32requiredDollars per day.daily_hire_rate_centssint32requiredCents per day.
VehicleRepresents a vehicle that can be hired.
Vehicle FieldsFieldTypeLabelDescriptionidint32requiredUnique vehicle ID.modelModelrequiredVehicle model.reg_numberstringrequiredVehicle registration number.mileagesint32optionalCurrent vehicle mileage, if known.categoryVehicle.CategoryoptionalVehicle category.daily_hire_rate_dollarssint32optionalDollars per day.Default: 50daily_hire_rate_centssint32optionalCents per day.
Vehicle Nested ExtensionsExtensionTypeBaseNumberDescriptionseriesstringModel100Vehicle model series.
Vehicle.CategoryRepresents a vehicle category. E.g. "Sedan" or "Truck".
Vehicle.Category FieldsFieldTypeLabelDescriptioncodestringrequiredCategory code. E.g. "S".descriptionstringrequiredCategory name. E.g. "Sedan".
Manufacturer.CategoryManufacturer category. A manufacturer may be either inhouse or external.
Manufacturer.Category ValuesNameNumberDescriptionCATEGORY_INHOUSE0The manufacturer is inhouse.CATEGORY_EXTERNAL1The manufacturer is external.
File-level ExtensionsExtensionTypeBaseNumberDescriptioncountrystringManufacturer100Manufacturer country.Default: ChinaScalar Value Types.proto TypeNotesC++JavaPythonGoC#PHPRubydoubledoubledoublefloatfloat64doublefloatFloatfloatfloatfloatfloatfloat32floatfloatFloatint32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignumuint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignumfixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignumsfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignumboolboolbooleanbooleanboolboolbooleanTrueClass/FalseClassstringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)