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

Remove DigitalTwins Writable property, rewrite Basic classes to match .NET #16896

Merged
merged 5 commits into from
Oct 27, 2020

Conversation

timtay-microsoft
Copy link
Member

Writable property isn't sent by the service anymore, so we don't need it in our serialization types.

Also adding/changing a couple of Basic types to match what we have in .NET such as BasicDigitalTwinComponentMetadata

);

String basicDigitalTwinPayload = mapper.writeValueAsString(basicTwin);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field wasn't used anywhere, so I deleted it

Copy link
Contributor

@azabbasi azabbasi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the sample/readme file as well. We have a task to make that automated but in the meanwhile we should manually update those snippets.

*/
public class BasicDigitalTwinPropertyMetadata {
@JsonProperty(value = DigitalTwinsJsonPropertyNames.METADATA_PROPERTY_LAST_UPDATE_TIME, required = true)
private OffsetDateTime lastUpdatedOn;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know we decided to use lastUpdatedOn, I just wanted to say I think lastUpdatedTime might have been a better property name. goodbye

Copy link
Member Author

@timtay-microsoft timtay-microsoft Oct 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly this is the name the service choose, so I'm not looking to change it.

Scratch that, the service went with "lastUpdateTime" but Azure SDK team prefers we name like the above. We already renamed the digital twins model data class' date time field like this, so it should pass review

@timtay-microsoft timtay-microsoft merged commit 25b1547 into master Oct 27, 2020
@timtay-microsoft timtay-microsoft deleted the feature/adt/timtay/writableProperty branch October 27, 2020 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants