"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * Montelo
 * Documentation for the Montelo API.
 *
 * The version of the OpenAPI document: 1.0
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApiKeyWithEnvDtoToJSON = exports.ApiKeyWithEnvDtoFromJSONTyped = exports.ApiKeyWithEnvDtoFromJSON = exports.instanceOfApiKeyWithEnvDto = void 0;
const EnvironmentDto_1 = require("./EnvironmentDto");
/**
 * Check if a given object implements the ApiKeyWithEnvDto interface.
 */
function instanceOfApiKeyWithEnvDto(value) {
    let isInstance = true;
    isInstance = isInstance && "id" in value;
    isInstance = isInstance && "envId" in value;
    isInstance = isInstance && "key" in value;
    isInstance = isInstance && "viewed" in value;
    isInstance = isInstance && "updatedAt" in value;
    isInstance = isInstance && "environment" in value;
    return isInstance;
}
exports.instanceOfApiKeyWithEnvDto = instanceOfApiKeyWithEnvDto;
function ApiKeyWithEnvDtoFromJSON(json) {
    return ApiKeyWithEnvDtoFromJSONTyped(json, false);
}
exports.ApiKeyWithEnvDtoFromJSON = ApiKeyWithEnvDtoFromJSON;
function ApiKeyWithEnvDtoFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'id': json['id'],
        'envId': json['envId'],
        'key': json['key'],
        'viewed': json['viewed'],
        'updatedAt': json['updatedAt'],
        'environment': (0, EnvironmentDto_1.EnvironmentDtoFromJSON)(json['environment']),
    };
}
exports.ApiKeyWithEnvDtoFromJSONTyped = ApiKeyWithEnvDtoFromJSONTyped;
function ApiKeyWithEnvDtoToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'id': value.id,
        'envId': value.envId,
        'key': value.key,
        'viewed': value.viewed,
        'updatedAt': value.updatedAt,
        'environment': (0, EnvironmentDto_1.EnvironmentDtoToJSON)(value.environment),
    };
}
exports.ApiKeyWithEnvDtoToJSON = ApiKeyWithEnvDtoToJSON;
