Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ com.azure.spring:spring-cloud-azure-stream-binder-servicebus-core;7.4.0;7.5.0-be
com.azure.spring:spring-cloud-azure-stream-binder-servicebus;7.4.0;7.5.0-beta.1
com.azure.spring:spring-cloud-azure-testcontainers;7.4.0;7.5.0-beta.1
com.azure:azure-spring-data-cosmos;7.4.0;7.5.0-beta.1
com.azure:azure-iot-deviceregistry-softwareupdate;1.0.0-beta.1;1.0.0-beta.1
com.azure.resourcemanager:azure-resourcemanager;2.63.0;2.64.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-appplatform;2.51.0;2.52.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-appservice;2.56.0;2.57.0-beta.1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Release History

## 1.0.0-beta.1 (Unreleased)

- Azure DeviceRegistrySoftwareUpdateClient client library for Java. This package contains Microsoft Azure DeviceRegistrySoftwareUpdateClient client library.

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
### Features Added

Comment on lines +9 to +15
- Initial release for the azure-iot-deviceregistry-softwareupdate Java SDK.
Comment on lines +9 to +16
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Azure DeviceRegistrySoftwareUpdateClient client library for Java

Azure DeviceRegistrySoftwareUpdateClient client library for Java.

This package contains Microsoft Azure DeviceRegistrySoftwareUpdateClient client library.

## Documentation

Various documentation is available to help you get started

- [API reference documentation][docs]
- [Product documentation][product_documentation]

## Getting started

### Prerequisites

- [Java Development Kit (JDK)][jdk] with version 8 or above
- [Azure Subscription][azure_subscription]

### Adding the package to your product

