tribufu-js/src/models/IpAddress.ts
2025-12-27 10:02:16 -03:00

209 lines
5.1 KiB
TypeScript

/* tslint:disable */
/* eslint-disable */
/**
* Tribufu API
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.3.0
* Contact: contact@tribufu.com
*
* 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 IpAddress
*/
export interface IpAddress {
/**
*
* @type {string}
* @memberof IpAddress
*/
address?: string | null;
/**
*
* @type {number}
* @memberof IpAddress
*/
version?: number;
/**
*
* @type {string}
* @memberof IpAddress
*/
network?: string | null;
/**
*
* @type {boolean}
* @memberof IpAddress
*/
reserved?: boolean;
/**
*
* @type {boolean}
* @memberof IpAddress
*/
banned?: boolean;
/**
*
* @type {string}
* @memberof IpAddress
*/
asn?: string | null;
/**
*
* @type {string}
* @memberof IpAddress
*/
isp?: string | null;
/**
*
* @type {string}
* @memberof IpAddress
*/
continent?: string | null;
/**
*
* @type {string}
* @memberof IpAddress
*/
country?: string | null;
/**
*
* @type {string}
* @memberof IpAddress
*/
province?: string | null;
/**
*
* @type {string}
* @memberof IpAddress
*/
city?: string | null;
/**
*
* @type {string}
* @memberof IpAddress
*/
postalCode?: string | null;
/**
*
* @type {string}
* @memberof IpAddress
*/
callingCode?: string | null;
/**
*
* @type {string}
* @memberof IpAddress
*/
tld?: string | null;
/**
*
* @type {string}
* @memberof IpAddress
*/
language?: string | null;
/**
*
* @type {string}
* @memberof IpAddress
*/
timezone?: string | null;
/**
*
* @type {string}
* @memberof IpAddress
*/
currency?: string | null;
/**
*
* @type {number}
* @memberof IpAddress
*/
latitude?: number | null;
/**
*
* @type {number}
* @memberof IpAddress
*/
longitude?: number | null;
}
/**
* Check if a given object implements the IpAddress interface.
*/
export function instanceOfIpAddress(value: object): value is IpAddress {
return true;
}
export function IpAddressFromJSON(json: any): IpAddress {
return IpAddressFromJSONTyped(json, false);
}
export function IpAddressFromJSONTyped(json: any, ignoreDiscriminator: boolean): IpAddress {
if (json == null) {
return json;
}
return {
'address': json['address'] == null ? undefined : json['address'],
'version': json['version'] == null ? undefined : json['version'],
'network': json['network'] == null ? undefined : json['network'],
'reserved': json['reserved'] == null ? undefined : json['reserved'],
'banned': json['banned'] == null ? undefined : json['banned'],
'asn': json['asn'] == null ? undefined : json['asn'],
'isp': json['isp'] == null ? undefined : json['isp'],
'continent': json['continent'] == null ? undefined : json['continent'],
'country': json['country'] == null ? undefined : json['country'],
'province': json['province'] == null ? undefined : json['province'],
'city': json['city'] == null ? undefined : json['city'],
'postalCode': json['postal_code'] == null ? undefined : json['postal_code'],
'callingCode': json['calling_code'] == null ? undefined : json['calling_code'],
'tld': json['tld'] == null ? undefined : json['tld'],
'language': json['language'] == null ? undefined : json['language'],
'timezone': json['timezone'] == null ? undefined : json['timezone'],
'currency': json['currency'] == null ? undefined : json['currency'],
'latitude': json['latitude'] == null ? undefined : json['latitude'],
'longitude': json['longitude'] == null ? undefined : json['longitude'],
};
}
export function IpAddressToJSON(json: any): IpAddress {
return IpAddressToJSONTyped(json, false);
}
export function IpAddressToJSONTyped(value?: IpAddress | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'address': value['address'],
'version': value['version'],
'network': value['network'],
'reserved': value['reserved'],
'banned': value['banned'],
'asn': value['asn'],
'isp': value['isp'],
'continent': value['continent'],
'country': value['country'],
'province': value['province'],
'city': value['city'],
'postal_code': value['postalCode'],
'calling_code': value['callingCode'],
'tld': value['tld'],
'language': value['language'],
'timezone': value['timezone'],
'currency': value['currency'],
'latitude': value['latitude'],
'longitude': value['longitude'],
};
}