/* 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 { IoK8sApiRbacV1RoleRef, IoK8sApiRbacV1RoleRefFromJSON, IoK8sApiRbacV1RoleRefToJSON, IoK8sApiRbacV1Subject, IoK8sApiRbacV1SubjectFromJSON, IoK8sApiRbacV1SubjectToJSON, IoK8sApimachineryPkgApisMetaV1ObjectMeta, IoK8sApimachineryPkgApisMetaV1ObjectMetaFromJSON, IoK8sApimachineryPkgApisMetaV1ObjectMetaToJSON, } from './'; /** * ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. * @export * @interface IoK8sApiRbacV1ClusterRoleBinding */ export interface IoK8sApiRbacV1ClusterRoleBinding { /** * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources * @type {string} * @memberof IoK8sApiRbacV1ClusterRoleBinding */ apiVersion?: string; /** * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds * @type {string} * @memberof IoK8sApiRbacV1ClusterRoleBinding */ kind?: string; /** * * @type {IoK8sApimachineryPkgApisMetaV1ObjectMeta} * @memberof IoK8sApiRbacV1ClusterRoleBinding */ metadata?: IoK8sApimachineryPkgApisMetaV1ObjectMeta; /** * * @type {IoK8sApiRbacV1RoleRef} * @memberof IoK8sApiRbacV1ClusterRoleBinding */ roleRef: IoK8sApiRbacV1RoleRef; /** * Subjects holds references to the objects the role applies to. * @type {Array} * @memberof IoK8sApiRbacV1ClusterRoleBinding */ subjects?: Array; } export function IoK8sApiRbacV1ClusterRoleBindingFromJSON( json: any, ): IoK8sApiRbacV1ClusterRoleBinding { return IoK8sApiRbacV1ClusterRoleBindingFromJSONTyped(json, false); } export function IoK8sApiRbacV1ClusterRoleBindingFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): IoK8sApiRbacV1ClusterRoleBinding { if (json === undefined || json === null) { return json; } return { apiVersion: !exists(json, 'apiVersion') ? undefined : json['apiVersion'], kind: !exists(json, 'kind') ? undefined : json['kind'], metadata: !exists(json, 'metadata') ? undefined : IoK8sApimachineryPkgApisMetaV1ObjectMetaFromJSON(json['metadata']), roleRef: IoK8sApiRbacV1RoleRefFromJSON(json['roleRef']), subjects: !exists(json, 'subjects') ? undefined : (json['subjects'] as Array).map(IoK8sApiRbacV1SubjectFromJSON), }; } export function IoK8sApiRbacV1ClusterRoleBindingToJSON( value?: IoK8sApiRbacV1ClusterRoleBinding | null, ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { apiVersion: value.apiVersion, kind: value.kind, metadata: IoK8sApimachineryPkgApisMetaV1ObjectMetaToJSON(value.metadata), roleRef: IoK8sApiRbacV1RoleRefToJSON(value.roleRef), subjects: value.subjects === undefined ? undefined : (value.subjects as Array).map(IoK8sApiRbacV1SubjectToJSON), }; }