1
- /*
2
- Copyright (c) 2018 VMware, Inc. All Rights Reserved.
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
1
+ // © Broadcom. All Rights Reserved.
2
+ // The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
3
+ // SPDX-License-Identifier: Apache-2.0
16
4
17
5
package tags
18
6
@@ -34,6 +22,7 @@ type Category struct {
34
22
Cardinality string `json:"cardinality,omitempty"`
35
23
AssociableTypes []string `json:"associable_types,omitempty"`
36
24
UsedBy []string `json:"used_by,omitempty"`
25
+ CategoryID string `json:"category_id,omitempty"`
37
26
}
38
27
39
28
func (c * Category ) hasType (kind string ) bool {
@@ -74,6 +63,7 @@ func (c *Manager) CreateCategory(ctx context.Context, category *Category) (strin
74
63
Description string `json:"description"`
75
64
Cardinality string `json:"cardinality"`
76
65
AssociableTypes []string `json:"associable_types"`
66
+ CategoryID string `json:"category_id,omitempty"`
77
67
}
78
68
spec := struct {
79
69
Category create `json:"create_spec"`
@@ -83,6 +73,7 @@ func (c *Manager) CreateCategory(ctx context.Context, category *Category) (strin
83
73
Description : category .Description ,
84
74
Cardinality : category .Cardinality ,
85
75
AssociableTypes : category .AssociableTypes ,
76
+ CategoryID : category .CategoryID ,
86
77
},
87
78
}
88
79
if spec .Category .AssociableTypes == nil {
0 commit comments