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-05-01 18:09:29 +00:00
|
|
|
|
|
|
|
export const PRIMARY_KEY = 'uid';
|
|
|
|
export const SLUG_KEY = 'ID';
|
2020-11-09 17:29:12 +00:00
|
|
|
|
|
|
|
export default class Role extends Model {
|
|
|
|
@attr('string') uid;
|
|
|
|
@attr('string') ID;
|
|
|
|
|
|
|
|
@attr('string') Datacenter;
|
|
|
|
@attr('string') Namespace;
|
2021-09-15 18:50:11 +00:00
|
|
|
@attr('string') Partition;
|
2020-11-09 17:29:12 +00:00
|
|
|
@attr('string', { defaultValue: () => '' }) Name;
|
|
|
|
@attr('string', { defaultValue: () => '' }) Description;
|
|
|
|
@attr({ defaultValue: () => [] }) Policies;
|
|
|
|
@attr({ defaultValue: () => [] }) ServiceIdentities;
|
|
|
|
@attr({ defaultValue: () => [] }) NodeIdentities;
|
|
|
|
@attr('number') SyncTime;
|
|
|
|
@attr('number') CreateIndex;
|
|
|
|
@attr('number') ModifyIndex;
|
2021-01-25 18:13:54 +00:00
|
|
|
// frontend only for ordering where CreateIndex can't be used i.e. for when
|
|
|
|
// we need to order items that aren't yet saved to the backend, for example
|
|
|
|
// in the role-selector
|
2020-11-09 17:29:12 +00:00
|
|
|
@attr('number') CreateTime;
|
2019-05-01 18:09:29 +00:00
|
|
|
// TODO: Figure out whether we need this or not
|
2020-11-09 17:29:12 +00:00
|
|
|
@attr() Datacenters; // string[]
|
|
|
|
@attr('string') Hash;
|
|
|
|
}
|