triangle-types 1.0.261 → 1.0.262
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { ResourceTypeID } from "./TenantProvision.js";
|
|
1
2
|
export declare class TenantResourceTag {
|
|
2
|
-
readonly tenant_resource_id: string;
|
|
3
3
|
readonly tenant_id: string;
|
|
4
|
+
readonly resource_type_id: ResourceTypeID;
|
|
5
|
+
readonly resource_id: string;
|
|
4
6
|
readonly tag_type_id: string;
|
|
5
7
|
readonly tag_id: string;
|
|
6
8
|
readonly [x: string]: any;
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
+
import { is_resource_type_id } from "./TenantProvision.js";
|
|
1
2
|
export class TenantResourceTag {
|
|
2
|
-
tenant_resource_id;
|
|
3
3
|
tenant_id;
|
|
4
|
+
resource_type_id;
|
|
5
|
+
resource_id;
|
|
4
6
|
tag_type_id;
|
|
5
7
|
tag_id;
|
|
6
8
|
constructor(tenant_resource_tag) {
|
|
7
9
|
if (!TenantResourceTag.is(tenant_resource_tag)) {
|
|
8
10
|
throw Error("Invalid input.");
|
|
9
11
|
}
|
|
10
|
-
this.tenant_resource_id = tenant_resource_tag.tenant_resource_id;
|
|
11
12
|
this.tenant_id = tenant_resource_tag.tenant_id;
|
|
13
|
+
this.resource_type_id = tenant_resource_tag.resource_type_id;
|
|
14
|
+
this.resource_id = tenant_resource_tag.resource_id;
|
|
12
15
|
this.tag_type_id = tenant_resource_tag.tag_type_id;
|
|
13
16
|
this.tag_id = tenant_resource_tag.tag_id;
|
|
14
17
|
}
|
|
15
18
|
static is(tenant_resource_tag) {
|
|
16
19
|
return (tenant_resource_tag !== undefined &&
|
|
17
|
-
typeof tenant_resource_tag.tenant_resource_id === "string" &&
|
|
18
20
|
typeof tenant_resource_tag.tenant_id === "string" &&
|
|
21
|
+
is_resource_type_id(tenant_resource_tag.resource_type_id) &&
|
|
22
|
+
typeof tenant_resource_tag.resource_id === "string" &&
|
|
19
23
|
typeof tenant_resource_tag.tag_type_id === "string" &&
|
|
20
24
|
typeof tenant_resource_tag.tag_id === "string");
|
|
21
25
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { is_resource_type_id, ResourceTypeID } from "./TenantProvision"
|
|
2
|
+
|
|
1
3
|
export class TenantResourceTag {
|
|
2
|
-
readonly tenant_resource_id : string
|
|
3
4
|
readonly tenant_id : string
|
|
5
|
+
readonly resource_type_id : ResourceTypeID
|
|
6
|
+
readonly resource_id : string
|
|
4
7
|
readonly tag_type_id : string
|
|
5
8
|
readonly tag_id : string
|
|
6
9
|
readonly [x : string] : any
|
|
@@ -9,8 +12,9 @@ export class TenantResourceTag {
|
|
|
9
12
|
if (!TenantResourceTag.is(tenant_resource_tag)) {
|
|
10
13
|
throw Error("Invalid input.")
|
|
11
14
|
}
|
|
12
|
-
this.tenant_resource_id = tenant_resource_tag.tenant_resource_id
|
|
13
15
|
this.tenant_id = tenant_resource_tag.tenant_id
|
|
16
|
+
this.resource_type_id = tenant_resource_tag.resource_type_id
|
|
17
|
+
this.resource_id = tenant_resource_tag.resource_id
|
|
14
18
|
this.tag_type_id = tenant_resource_tag.tag_type_id
|
|
15
19
|
this.tag_id = tenant_resource_tag.tag_id
|
|
16
20
|
}
|
|
@@ -18,8 +22,9 @@ export class TenantResourceTag {
|
|
|
18
22
|
static is(tenant_resource_tag : any) : tenant_resource_tag is TenantResourceTag {
|
|
19
23
|
return (
|
|
20
24
|
tenant_resource_tag !== undefined &&
|
|
21
|
-
typeof tenant_resource_tag.tenant_resource_id === "string" &&
|
|
22
25
|
typeof tenant_resource_tag.tenant_id === "string" &&
|
|
26
|
+
is_resource_type_id(tenant_resource_tag.resource_type_id) &&
|
|
27
|
+
typeof tenant_resource_tag.resource_id === "string" &&
|
|
23
28
|
typeof tenant_resource_tag.tag_type_id === "string" &&
|
|
24
29
|
typeof tenant_resource_tag.tag_id === "string"
|
|
25
30
|
)
|