wallee
Version:
TypeScript/JavaScript client for wallee
31 lines (30 loc) • 1.06 kB
JavaScript
import { RestCountryFromJSON, } from './RestCountry';
/**
* Check if a given object implements the CountrySearchResponse interface.
*/
export function instanceOfCountrySearchResponse(value) {
return true;
}
export function CountrySearchResponseFromJSON(json) {
return CountrySearchResponseFromJSONTyped(json, false);
}
export function CountrySearchResponseFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'data': json['data'] == null ? undefined : (json['data'].map(RestCountryFromJSON)),
'offset': json['offset'] == null ? undefined : json['offset'],
'hasMore': json['hasMore'] == null ? undefined : json['hasMore'],
'limit': json['limit'] == null ? undefined : json['limit'],
};
}
export function CountrySearchResponseToJSON(json) {
return CountrySearchResponseToJSONTyped(json, false);
}
export function CountrySearchResponseToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {};
}