/* tslint:disable */ /* eslint-disable */ /** * Pinecone Admin API * Provides an API for managing a Pinecone organization and its resources, including projects, API keys, organization users and invites, service accounts, role bindings, and cost usage exports. * * The version of the OpenAPI document: 2026-07 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists, mapValues } from '../runtime'; import type { APIKey } from './APIKey'; import { APIKeyFromJSON, APIKeyFromJSONTyped, APIKeyToJSON, } from './APIKey'; /** * The details of an API key, including the secret. Only returned on API key creation. * @export * @interface APIKeyWithSecret */ export interface APIKeyWithSecret { /** * * @type {APIKey} * @memberof APIKeyWithSecret */ key: APIKey; /** * The value to use as an API key. New keys will have the format `"pckey__"`. The entire string should be used when authenticating. * @type {string} * @memberof APIKeyWithSecret */ value: string; } /** * Check if a given object implements the APIKeyWithSecret interface. */ export function instanceOfAPIKeyWithSecret(value: object): boolean { let isInstance = true; isInstance = isInstance && "key" in value; isInstance = isInstance && "value" in value; return isInstance; } export function APIKeyWithSecretFromJSON(json: any): APIKeyWithSecret { return APIKeyWithSecretFromJSONTyped(json, false); } export function APIKeyWithSecretFromJSONTyped(json: any, ignoreDiscriminator: boolean): APIKeyWithSecret { if ((json === undefined) || (json === null)) { return json; } return { 'key': APIKeyFromJSON(json['key']), 'value': json['value'], }; } export function APIKeyWithSecretToJSON(value?: APIKeyWithSecret | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'key': APIKeyToJSON(value.key), 'value': value.value, }; }