ServiceClass 사양

ServiceClassType에 새 클래스를 추가할 때는 다음 가이드라인을 준수해야 합니다.

  • 현지 표준: 클래스는 타겟 시장에서 의도한 운송 모드의 서비스 클래스의 현지 표준을 나타내야 합니다.
  • 하드웨어 중심: 파트너의 특정 가격 책정 구조 또는 요금 조건 (예: 환불 가능 여부, 유연성)이 아닌 차량의 물리적 속성 및 편의시설('하드웨어')을 나타내야 합니다.
  • 재사용성: 여러 파트너가 동일한 유형의 차량에 대한 가격을 제공할 때 동일한 클래스를 사용할 수 있어야 합니다. 이렇게 하면 파트너별 enum이 확산되는 것을 방지하고 일관성을 보장할 수 있습니다.

Proto 정의

// Attributes characterizing the amenities and ride comfort of a journey on a
// vehicle.
message ServiceClass {
  // A high level enum describing the service class type.
  enum ServiceClassType {
    // Global service classes
    FIRST_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 classes
    NON_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;

    // Bus specific service classes (commonly used in India).
    // Air-conditioned sleeper class.
    AC_SLEEPER_CLASS = 301;
    // Air-conditioned seater class.
    AC_SEATER_CLASS = 302;
    // Air-conditioned semi-sleeper class.
    AC_SEMI_SLEEPER_CLASS = 303;
    // Air-conditioned sleeper and seater class.
    AC_SLEEPER_SEATER_CLASS = 304;
    // Non-air-conditioned sleeper class.
    NON_AC_SLEEPER_CLASS = 305;
    // Non-air-conditioned seater class.
    NON_AC_SEATER_CLASS = 306;
    // Non-air-conditioned semi-sleeper class.
    NON_AC_SEMI_SLEEPER_CLASS = 307;
    // Non-air-conditioned sleeper and seater class.
    NON_AC_SLEEPER_SEATER_CLASS = 308;
  }

  ServiceClassType type = 1 [features.field_presence = IMPLICIT];
}

JSON 샘플

{
  "type": "FIRST_CLASS"
}