/* tslint:disable */
/* eslint-disable */
/**
* Squad API
* API for managing Squad resources
*
* The version of the OpenAPI document: 4.8.0
* Contact: help@meetsquad.ai
*
* 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.js';
/**
* App Store integration configuration in API response (sanitized)
* @export
* @interface AppStoreResponseConfig
*/
export interface AppStoreResponseConfig {
/**
* Whether the App Store integration is active
* @type {boolean}
* @memberof AppStoreResponseConfig
*/
active: boolean;
/**
* Name of the app
* @type {string}
* @memberof AppStoreResponseConfig
*/
appName: string;
/**
* Apple App Store numeric app ID
* @type {string}
* @memberof AppStoreResponseConfig
*/
appId: string;
/**
* User ID who created this integration
* @type {string}
* @memberof AppStoreResponseConfig
*/
createdBy: string;
/**
* Total number of reviews read so far
* @type {number}
* @memberof AppStoreResponseConfig
*/
totalReviewsRead: number;
/**
* ID of the last review that was read
* @type {string}
* @memberof AppStoreResponseConfig
*/
lastReadReviewsId: string | null;
/**
* URL of the app icon/image
* @type {string}
* @memberof AppStoreResponseConfig
*/
imageUrl: string;
/**
* Number of reviews in the last sync
* @type {number}
* @memberof AppStoreResponseConfig
*/
lastReviewCount: number;
/**
* Unix timestamp of the last review read
* @type {number}
* @memberof AppStoreResponseConfig
*/
lastReadReviewsDate: number | null;
/**
* Unix timestamp of the last sync run
* @type {number}
* @memberof AppStoreResponseConfig
*/
lastRunDate: number | null;
/**
* ISO 3166-1 alpha-2 country code (lowercase)
* @type {string}
* @memberof AppStoreResponseConfig
*/
country: string;
}
/**
* Check if a given object implements the AppStoreResponseConfig interface.
*/
export function instanceOfAppStoreResponseConfig(value: object): value is AppStoreResponseConfig {
if (!('active' in value) || value['active'] === undefined) return false;
if (!('appName' in value) || value['appName'] === undefined) return false;
if (!('appId' in value) || value['appId'] === undefined) return false;
if (!('createdBy' in value) || value['createdBy'] === undefined) return false;
if (!('totalReviewsRead' in value) || value['totalReviewsRead'] === undefined) return false;
if (!('lastReadReviewsId' in value) || value['lastReadReviewsId'] === undefined) return false;
if (!('imageUrl' in value) || value['imageUrl'] === undefined) return false;
if (!('lastReviewCount' in value) || value['lastReviewCount'] === undefined) return false;
if (!('lastReadReviewsDate' in value) || value['lastReadReviewsDate'] === undefined) return false;
if (!('lastRunDate' in value) || value['lastRunDate'] === undefined) return false;
if (!('country' in value) || value['country'] === undefined) return false;
return true;
}
export function AppStoreResponseConfigFromJSON(json: any): AppStoreResponseConfig {
return AppStoreResponseConfigFromJSONTyped(json, false);
}
export function AppStoreResponseConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppStoreResponseConfig {
if (json == null) {
return json;
}
return {
'active': json['active'],
'appName': json['app_name'],
'appId': json['app_id'],
'createdBy': json['created_by'],
'totalReviewsRead': json['total_reviews_read'],
'lastReadReviewsId': json['last_read_reviews_id'],
'imageUrl': json['image_url'],
'lastReviewCount': json['last_review_count'],
'lastReadReviewsDate': json['last_read_reviews_date'],
'lastRunDate': json['last_run_date'],
'country': json['country'],
};
}
export function AppStoreResponseConfigToJSON(json: any): AppStoreResponseConfig {
return AppStoreResponseConfigToJSONTyped(json, false);
}
export function AppStoreResponseConfigToJSONTyped(value?: AppStoreResponseConfig | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'active': value['active'],
'app_name': value['appName'],
'app_id': value['appId'],
'created_by': value['createdBy'],
'total_reviews_read': value['totalReviewsRead'],
'last_read_reviews_id': value['lastReadReviewsId'],
'image_url': value['imageUrl'],
'last_review_count': value['lastReviewCount'],
'last_read_reviews_date': value['lastReadReviewsDate'],
'last_run_date': value['lastRunDate'],
'country': value['country'],
};
}