[//]: # ({x-version-update-start;com.azure:azure-iot-deviceregistry-softwareupdate;current})
```xml
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-iot-deviceregistry-softwareupdate</artifactId>
<version>1.0.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})

### Authentication

[Azure Identity][azure_identity] package provides the default implementation for authenticating the client.

## Key concepts

## Examples

```java com.azure.iot.deviceregistry.softwareupdate.readme
```

Comment on lines +41 to +43
### Service API versions

The client library targets the latest service API version by default.
The service client builder accepts an optional service API version parameter to specify which API version to communicate.

#### Select a service API version

You have the flexibility to explicitly select a supported service API version when initializing a service client via the service client builder.
This ensures that the client can communicate with services using the specified API version.

When selecting an API version, it is important to verify that there are no breaking changes compared to the latest API version.
If there are significant differences, API calls may fail due to incompatibility.

Always ensure that the chosen API version is fully supported and operational for your specific use case and that it aligns with the service's versioning policy.

## Troubleshooting

## Next steps

## Contributing

For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).

1. Fork it
1. Create your feature branch (`git checkout -b my-new-feature`)
1. Commit your changes (`git commit -am 'Add some feature'`)
1. Push to the branch (`git push origin my-new-feature`)
1. Create new Pull Request

<!-- LINKS -->
[product_documentation]: https://azure.microsoft.com/services/
[docs]: https://azure.github.io/azure-sdk-for-java/
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"AssetsRepo":"Azure/azure-sdk-assets","AssetsRepoPrefixPath":"java","TagPrefix":"java/deviceregistry/azure-iot-deviceregistry-softwareupdate","Tag":""}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<!--
~ Copyright (c) Microsoft Corporation. All rights reserved.
~ Licensed under the MIT License.
~ Code generated by Microsoft (R) TypeSpec Code Generator.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.azure</groupId>
<artifactId>azure-client-sdk-parent</artifactId>
<version>1.7.0</version> <!-- {x-version-update;com.azure:azure-client-sdk-parent;current} -->
<relativePath>../../parents/azure-client-sdk-parent</relativePath>
</parent>

<groupId>com.azure</groupId>
<artifactId>azure-iot-deviceregistry-softwareupdate</artifactId>
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-iot-deviceregistry-softwareupdate;current} -->
<packaging>jar</packaging>

<name>Microsoft Azure SDK for DeviceRegistrySoftwareUpdateClient</name>
<description>This package contains Microsoft Azure DeviceRegistrySoftwareUpdateClient client library.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
<license>
<name>The MIT License (MIT)</name>
<url>http://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>

<scm>
<url>https://github.com/Azure/azure-sdk-for-java</url>
<connection>scm:git:git@github.com:Azure/azure-sdk-for-java.git</connection>
<developerConnection>scm:git:git@github.com:Azure/azure-sdk-for-java.git</developerConnection>
<tag>HEAD</tag>
</scm>
<developers>
<developer>
<id>microsoft</id>
<name>Microsoft</name>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.59.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-netty</artifactId>
<version>1.16.6</version> <!-- {x-version-update;com.azure:azure-core-http-netty;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-test</artifactId>
<version>1.27.0-beta.17</version> <!-- {x-version-update;com.azure:azure-core-test;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.18.4</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
Comment on lines +51 to +67
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.iot.deviceregistry.softwareupdate;

import com.azure.core.annotation.Generated;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.exception.ClientAuthenticationException;
import com.azure.core.exception.HttpResponseException;
import com.azure.core.exception.ResourceModifiedException;
import com.azure.core.exception.ResourceNotFoundException;
import com.azure.core.http.rest.PagedFlux;
import com.azure.core.http.rest.PagedResponse;
import com.azure.core.http.rest.PagedResponseBase;
import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
import com.azure.core.util.FluxUtil;
import com.azure.iot.deviceregistry.softwareupdate.implementation.DeviceClassesImpl;
import com.azure.iot.deviceregistry.softwareupdate.models.DeviceClass;
import java.util.stream.Collectors;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
* Initializes a new instance of the asynchronous DeviceRegistrySoftwareUpdateClient type.
*/
@ServiceClient(builder = DeviceRegistrySoftwareUpdateClientBuilder.class, isAsync = true)
public final class DeviceClassesAsyncClient {
@Generated
private final DeviceClassesImpl serviceClient;

/**
* Initializes an instance of DeviceClassesAsyncClient class.
*
* @param serviceClient the service client implementation.
*/
@Generated
DeviceClassesAsyncClient(DeviceClassesImpl serviceClient) {
this.serviceClient = serviceClient;
}

/**
* Gets a list of device classes.
* <p><strong>Response Body Schema</strong></p>
*
* <pre>
* {@code
* {
* deviceClassId: String (Required)
* deviceClassProperties (Required): {
* compatProperties (Required): {
* String: String (Required)
* }
* agentProfile: int (Required)
* }
* bestCompatibleUpdate (Optional): {
* updateId (Required): {
* provider: String (Required)
* name: String (Required)
* version: String (Required)
* }
* }
* }
* }
* </pre>
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return a list of device classes as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<BinaryData> list(RequestOptions requestOptions) {
return this.serviceClient.listAsync(requestOptions);
}

/**
* Gets the properties of a device class.
* <p><strong>Response Body Schema</strong></p>
*
* <pre>
* {@code
* {
* deviceClassId: String (Required)
* deviceClassProperties (Required): {
* compatProperties (Required): {
* String: String (Required)
* }
* agentProfile: int (Required)
* }
* bestCompatibleUpdate (Optional): {
* updateId (Required): {
* provider: String (Required)
* name: String (Required)
* version: String (Required)
* }
* }
* }
* }
* </pre>
*
* @param deviceClassId Device class identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return the properties of a device class along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<BinaryData>> getDeviceClassWithResponse(String deviceClassId, RequestOptions requestOptions) {
return this.serviceClient.getDeviceClassWithResponseAsync(deviceClassId, requestOptions);
}

/**
* Deletes a device class.
*
* @param deviceClassId Device class identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return the {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> deleteWithResponse(String deviceClassId, RequestOptions requestOptions) {
return this.serviceClient.deleteWithResponseAsync(deviceClassId, requestOptions);
}

/**
* Gets a list of device classes.
*
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of device classes as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<DeviceClass> list() {
// Generated convenience method for list
RequestOptions requestOptions = new RequestOptions();
PagedFlux<BinaryData> pagedFluxResponse = list(requestOptions);
return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
Flux<PagedResponse<BinaryData>> flux = (continuationTokenParam == null)
? pagedFluxResponse.byPage().take(1)
: pagedFluxResponse.byPage(continuationTokenParam).take(1);
return flux.map(pagedResponse -> new PagedResponseBase<Void, DeviceClass>(pagedResponse.getRequest(),
pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
pagedResponse.getValue()
.stream()
.map(protocolMethodData -> protocolMethodData.toObject(DeviceClass.class))
.collect(Collectors.toList()),
pagedResponse.getContinuationToken(), null));
});
}

/**
* Gets the properties of a device class.
*
* @param deviceClassId Device class identifier.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the properties of a device class on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<DeviceClass> getDeviceClass(String deviceClassId) {
// Generated convenience method for getDeviceClassWithResponse
RequestOptions requestOptions = new RequestOptions();
return getDeviceClassWithResponse(deviceClassId, requestOptions).flatMap(FluxUtil::toMono)
.map(protocolMethodData -> protocolMethodData.toObject(DeviceClass.class));
}

/**
* Deletes a device class.
*
* @param deviceClassId Device class identifier.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return A {@link Mono} that completes when a successful response is received.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> delete(String deviceClassId) {
// Generated convenience method for deleteWithResponse
RequestOptions requestOptions = new RequestOptions();
return deleteWithResponse(deviceClassId, requestOptions).flatMap(FluxUtil::toMono);
}
}
Loading
Loading