Skip to content

Commit 0c11a3d

Browse files
author
SDKAuto
committed
CodeGen from PR 34227 in Azure/azure-rest-api-specs
Merge 94243b4cb64d8e838a4e6649a4df100228b4da03 into 2b341fca86a5d4ff863d88084e358cacd7b4e904
1 parent 562854a commit 0c11a3d

File tree

556 files changed

+33220
-11081
lines changed

Some content is hidden

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

556 files changed

+33220
-11081
lines changed

sdk/providerhub/azure-resourcemanager-providerhub/CHANGELOG.md

Lines changed: 983 additions & 4 deletions
Large diffs are not rendered by default.

sdk/providerhub/azure-resourcemanager-providerhub/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Azure Resource Manager ProviderHub client library for Java.
44

5-
This package contains Microsoft Azure SDK for ProviderHub Management SDK. Microsoft ProviderHub. Package tag package-2020-11-20. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
5+
This package contains Microsoft Azure SDK for ProviderHub Management SDK. Microsoft ProviderHub. Package tag package-2024-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
66

77
## We'd love to hear your feedback
88

@@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
5252
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
5353

5454
```java
55-
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
55+
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
5656
TokenCredential credential = new DefaultAzureCredentialBuilder()
5757
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
5858
.build();
5959
ProviderHubManager manager = ProviderHubManager
6060
.authenticate(credential, profile);
6161
```
6262

63-
The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
63+
The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
6464

6565
See [Authentication][authenticate] for more options.
6666

@@ -110,5 +110,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
110110
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
111111
[coc]: https://opensource.microsoft.com/codeofconduct/
112112
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
113-
114-

sdk/providerhub/azure-resourcemanager-providerhub/SAMPLE.md

Lines changed: 1361 additions & 482 deletions
Large diffs are not rendered by default.

sdk/providerhub/azure-resourcemanager-providerhub/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<packaging>jar</packaging>
1919

2020
<name>Microsoft Azure SDK for ProviderHub Management</name>
21-
<description>This package contains Microsoft Azure SDK for ProviderHub Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft ProviderHub. Package tag package-2020-11-20.</description>
21+
<description>This package contains Microsoft Azure SDK for ProviderHub Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft ProviderHub. Package tag package-2024-09-01.</description>
2222
<url>https://github.com/Azure/azure-sdk-for-java</url>
2323

2424
<licenses>
@@ -45,7 +45,7 @@
4545
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4646
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
4747
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
48-
<spotless.skip>false</spotless.skip>
48+
<revapi.skip>true</revapi.skip>
4949
</properties>
5050
<dependencies>
5151
<dependency>

sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/ProviderHubManager.java

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,39 @@
2222
import com.azure.core.http.policy.UserAgentPolicy;
2323
import com.azure.core.management.profile.AzureProfile;
2424
import com.azure.core.util.Configuration;
25+
import com.azure.core.util.CoreUtils;
2526
import com.azure.core.util.logging.ClientLogger;
2627
import com.azure.resourcemanager.providerhub.fluent.ProviderHub;
28+
import com.azure.resourcemanager.providerhub.implementation.AuthorizedApplicationsImpl;
2729
import com.azure.resourcemanager.providerhub.implementation.CustomRolloutsImpl;
2830
import com.azure.resourcemanager.providerhub.implementation.DefaultRolloutsImpl;
31+
import com.azure.resourcemanager.providerhub.implementation.NewRegionFrontloadReleasesImpl;
2932
import com.azure.resourcemanager.providerhub.implementation.NotificationRegistrationsImpl;
3033
import com.azure.resourcemanager.providerhub.implementation.OperationsImpl;
3134
import com.azure.resourcemanager.providerhub.implementation.ProviderHubBuilder;
35+
import com.azure.resourcemanager.providerhub.implementation.ProviderMonitorSettingsImpl;
3236
import com.azure.resourcemanager.providerhub.implementation.ProviderRegistrationsImpl;
37+
import com.azure.resourcemanager.providerhub.implementation.ResourceActionsImpl;
3338
import com.azure.resourcemanager.providerhub.implementation.ResourceProvidersImpl;
3439
import com.azure.resourcemanager.providerhub.implementation.ResourceTypeRegistrationsImpl;
3540
import com.azure.resourcemanager.providerhub.implementation.SkusImpl;
41+
import com.azure.resourcemanager.providerhub.models.AuthorizedApplications;
3642
import com.azure.resourcemanager.providerhub.models.CustomRollouts;
3743
import com.azure.resourcemanager.providerhub.models.DefaultRollouts;
44+
import com.azure.resourcemanager.providerhub.models.NewRegionFrontloadReleases;
3845
import com.azure.resourcemanager.providerhub.models.NotificationRegistrations;
3946
import com.azure.resourcemanager.providerhub.models.Operations;
47+
import com.azure.resourcemanager.providerhub.models.ProviderMonitorSettings;
4048
import com.azure.resourcemanager.providerhub.models.ProviderRegistrations;
49+
import com.azure.resourcemanager.providerhub.models.ResourceActions;
4150
import com.azure.resourcemanager.providerhub.models.ResourceProviders;
4251
import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrations;
4352
import com.azure.resourcemanager.providerhub.models.Skus;
4453
import java.time.Duration;
4554
import java.time.temporal.ChronoUnit;
4655
import java.util.ArrayList;
4756
import java.util.List;
57+
import java.util.Map;
4858
import java.util.Objects;
4959
import java.util.stream.Collectors;
5060

