/* 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 { IoK8sApimachineryPkgApisMetaV1LabelSelector, IoK8sApimachineryPkgApisMetaV1LabelSelectorFromJSON, IoK8sApimachineryPkgApisMetaV1LabelSelectorToJSON, } from './'; /** * AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole * @export * @interface IoK8sApiRbacV1AggregationRule */ export interface IoK8sApiRbacV1AggregationRule { /** * ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added * @type {Array} * @memberof IoK8sApiRbacV1AggregationRule */ clusterRoleSelectors?: Array; } export function IoK8sApiRbacV1AggregationRuleFromJSON(json: any): IoK8sApiRbacV1AggregationRule { return IoK8sApiRbacV1AggregationRuleFromJSONTyped(json, false); } export function IoK8sApiRbacV1AggregationRuleFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): IoK8sApiRbacV1AggregationRule { if (json === undefined || json === null) { return json; } return { clusterRoleSelectors: !exists(json, 'clusterRoleSelectors') ? undefined : (json['clusterRoleSelectors'] as Array).map( IoK8sApimachineryPkgApisMetaV1LabelSelectorFromJSON, ), }; } export function IoK8sApiRbacV1AggregationRuleToJSON( value?: IoK8sApiRbacV1AggregationRule | null, ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { clusterRoleSelectors: value.clusterRoleSelectors === undefined ? undefined : (value.clusterRoleSelectors as Array).map( IoK8sApimachineryPkgApisMetaV1LabelSelectorToJSON, ), }; }