@hasadna/open-bus-api-client
Version:
A client library for interacting with the Open-Bus API.
119 lines (108 loc) • 5.82 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* Open Bus Stride API
* ### Follow planned and real-time bus statistics 🚌 Welcome to The Public Knowledge Workshop\'s Stride project. We provide usable and accurate data about the Israeli public transportation system. For background on the project and some more detailed documentation and usage guides, see [STRIDE.md](https://github.com/hasadna/open-bus-pipelines/blob/main/STRIDE.md). Looking for a specific use-case? * Take a look at the **user cases** APIs below. * Try one of our existing [jupyter notebooks](https://github.com/hasadna/open-bus-stride-client/blob/main/README.md#using-the-interactive-jupyter-notebooks). * Don\'t see your use-case covered here? Please [open us a ticket](https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fhasadna%2Fopen-bus%2Fissues%2Fnew)! Queries are by default limited to 100 results per query, this limit can be increased up to 500,000 results. Please try to set appropriate query parameters to limit the results to reduce load on our DB. If you do need to get large number of results (up to 500,000) it\'s recommended to use one of these methods: 1. Use HTTP streaming and JSON streaming decoder, this method is most efficient and provide accurate results. Our [Stride Python Client iterate method](https://github.com/hasadna/open-bus-stride-client#usage) uses this method. 2. Use combination of limit / offset parameters to get results by page. This method may be less accurate because it depends on data remaining unchanged between requests. For more advanced usage- * Use **gtfs** for data about the planned lines timetables. * Use **siri** for data about lines real-time * See [Open Bus Stride Data Model](https://github.com/hasadna/open-bus-stride-db/blob/main/DATA_MODEL.md) for description of field and table names. * See [Open Bus Stride ETL Processes](https://github.com/hasadna/open-bus-pipelines/blob/main/STRIDE_ETL_PROCESSES.md) for description of the ETL processes which fetch and aggregate the data. * See [MOT Developer Information](https://www.gov.il/BlobFolder/generalpage/gtfs_general_transit_feed_specifications/he/GTFS%20-%20Developer%20Information.pdf) for description of the source fields as published by the Israel Ministry of Transportation.
*
* The version of the OpenAPI document: 6909b3db7b8bfa5ac3f3c4aeb3de80d2a2c75810
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
/**
*
* @export
* @interface ComplaintsSendPostRequestUserData
*/
export interface ComplaintsSendPostRequestUserData {
/**
* First name of the complainant
* @type {string}
* @memberof ComplaintsSendPostRequestUserData
*/
firstName: string;
/**
* Last name of the complainant
* @type {string}
* @memberof ComplaintsSendPostRequestUserData
*/
lastName: string;
/**
* ID number of the complainant
* @type {string}
* @memberof ComplaintsSendPostRequestUserData
*/
id: string;
/**
* Email address of the complainant
* @type {string}
* @memberof ComplaintsSendPostRequestUserData
*/
email: string;
/**
* Phone number of the complainant
* @type {string}
* @memberof ComplaintsSendPostRequestUserData
*/
phone: string;
/**
* Type of complaint (e.g., no_stop)
* @type {string}
* @memberof ComplaintsSendPostRequestUserData
*/
complaintType?: string;
/**
* Detailed description of the complaint
* @type {string}
* @memberof ComplaintsSendPostRequestUserData
*/
description?: string;
}
/**
* Check if a given object implements the ComplaintsSendPostRequestUserData interface.
*/
export function instanceOfComplaintsSendPostRequestUserData(value: object): value is ComplaintsSendPostRequestUserData {
if (!('firstName' in value) || value['firstName'] === undefined) return false;
if (!('lastName' in value) || value['lastName'] === undefined) return false;
if (!('id' in value) || value['id'] === undefined) return false;
if (!('email' in value) || value['email'] === undefined) return false;
if (!('phone' in value) || value['phone'] === undefined) return false;
return true;
}
export function ComplaintsSendPostRequestUserDataFromJSON(json: any): ComplaintsSendPostRequestUserData {
return ComplaintsSendPostRequestUserDataFromJSONTyped(json, false);
}
export function ComplaintsSendPostRequestUserDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ComplaintsSendPostRequestUserData {
if (json == null) {
return json;
}
return {
'firstName': json['firstName'],
'lastName': json['lastName'],
'id': json['id'],
'email': json['email'],
'phone': json['phone'],
'complaintType': json['complaintType'] == null ? undefined : json['complaintType'],
'description': json['description'] == null ? undefined : json['description'],
};
}
export function ComplaintsSendPostRequestUserDataToJSON(json: any): ComplaintsSendPostRequestUserData {
return ComplaintsSendPostRequestUserDataToJSONTyped(json, false);
}
export function ComplaintsSendPostRequestUserDataToJSONTyped(value?: ComplaintsSendPostRequestUserData | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'firstName': value['firstName'],
'lastName': value['lastName'],
'id': value['id'],
'email': value['email'],
'phone': value['phone'],
'complaintType': value['complaintType'],
'description': value['description'],
};
}