Skip to content

Commit 0cb89c0

Browse files
author
SDKAuto
committed
CodeGen from PR 34246 in Azure/azure-rest-api-specs
Merge cc98d5f41df1272e4141e77768b53e638a4614e9 into 966641101aefa94716480485277de45a18a499fc
1 parent 5338afd commit 0cb89c0

File tree

58 files changed

+5101
-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.

58 files changed

+5101
-0
lines changed

eng/versioning/version_client.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ com.azure.spring:spring-cloud-azure-stream-binder-servicebus-core;5.22.0;5.23.0-
256256
com.azure.spring:spring-cloud-azure-stream-binder-servicebus;5.22.0;5.23.0-beta.1
257257
com.azure.spring:spring-cloud-azure-testcontainers;5.22.0;5.23.0-beta.1
258258
com.azure:azure-spring-data-cosmos;5.22.0;5.23.0-beta.1
259+
com.azure:azure-programmableconnectivity;1.0.0-beta.1;1.0.0-beta.1
259260
com.azure.resourcemanager:azure-resourcemanager;2.50.0;2.51.0-beta.1
260261
com.azure.resourcemanager:azure-resourcemanager-appplatform;2.50.0;2.51.0-beta.1
261262
com.azure.resourcemanager:azure-resourcemanager-appservice;2.50.0;2.51.0-beta.1

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@
179179
<module>sdk/postgresql</module>
180180
<module>sdk/postgresqlflexibleserver</module>
181181
<module>sdk/powerbidedicated</module>
182+
<module>sdk/programmableconnectivity</module>
182183
<module>sdk/providerhub</module>
183184
<module>sdk/purview</module>
184185
<module>sdk/quantum</module>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Release History
2+
3+
## 1.0.0-beta.1 (Unreleased)
4+
5+
- Azure ProgrammableConnectivity client library for Java. This package contains Microsoft Azure ProgrammableConnectivity client library.
6+
7+
### Features Added
8+
9+
### Breaking Changes
10+
11+
### Bugs Fixed
12+
13+
### Other Changes
14+
### Features Added
15+
16+
- Initial release for the azure-programmableconnectivity Java SDK.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Azure ProgrammableConnectivity client library for Java
2+
3+
Azure ProgrammableConnectivity client library for Java.
4+
5+
This package contains Microsoft Azure ProgrammableConnectivity client library.
6+
7+
## Documentation
8+
9+
Various documentation is available to help you get started
10+
11+
- [API reference documentation][docs]
12+
- [Product documentation][product_documentation]
13+
14+
## Getting started
15+
16+
### Prerequisites
17+
18+
- [Java Development Kit (JDK)][jdk] with version 8 or above
19+
- [Azure Subscription][azure_subscription]
20+
21+
### Adding the package to your product
22+
23+
[//]: # ({x-version-update-start;com.azure:azure-programmableconnectivity;current})
24+
```xml
25+
<dependency>
26+
<groupId>com.azure</groupId>
27+
<artifactId>azure-programmableconnectivity</artifactId>
28+
<version>1.0.0-beta.1</version>
29+
</dependency>
30+
```
31+
[//]: # ({x-version-update-end})
32+
33+
### Authentication
34+
35+
[Azure Identity][azure_identity] package provides the default implementation for authenticating the client.
36+
37+
## Key concepts
38+
39+
## Examples
40+
41+
```java com.azure.programmableconnectivity.readme
42+
```
43+
44+
### Service API versions
45+
46+
The client library targets the latest service API version by default.
47+
The service client builder accepts an optional service API version parameter to specify which API version to communicate.
48+
49+
#### Select a service API version
50+
51+
You have the flexibility to explicitly select a supported service API version when initializing a service client via the service client builder.
52+
This ensures that the client can communicate with services using the specified API version.
53+
54+
When selecting an API version, it is important to verify that there are no breaking changes compared to the latest API version.
55+
If there are significant differences, API calls may fail due to incompatibility.
56+
57+
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.
58+
59+
## Troubleshooting
60+
61+
## Next steps
62+
63+
## Contributing
64+
65+
For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
66+
67+
1. Fork it
68+
1. Create your feature branch (`git checkout -b my-new-feature`)
69+
1. Commit your changes (`git commit -am 'Add some feature'`)
70+
1. Push to the branch (`git push origin my-new-feature`)
71+
1. Create new Pull Request
72+
73+
<!-- LINKS -->
74+
[product_documentation]: https://azure.microsoft.com/services/
75+
[docs]: https://azure.github.io/azure-sdk-for-java/
76+
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
77+
[azure_subscription]: https://azure.microsoft.com/free/
78+
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"AssetsRepo":"Azure/azure-sdk-assets","AssetsRepoPrefixPath":"java","TagPrefix":"java/programmableconnectivity/azure-programmableconnectivity","Tag":""}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<!--
2+
~ Copyright (c) Microsoft Corporation. All rights reserved.
3+
~ Licensed under the MIT License.
4+
~ Code generated by Microsoft (R) TypeSpec Code Generator.
5+
-->
6+
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
7+
<modelVersion>4.0.0</modelVersion>
8+
<parent>
9+
<groupId>com.azure</groupId>
10+
<artifactId>azure-client-sdk-parent</artifactId>
11+
<version>1.7.0</version> <!-- {x-version-update;com.azure:azure-client-sdk-parent;current} -->
12+
<relativePath>../../parents/azure-client-sdk-parent</relativePath>
13+
</parent>
14+
15+
<groupId>com.azure</groupId>
16+
<artifactId>azure-programmableconnectivity</artifactId>
17+
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-programmableconnectivity;current} -->
18+
<packaging>jar</packaging>
19+
20+
<name>Microsoft Azure SDK for ProgrammableConnectivity</name>
21+
<description>This package contains Microsoft Azure ProgrammableConnectivity client library.</description>
22+
<url>https://github.com/Azure/azure-sdk-for-java</url>
23+
24+
<licenses>
25+
<license>
26+
<name>The MIT License (MIT)</name>
27+
<url>http://opensource.org/licenses/MIT</url>
28+
<distribution>repo</distribution>
29+
</license>
30+
</licenses>
31+
32+
<scm>
33+
<url>https://github.com/Azure/azure-sdk-for-java</url>
34+
<connection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</connection>
35+
<developerConnection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</developerConnection>
36+
<tag>HEAD</tag>
37+
</scm>
38+
<developers>
39+
<developer>
40+
<id>microsoft</id>
41+
<name>Microsoft</name>
42+
</developer>
43+
</developers>
44+
<properties>
45+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
46+
</properties>
47+
<dependencies>
48+
<dependency>
49+
<groupId>com.azure</groupId>
50+
<artifactId>azure-core</artifactId>
51+
<version>1.55.3</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
52+
</dependency>
53+
<dependency>
54+
<groupId>com.azure</groupId>
55+
<artifactId>azure-core-http-netty</artifactId>
56+
<version>1.15.11</version> <!-- {x-version-update;com.azure:azure-core-http-netty;dependency} -->
57+
</dependency>
58+
<dependency>
59+
<groupId>com.azure</groupId>
60+
<artifactId>azure-core-test</artifactId>
61+
<version>1.27.0-beta.8</version> <!-- {x-version-update;com.azure:azure-core-test;dependency} -->
62+
<scope>test</scope>
63+
</dependency>
64+
<dependency>
65+
<groupId>com.azure</groupId>
66+
<artifactId>azure-identity</artifactId>
67+
<version>1.15.4</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
68+
<scope>test</scope>
69+
</dependency>
70+
</dependencies>
71+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
// Code generated by Microsoft (R) TypeSpec Code Generator.
4+
5+
package com.azure.programmableconnectivity;
6+
7+
import com.azure.core.annotation.Generated;
8+
import com.azure.core.annotation.ReturnType;
9+
import com.azure.core.annotation.ServiceClient;
10+
import com.azure.core.annotation.ServiceMethod;
11+
import com.azure.core.exception.ClientAuthenticationException;
12+
import com.azure.core.exception.HttpResponseException;
13+
import com.azure.core.exception.ResourceModifiedException;
14+
import com.azure.core.exception.ResourceNotFoundException;
15+
import com.azure.core.http.rest.RequestOptions;
16+
import com.azure.core.http.rest.Response;
17+
import com.azure.core.util.BinaryData;
18+
import com.azure.core.util.FluxUtil;
19+
import com.azure.programmableconnectivity.implementation.DeviceLocationsImpl;
20+
import com.azure.programmableconnectivity.models.DeviceLocationVerificationContent;
21+
import com.azure.programmableconnectivity.models.DeviceLocationVerificationResult;
22+
import reactor.core.publisher.Mono;
23+
24+
/**
25+
* Initializes a new instance of the asynchronous ProgrammableConnectivityClient type.
26+
*/
27+
@ServiceClient(builder = ProgrammableConnectivityClientBuilder.class, isAsync = true)
28+
public final class DeviceLocationAsyncClient {
29+
@Generated
30+
private final DeviceLocationsImpl serviceClient;
31+
32+
/**
33+
* Initializes an instance of DeviceLocationAsyncClient class.
34+
*
35+
* @param serviceClient the service client implementation.
36+
*/
37+
@Generated
38+
DeviceLocationAsyncClient(DeviceLocationsImpl serviceClient) {
39+
this.serviceClient = serviceClient;
40+
}
41+
42+
/**
43+
* Verifies whether a device is within a specified location area, defined as an accuracy (radius) around a point,
44+
* specified by longitude and latitude.
45+
* <p><strong>Request Body Schema</strong></p>
46+
*
47+
* <pre>
48+
* {@code
49+
* {
50+
* networkIdentifier (Required): {
51+
* identifierType: String (Required)
52+
* identifier: String (Required)
53+
* }
54+
* latitude: double (Required)
55+
* longitude: double (Required)
56+
* accuracy: int (Required)
57+
* device (Required): {
58+
* networkAccessIdentifier: String (Optional)
59+
* phoneNumber: String (Optional)
60+
* ipv4Address (Optional): {
61+
* ipv4: String (Required)
62+
* port: int (Required)
63+
* }
64+
* ipv6Address (Optional): {
65+
* ipv6: String (Required)
66+
* port: int (Required)
67+
* }
68+
* }
69+
* }
70+
* }
71+
* </pre>
72+
*
73+
* <p><strong>Response Body Schema</strong></p>
74+
*
75+
* <pre>
76+
* {@code
77+
* {
78+
* verificationResult: boolean (Required)
79+
* }
80+
* }
81+
* </pre>
82+
*
83+
* @param apcGatewayId The identifier of the APC Gateway resource which should handle this request.
84+
* @param body Body parameter.
85+
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
86+
* @throws HttpResponseException thrown if the request is rejected by server.
87+
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
88+
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
89+
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
90+
* @return response verifying location along with {@link Response} on successful completion of {@link Mono}.
91+
*/
92+
@Generated
93+
@ServiceMethod(returns = ReturnType.SINGLE)
94+
public Mono<Response<BinaryData>> verifyWithResponse(String apcGatewayId, BinaryData body,
95+
RequestOptions requestOptions) {
96+
return this.serviceClient.verifyWithResponseAsync(apcGatewayId, body, requestOptions);
97+
}
98+
99+
/**
100+
* Verifies whether a device is within a specified location area, defined as an accuracy (radius) around a point,
101+
* specified by longitude and latitude.
102+
*
103+
* @param apcGatewayId The identifier of the APC Gateway resource which should handle this request.
104+
* @param body Body parameter.
105+
* @throws IllegalArgumentException thrown if parameters fail the validation.
106+
* @throws HttpResponseException thrown if the request is rejected by server.
107+
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
108+
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
109+
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
110+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
111+
* @return response verifying location on successful completion of {@link Mono}.
112+
*/
113+
@Generated
114+
@ServiceMethod(returns = ReturnType.SINGLE)
115+
public Mono<DeviceLocationVerificationResult> verify(String apcGatewayId, DeviceLocationVerificationContent body) {
116+
// Generated convenience method for verifyWithResponse
117+
RequestOptions requestOptions = new RequestOptions();
118+
return verifyWithResponse(apcGatewayId, BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono)
119+
.map(protocolMethodData -> protocolMethodData.toObject(DeviceLocationVerificationResult.class));
120+
}
121+
}

0 commit comments

Comments
 (0)