/* 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 { IoK8sApiRbacV1AggregationRule, IoK8sApiRbacV1AggregationRuleFromJSON, IoK8sApiRbacV1AggregationRuleToJSON, IoK8sApiRbacV1PolicyRule, IoK8sApiRbacV1PolicyRuleFromJSON, IoK8sApiRbacV1PolicyRuleToJSON, IoK8sApimachineryPkgApisMetaV1ObjectMeta, IoK8sApimachineryPkgApisMetaV1ObjectMetaFromJSON, IoK8sApimachineryPkgApisMetaV1ObjectMetaToJSON, } from './'; /** * ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. * @export * @interface IoK8sApiRbacV1ClusterRole */ export interface IoK8sApiRbacV1ClusterRole { /** * * @type {IoK8sApiRbacV1AggregationRule} * @memberof IoK8sApiRbacV1ClusterRole */ aggregationRule?: IoK8sApiRbacV1AggregationRule; /** * 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 IoK8sApiRbacV1ClusterRole */ 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 IoK8sApiRbacV1ClusterRole */ kind?: string; /** * * @type {IoK8sApimachineryPkgApisMetaV1ObjectMeta} * @memberof IoK8sApiRbacV1ClusterRole */ metadata?: IoK8sApimachineryPkgApisMetaV1ObjectMeta; /** * Rules holds all the PolicyRules for this ClusterRole * @type {Array} * @memberof IoK8sApiRbacV1ClusterRole */ rules?: Array; } export function IoK8sApiRbacV1ClusterRoleFromJSON(json: any): IoK8sApiRbacV1ClusterRole { return IoK8sApiRbacV1ClusterRoleFromJSONTyped(json, false); } export function IoK8sApiRbacV1ClusterRoleFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): IoK8sApiRbacV1ClusterRole { if (json === undefined || json === null) { return json; } return { aggregationRule: !exists(json, 'aggregationRule') ? undefined : IoK8sApiRbacV1AggregationRuleFromJSON(json['aggregationRule']), apiVersion: !exists(json, 'apiVersion') ? undefined : json['apiVersion'], kind: !exists(json, 'kind') ? undefined : json['kind'], metadata: !exists(json, 'metadata') ? undefined : IoK8sApimachineryPkgApisMetaV1ObjectMetaFromJSON(json['metadata']), rules: !exists(json, 'rules') ? undefined : (json['rules'] as Array).map(IoK8sApiRbacV1PolicyRuleFromJSON), }; } export function IoK8sApiRbacV1ClusterRoleToJSON(value?: IoK8sApiRbacV1ClusterRole | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { aggregationRule: IoK8sApiRbacV1AggregationRuleToJSON(value.aggregationRule), apiVersion: value.apiVersion, kind: value.kind, metadata: IoK8sApimachineryPkgApisMetaV1ObjectMetaToJSON(value.metadata), rules: value.rules === undefined ? undefined : (value.rules as Array).map(IoK8sApiRbacV1PolicyRuleToJSON), }; }