/**
* The Category model module.
* @module Ntnx/Category
* @version 4.4.2
* @class Category
* @extends ExternalizableAbstractModel
*
* @param { string } key The key of a category when it is represented in `key:value` format. Constraints applicable when field is given in the payload during create and update: * A string of maxlength of 64 * First character must NOT be any of: `$` `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Remaining characters (0–63) must NOT include: `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Note: `$` is allowed after the first character It is a mandatory field in the payload of `createCategory` and `updateCategoryById` APIs.
This field can't be updated through `updateCategoryById` API.
*
* @param { string } value The value of a category when it is represented in `key:value` format. Constraints applicable when the field is given in the payload during create and update: * A string of max length 64 * First character must NOT be any of: `$` `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Remaining characters (0–63) must NOT include: `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Note: `$` is allowed after the first character It is a mandatory input field in the payload of `createCategory` and `updateCategoryById` APIs.
This field can be updated through `updateCategoryById` API.
Updating the value will not change the extId of the category.
*/
export default class Category extends ExternalizableAbstractModel {
/**
* Constructs a new Category.
* @alias module:Ntnx/Category
* @extends module:Ntnx/ExternalizableAbstractModel
*
* @param { string } key The key of a category when it is represented in `key:value` format. Constraints applicable when field is given in the payload during create and update: * A string of maxlength of 64 * First character must NOT be any of: `$` `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Remaining characters (0–63) must NOT include: `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Note: `$` is allowed after the first character It is a mandatory field in the payload of `createCategory` and `updateCategoryById` APIs.
This field can't be updated through `updateCategoryById` API.
*
* @param { string } value The value of a category when it is represented in `key:value` format. Constraints applicable when the field is given in the payload during create and update: * A string of max length 64 * First character must NOT be any of: `$` `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Remaining characters (0–63) must NOT include: `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Note: `$` is allowed after the first character It is a mandatory input field in the payload of `createCategory` and `updateCategoryById` APIs.
This field can be updated through `updateCategoryById` API.
Updating the value will not change the extId of the category.
*/
constructor(key: string, value: string);
key: string;
value: string;
/**
* Returns The key of a category when it is represented in `key:value` format. Constraints applicable when field is given in the payload during create and update: * A string of maxlength of 64 * First character must NOT be any of: `$` `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Remaining characters (0–63) must NOT include: `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Note: `$` is allowed after the first character It is a mandatory field in the payload of `createCategory` and `updateCategoryById` APIs.
This field can't be updated through `updateCategoryById` API.
* @return {string}
*/
getKey(): string;
/**
* Sets The key of a category when it is represented in `key:value` format. Constraints applicable when field is given in the payload during create and update: * A string of maxlength of 64 * First character must NOT be any of: `$` `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Remaining characters (0–63) must NOT include: `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Note: `$` is allowed after the first character It is a mandatory field in the payload of `createCategory` and `updateCategoryById` APIs.
This field can't be updated through `updateCategoryById` API.
* @param {string} key The key of a category when it is represented in `key:value` format. Constraints applicable when field is given in the payload during create and update: * A string of maxlength of 64 * First character must NOT be any of: `$` `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Remaining characters (0–63) must NOT include: `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Note: `$` is allowed after the first character It is a mandatory field in the payload of `createCategory` and `updateCategoryById` APIs.
This field can't be updated through `updateCategoryById` API.
*/
setKey(key: string): void;
/**
* Returns The value of a category when it is represented in `key:value` format. Constraints applicable when the field is given in the payload during create and update: * A string of max length 64 * First character must NOT be any of: `$` `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Remaining characters (0–63) must NOT include: `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Note: `$` is allowed after the first character It is a mandatory input field in the payload of `createCategory` and `updateCategoryById` APIs.
This field can be updated through `updateCategoryById` API.
Updating the value will not change the extId of the category.
* @return {string}
*/
getValue(): string;
/**
* Sets The value of a category when it is represented in `key:value` format. Constraints applicable when the field is given in the payload during create and update: * A string of max length 64 * First character must NOT be any of: `$` `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Remaining characters (0–63) must NOT include: `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Note: `$` is allowed after the first character It is a mandatory input field in the payload of `createCategory` and `updateCategoryById` APIs.
This field can be updated through `updateCategoryById` API.
Updating the value will not change the extId of the category.
* @param {string} value The value of a category when it is represented in `key:value` format. Constraints applicable when the field is given in the payload during create and update: * A string of max length 64 * First character must NOT be any of: `$` `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Remaining characters (0–63) must NOT include: `/` `,` `!` `\"` `#` `%` `'` `(` `)` `*` `+` `:` `;` `=` `?` `\\` `|` `[` `]` `^` `&` * Note: `$` is allowed after the first character It is a mandatory input field in the payload of `createCategory` and `updateCategoryById` APIs.
This field can be updated through `updateCategoryById` API.
Updating the value will not change the extId of the category.
*/
setValue(value: string): void;
/**
* @return {CategoryType}
*/
getType(): CategoryType;
/**
* @param {CategoryType} type
*/
setType(type: CategoryType): void;
type: string;
/**
* Returns A string consisting of the description of the category as defined by the user.
Description can be optionally provided in the payload of `createCategory` and `updateCategoryById` APIs.
Description field can be updated through `updateCategoryById` API.
The server does not validate this value nor does it enforce the uniqueness or any other constraints.
It is the responsibility of the user to ensure that any semantic or syntactic constraints are retained when mutating this field.
* @return {string}
*/
getDescription(): string;
/**
* Sets A string consisting of the description of the category as defined by the user.
Description can be optionally provided in the payload of `createCategory` and `updateCategoryById` APIs.
Description field can be updated through `updateCategoryById` API.
The server does not validate this value nor does it enforce the uniqueness or any other constraints.
It is the responsibility of the user to ensure that any semantic or syntactic constraints are retained when mutating this field.
* @param {string} description A string consisting of the description of the category as defined by the user.
Description can be optionally provided in the payload of `createCategory` and `updateCategoryById` APIs.
Description field can be updated through `updateCategoryById` API.
The server does not validate this value nor does it enforce the uniqueness or any other constraints.
It is the responsibility of the user to ensure that any semantic or syntactic constraints are retained when mutating this field.
*/
setDescription(description: string): void;
description: string;
/**
* Returns This field contains the UUID of a user who owns the category.
This field will be ignored if given in the payload of `createCategory` API. Hence, when a category is created, the logged-in user automatically becomes the owner of the category.
This field can be updated through `updateCategoryById` API, in which case, should be provided, UUID of a valid user is present in the system.
Validity of the user UUID can be checked by invoking the API: authn/users/{extId} in the 'Identity and Access Management' or 'IAM' namespace.
It is used for enabling RBAC access to self-owned categories.
* @return {string}
*/
getOwnerUuid(): string;
/**
* Sets This field contains the UUID of a user who owns the category.
This field will be ignored if given in the payload of `createCategory` API. Hence, when a category is created, the logged-in user automatically becomes the owner of the category.
This field can be updated through `updateCategoryById` API, in which case, should be provided, UUID of a valid user is present in the system.
Validity of the user UUID can be checked by invoking the API: authn/users/{extId} in the 'Identity and Access Management' or 'IAM' namespace.
It is used for enabling RBAC access to self-owned categories.
* @param {string} ownerUuid This field contains the UUID of a user who owns the category.
This field will be ignored if given in the payload of `createCategory` API. Hence, when a category is created, the logged-in user automatically becomes the owner of the category.
This field can be updated through `updateCategoryById` API, in which case, should be provided, UUID of a valid user is present in the system.
Validity of the user UUID can be checked by invoking the API: authn/users/{extId} in the 'Identity and Access Management' or 'IAM' namespace.
It is used for enabling RBAC access to self-owned categories.
*/
setOwnerUuid(ownerUuid: string): void;
ownerUuid: string;
/**
* Returns This field gives basic information about resources that are associated with the category.
The results present under this field summarize the counts of various kinds of resources associated with the category.
For more detailed information about the UUIDs of the resources, please look into the field `detailedAssociations`.
This field will be ignored, if given in the payload of `updateCategoryById` or `createCategory` APIs.
This field will not be present by default in `listCategories` API, unless the parameter $expand=associations is present in the URL.
* @return {AssociationSummary[]}
*/
getAssociations(): AssociationSummary[];
/**
* Sets This field gives basic information about resources that are associated with the category.
The results present under this field summarize the counts of various kinds of resources associated with the category.
For more detailed information about the UUIDs of the resources, please look into the field `detailedAssociations`.
This field will be ignored, if given in the payload of `updateCategoryById` or `createCategory` APIs.
This field will not be present by default in `listCategories` API, unless the parameter $expand=associations is present in the URL.
* @param {AssociationSummary[]} associations This field gives basic information about resources that are associated with the category.
The results present under this field summarize the counts of various kinds of resources associated with the category.
For more detailed information about the UUIDs of the resources, please look into the field `detailedAssociations`.
This field will be ignored, if given in the payload of `updateCategoryById` or `createCategory` APIs.
This field will not be present by default in `listCategories` API, unless the parameter $expand=associations is present in the URL.
*/
setAssociations(associations: AssociationSummary[]): void;
associations: AssociationSummary[];
/**
* Returns This field gives detailed information about the resources which are associated with the category.
The results present under this field contain the UUIDs of the entities and policies of various kinds associated with the category.
This field will be ignored, if given in the payload of `updateCategoryById` or `createCategory` APIs.
This field will not be present by default in `getCategoryById` API, unless the parameter $expand=detailedAssociations is present in the URL.
* @return {AssociationDetail[]}
*/
getDetailedAssociations(): AssociationDetail[];
/**
* Sets This field gives detailed information about the resources which are associated with the category.
The results present under this field contain the UUIDs of the entities and policies of various kinds associated with the category.
This field will be ignored, if given in the payload of `updateCategoryById` or `createCategory` APIs.
This field will not be present by default in `getCategoryById` API, unless the parameter $expand=detailedAssociations is present in the URL.
* @param {AssociationDetail[]} detailedAssociations This field gives detailed information about the resources which are associated with the category.
The results present under this field contain the UUIDs of the entities and policies of various kinds associated with the category.
This field will be ignored, if given in the payload of `updateCategoryById` or `createCategory` APIs.
This field will not be present by default in `getCategoryById` API, unless the parameter $expand=detailedAssociations is present in the URL.
*/
setDetailedAssociations(detailedAssociations: AssociationDetail[]): void;
detailedAssociations: AssociationDetail[];
/**
* Returns The external identifier of the project to which the category belongs.
This field is optional in the payload of category apis.
If given, it should be a valid UUID of a project present in the system.
* @return {string}
*/
getProjectExtId(): string;
/**
* Sets The external identifier of the project to which the category belongs.
This field is optional in the payload of category apis.
If given, it should be a valid UUID of a project present in the system.
* @param {string} projectExtId The external identifier of the project to which the category belongs.
This field is optional in the payload of category apis.
If given, it should be a valid UUID of a project present in the system.
*/
setProjectExtId(projectExtId: string): void;
projectExtId: string;
/**
* Returns This field contains a list of projects with which the category is shared.
The projects are identified by their external identifiers.
If given, it should be a valid UUID of a project present in the system.
* @return {string[]}
*/
getSharedWithProjects(): string[];
/**
* Sets This field contains a list of projects with which the category is shared.
The projects are identified by their external identifiers.
If given, it should be a valid UUID of a project present in the system.
* @param {string[]} sharedWithProjects This field contains a list of projects with which the category is shared.
The projects are identified by their external identifiers.
If given, it should be a valid UUID of a project present in the system.
*/
setSharedWithProjects(sharedWithProjects: string[]): void;
sharedWithProjects: string[];
/**
* Returns This field indicates whether the category is shared with all projects in the system.
If set to true, the category is accessible to all projects.
If set to false, the category is not shared with all projects and can only be accessed by specific projects listed in `sharedWithProjects`.
* @return {boolean}
*/
getIsSharedWithAllProjects(): boolean;
/**
* Sets This field indicates whether the category is shared with all projects in the system.
If set to true, the category is accessible to all projects.
If set to false, the category is not shared with all projects and can only be accessed by specific projects listed in `sharedWithProjects`.
* @param {boolean} isSharedWithAllProjects This field indicates whether the category is shared with all projects in the system.
If set to true, the category is accessible to all projects.
If set to false, the category is not shared with all projects and can only be accessed by specific projects listed in `sharedWithProjects`.
*/
setIsSharedWithAllProjects(isSharedWithAllProjects: boolean): void;
isSharedWithAllProjects: boolean;
#private;
}
import ExternalizableAbstractModel from "../../../common/v1/response/ExternalizableAbstractModel";
import CategoryType from "./CategoryType";
import AssociationSummary from "./AssociationSummary";
import AssociationDetail from "./AssociationDetail";