Skip to content
Closed
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.1.0-beta.1 (Unreleased)
## 1.0.0-beta.1 (2023-05-17)

- 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).

### Features Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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-2022-12. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
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).

## We'd love to hear your feedback

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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for CognitiveServices Management</name>
<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>
<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>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,25 @@
import com.azure.resourcemanager.cognitiveservices.implementation.CommitmentTiersImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.DeletedAccountsImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.DeploymentsImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.ModelsImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.OperationsImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.PrivateEndpointConnectionsImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.PrivateLinkResourcesImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.ResourceProvidersImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.ResourceSkusImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.UsagesImpl;
import com.azure.resourcemanager.cognitiveservices.models.Accounts;
import com.azure.resourcemanager.cognitiveservices.models.CommitmentPlans;
import com.azure.resourcemanager.cognitiveservices.models.CommitmentTiers;
import com.azure.resourcemanager.cognitiveservices.models.DeletedAccounts;
import com.azure.resourcemanager.cognitiveservices.models.Deployments;
import com.azure.resourcemanager.cognitiveservices.models.Models;
import com.azure.resourcemanager.cognitiveservices.models.Operations;
import com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointConnections;
import com.azure.resourcemanager.cognitiveservices.models.PrivateLinkResources;
import com.azure.resourcemanager.cognitiveservices.models.ResourceProviders;
import com.azure.resourcemanager.cognitiveservices.models.ResourceSkus;
import com.azure.resourcemanager.cognitiveservices.models.Usages;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
Expand All @@ -60,12 +64,16 @@ public final class CognitiveServicesManager {

private ResourceSkus resourceSkus;

private Usages usages;

private Operations operations;

private ResourceProviders resourceProviders;

private CommitmentTiers commitmentTiers;

private Models models;

private PrivateEndpointConnections privateEndpointConnections;

private PrivateLinkResources privateLinkResources;
Expand Down Expand Up @@ -239,7 +247,7 @@ public CognitiveServicesManager authenticate(TokenCredential credential, AzurePr
.append("-")
.append("com.azure.resourcemanager.cognitiveservices")
.append("/")
.append("1.0.0");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down Expand Up @@ -332,6 +340,18 @@ public ResourceSkus resourceSkus() {
return resourceSkus;
}

/**
* Gets the resource collection API of Usages.
*
* @return Resource collection API of Usages.
*/
public Usages usages() {
if (this.usages == null) {
this.usages = new UsagesImpl(clientObject.getUsages(), this);
}
return usages;
}

/**
* Gets the resource collection API of Operations.
*
Expand Down Expand Up @@ -368,6 +388,18 @@ public CommitmentTiers commitmentTiers() {
return commitmentTiers;
}

/**
* Gets the resource collection API of Models.
*
* @return Resource collection API of Models.
*/
public Models models() {
if (this.models == null) {
this.models = new ModelsImpl(clientObject.getModels(), this);
}
return models;
}

/**
* Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ public interface CognitiveServicesManagementClient {
*/
ResourceSkusClient getResourceSkus();

/**
* Gets the UsagesClient object to access its operations.
*
* @return the UsagesClient object.
*/
UsagesClient getUsages();

/**
* Gets the OperationsClient object to access its operations.
*
Expand All @@ -86,6 +93,13 @@ public interface CognitiveServicesManagementClient {
*/
CommitmentTiersClient getCommitmentTiers();

/**
* Gets the ModelsClient object to access its operations.
*
* @return the ModelsClient object.
*/
ModelsClient getModels();

/**
* Gets the PrivateEndpointConnectionsClient object to access its operations.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.cognitiveservices.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.resourcemanager.cognitiveservices.fluent.models.ModelInner;

/** An instance of this class provides access to all the operations defined in ModelsClient. */
public interface ModelsClient {
/**
* List Models.
*
* @param location Resource location.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of cognitive services models as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ModelInner> list(String location);

/**
* List Models.
*
* @param location Resource location.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the list of cognitive services models as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ModelInner> list(String location, Context context);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.cognitiveservices.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.resourcemanager.cognitiveservices.fluent.models.UsageInner;

/** An instance of this class provides access to all the operations defined in UsagesClient. */
public interface UsagesClient {
/**
* Get usages for the requested subscription.
*
* @param location Resource location.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return usages for the requested subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<UsageInner> list(String location);

/**
* Get usages for the requested subscription.
*
* @param location Resource location.
* @param filter An OData filter expression that describes a subset of usages to return. The supported parameter is
* name.value (name of the metric, can have an or of multiple names).
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return usages for the requested subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<UsageInner> list(String location, String filter, Context context);
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
import com.azure.resourcemanager.cognitiveservices.models.DeploymentModel;
import com.azure.resourcemanager.cognitiveservices.models.ModelDeprecationInfo;
import com.azure.resourcemanager.cognitiveservices.models.ModelLifecycleStatus;
import com.azure.resourcemanager.cognitiveservices.models.ModelSku;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;

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

/*
* If the model is default version.
*/
@JsonProperty(value = "isDefaultVersion")
private Boolean isDefaultVersion;

/*
* The list of Model Sku.
*/
@JsonProperty(value = "skus")
private List<ModelSku> skus;

/*
* The max capacity.
*/
Expand Down Expand Up @@ -84,6 +98,46 @@ public AccountModelInner withBaseModel(DeploymentModel baseModel) {
return this;
}

/**
* Get the isDefaultVersion property: If the model is default version.
*
* @return the isDefaultVersion value.
*/
public Boolean isDefaultVersion() {
return this.isDefaultVersion;
}

/**
* Set the isDefaultVersion property: If the model is default version.
*
* @param isDefaultVersion the isDefaultVersion value to set.
* @return the AccountModelInner object itself.
*/
public AccountModelInner withIsDefaultVersion(Boolean isDefaultVersion) {
this.isDefaultVersion = isDefaultVersion;
return this;
}

/**
* Get the skus property: The list of Model Sku.
*
* @return the skus value.
*/
public List<ModelSku> skus() {
return this.skus;
}

/**
* Set the skus property: The list of Model Sku.
*
* @param skus the skus value to set.
* @return the AccountModelInner object itself.
*/
public AccountModelInner withSkus(List<ModelSku> skus) {
this.skus = skus;
return this;
}

/**
* Get the maxCapacity property: The max capacity.
*
Expand Down Expand Up @@ -214,6 +268,13 @@ public AccountModelInner withVersion(String version) {
return this;
}

/** {@inheritDoc} */
@Override
public AccountModelInner withSource(String source) {
super.withSource(source);
return this;
}

/**
* Validates the instance.
*
Expand All @@ -225,6 +286,9 @@ public void validate() {
if (baseModel() != null) {
baseModel().validate();
}
if (skus() != null) {
skus().forEach(e -> e.validate());
}
if (deprecation() != null) {
deprecation().validate();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.cognitiveservices.models.DeploymentProperties;
import com.azure.resourcemanager.cognitiveservices.models.Sku;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Cognitive Services account deployment. */
@Fluent
public final class DeploymentInner extends ProxyResource {
/*
* The resource model definition representing SKU
*/
@JsonProperty(value = "sku")
private Sku sku;

/*
* Metadata pertaining to creation and last modification of the resource.
*/
Expand All @@ -35,6 +42,26 @@ public final class DeploymentInner extends ProxyResource {
public DeploymentInner() {
}

/**
* Get the sku property: The resource model definition representing SKU.
*
* @return the sku value.
*/
public Sku sku() {
return this.sku;
}

/**
* Set the sku property: The resource model definition representing SKU.
*
* @param sku the sku value to set.
* @return the DeploymentInner object itself.
*/
public DeploymentInner withSku(Sku sku) {
this.sku = sku;
return this;
}

/**
* Get the systemData property: Metadata pertaining to creation and last modification of the resource.
*
Expand Down Expand Up @@ -79,6 +106,9 @@ public DeploymentInner withProperties(DeploymentProperties properties) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (sku() != null) {
sku().validate();
}
if (properties() != null) {
properties().validate();
}
Expand Down
Loading