Skip to content

Commit 063d64b

Browse files
abhipsaMisravinagesh
authored andcommitted
feat(hub): Creating a new feature branch with swagger and generated files
1 parent 80c89ee commit 063d64b

File tree

133 files changed

+16718
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+16718
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30011.22
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Iot.Hub.Service", "src\Azure.Iot.Hub.Service.csproj", "{E33D09D9-D809-472C-82E6-6A26BDB86FC2}"
7+
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Iot.Hub.Service.Tests", "tests\Azure.Iot.Hub.Service.Tests.csproj", "{4F476D56-DDE7-43D3-8CB4-BA1E77F5A300}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Release|Any CPU = Release|Any CPU
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{E33D09D9-D809-472C-82E6-6A26BDB86FC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17+
{E33D09D9-D809-472C-82E6-6A26BDB86FC2}.Debug|Any CPU.Build.0 = Debug|Any CPU
18+
{E33D09D9-D809-472C-82E6-6A26BDB86FC2}.Release|Any CPU.ActiveCfg = Release|Any CPU
19+
{E33D09D9-D809-472C-82E6-6A26BDB86FC2}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{4F476D56-DDE7-43D3-8CB4-BA1E77F5A300}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{4F476D56-DDE7-43D3-8CB4-BA1E77F5A300}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{4F476D56-DDE7-43D3-8CB4-BA1E77F5A300}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{4F476D56-DDE7-43D3-8CB4-BA1E77F5A300}.Release|Any CPU.Build.0 = Release|Any CPU
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE}
30+
EndGlobalSection
31+
EndGlobal
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Release History
2+
3+
## 1.0.0-preview.1 (Unreleased)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<configSections>
4+
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
5+
<section name="SteveCadwallader.CodeMaid.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
6+
</sectionGroup>
7+
</configSections>
8+
<userSettings>
9+
<SteveCadwallader.CodeMaid.Properties.Settings>
10+
<setting name="Cleaning_AutoCleanupOnFileSave" serializeAs="String">
11+
<value>True</value>
12+
</setting>
13+
<setting name="Formatting_CommentXmlSpaceSingleTags" serializeAs="String">
14+
<value>True</value>
15+
</setting>
16+
<setting name="Cleaning_InsertEndOfFileTrailingNewLine" serializeAs="String">
17+
<value>True</value>
18+
</setting>
19+
<setting name="Formatting_CommentWrapColumn" serializeAs="String">
20+
<value>120</value>
21+
</setting>
22+
<setting name="Formatting_CommentRunDuringCleanup" serializeAs="String">
23+
<value>False</value>
24+
</setting>
25+
<setting name="Cleaning_UpdateFileHeaderCSharp" serializeAs="String">
26+
<value>// Copyright (c) Microsoft Corporation. All rights reserved.
27+
// Licensed under the MIT License.
28+
</value>
29+
</setting>
30+
<setting name="Reorganizing_PrimaryOrderByAccessLevel" serializeAs="String">
31+
<value>True</value>
32+
</setting>
33+
<setting name="Cleaning_PerformPartialCleanupOnExternal" serializeAs="String">
34+
<value>1</value>
35+
</setting>
36+
<setting name="Progressing_ShowBuildProgressOnBuildStart" serializeAs="String">
37+
<value>False</value>
38+
</setting>
39+
</SteveCadwallader.CodeMaid.Properties.Settings>
40+
</userSettings>
41+
</configuration>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<!--
3+
Add any shared properties you want for the projects under this package directory that need to be set before the auto imported Directory.Build.props
4+
-->
5+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" />
6+
</Project>
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# README.md template
2+
3+
Use the guidelines in each section of this template to ensure consistency and readability of your README. The README resides in your package's GitHub repository at the root of its directory within the repo. It's also used as the package distribution page (NuGet, PyPi, npm, etc.) and as a Quickstart on docs.microsoft.com. See [README-EXAMPLE.md](README-EXAMPLE.md) for an example following this template.
4+
5+
**Title**: The H1 of your README should be in the format: `# [Product Name] client library for [Language]`
6+
7+
* All headings, including the H1, should use **sentence-style capitalization**. Refer to the [Microsoft Style Guide][style-guide-msft] and [Microsoft Cloud Style Guide][style-guide-cloud] for more information.
8+
* Example: `# Azure Batch client library for Python`
9+
10+
# Azure Template client library for .NET
11+
12+
**Introduction**: The introduction appears directly under the title (H1) of your README.
13+
14+
* **DO NOT** use an "Introduction" or "Overview" heading (H2) for this section.
15+
* First sentence: **Describe the service** briefly. You can usually use the first line of the service's docs landing page for this (Example: [Cosmos DB docs landing page](https://docs.microsoft.com/azure/cosmos-db/)).
16+
* Next, add a **bulleted list** of the **most common tasks** supported by the package or library, prefaced with "Use the client library for [Product Name] to:". Then, provide code snippets for these tasks in the [Examples](#examples) section later in the document. Keep the task list short but include those tasks most developers need to perform with your package.
17+
* Include this single line of links targeting your product's content at the bottom of the introduction, making any adjustments as necessary (for example, NuGet instead of PyPi):
18+
19+
[Source code](https://github.com/Azure/azure-sdk-for-python/tree/master/azure-batch) | [Package (PyPi)](https://pypi.org/project/azure-batch/) | [API reference documentation](https://docs.microsoft.com/python/api/overview/azure/batch?view=azure-python) | [Product documentation](https://docs.microsoft.com/azure/batch/)
20+
21+
> TIP: Your README should be as **brief** as possible but **no more brief** than necessary to get a developer new to Azure, the service, or the package up and running quickly. Keep it brief, but include everything a developer needs to make their first API call successfully.
22+
23+
## Getting started
24+
25+
This section should include everything a developer needs to do to install and create their first client connection *very quickly*.
26+
27+
### Install the package
28+
29+
First, provide instruction for obtaining and installing the package or library. This section might include only a single line of code, like `pip install package-name`, but should enable a developer to successfully install the package from NuGet, pip, npm, Maven, or even cloning a GitHub repository.
30+
31+
Include a **Prerequisites** line after the install command that details any requirements that must be satisfied before a developer can [authenticate](#authenticate-the-client) and test all of the snippets in the [Examples](#examples) section. For example, for Cosmos DB:
32+
33+
**Prerequisites**: You must have an [Azure subscription](https://azure.microsoft.com/free/), [Cosmos DB account](https://docs.microsoft.com/azure/cosmos-db/account-overview) (SQL API), and [Python 3.6+](https://www.python.org/downloads/) to use this package.
34+
35+
### Authenticate the client
36+
37+
If your library requires authentication for use, such as for Azure services, include instructions and example code needed for initializing and authenticating.
38+
39+
For example, include details on obtaining an account key and endpoint URI, setting environment variables for each, and initializing the client object.
40+
41+
## Key concepts
42+
43+
The *Key concepts* section should describe the functionality of the main classes. Point out the most important and useful classes in the package (with links to their reference pages) and explain how those classes work together. Feel free to use bulleted lists, tables, code blocks, or even diagrams for clarity.
44+
45+
## Examples
46+
47+
Include code snippets and short descriptions for each task you listed in the [Introduction](#introduction) (the bulleted list). Briefly explain each operation, but include enough clarity to explain complex or otherwise tricky operations.
48+
49+
If possible, use the same example snippets that your in-code documentation uses. For example, use the snippets in your `examples.py` that Sphinx ingests via its [literalinclude](https://www.sphinx-doc.org/en/1.5/markup/code.html?highlight=code%20examples#includes) directive. The `examples.py` file containing the snippets should reside alongside your package's code, and should be tested in an automated fashion.
50+
51+
Each example in the *Examples* section starts with an H3 that describes the example. At the top of this section, just under the *Examples* H2, add a bulleted list linking to each example H3. Each example should deep-link to the types and/or members used in the example.
52+
53+
* [Create the thing](#create-the-thing)
54+
* [Get the thing](#get-the-thing)
55+
* [List the things](#list-the-things)
56+
57+
### Create the thing
58+
59+
Use the [create_thing](not-valid-link) method to create a Thing reference; this method does not make a network call. To persist the Thing in the service, call [Thing.save](not-valid-link).
60+
61+
```Python
62+
thing = client.create_thing(id, name)
63+
thing.save()
64+
```
65+
66+
### Get the thing
67+
68+
The [get_thing](not-valid-link) method retrieves a Thing from the service. The `id` parameter is the unique ID of the Thing, not its "name" property.
69+
70+
```C# Snippet:GetSecret
71+
var client = new MiniSecretClient(new Uri(endpoint), new DefaultAzureCredential());
72+
73+
SecretBundle secret = client.GetSecret("TestSecret");
74+
75+
Console.WriteLine(secret.Value);
76+
```Python
77+
things = client.list_things()
78+
```
79+
80+
## Troubleshooting
81+
82+
Describe common errors and exceptions, how to "unpack" them if necessary, and include guidance for graceful handling and recovery.
83+
84+
Provide information to help developers avoid throttling or other service-enforced errors they might encounter. For example, provide guidance and examples for using retry or connection policies in the API.
85+
86+
If the package or a related package supports it, include tips for logging or enabling instrumentation to help them debug their code.
87+
88+
## Next steps
89+
90+
* Provide a link to additional code examples, ideally to those sitting alongside the README in the package's `/samples` directory.
91+
* If appropriate, point users to other packages that might be useful.
92+
* If you think there's a good chance that developers might stumble across your package in error (because they're searching for specific functionality and mistakenly think the package provides that functionality), point them to the packages they might be looking for.
93+
94+
## Contributing
95+
96+
This is a template, but your SDK readme should include details on how to contribute code to the repo/package.
97+
98+
<!-- LINKS -->
99+
[style-guide-msft]: https://docs.microsoft.com/style-guide/capitalization
100+
[style-guide-cloud]: https://worldready.cloudapp.net/Styleguide/Read?id=2696&topicid=25357
101+
102+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net%2Fsdk%2Ftemplate%2FAzure.Template%2FREADME.png)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
namespace Azure.Iot.Hub.Service
2+
{
3+
4+
}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Azure Iot Hub Service API Design Doc
2+
This document outlines the APIs for the Azure Iot Hub Service SDK
3+
4+
<details><summary><b>Constructors</b></summary>
5+
6+
```csharp
7+
8+
```
9+
</details>
10+
11+
<details><summary><b>Configurations</b></summary>
12+
APIs for managing configurations for devices and modules
13+
```csharp
14+
15+
```
16+
</details>
17+
18+
<details><summary><b>Statistics</b></summary>
19+
APIs for getting statistics about devices and modules, as well as service statistics
20+
```csharp
21+
22+
```
23+
</details>
24+
25+
<details><summary><b>Registry</b></summary>
26+
APIs for managing device and module identities
27+
```csharp
28+
29+
```
30+
</details>
31+
32+
<details><summary><b>Jobs</b></summary>
33+
APIs for using IotHub jobs
34+
```csharp
35+
36+
```
37+
</details>
38+
39+
<details><summary><b>V2 Jobs</b></summary>
40+
(maybe combine with job APIs, or maybe don't expose v1 job APIs. Talk with service about this)
41+
42+
```csharp
43+
44+
```
45+
</details>
46+
47+
<details><summary><b>Twin</b></summary>
48+
Device and module twin operations
49+
```csharp
50+
51+
```
52+
</details>
53+
54+
<details><summary><b>Methods</b></summary>
55+
Device and module direct methods
56+
```csharp
57+
58+
```
59+
</details>
60+
61+
<details><summary><b>Cloud to Device Messaging</b></summary>
62+
No sign of this in the swagger
63+
```csharp
64+
65+
```
66+
</details>
67+
68+
<details><summary><b>Feedback Message</b></summary>
69+
APIs for getting feedback messages
70+
```csharp
71+
72+
```
73+
</details>
74+
75+
<details><summary><b>File Upload Notifications</b></summary>
76+
No sign of this in the swagger
77+
```csharp
78+
79+
```
80+
</details>
81+
82+
<details><summary><b>Query</b></summary>
83+
APIs for querying on device or module identities
84+
```csharp
85+
86+
```
87+
</details>
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<AssemblyTitle>Azure IoT Hub Service Client SDK</AssemblyTitle>
4+
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks>
5+
<EnableApiCompat>false</EnableApiCompat>
6+
<!-- These supressions should be removed in a production library -->
7+
<NoWarn>$(NoWarn);CA1812</NoWarn>
8+
</PropertyGroup>
9+
10+
<!-- Nuget properties -->
11+
<PropertyGroup>
12+
<PackageTags>IoT;PnP;$(PackageCommonTags)</PackageTags>
13+
<Description>SDK for the Azure IoT Hub service</Description>
14+
<Version>1.0.0-preview.1</Version>
15+
</PropertyGroup>
16+
17+
<ItemGroup>
18+
<PackageReference Include="System.Text.Json" />
19+
</ItemGroup>
20+
21+
<!-- Common source from Azure.Core -->
22+
<ItemGroup>
23+
<Compile Include="$(AzureCoreSharedSources)ArrayBufferWriter.cs">
24+
<LinkBase>Shared\Azure.Core</LinkBase>
25+
</Compile>
26+
<Compile Include="$(AzureCoreSharedSources)ClientDiagnostics.cs">
27+
<LinkBase>Shared\Azure.Core</LinkBase>
28+
</Compile>
29+
<Compile Include="$(AzureCoreSharedSources)ContentTypeUtilities.cs">
30+
<LinkBase>Shared\Azure.Core</LinkBase>
31+
</Compile>
32+
<Compile Include="$(AzureCoreSharedSources)DiagnosticScope.cs">
33+
<LinkBase>Shared\Azure.Core</LinkBase>
34+
</Compile>
35+
<Compile Include="$(AzureCoreSharedSources)DiagnosticScopeFactory.cs">
36+
<LinkBase>Shared\Azure.Core</LinkBase>
37+
</Compile>
38+
<Compile Include="$(AzureCoreSharedSources)HttpMessageSanitizer.cs">
39+
<LinkBase>Shared\Azure.Core</LinkBase>
40+
</Compile>
41+
<Compile Include="$(AzureCoreSharedSources)TaskExtensions.cs">
42+
<LinkBase>Shared\Azure.Core</LinkBase>
43+
</Compile>
44+
<Compile Include="$(AzureCoreSharedSources)OperationHelpers.cs">
45+
<LinkBase>Shared\Azure.Core</LinkBase>
46+
</Compile>
47+
<Compile Include="$(AzureCoreSharedSources)Argument.cs">
48+
<LinkBase>Shared\Azure.Core</LinkBase>
49+
</Compile>
50+
</ItemGroup>
51+
52+
<Import Project="$(MSBuildThisFileDirectory)..\..\..\core\Azure.Core\src\Azure.Core.props" />
53+
54+
</Project>

0 commit comments

Comments
 (0)