2023-03-14 13:18:55 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
2023-08-11 13:12:13 +00:00
|
|
|
* SPDX-License-Identifier: BUSL-1.1
|
2023-03-14 13:18:55 +00:00
|
|
|
*/
|
|
|
|
|
2020-11-09 17:29:12 +00:00
|
|
|
import Model, { attr } from '@ember-data/model';
|
2019-12-17 18:47:37 +00:00
|
|
|
|
2021-09-15 18:50:11 +00:00
|
|
|
export const PRIMARY_KEY = 'uid';
|
2019-12-17 18:47:37 +00:00
|
|
|
export const SLUG_KEY = 'Name';
|
|
|
|
export const NSPACE_KEY = 'Namespace';
|
|
|
|
|
2020-11-09 17:29:12 +00:00
|
|
|
export default class Nspace extends Model {
|
|
|
|
@attr('string') uid;
|
|
|
|
@attr('string') Name;
|
2021-09-15 18:50:11 +00:00
|
|
|
@attr('string') Datacenter;
|
|
|
|
@attr('string') Partition;
|
|
|
|
// Namespace is the same as Name but please don't alias as we want to keep
|
|
|
|
// mutating the response here instead
|
|
|
|
@attr('string') Namespace;
|
2019-12-17 18:47:37 +00:00
|
|
|
|
2020-11-09 17:29:12 +00:00
|
|
|
@attr('number') SyncTime;
|
|
|
|
@attr('string', { defaultValue: () => '' }) Description;
|
2021-02-19 16:42:16 +00:00
|
|
|
@attr({ defaultValue: () => [] }) Resources; // []
|
2020-11-09 17:29:12 +00:00
|
|
|
// TODO: Is there some sort of date we can use here
|
|
|
|
@attr('string') DeletedAt;
|
|
|
|
@attr({
|
|
|
|
defaultValue: () => ({
|
|
|
|
PolicyDefaults: [],
|
|
|
|
RoleDefaults: [],
|
|
|
|
}),
|
|
|
|
})
|
|
|
|
ACLs;
|
|
|
|
}
|