/* tslint:disable */
/* eslint-disable */
/**
 * Hexiosec Transfer API
 * API description for Hexiosec Transfer  ## Testing Requests  Endpoints that require authentication will use your session cookie from the main application if an API key is not provided. This is fine for testing GET requests, however POST/DELETE requests will require a CSRF token when using a session cookie. It is not possible to provide a CSRF token from this page, and so an API key must be used.
 *
 * The version of the OpenAPI document: 0.0.1
 * Contact: support@hexiosec.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 { InviteFileCountsResponseFromJSON, InviteFileCountsResponseToJSON, } from './InviteFileCountsResponse.js';
/**
 * Check if a given object implements the InviteResponse interface.
 */
export function instanceOfInviteResponse(value) {
    if (!('id' in value) || value['id'] === undefined)
        return false;
    if (!('publicId' in value) || value['publicId'] === undefined)
        return false;
    if (!('userId' in value) || value['userId'] === undefined)
        return false;
    if (!('created' in value) || value['created'] === undefined)
        return false;
    if (!('state' in value) || value['state'] === undefined)
        return false;
    return true;
}
export function InviteResponseFromJSON(json) {
    return InviteResponseFromJSONTyped(json, false);
}
export function InviteResponseFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        id: json['id'],
        publicId: json['public_id'],
        userId: json['user_id'],
        subject: json['subject'] == null ? undefined : json['subject'],
        created: new Date(json['created']),
        exp: json['exp'] == null ? undefined : new Date(json['exp']),
        max: json['max'] == null ? undefined : json['max'],
        publicKey: json['public_key'] == null ? undefined : json['public_key'],
        state: json['state'],
        files: json['files'] == null ? undefined : InviteFileCountsResponseFromJSON(json['files']),
    };
}
export function InviteResponseToJSON(json) {
    return InviteResponseToJSONTyped(json, false);
}
export function InviteResponseToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        id: value['id'],
        public_id: value['publicId'],
        user_id: value['userId'],
        subject: value['subject'],
        created: value['created'].toISOString(),
        exp: value['exp'] == null ? undefined : value['exp'].toISOString(),
        max: value['max'],
        public_key: value['publicKey'],
        state: value['state'],
        files: InviteFileCountsResponseToJSON(value['files']),
    };
}
