/* tslint:disable */ /* eslint-disable */ /** * Fabric API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.0 * * * 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 ResourcePublishingWithStats */ export interface ResourcePublishingWithStats { /** * * @type {string} * @memberof ResourcePublishingWithStats */ 'id': string; /** * * @type {string} * @memberof ResourcePublishingWithStats */ 'resourceId': string; /** * * @type {boolean} * @memberof ResourcePublishingWithStats */ 'allowIndex'?: boolean; /** * * @type {boolean} * @memberof ResourcePublishingWithStats */ 'allowCopy'?: boolean; /** * * @type {boolean} * @memberof ResourcePublishingWithStats */ 'allowDownload'?: boolean; /** * * @type {string} * @memberof ResourcePublishingWithStats */ 'slug'?: string | null; /** * * @type {string} * @memberof ResourcePublishingWithStats */ 'title'?: string | null; /** * * @type {string} * @memberof ResourcePublishingWithStats */ 'description'?: string | null; /** * * @type {string} * @memberof ResourcePublishingWithStats */ 'expiresAt'?: string | null; /** * * @type {string} * @memberof ResourcePublishingWithStats */ 'createdAt': string; /** * * @type {string} * @memberof ResourcePublishingWithStats */ 'modifiedAt': string; /** * * @type {string} * @memberof ResourcePublishingWithStats */ 'accessToken': string; /** * * @type {boolean} * @memberof ResourcePublishingWithStats */ 'isEnabled'?: boolean; /** * * @type {boolean} * @memberof ResourcePublishingWithStats */ 'allowAnalytics'?: boolean; /** * * @type {number} * @memberof ResourcePublishingWithStats */ 'visitCount': number; /** * * @type {string} * @memberof ResourcePublishingWithStats */ 'lastVisitAt': string | null; } /** * Check if a given object implements the ResourcePublishingWithStats interface. */ export function instanceOfResourcePublishingWithStats(value: object): value is ResourcePublishingWithStats { if (!('id' in value) || value['id'] === undefined) return false; if (!('resourceId' in value) || value['resourceId'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('modifiedAt' in value) || value['modifiedAt'] === undefined) return false; if (!('accessToken' in value) || value['accessToken'] === undefined) return false; if (!('visitCount' in value) || value['visitCount'] === undefined) return false; if (!('lastVisitAt' in value) || value['lastVisitAt'] === undefined) return false; return true; } export function ResourcePublishingWithStatsFromJSON(json: any): ResourcePublishingWithStats { return ResourcePublishingWithStatsFromJSONTyped(json, false); } export function ResourcePublishingWithStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourcePublishingWithStats { if (json == null) { return json; } const result = { } as ResourcePublishingWithStats; if (json['id'] !== undefined) { result['id'] = json['id']; } if (json['resourceId'] !== undefined) { result['resourceId'] = json['resourceId']; } if (json['allowIndex'] !== undefined) { result['allowIndex'] = json['allowIndex']; } if (json['allowCopy'] !== undefined) { result['allowCopy'] = json['allowCopy']; } if (json['allowDownload'] !== undefined) { result['allowDownload'] = json['allowDownload']; } if (json['slug'] !== undefined) { if (json['slug'] === null) { result['slug'] = null; } else { result['slug'] = json['slug']; } } if (json['title'] !== undefined) { if (json['title'] === null) { result['title'] = null; } else { result['title'] = json['title']; } } if (json['description'] !== undefined) { if (json['description'] === null) { result['description'] = null; } else { result['description'] = json['description']; } } if (json['expiresAt'] !== undefined) { if (json['expiresAt'] === null) { result['expiresAt'] = null; } else { result['expiresAt'] = json['expiresAt']; } } if (json['createdAt'] !== undefined) { result['createdAt'] = json['createdAt']; } if (json['modifiedAt'] !== undefined) { result['modifiedAt'] = json['modifiedAt']; } if (json['accessToken'] !== undefined) { result['accessToken'] = json['accessToken']; } if (json['isEnabled'] !== undefined) { result['isEnabled'] = json['isEnabled']; } if (json['allowAnalytics'] !== undefined) { result['allowAnalytics'] = json['allowAnalytics']; } if (json['visitCount'] !== undefined) { result['visitCount'] = json['visitCount']; } if (json['lastVisitAt'] !== undefined) { if (json['lastVisitAt'] === null) { result['lastVisitAt'] = null; } else { result['lastVisitAt'] = json['lastVisitAt']; } } return result; } export function ResourcePublishingWithStatsToJSON(json: any): ResourcePublishingWithStats { return ResourcePublishingWithStatsToJSONTyped(json, false); } export function ResourcePublishingWithStatsToJSONTyped(value?: ResourcePublishingWithStats | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'resourceId': value['resourceId'], 'allowIndex': value['allowIndex'], 'allowCopy': value['allowCopy'], 'allowDownload': value['allowDownload'], 'slug': value['slug'], 'title': value['title'], 'description': value['description'], 'expiresAt': value['expiresAt'], 'createdAt': value['createdAt'], 'modifiedAt': value['modifiedAt'], 'accessToken': value['accessToken'], 'isEnabled': value['isEnabled'], 'allowAnalytics': value['allowAnalytics'], 'visitCount': value['visitCount'], 'lastVisitAt': value['lastVisitAt'], }; }