সার্ভিসক্লাস স্পেসিফিকেশন

ServiceClassType এ নতুন ক্লাস যোগ করার সময়, নিশ্চিত করুন যে সেগুলি নিম্নলিখিত নির্দেশিকাগুলি মেনে চলে:

  • স্থানীয় মানদণ্ড : শ্রেণিগুলো লক্ষ্য বাজারে উদ্দিষ্ট পরিবহন মাধ্যমের জন্য পরিষেবা শ্রেণিগুলোর স্থানীয় মানদণ্ডের প্রতিনিধিত্ব করবে।
  • হার্ডওয়্যার-কেন্দ্রিক : এগুলোর মাধ্যমে কোনো অংশীদারের নির্দিষ্ট মূল্য কাঠামো বা ভাড়ার শর্তাবলীর (যেমন, ফেরতযোগ্যতা, নমনীয়তা) পরিবর্তে যানবাহনটির ভৌত বৈশিষ্ট্য এবং সুযোগ-সুবিধাগুলো (অর্থাৎ ‘হার্ডওয়্যার’) তুলে ধরা উচিত।
  • পুনর্ব্যবহারযোগ্যতা : একই ধরনের গাড়ির মূল্য প্রদানের ক্ষেত্রে বিভিন্ন অংশীদার একই ক্লাস ব্যবহার করতে পারবে। এর ফলে অংশীদার-নির্দিষ্ট এনামের বিস্তার রোধ হয় এবং সামঞ্জস্য নিশ্চিত হয়।

প্রোটো সংজ্ঞা

// 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"
}