Skip to content

Commit d4a86d8

Browse files
author
SDKAuto
committed
CodeGen from PR 23661 in Azure/azure-rest-api-specs
Merge 581b900bc3ab2322def1bdd4c90a92478d75817f into a2140e7ff0a6c28df501b16c51fe85b762a386fc
1 parent 1585ae5 commit d4a86d8

File tree

182 files changed

+2593
-5078
lines changed

Some content is hidden

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

182 files changed

+2593
-5078
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Release History
22

3-
## 1.1.0-beta.1 (Unreleased)
3+
## 1.0.0-beta.1 (2023-05-17)
4+
5+
- Azure Resource Manager CognitiveServices client library for Java. This package contains Microsoft Azure SDK for CognitiveServices Management SDK. Cognitive Services Management Client. Package tag package-2023-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
46

57
### Features Added
68

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

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

33
Azure Resource Manager CognitiveServices client library for Java.
44

5-
This package contains Microsoft Azure SDK for CognitiveServices Management SDK. Cognitive Services Management Client. Package tag package-2022-12. 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 CognitiveServices Management SDK. Cognitive Services Management Client. Package tag package-2023-05. 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

@@ -32,7 +32,7 @@ Various documentation is available to help you get started
3232
<dependency>
3333
<groupId>com.azure.resourcemanager</groupId>
3434
<artifactId>azure-resourcemanager-cognitiveservices</artifactId>
35-
<version>1.0.0</version>
35+
<version>1.1.0-beta.1</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})

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

Lines changed: 89 additions & 43 deletions
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<packaging>jar</packaging>
1919

2020
<name>Microsoft Azure SDK for CognitiveServices Management</name>
21-
<description>This package contains Microsoft Azure SDK for CognitiveServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Cognitive Services Management Client. Package tag package-2022-12.</description>
21+
<description>This package contains Microsoft Azure SDK for CognitiveServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Cognitive Services Management Client. Package tag package-2023-05.</description>
2222
<url>https://github.com/Azure/azure-sdk-for-java</url>
2323

2424
<licenses>

sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/CognitiveServicesManager.java

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,25 @@
3030
import com.azure.resourcemanager.cognitiveservices.implementation.CommitmentTiersImpl;
3131
import com.azure.resourcemanager.cognitiveservices.implementation.DeletedAccountsImpl;
3232
import com.azure.resourcemanager.cognitiveservices.implementation.DeploymentsImpl;
33+
import com.azure.resourcemanager.cognitiveservices.implementation.ModelsImpl;
3334
import com.azure.resourcemanager.cognitiveservices.implementation.OperationsImpl;
3435
import com.azure.resourcemanager.cognitiveservices.implementation.PrivateEndpointConnectionsImpl;
3536
import com.azure.resourcemanager.cognitiveservices.implementation.PrivateLinkResourcesImpl;
3637
import com.azure.resourcemanager.cognitiveservices.implementation.ResourceProvidersImpl;
3738
import com.azure.resourcemanager.cognitiveservices.implementation.ResourceSkusImpl;
39+
import com.azure.resourcemanager.cognitiveservices.implementation.UsagesImpl;
3840
import com.azure.resourcemanager.cognitiveservices.models.Accounts;
3941
import com.azure.resourcemanager.cognitiveservices.models.CommitmentPlans;
4042
import com.azure.resourcemanager.cognitiveservices.models.CommitmentTiers;
4143
import com.azure.resourcemanager.cognitiveservices.models.DeletedAccounts;
4244
import com.azure.resourcemanager.cognitiveservices.models.Deployments;
45+
import com.azure.resourcemanager.cognitiveservices.models.Models;
4346
import com.azure.resourcemanager.cognitiveservices.models.Operations;
4447
import com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointConnections;
4548
import com.azure.resourcemanager.cognitiveservices.models.PrivateLinkResources;
4649
import com.azure.resourcemanager.cognitiveservices.models.ResourceProviders;
4750
import com.azure.resourcemanager.cognitiveservices.models.ResourceSkus;
51+
import com.azure.resourcemanager.cognitiveservices.models.Usages;
4852
import java.time.Duration;
4953
import java.time.temporal.ChronoUnit;
5054
import java.util.ArrayList;
@@ -60,12 +64,16 @@ public final class CognitiveServicesManager {
6064

6165
private ResourceSkus resourceSkus;
6266

67+
private Usages usages;
68+
6369
private Operations operations;
6470

6571
private ResourceProviders resourceProviders;
6672

6773
private CommitmentTiers commitmentTiers;
6874

75+
private Models models;
76+
6977
private PrivateEndpointConnections privateEndpointConnections;
7078

7179
private PrivateLinkResources privateLinkResources;
@@ -239,7 +247,7 @@ public CognitiveServicesManager authenticate(TokenCredential credential, AzurePr
239247
.append("-")
240248
.append("com.azure.resourcemanager.cognitiveservices")
241249
.append("/")
242-
.append("1.0.0");
250+
.append("1.0.0-beta.1");
243251
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
244252
userAgentBuilder
245253
.append(" (")
@@ -332,6 +340,18 @@ public ResourceSkus resourceSkus() {
332340
return resourceSkus;
333341
}
334342

343+
/**
344+
* Gets the resource collection API of Usages.
345+
*
346+
* @return Resource collection API of Usages.
347+
*/
348+
public Usages usages() {
349+
if (this.usages == null) {
350+
this.usages = new UsagesImpl(clientObject.getUsages(), this);
351+
}
352+
return usages;
353+
}
354+
335355
/**
336356
* Gets the resource collection API of Operations.
337357
*
@@ -368,6 +388,18 @@ public CommitmentTiers commitmentTiers() {
368388
return commitmentTiers;
369389
}
370390

391+
/**
392+
* Gets the resource collection API of Models.
393+
*
394+
* @return Resource collection API of Models.
395+
*/
396+
public Models models() {
397+
if (this.models == null) {
398+
this.models = new ModelsImpl(clientObject.getModels(), this);
399+
}
400+
return models;
401+
}
402+
371403
/**
372404
* Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection.
373405
*

sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CognitiveServicesManagementClient.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ public interface CognitiveServicesManagementClient {
6565
*/
6666
ResourceSkusClient getResourceSkus();
6767

68+
/**
69+
* Gets the UsagesClient object to access its operations.
70+
*
71+
* @return the UsagesClient object.
72+
*/
73+
UsagesClient getUsages();
74+
6875
/**
6976
* Gets the OperationsClient object to access its operations.
7077
*
@@ -86,6 +93,13 @@ public interface CognitiveServicesManagementClient {
8693
*/
8794
CommitmentTiersClient getCommitmentTiers();
8895

96+
/**
97+
* Gets the ModelsClient object to access its operations.
98+
*
99+
* @return the ModelsClient object.
100+
*/
101+
ModelsClient getModels();
102+
89103
/**
90104
* Gets the PrivateEndpointConnectionsClient object to access its operations.
91105
*
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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.cognitiveservices.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.util.Context;
11+
import com.azure.resourcemanager.cognitiveservices.fluent.models.ModelInner;
12+
13+
/** An instance of this class provides access to all the operations defined in ModelsClient. */
14+
public interface ModelsClient {
15+
/**
16+
* List Models.
17+
*
18+
* @param location Resource location.
19+
* @throws IllegalArgumentException thrown if parameters fail the validation.
20+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
21+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
22+
* @return the list of cognitive services models as paginated response with {@link PagedIterable}.
23+
*/
24+
@ServiceMethod(returns = ReturnType.COLLECTION)
25+
PagedIterable<ModelInner> list(String location);
26+
27+
/**
28+
* List Models.
29+
*
30+
* @param location Resource location.
31+
* @param context The context to associate with this operation.
32+
* @throws IllegalArgumentException thrown if parameters fail the validation.
33+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
34+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
35+
* @return the list of cognitive services models as paginated response with {@link PagedIterable}.
36+
*/
37+
@ServiceMethod(returns = ReturnType.COLLECTION)
38+
PagedIterable<ModelInner> list(String location, Context context);
39+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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.cognitiveservices.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.util.Context;
11+
import com.azure.resourcemanager.cognitiveservices.fluent.models.UsageInner;
12+
13+
/** An instance of this class provides access to all the operations defined in UsagesClient. */
14+
public interface UsagesClient {
15+
/**
16+
* Get usages for the requested subscription.
17+
*
18+
* @param location Resource location.
19+
* @throws IllegalArgumentException thrown if parameters fail the validation.
20+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
21+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
22+
* @return usages for the requested subscription as paginated response with {@link PagedIterable}.
23+
*/
24+
@ServiceMethod(returns = ReturnType.COLLECTION)
25+
PagedIterable<UsageInner> list(String location);
26+
27+
/**
28+
* Get usages for the requested subscription.
29+
*
30+
* @param location Resource location.
31+
* @param filter An OData filter expression that describes a subset of usages to return. The supported parameter is
32+
* name.value (name of the metric, can have an or of multiple names).
33+
* @param context The context to associate with this operation.
34+
* @throws IllegalArgumentException thrown if parameters fail the validation.
35+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
36+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
37+
* @return usages for the requested subscription as paginated response with {@link PagedIterable}.
38+
*/
39+
@ServiceMethod(returns = ReturnType.COLLECTION)
40+
PagedIterable<UsageInner> list(String location, String filter, Context context);
41+
}

sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountModelInner.java

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
import com.azure.resourcemanager.cognitiveservices.models.DeploymentModel;
1010
import com.azure.resourcemanager.cognitiveservices.models.ModelDeprecationInfo;
1111
import com.azure.resourcemanager.cognitiveservices.models.ModelLifecycleStatus;
12+
import com.azure.resourcemanager.cognitiveservices.models.ModelSku;
1213
import com.fasterxml.jackson.annotation.JsonInclude;
1314
import com.fasterxml.jackson.annotation.JsonProperty;
15+
import java.util.List;
1416
import java.util.Map;
1517

1618
/** Cognitive Services account Model. */
@@ -22,6 +24,18 @@ public final class AccountModelInner extends DeploymentModel {
2224
@JsonProperty(value = "baseModel")
2325
private DeploymentModel baseModel;
2426

27+
/*
28+
* If the model is default version.
29+
*/
30+
@JsonProperty(value = "isDefaultVersion")
31+
private Boolean isDefaultVersion;
32+
33+
/*
34+
* The list of Model Sku.
35+
*/
36+
@JsonProperty(value = "skus")
37+
private List<ModelSku> skus;
38+
2539
/*
2640
* The max capacity.
2741
*/
@@ -84,6 +98,46 @@ public AccountModelInner withBaseModel(DeploymentModel baseModel) {
8498
return this;
8599
}
86100

101+
/**
102+
* Get the isDefaultVersion property: If the model is default version.
103+
*
104+
* @return the isDefaultVersion value.
105+
*/
106+
public Boolean isDefaultVersion() {
107+
return this.isDefaultVersion;
108+
}
109+
110+
/**
111+
* Set the isDefaultVersion property: If the model is default version.
112+
*
113+
* @param isDefaultVersion the isDefaultVersion value to set.
114+
* @return the AccountModelInner object itself.
115+
*/
116+
public AccountModelInner withIsDefaultVersion(Boolean isDefaultVersion) {
117+
this.isDefaultVersion = isDefaultVersion;
118+
return this;
119+
}
120+
121+
/**
122+
* Get the skus property: The list of Model Sku.
123+
*
124+
* @return the skus value.
125+
*/
126+
public List<ModelSku> skus() {
127+
return this.skus;
128+
}
129+
130+
/**
131+
* Set the skus property: The list of Model Sku.
132+
*
133+
* @param skus the skus value to set.
134+
* @return the AccountModelInner object itself.
135+
*/
136+
public AccountModelInner withSkus(List<ModelSku> skus) {
137+
this.skus = skus;
138+
return this;
139+
}
140+
87141
/**
88142
* Get the maxCapacity property: The max capacity.
89143
*
@@ -214,6 +268,13 @@ public AccountModelInner withVersion(String version) {
214268
return this;
215269
}
216270

271+
/** {@inheritDoc} */
272+
@Override
273+
public AccountModelInner withSource(String source) {
274+
super.withSource(source);
275+
return this;
276+
}
277+
217278
/**
218279
* Validates the instance.
219280
*
@@ -225,6 +286,9 @@ public void validate() {
225286
if (baseModel() != null) {
226287
baseModel().validate();
227288
}
289+
if (skus() != null) {
290+
skus().forEach(e -> e.validate());
291+
}
228292
if (deprecation() != null) {
229293
deprecation().validate();
230294
}

sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/DeploymentInner.java

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,18 @@
88
import com.azure.core.management.ProxyResource;
99
import com.azure.core.management.SystemData;
1010
import com.azure.resourcemanager.cognitiveservices.models.DeploymentProperties;
11+
import com.azure.resourcemanager.cognitiveservices.models.Sku;
1112
import com.fasterxml.jackson.annotation.JsonProperty;
1213

1314
/** Cognitive Services account deployment. */
1415
@Fluent
1516
public final class DeploymentInner extends ProxyResource {
17+
/*
18+
* The resource model definition representing SKU
19+
*/
20+
@JsonProperty(value = "sku")
21+
private Sku sku;
22+
1623
/*
1724
* Metadata pertaining to creation and last modification of the resource.
1825
*/
@@ -35,6 +42,26 @@ public final class DeploymentInner extends ProxyResource {
3542
public DeploymentInner() {
3643
}
3744

45+
/**
46+
* Get the sku property: The resource model definition representing SKU.
47+
*
48+
* @return the sku value.
49+
*/
50+
public Sku sku() {
51+
return this.sku;
52+
}
53+
54+
/**
55+
* Set the sku property: The resource model definition representing SKU.
56+
*
57+
* @param sku the sku value to set.
58+
* @return the DeploymentInner object itself.
59+
*/
60+
public DeploymentInner withSku(Sku sku) {
61+
this.sku = sku;
62+
return this;
63+
}
64+
3865
/**
3966
* Get the systemData property: Metadata pertaining to creation and last modification of the resource.
4067
*
@@ -79,6 +106,9 @@ public DeploymentInner withProperties(DeploymentProperties properties) {
79106
* @throws IllegalArgumentException thrown if the instance is not valid.
80107
*/
81108
public void validate() {
109+
if (sku() != null) {
110+
sku().validate();
111+
}
82112
if (properties() != null) {
83113
properties().validate();
84114
}

0 commit comments

Comments
 (0)