@@ -69,6 +79,14 @@ public final class ProviderHubManager {
6979

7080
private Skus skus;
7181

82+
private ResourceActions resourceActions;
83+
84+
private AuthorizedApplications authorizedApplications;
85+
86+
private ProviderMonitorSettings providerMonitorSettings;
87+
88+
private NewRegionFrontloadReleases newRegionFrontloadReleases;
89+
7290
private final ProviderHub clientObject;
7391

7492
private ProviderHubManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
@@ -121,6 +139,9 @@ public static Configurable configure() {
121139
*/
122140
public static final class Configurable {
123141
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
142+
private static final String SDK_VERSION = "version";
143+
private static final Map<String, String> PROPERTIES
144+
= CoreUtils.getProperties("azure-resourcemanager-providerhub.properties");
124145

125146
private HttpClient httpClient;
126147
private HttpLogOptions httpLogOptions;
@@ -228,12 +249,14 @@ public ProviderHubManager authenticate(TokenCredential credential, AzureProfile
228249
Objects.requireNonNull(credential, "'credential' cannot be null.");
229250
Objects.requireNonNull(profile, "'profile' cannot be null.");
230251

252+
String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
253+
231254
StringBuilder userAgentBuilder = new StringBuilder();
232255
userAgentBuilder.append("azsdk-java")
233256
.append("-")
234257
.append("com.azure.resourcemanager.providerhub")
235258
.append("/")
236-
.append("1.1.0");
259+
.append(clientVersion);
237260
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
238261
userAgentBuilder.append(" (")
239262
.append(Configuration.getGlobalConfiguration().get("java.version"))
@@ -377,6 +400,57 @@ public Skus skus() {
377400
return skus;
378401
}
379402

403+
/**
404+
* Gets the resource collection API of ResourceActions.
405+
*
406+
* @return Resource collection API of ResourceActions.
407+
*/
408+
public ResourceActions resourceActions() {
409+
if (this.resourceActions == null) {
410+
this.resourceActions = new ResourceActionsImpl(clientObject.getResourceActions(), this);
411+
}
412+
return resourceActions;
413+
}
414+
415+
/**
416+
* Gets the resource collection API of AuthorizedApplications. It manages AuthorizedApplication.
417+
*
418+
* @return Resource collection API of AuthorizedApplications.
419+
*/
420+
public AuthorizedApplications authorizedApplications() {
421+
if (this.authorizedApplications == null) {
422+
this.authorizedApplications
423+
= new AuthorizedApplicationsImpl(clientObject.getAuthorizedApplications(), this);
424+
}
425+
return authorizedApplications;
426+
}
427+
428+
/**
429+
* Gets the resource collection API of ProviderMonitorSettings. It manages ProviderMonitorSetting.
430+
*
431+
* @return Resource collection API of ProviderMonitorSettings.
432+
*/
433+
public ProviderMonitorSettings providerMonitorSettings() {
434+
if (this.providerMonitorSettings == null) {
435+
this.providerMonitorSettings
436+
= new ProviderMonitorSettingsImpl(clientObject.getProviderMonitorSettings(), this);
437+
}
438+
return providerMonitorSettings;
439+
}
440+
441+
/**
442+
* Gets the resource collection API of NewRegionFrontloadReleases.
443+
*
444+
* @return Resource collection API of NewRegionFrontloadReleases.
445+
*/
446+
public NewRegionFrontloadReleases newRegionFrontloadReleases() {
447+
if (this.newRegionFrontloadReleases == null) {
448+
this.newRegionFrontloadReleases
449+
= new NewRegionFrontloadReleasesImpl(clientObject.getNewRegionFrontloadReleases(), this);
450+
}
451+
return newRegionFrontloadReleases;
452+
}
453+
380454
/**
381455
* Gets wrapped service client ProviderHub providing direct access to the underlying auto-generated API
382456
* implementation, based on Azure REST API.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
5+
package com.azure.resourcemanager.providerhub.fluent;
6+
7+
import com.azure.core.annotation.ReturnType;
8+
import com.azure.core.annotation.ServiceMethod;
9+
import com.azure.core.http.rest.PagedIterable;
10+
import com.azure.core.http.rest.Response;
11+
import com.azure.core.management.polling.PollResult;
12+
import com.azure.core.util.Context;
13+
import com.azure.core.util.polling.SyncPoller;
14+
import com.azure.resourcemanager.providerhub.fluent.models.AuthorizedApplicationInner;
15+
import java.util.UUID;
16+
17+
/**
18+
* An instance of this class provides access to all the operations defined in AuthorizedApplicationsClient.
19+
*/
20+
public interface AuthorizedApplicationsClient {
21+
/**
22+
* Gets the authorized application details.
23+
*
24+
* @param providerNamespace The name of the resource provider hosted within ProviderHub.
25+
* @param applicationId The application ID.
26+
* @param context The context to associate with this operation.
27+
* @throws IllegalArgumentException thrown if parameters fail the validation.
28+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
29+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
30+
* @return the authorized application details along with {@link Response}.
31+
*/
32+
@ServiceMethod(returns = ReturnType.SINGLE)
33+
Response<AuthorizedApplicationInner> getWithResponse(String providerNamespace, UUID applicationId, Context context);
34+
35+
/**
36+
* Gets the authorized application details.
37+
*
38+
* @param providerNamespace The name of the resource provider hosted within ProviderHub.
39+
* @param applicationId The application ID.
40+
* @throws IllegalArgumentException thrown if parameters fail the validation.
41+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
42+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
43+
* @return the authorized application details.
44+
*/
45+
@ServiceMethod(returns = ReturnType.SINGLE)
46+
AuthorizedApplicationInner get(String providerNamespace, UUID applicationId);
47+
48+
/**
49+
* Creates or updates the authorized application.
50+
*
51+
* @param providerNamespace The name of the resource provider hosted within ProviderHub.
52+
* @param applicationId The application ID.
53+
* @param properties The authorized application properties supplied to the CreateOrUpdate operation.
54+
* @throws IllegalArgumentException thrown if parameters fail the validation.
55+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
56+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
57+
* @return the {@link SyncPoller} for polling of long-running operation.
58+
*/
59+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
60+
SyncPoller<PollResult<AuthorizedApplicationInner>, AuthorizedApplicationInner>
61+
beginCreateOrUpdate(String providerNamespace, UUID applicationId, AuthorizedApplicationInner properties);
62+
63+
/**
64+
* Creates or updates the authorized application.
65+
*
66+
* @param providerNamespace The name of the resource provider hosted within ProviderHub.
67+
* @param applicationId The application ID.
68+
* @param properties The authorized application properties supplied to the CreateOrUpdate operation.
69+
* @param context The context to associate with this operation.
70+
* @throws IllegalArgumentException thrown if parameters fail the validation.
71+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
72+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
73+
* @return the {@link SyncPoller} for polling of long-running operation.
74+
*/
75+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
76+
SyncPoller<PollResult<AuthorizedApplicationInner>, AuthorizedApplicationInner> beginCreateOrUpdate(
77+
String providerNamespace, UUID applicationId, AuthorizedApplicationInner properties, Context context);
78+
79+
/**
80+
* Creates or updates the authorized application.
81+
*
82+
* @param providerNamespace The name of the resource provider hosted within ProviderHub.
83+
* @param applicationId The application ID.
84+
* @param properties The authorized application properties supplied to the CreateOrUpdate operation.
85+
* @throws IllegalArgumentException thrown if parameters fail the validation.
86+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
87+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
88+
* @return the response.
89+
*/
90+
@ServiceMethod(returns = ReturnType.SINGLE)
91+
AuthorizedApplicationInner createOrUpdate(String providerNamespace, UUID applicationId,
92+
AuthorizedApplicationInner properties);
93+
94+
/**
95+
* Creates or updates the authorized application.
96+
*
97+
* @param providerNamespace The name of the resource provider hosted within ProviderHub.
98+
* @param applicationId The application ID.
99+
* @param properties The authorized application properties supplied to the CreateOrUpdate operation.
100+
* @param context The context to associate with this operation.
101+
* @throws IllegalArgumentException thrown if parameters fail the validation.
102+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
103+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
104+
* @return the response.
105+
*/
106+
@ServiceMethod(returns = ReturnType.SINGLE)
107+
AuthorizedApplicationInner createOrUpdate(String providerNamespace, UUID applicationId,
108+
AuthorizedApplicationInner properties, Context context);
109+
110+
/**
111+
* Deletes an authorized application.
112+
*
113+
* @param providerNamespace The name of the resource provider hosted within ProviderHub.
114+
* @param applicationId The application ID.
115+
* @param context The context to associate with this operation.
116+
* @throws IllegalArgumentException thrown if parameters fail the validation.
117+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
118+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
119+
* @return the {@link Response}.
120+
*/
121+
@ServiceMethod(returns = ReturnType.SINGLE)
122+
Response<Void> deleteWithResponse(String providerNamespace, UUID applicationId, Context context);
123+
124+
/**
125+
* Deletes an authorized application.
126+
*
127+
* @param providerNamespace The name of the resource provider hosted within ProviderHub.
128+
* @param applicationId The application ID.
129+
* @throws IllegalArgumentException thrown if parameters fail the validation.
130+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
131+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
132+
*/
133+
@ServiceMethod(returns = ReturnType.SINGLE)
134+
void delete(String providerNamespace, UUID applicationId);
135+
136+
/**
137+
* Gets the list of the authorized applications in the provider namespace.
138+
*
139+
* @param providerNamespace The name of the resource provider hosted within ProviderHub.
140+
* @throws IllegalArgumentException thrown if parameters fail the validation.
141+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
142+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
143+
* @return the list of the authorized applications in the provider namespace as paginated response with
144+
* {@link PagedIterable}.
145+
*/
146+
@ServiceMethod(returns = ReturnType.COLLECTION)
147+
PagedIterable<AuthorizedApplicationInner> list(String providerNamespace);
148+
149+
/**
150+
* Gets the list of the authorized applications in the provider namespace.
151+
*
152+
* @param providerNamespace The name of the resource provider hosted within ProviderHub.
153+
* @param context The context to associate with this operation.
154+
* @throws IllegalArgumentException thrown if parameters fail the validation.
155+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
156+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
157+
* @return the list of the authorized applications in the provider namespace as paginated response with
158+
* {@link PagedIterable}.
159+
*/
160+
@ServiceMethod(returns = ReturnType.COLLECTION)
161+
PagedIterable<AuthorizedApplicationInner> list(String providerNamespace, Context context);
162+
}

0 commit comments

Comments
 (0)