-
Notifications
You must be signed in to change notification settings - Fork 222
Rebuilt shadow bindings and updated shadow sample to show how to clear properties #269
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
Merged
TwistedTwigleg
merged 6 commits into
aws:main
from
TwistedTwigleg:ShadowStateGeneratorAdjustment
Feb 17, 2022
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
31904ea
Rebuilt shadow bindings and updated shadow sample to show how to clea…
TwistedTwigleg 95a5573
Modified Shadow sample to fit model generator adjustments that allow …
TwistedTwigleg a1027e6
Adjusted iotshadow so that the none_is_valid properties default to False
TwistedTwigleg e8c89a0
Minor adjustments to passing None in Shadow
TwistedTwigleg 1316ba7
Updated variable_is_null_valid to variable_is_nullable for better rea…
TwistedTwigleg f285ae2
Merge branch 'main' into ShadowStateGeneratorAdjustment
TwistedTwigleg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 "explicitly null" thing can go both ways. Users can send AND receive
ShadowState
.We should also adjust the
from_payload()
function so that users can tell the difference between a "None because nothing was there" and "None because the json doc had null in it"In my opinion, the naming scheme
xyz_none_is_valid
makes a little less sense when we think about data being received. maybe we should just go with something simple likexyz_is_explicitly_null
and if that's true, then we just send null. We don't cross-reference it with the actual value ofxyz
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.
That works for me - that would also make the code simpler as well.
Uh oh!
There was an error while loading. Please reload this page.
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.
I changed the name to
<var>_is_nullable
and added checking tofrom_payload
👍(technically it should be
is_nonable
sincenull
isnone
, butnonable
not a word, so... I think nullable should work)