kubernetes-models
Version:
20 lines (19 loc) • 1.06 kB
JavaScript
import { createTypeMetaGuard, Model, setSchema } from "@kubernetes-models/base";
import { addSchema } from "../../_schemas/IoK8sApiAuthorizationV1SelfSubjectAccessReview.mjs";
/**
* SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means "in all namespaces". Self is a special case, because users should always be able to check whether they can perform an action
*/
export class SelfSubjectAccessReview extends Model {
constructor(data) {
super({
apiVersion: SelfSubjectAccessReview.apiVersion,
kind: SelfSubjectAccessReview.kind,
...data
});
}
}
SelfSubjectAccessReview.apiVersion = "authorization.k8s.io/v1";
SelfSubjectAccessReview.kind = "SelfSubjectAccessReview";
SelfSubjectAccessReview.is = createTypeMetaGuard(SelfSubjectAccessReview);
setSchema(SelfSubjectAccessReview, "io.k8s.api.authorization.v1.SelfSubjectAccessReview", addSchema);
export { SelfSubjectAccessReview as IoK8sApiAuthorizationV1SelfSubjectAccessReview };