Stay organized with collections
Save and categorize content based on your preferences.
Proto Definition
// Attributes characterizing the amenities and ride comfort of a journey on a// vehicle.messageServiceClass{// A high level enum describing the service class type.enumServiceClassType{// Global service classesFIRST_CLASS=1;SECOND_CLASS=2;// Only a single service class is offered by the operator. The service class// may not even have a name because there is no distinction to be made.SINGLE_CLASS=3;BUSINESS_CLASS=4;// Additional global or per-market service classes can be added. Please// reach out to the Google Transport team if additional service classes are// needed for your use case.// Japan specific train ticket classesNON_RESERVED_SECOND_CLASS=201;RESERVED_SECOND_CLASS=202;RESERVED_GREEN_CAR_CLASS=203;RESERVED_GRAN_CLASS=204;// Brazil specific service classes.CONVENCIONAL=205;EXECUTIVO=206;SEMILEITO=207;LEITO=208;CAMA=209;}ServiceClassTypetype=1;}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-22 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eServiceClass\u003c/code\u003e message defines the amenities and comfort level of a vehicle journey.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eServiceClassType\u003c/code\u003e is an enum within \u003ccode\u003eServiceClass\u003c/code\u003e that specifies the service class, including \u003ccode\u003eFIRST_CLASS\u003c/code\u003e, \u003ccode\u003eSECOND_CLASS\u003c/code\u003e, \u003ccode\u003eSINGLE_CLASS\u003c/code\u003e, and \u003ccode\u003eBUSINESS_CLASS\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eSpecific service classes, like \u003ccode\u003eNON_RESERVED_SECOND_CLASS\u003c/code\u003e, \u003ccode\u003eRESERVED_SECOND_CLASS\u003c/code\u003e, \u003ccode\u003eRESERVED_GREEN_CAR_CLASS\u003c/code\u003e, and \u003ccode\u003eRESERVED_GRAN_CLASS\u003c/code\u003e, are available for the Japan market.\u003c/p\u003e\n"],["\u003cp\u003eThe JSON sample illustrates how to represent the service class type, with "type" set to "FIRST_CLASS" in this example.\u003c/p\u003e\n"],["\u003cp\u003eWhen using protocol buffer libraries, it's recommended to include \u003ccode\u003eSERVICE_CLASS_TYPE_UNSPECIFIED = 0\u003c/code\u003e within the \u003ccode\u003eServiceClass.ServiceClassType\u003c/code\u003e enum.\u003c/p\u003e\n"]]],[],null,["# ServiceClass specification\n\n### Proto Definition\n\n```protobuf\n// Attributes characterizing the amenities and ride comfort of a journey on a\n// vehicle.\nmessage ServiceClass {\n // A high level enum describing the service class type.\n enum ServiceClassType {\n // Global service classes\n FIRST_CLASS = 1;\n SECOND_CLASS = 2;\n\n // Only a single service class is offered by the operator. The service class\n // may not even have a name because there is no distinction to be made.\n SINGLE_CLASS = 3;\n BUSINESS_CLASS = 4;\n\n // Additional global or per-market service classes can be added. Please\n // reach out to the Google Transport team if additional service classes are\n // needed for your use case.\n\n // Japan specific train ticket classes\n NON_RESERVED_SECOND_CLASS = 201;\n RESERVED_SECOND_CLASS = 202;\n RESERVED_GREEN_CAR_CLASS = 203;\n RESERVED_GRAN_CLASS = 204;\n // Brazil specific service classes.\n CONVENCIONAL = 205;\n EXECUTIVO = 206;\n SEMILEITO = 207;\n LEITO = 208;\n CAMA = 209;\n }\n\n ServiceClassType type = 1;\n}\n```\n| **Note:** when using the recommended [protocol buffer libraries](https://github.com/protocolbuffers/protobuf) add a value for `SERVICE_CLASS_TYPE_UNSPECIFIED = 0;` in the `ServiceClass.ServiceClassType` enum.\n\n### JSON Sample\n\n```json\n{\n \"type\": \"FIRST_CLASS\"\n}\n```"]]