/* tslint:disable */ /* eslint-disable */ /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: unversioned * * * 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 } from '../runtime'; import { IoK8sApiCoreV1KeyToPath, IoK8sApiCoreV1KeyToPathFromJSON, IoK8sApiCoreV1KeyToPathToJSON, } from './'; /** * Adapts a secret into a projected volume. * * The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode. * @export * @interface IoK8sApiCoreV1SecretProjection */ export interface IoK8sApiCoreV1SecretProjection { /** * items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. * @type {Array} * @memberof IoK8sApiCoreV1SecretProjection */ items?: Array; /** * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names * @type {string} * @memberof IoK8sApiCoreV1SecretProjection */ name?: string; /** * optional field specify whether the Secret or its key must be defined * @type {boolean} * @memberof IoK8sApiCoreV1SecretProjection */ optional?: boolean; } export function IoK8sApiCoreV1SecretProjectionFromJSON(json: any): IoK8sApiCoreV1SecretProjection { return IoK8sApiCoreV1SecretProjectionFromJSONTyped(json, false); } export function IoK8sApiCoreV1SecretProjectionFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): IoK8sApiCoreV1SecretProjection { if (json === undefined || json === null) { return json; } return { items: !exists(json, 'items') ? undefined : (json['items'] as Array).map(IoK8sApiCoreV1KeyToPathFromJSON), name: !exists(json, 'name') ? undefined : json['name'], optional: !exists(json, 'optional') ? undefined : json['optional'], }; } export function IoK8sApiCoreV1SecretProjectionToJSON( value?: IoK8sApiCoreV1SecretProjection | null, ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { items: value.items === undefined ? undefined : (value.items as Array).map(IoK8sApiCoreV1KeyToPathToJSON), name: value.name, optional: value.optional, }; }