Skip to content

Commit

Permalink
Loading imports for associated external type for list, map, set, sing…
Browse files Browse the repository at this point in the history
…le nested attributes and blocks (#31)
  • Loading branch information
bendbennett committed Aug 10, 2023
1 parent 780b5d4 commit 4f10b1e
Show file tree
Hide file tree
Showing 23 changed files with 65 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions internal/datasource_generate/list_nested_attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func (g GeneratorListNestedAttribute) Imports() *generatorschema.Imports {
// TODO: This should only be added if model object helper functions are being generated.
imports.Append(generatorschema.AttrImports())

assocExtTypeImports := generatorschema.AssociatedExternalTypeImports(g.NestedObject.AssociatedExternalType)
imports.Append(assocExtTypeImports)

return imports
}

Expand Down
3 changes: 3 additions & 0 deletions internal/datasource_generate/list_nested_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ func (g GeneratorListNestedBlock) Imports() *generatorschema.Imports {
// TODO: This should only be added if model object helper functions are being generated.
imports.Append(generatorschema.AttrImports())

assocExtTypeImports := generatorschema.AssociatedExternalTypeImports(g.NestedObject.AssociatedExternalType)
imports.Append(assocExtTypeImports)

return imports
}

Expand Down
3 changes: 3 additions & 0 deletions internal/datasource_generate/map_nested_attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func (g GeneratorMapNestedAttribute) Imports() *generatorschema.Imports {
// TODO: This should only be added if model object helper functions are being generated.
imports.Append(generatorschema.AttrImports())

assocExtTypeImports := generatorschema.AssociatedExternalTypeImports(g.NestedObject.AssociatedExternalType)
imports.Append(assocExtTypeImports)

return imports
}

Expand Down
3 changes: 3 additions & 0 deletions internal/datasource_generate/set_nested_attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func (g GeneratorSetNestedAttribute) Imports() *generatorschema.Imports {
// TODO: This should only be added if model object helper functions are being generated.
imports.Append(generatorschema.AttrImports())

assocExtTypeImports := generatorschema.AssociatedExternalTypeImports(g.NestedObject.AssociatedExternalType)
imports.Append(assocExtTypeImports)

return imports
}

Expand Down
3 changes: 3 additions & 0 deletions internal/datasource_generate/set_nested_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ func (g GeneratorSetNestedBlock) Imports() *generatorschema.Imports {
// TODO: This should only be added if model object helper functions are being generated.
imports.Append(generatorschema.AttrImports())

assocExtTypeImports := generatorschema.AssociatedExternalTypeImports(g.NestedObject.AssociatedExternalType)
imports.Append(assocExtTypeImports)

return imports
}

Expand Down
3 changes: 3 additions & 0 deletions internal/datasource_generate/single_nested_attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ func (g GeneratorSingleNestedAttribute) Imports() *generatorschema.Imports {
// TODO: This should only be added if model object helper functions are being generated.
imports.Append(generatorschema.AttrImports())

assocExtTypeImports := generatorschema.AssociatedExternalTypeImports(g.AssociatedExternalType)
imports.Append(assocExtTypeImports)

return imports
}

Expand Down
3 changes: 3 additions & 0 deletions internal/provider_generate/list_nested_attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func (g GeneratorListNestedAttribute) Imports() *generatorschema.Imports {
// TODO: This should only be added if model object helper functions are being generated.
imports.Append(generatorschema.AttrImports())

assocExtTypeImports := generatorschema.AssociatedExternalTypeImports(g.NestedObject.AssociatedExternalType)
imports.Append(assocExtTypeImports)

return imports
}

Expand Down
3 changes: 3 additions & 0 deletions internal/provider_generate/map_nested_attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func (g GeneratorMapNestedAttribute) Imports() *generatorschema.Imports {
// TODO: This should only be added if model object helper functions are being generated.
imports.Append(generatorschema.AttrImports())

assocExtTypeImports := generatorschema.AssociatedExternalTypeImports(g.NestedObject.AssociatedExternalType)
imports.Append(assocExtTypeImports)

return imports
}

Expand Down
3 changes: 3 additions & 0 deletions internal/provider_generate/set_nested_attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func (g GeneratorSetNestedAttribute) Imports() *generatorschema.Imports {
// TODO: This should only be added if model object helper functions are being generated.
imports.Append(generatorschema.AttrImports())

assocExtTypeImports := generatorschema.AssociatedExternalTypeImports(g.NestedObject.AssociatedExternalType)
imports.Append(assocExtTypeImports)

return imports
}

Expand Down
3 changes: 3 additions & 0 deletions internal/provider_generate/set_nested_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ func (g GeneratorSetNestedBlock) Imports() *generatorschema.Imports {
// TODO: This should only be added if model object helper functions are being generated.
imports.Append(generatorschema.AttrImports())

assocExtTypeImports := generatorschema.AssociatedExternalTypeImports(g.NestedObject.AssociatedExternalType)
imports.Append(assocExtTypeImports)

return imports
}

Expand Down
3 changes: 3 additions & 0 deletions internal/provider_generate/single_nested_attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ func (g GeneratorSingleNestedAttribute) Imports() *generatorschema.Imports {
// TODO: This should only be added if model object helper functions are being generated.
imports.Append(generatorschema.AttrImports())

assocExtTypeImports := generatorschema.AssociatedExternalTypeImports(g.AssociatedExternalType)
imports.Append(assocExtTypeImports)

return imports
}

Expand Down
3 changes: 3 additions & 0 deletions internal/provider_generate/single_nested_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ func (g GeneratorSingleNestedBlock) Imports() *generatorschema.Imports {
// TODO: This should only be added if model object helper functions are being generated.
imports.Append(generatorschema.AttrImports())

assocExtTypeImports := generatorschema.AssociatedExternalTypeImports(g.AssociatedExternalType)
imports.Append(assocExtTypeImports)

return imports
}

Expand Down
3 changes: 3 additions & 0 deletions internal/resource_generate/list_nested_attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ func (g GeneratorListNestedAttribute) Imports() *generatorschema.Imports {
// TODO: This should only be added if model object helper functions are being generated.
imports.Append(generatorschema.AttrImports())

assocExtTypeImports := generatorschema.AssociatedExternalTypeImports(g.NestedObject.AssociatedExternalType)
imports.Append(assocExtTypeImports)

return imports
}

Expand Down
3 changes: 3 additions & 0 deletions internal/resource_generate/list_nested_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ func (g GeneratorListNestedBlock) Imports() *generatorschema.Imports {
// TODO: This should only be added if model object helper functions are being generated.
imports.Append(generatorschema.AttrImports())

assocExtTypeImports := generatorschema.AssociatedExternalTypeImports(g.NestedObject.AssociatedExternalType)
imports.Append(assocExtTypeImports)

return imports
}

Expand Down
3 changes: 3 additions & 0 deletions internal/resource_generate/map_nested_attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ func (g GeneratorMapNestedAttribute) Imports() *generatorschema.Imports {
// TODO: This should only be added if model object helper functions are being generated.
imports.Append(generatorschema.AttrImports())

assocExtTypeImports := generatorschema.AssociatedExternalTypeImports(g.NestedObject.AssociatedExternalType)
imports.Append(assocExtTypeImports)

return imports
}

Expand Down
3 changes: 3 additions & 0 deletions internal/resource_generate/set_nested_attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ func (g GeneratorSetNestedAttribute) Imports() *generatorschema.Imports {
// TODO: This should only be added if model object helper functions are being generated.
imports.Append(generatorschema.AttrImports())

assocExtTypeImports := generatorschema.AssociatedExternalTypeImports(g.NestedObject.AssociatedExternalType)
imports.Append(assocExtTypeImports)

return imports
}

Expand Down
3 changes: 3 additions & 0 deletions internal/resource_generate/set_nested_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ func (g GeneratorSetNestedBlock) Imports() *generatorschema.Imports {
// TODO: This should only be added if model object helper functions are being generated.
imports.Append(generatorschema.AttrImports())

assocExtTypeImports := generatorschema.AssociatedExternalTypeImports(g.NestedObject.AssociatedExternalType)
imports.Append(assocExtTypeImports)

return imports
}

Expand Down
3 changes: 3 additions & 0 deletions internal/resource_generate/single_nested_attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ func (g GeneratorSingleNestedAttribute) Imports() *generatorschema.Imports {
// TODO: This should only be added if model object helper functions are being generated.
imports.Append(generatorschema.AttrImports())

assocExtTypeImports := generatorschema.AssociatedExternalTypeImports(g.AssociatedExternalType)
imports.Append(assocExtTypeImports)

return imports
}

Expand Down
3 changes: 3 additions & 0 deletions internal/resource_generate/single_nested_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ func (g GeneratorSingleNestedBlock) Imports() *generatorschema.Imports {
// TODO: This should only be added if model object helper functions are being generated.
imports.Append(generatorschema.AttrImports())

assocExtTypeImports := generatorschema.AssociatedExternalTypeImports(g.AssociatedExternalType)
imports.Append(assocExtTypeImports)

return imports
}

Expand Down

0 comments on commit 4f10b1e

Please sign in to comment.