Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Container variant type improvements #7400

Open
8 tasks
stevejgordon opened this issue Mar 21, 2023 · 0 comments
Open
8 tasks

[FEATURE] Container variant type improvements #7400

stevejgordon opened this issue Mar 21, 2023 · 0 comments
Labels
8.x Relates to 8.x client version Category: Feature
Milestone

Comments

@stevejgordon
Copy link
Contributor

stevejgordon commented Mar 21, 2023

Container variant types are code generated as a class that encapsulates the variant name and the variant object, with factory methods for creating each built-in variant type. This makes them reasonably easy to work with when using them in requests but challenging to use when accessing them in responses.

The code-generated class includes internal properties for the Variant and VariantName but doesn't expose ways to access the variant. Currently, in v8.0, we manually add a TryGet<T> method to these types. We do not "mark" variants which limits our ability to constrain the generic T on the TryGet method.

We should enhance the code-generation to make these types easier to use:

Enhancements

An example of where this applies is the Processor container type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.x Relates to 8.x client version Category: Feature
Projects
None yet
Development

No branches or pull requests

2 participants