-
Notifications
You must be signed in to change notification settings - Fork 10
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
KMS: Smithy-generated code #196
KMS: Smithy-generated code #196
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed some random operation implementations since the TypeConversion layer is almost 10k lines. They all should follow the same pattern, but it's better to get a second pair of eyes.
I assume CI is failing because not all the code pieces are checked in right now?
.../runtimes/python/src/com_amazonaws_kms/smithygenerated/com_amazonaws_kms/aws_sdk_to_dafny.py
Show resolved
Hide resolved
def com_amazonaws_kms_AlreadyExistsException(input): | ||
output = {} | ||
if input.message.is_Some: | ||
output["message"] = input.message.value.VerbatimString(False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does input.KeyId.VerbatimString(False)
do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This converts a Dafny key ID to a native key ID
Dafny key ID is a _dafny.Seq
. Seq has a method VerbatimString: link
Dafny strings are represented as tuples of characters in Python.
VerbatimString(False) will ''.join
the Dafny characters together.
This gets you to a native string
Yep, I think this is the right way to go about this
Correct -- for any PRs until all code is checked in, refer to the CI from #171 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Issue #, if available:
Description of changes:
Squash/merge commit message, if applicable:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.