2023-03-01 09:39:41 -06:00
|
|
|
/**
|
2026-01-28 17:09:06 -08:00
|
|
|
* Copyright IBM Corp. 2021, 2026
|
2024-05-31 11:29:24 -07:00
|
|
|
* SPDX-License-Identifier: BUSL-1.1
|
2023-03-01 09:39:41 -06:00
|
|
|
*/
|
|
|
|
|
|
2020-09-14 10:45:56 -04:00
|
|
|
import BaseModel from '../../models/base';
|
|
|
|
|
import { attr } from '@ember-data/model';
|
|
|
|
|
|
|
|
|
|
/**
|
2020-09-16 14:29:02 -04:00
|
|
|
* Account contains all fields related to an account resource
|
2020-09-14 10:45:56 -04:00
|
|
|
*/
|
|
|
|
|
export default class GeneratedAccountModel extends BaseModel {
|
|
|
|
|
// =attributes
|
|
|
|
|
|
|
|
|
|
@attr('string', {
|
2020-09-16 14:29:02 -04:00
|
|
|
description: 'The type of the resource, to help differentiate schemas',
|
|
|
|
|
})
|
|
|
|
|
type;
|
2020-09-14 10:45:56 -04:00
|
|
|
|
|
|
|
|
@attr('string', {
|
|
|
|
|
description: 'The owning auth method ID.',
|
2020-09-16 14:29:02 -04:00
|
|
|
})
|
|
|
|
|
auth_method_id;
|
2020-09-14 10:45:56 -04:00
|
|
|
|
|
|
|
|
@attr('string', {
|
|
|
|
|
description: 'Optional name for identification purposes',
|
|
|
|
|
})
|
|
|
|
|
name;
|
|
|
|
|
|
|
|
|
|
@attr('string', {
|
|
|
|
|
description: 'Optional user-set description for identification purposes',
|
|
|
|
|
})
|
|
|
|
|
description;
|
|
|
|
|
|
|
|
|
|
@attr('date', {
|
|
|
|
|
description: 'The time this resource was created\nOutput only.',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
})
|
|
|
|
|
created_time;
|
|
|
|
|
|
|
|
|
|
@attr('date', {
|
|
|
|
|
description: 'The time this resource was last updated\nOutput only.',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
})
|
|
|
|
|
updated_time;
|
|
|
|
|
|
|
|
|
|
@attr('number', {
|
|
|
|
|
description: 'Current version number of this resource.',
|
|
|
|
|
})
|
|
|
|
|
version;
|
2022-06-28 19:30:26 -04:00
|
|
|
|
2023-07-12 10:57:14 -07:00
|
|
|
// =attributes (password and LDAP)
|
2022-06-28 19:30:26 -04:00
|
|
|
@attr('string', {
|
2023-07-12 10:57:14 -07:00
|
|
|
for: ['password', 'ldap'],
|
2022-06-28 19:30:26 -04:00
|
|
|
isNestedAttribute: true,
|
|
|
|
|
description: 'The account login name',
|
|
|
|
|
})
|
|
|
|
|
login_name;
|
|
|
|
|
|
|
|
|
|
// =attributes (OIDC)
|
|
|
|
|
@attr('string', { for: 'oidc', isNestedAttribute: true }) subject;
|
|
|
|
|
@attr('string', { for: 'oidc', isNestedAttribute: true }) issuer;
|
2023-07-12 10:57:14 -07:00
|
|
|
|
|
|
|
|
// =attributes (OIDC and LDAP)
|
|
|
|
|
@attr('string', {
|
|
|
|
|
for: ['oidc', 'ldap'],
|
|
|
|
|
isNestedAttribute: true,
|
|
|
|
|
readOnly: true,
|
|
|
|
|
})
|
2022-06-28 19:30:26 -04:00
|
|
|
email;
|
2023-07-12 10:57:14 -07:00
|
|
|
@attr('string', {
|
|
|
|
|
for: ['oidc', 'ldap'],
|
|
|
|
|
isNestedAttribute: true,
|
|
|
|
|
readOnly: true,
|
|
|
|
|
})
|
2022-06-28 19:30:26 -04:00
|
|
|
full_name;
|
2023-07-12 10:57:14 -07:00
|
|
|
|
|
|
|
|
// =attributes (LDAP)
|
|
|
|
|
@attr('string', { for: 'ldap', isNestedAttribute: true, readOnly: true }) dn;
|
|
|
|
|
@attr('string-array', {
|
|
|
|
|
for: 'ldap',
|
|
|
|
|
isNestedAttribute: true,
|
|
|
|
|
readOnly: true,
|
|
|
|
|
})
|
|
|
|
|
member_of_groups;
|
2020-09-14 10:45:56 -04:00
|
|
|
}
|