/* 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 { IoK8sApiAuthorizationV1FieldSelectorAttributes, IoK8sApiAuthorizationV1FieldSelectorAttributesFromJSON, IoK8sApiAuthorizationV1FieldSelectorAttributesToJSON, IoK8sApiAuthorizationV1LabelSelectorAttributes, IoK8sApiAuthorizationV1LabelSelectorAttributesFromJSON, IoK8sApiAuthorizationV1LabelSelectorAttributesToJSON, } from './'; /** * ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface * @export * @interface IoK8sApiAuthorizationV1ResourceAttributes */ export interface IoK8sApiAuthorizationV1ResourceAttributes { /** * * @type {IoK8sApiAuthorizationV1FieldSelectorAttributes} * @memberof IoK8sApiAuthorizationV1ResourceAttributes */ fieldSelector?: IoK8sApiAuthorizationV1FieldSelectorAttributes; /** * Group is the API Group of the Resource. "*" means all. * @type {string} * @memberof IoK8sApiAuthorizationV1ResourceAttributes */ group?: string; /** * * @type {IoK8sApiAuthorizationV1LabelSelectorAttributes} * @memberof IoK8sApiAuthorizationV1ResourceAttributes */ labelSelector?: IoK8sApiAuthorizationV1LabelSelectorAttributes; /** * Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. * @type {string} * @memberof IoK8sApiAuthorizationV1ResourceAttributes */ name?: string; /** * Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview * @type {string} * @memberof IoK8sApiAuthorizationV1ResourceAttributes */ namespace?: string; /** * Resource is one of the existing resource types. "*" means all. * @type {string} * @memberof IoK8sApiAuthorizationV1ResourceAttributes */ resource?: string; /** * Subresource is one of the existing resource types. "" means none. * @type {string} * @memberof IoK8sApiAuthorizationV1ResourceAttributes */ subresource?: string; /** * Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. * @type {string} * @memberof IoK8sApiAuthorizationV1ResourceAttributes */ verb?: string; /** * Version is the API Version of the Resource. "*" means all. * @type {string} * @memberof IoK8sApiAuthorizationV1ResourceAttributes */ version?: string; } export function IoK8sApiAuthorizationV1ResourceAttributesFromJSON( json: any, ): IoK8sApiAuthorizationV1ResourceAttributes { return IoK8sApiAuthorizationV1ResourceAttributesFromJSONTyped(json, false); } export function IoK8sApiAuthorizationV1ResourceAttributesFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): IoK8sApiAuthorizationV1ResourceAttributes { if (json === undefined || json === null) { return json; } return { fieldSelector: !exists(json, 'fieldSelector') ? undefined : IoK8sApiAuthorizationV1FieldSelectorAttributesFromJSON(json['fieldSelector']), group: !exists(json, 'group') ? undefined : json['group'], labelSelector: !exists(json, 'labelSelector') ? undefined : IoK8sApiAuthorizationV1LabelSelectorAttributesFromJSON(json['labelSelector']), name: !exists(json, 'name') ? undefined : json['name'], namespace: !exists(json, 'namespace') ? undefined : json['namespace'], resource: !exists(json, 'resource') ? undefined : json['resource'], subresource: !exists(json, 'subresource') ? undefined : json['subresource'], verb: !exists(json, 'verb') ? undefined : json['verb'], version: !exists(json, 'version') ? undefined : json['version'], }; } export function IoK8sApiAuthorizationV1ResourceAttributesToJSON( value?: IoK8sApiAuthorizationV1ResourceAttributes | null, ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { fieldSelector: IoK8sApiAuthorizationV1FieldSelectorAttributesToJSON(value.fieldSelector), group: value.group, labelSelector: IoK8sApiAuthorizationV1LabelSelectorAttributesToJSON(value.labelSelector), name: value.name, namespace: value.namespace, resource: value.resource, subresource: value.subresource, verb: value.verb, version: value.version, }; }