Skip to content

Commit aba6ba9

Browse files
committed
[ignore] add TODO comments for functions required to set class and property information from meta
1 parent a389886 commit aba6ba9

File tree

2 files changed

+65
-5
lines changed

2 files changed

+65
-5
lines changed

gen/utils/data/class.go

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ type Class struct {
2828
Children []Child
2929
// List of all possible parent classes.
3030
ContainedBy []string
31+
// Deprecated resources include a warning the resource and datasource schemas.
32+
Deprecated bool
3133
// The APIC versions in which the class is deprecated.
3234
DeprecatedVersions []VersionRange
3335
// Documentation specific information for the class.
@@ -179,16 +181,44 @@ func (c *Class) loadMetaFile() error {
179181
func (c *Class) setClassData() error {
180182
genLogger.Debug(fmt.Sprintf("Setting class data for class '%s'.", c.ClassName))
181183

184+
// TODO: add function to set AllowDelete
185+
186+
// TODO: add function to set Children
187+
188+
// TODO: add function to set ContainedBy
189+
190+
// TODO: add placeholder function for Deprecated
191+
192+
// TODO: add placeholder function for DeprecatedVersions
193+
194+
// TODO: add function to set Documentation
195+
196+
// TODO: add function to set IdentifiedBy
197+
198+
// TODO: add function to set IsMigration
199+
200+
// TODO: add function to set IsRelational
201+
202+
// TODO: add function to set IsSingleNested
203+
204+
// TODO: add function to set PlatformType
205+
206+
if properties, ok := c.MetaFileContent["properties"]; ok {
207+
c.setProperties(properties.(map[string]interface{}))
208+
}
209+
210+
// TODO: add function to set RequiredAsChild
211+
182212
err := c.setResourceName()
183213
if err != nil {
184214
return err
185215
}
186216

187-
// TODO: add functions to set the other class data
217+
// TODO: add function to set ResourceNameNested
188218

189-
if properties, ok := c.MetaFileContent["properties"]; ok {
190-
c.setProperties(properties.(map[string]interface{}))
191-
}
219+
// TODO: add function to set RnFormat
220+
221+
// TODO: add function to set Versions
192222

193223
genLogger.Debug(fmt.Sprintf("Successfully set class data for class '%s'.", c.ClassName))
194224
return nil

gen/utils/data/property.go

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,37 @@ func NewProperty(name string, details map[string]interface{}) *Property {
126126
genLogger.Trace(fmt.Sprintf("Creating new property struct for property: %s.", name))
127127
property := &Property{PropertyName: name}
128128

129-
// TODO: add functions to set the values of the property.
129+
// TODO: add function to set AttributeName
130+
131+
// TODO: add function to set Computed
132+
133+
// TODO: add function to set CustomType
134+
135+
// TODO: add placeholder function for Deprecated
136+
137+
// TODO: add placeholder function for DeprecatedVersions
138+
139+
// TODO: add function to set Documentation
140+
141+
// TODO: add function to set MigrationValues
142+
143+
// TODO: add function to set Optional
144+
145+
// TODO: add function to set PointsToClass
146+
147+
// TODO: add function to set ReadOnly
148+
149+
// TODO: add function to set Required
150+
151+
// TODO: add function to set TestValues
152+
153+
// TODO: add function to set Validators
154+
155+
// TODO: add function to set ValidValues
156+
157+
// TODO: add function to set ValueType
158+
159+
// TODO: add function to set Versions
130160

131161
return property
132162
}

0 commit comments

Comments
 (0)