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

Merge ADT dataplane feature branch into master. #14089

Merged
merged 23 commits into from
Aug 14, 2020
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4994961
Generate code from swagger
azabbasi Jun 26, 2020
940e948
Create generate.ps1
azabbasi Jun 26, 2020
cb0f003
Merge branch 'master' into feature/adt-dp
azabbasi Jun 26, 2020
9e6b32a
change autogenerated code to make it compile
azabbasi Jun 30, 2020
3556d2f
move generated code out of the root directory.
azabbasi Jun 30, 2020
7f3cd43
Got the autorest generated code build without intervention
azabbasi Jul 22, 2020
8a89e2e
Generate code from swagger
azabbasi Jun 26, 2020
c8e5dcb
Create generate.ps1
azabbasi Jun 26, 2020
eba5f9f
change autogenerated code to make it compile
azabbasi Jun 30, 2020
8e0937c
move generated code out of the root directory.
azabbasi Jun 30, 2020
6edd45b
Got the autorest generated code build without intervention
azabbasi Jul 22, 2020
e8a4467
Merge branch 'feature/adt-dp' of https://github.com/Azure/azure-sdk-f…
azabbasi Jul 22, 2020
0cb4af8
add MIT header.
azabbasi Jul 22, 2020
563cd44
Use auto rest v4 to generate the code.
azabbasi Jul 22, 2020
8dcdb44
point to the parent pom file.
azabbasi Jul 23, 2020
36463f7
Run autorest off of the source instead of local build
azabbasi Aug 10, 2020
8866eb7
Create DigitalTwinsClient.java
azabbasi Aug 10, 2020
6f5bff5
fix spacing
timtay-microsoft Aug 10, 2020
200c748
Add Readme file.
azabbasi Aug 13, 2020
bb58f04
Add yml files for CI and tests
azabbasi Aug 13, 2020
7156871
Add builder, sync and async digital twin clients (#13990)
timtay-microsoft Aug 13, 2020
2066410
address Alan's comments.
azabbasi Aug 14, 2020
20939ab
Address more of Alan's comments.
azabbasi Aug 14, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<module>sdk/core</module>
<module>sdk/cosmos</module>
<module>sdk/cognitiveservices</module>
<module>sdk/digitaltwins</module>
<module>sdk/eventgrid</module>
<module>sdk/eventhubs</module>
<module>sdk/formrecognizer</module>
Expand Down
94 changes: 94 additions & 0 deletions sdk/digitaltwins/azure-digitaltwins-core/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Azure IoT Digital Twins client library for Java

This library provides access to the Azure Digital Twins service for managing twins, models, relationships, etc.

[Source code][source] | Package (maven) (TODO: Add package info)

## Getting started

The complete Microsoft Azure SDK can be downloaded from the [Microsoft Azure downloads][microsoft_sdk_download] page, and it ships with support for building deployment packages, integrating with tooling, rich command line tooling, and more.

For the best development experience, developers should use the official Microsoft Maven packages for libraries. Maven packages are regularly updated with new functionality and hotfixes.

### Install the package

Install the Azure Digital Twins client library for java
TODO: Fill in details after first publish

### Prerequisites

- A Microsoft Azure Subscription
- To call Microsoft Azure services, create an [Azure subscription][azure_sub].
- An Azure Digital Twins instance
- In order to use the Azure Digital Twins SDK, first create a Digital Twins instance using one of options:
- Using [Azure portal][azure_portal]
- Using [Azure Management APIs][azure_rest_api]
- Using [Azure CLI][azure_cli]
- You will need to install azure cli and the [Azure IoT extension][iot_cli_extension] for Azure CLI.
- Refer to [IoT CLI documentation][iot_cli_doc] for more information on how to create and interact with your Digital Twins instance.

### Authenticate the Client

In order to interact with the Azure Digital Twins service, you will need to create an instance of a [TokenCredential class][token_credential] and pass it to the constructor of your DigitalTwinsClientBuilder (TODO: Reference the file once checked in).

## Key concepts

Azure Digital Twins Preview is an Azure IoT service that creates comprehensive models of the physical environment.
It can create spatial intelligence graphs to model the relationships and interactions between people, spaces, and devices.

You can learn more about Azure Digital Twins by visiting [Azure Digital Twins Documentation][digital_twins_documentation]

## Examples

You can familiarize yourself with different APIs using [samples for Digital Twins](TODO: Point to sampels once available).

## Source code folder structure

### /src

TODO: Describe source and link to the path.

### /src/swagger

A local copy of the swagger file that defines the structure of the REST APIs supported by the Azure Digital Twins service.

To regenerate the code, run the powershell script [generate.ps1](./generate.ps1).

Any time the client library code is updated, the following scripts need to be run:

TODO: Add extra information here.

## Troubleshooting

TODO: Add troubleshoooting guide

## Next steps

## Contributing

This project welcomes contributions and suggestions.
Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution.
For details, visit <https://cla.microsoft.com.>

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment).
Simply follow the instructions provided by the bot.
You will only need to do this once across all repos using our CLA.

This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct].
For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

<!-- LINKS -->
[microsoft_sdk_download]: https://azure.microsoft.com/en-us/downloads/?sdk=java
[azure_cli]: https://docs.microsoft.com/cli/azure
[azure_sub]: https://azure.microsoft.com/free/
[source]: https://github.com/Azure/azure-sdk-for-java/tree/feature/adt-dp/sdk/digitaltwins/azure-digitaltwins-core
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
[nuget]: https://www.nuget.org/
[azure_portal]: https://portal.azure.com/
[azure_rest_api]: https://docs.microsoft.com/en-us/rest/api/azure/
[azure_core_library]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/core/azure-core
[token_credential]: https://docs.microsoft.com/en-us/java/api/com.azure.core.credential.tokencredential?view=azure-java-stable
[digital_twins_documentation]: https://docs.microsoft.com/en-us/azure/digital-twins/
[azure_cli]: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest
[iot_cli_extension]: https://docs.microsoft.com/en-us/azure/iot-pnp/howto-use-iot-pnp-cli
[iot_cli_doc]: https://docs.microsoft.com/en-us/cli/azure/ext/azure-iot/dt?view=azure-cli-latest
21 changes: 21 additions & 0 deletions sdk/digitaltwins/azure-digitaltwins-core/autorest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Azure.DigitalTwins.Core

Run `generate.ps1` in this directory to generate the code.

## AutoRest Configuration

> see <https://aka.ms/autorest>

### Code generation settings

``` yaml
input-file: swagger/digitaltwins.json
output-folder: "./"
license-header: MICROSOFT_MIT_SMALL
use: '@autorest/java@4.0.1'
java:
add-context-parameter: true
namespace: com.azure.digitaltwins.core
add-credentials: true
sync-methods: none
```
Loading