Skip to content

Commit

Permalink
CodeGen from PR 24011 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 26128e4632ca60a6075adf703c743cf93dabfada into b74978708bb95475562412d4654c00fbcedd9f89
  • Loading branch information
SDKAuto committed May 16, 2023
1 parent cce62a8 commit fd86746
Show file tree
Hide file tree
Showing 108 changed files with 3,350 additions and 366 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.4 (Unreleased)
## 1.0.0-beta.1 (2023-05-16)

- Azure Resource Manager DataProtection client library for Java. This package contains Microsoft Azure SDK for DataProtection Management SDK. Open API 2.0 Specs for Azure Data Protection service. 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 DataProtection client library for Java.

This package contains Microsoft Azure SDK for DataProtection Management SDK. Open API 2.0 Specs for Azure Data Protection service. Package tag package-2023-01. 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 DataProtection Management SDK. Open API 2.0 Specs for Azure Data Protection service. 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-dataprotection</artifactId>
<version>1.0.0-beta.3</version>
<version>1.0.0-beta.4</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
267 changes: 202 additions & 65 deletions sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
~ Copyright (c) Microsoft Corporation. All rights reserved.
~ Licensed under the MIT License.
~ Code generated by Microsoft (R) AutoRest Code Generator.
-->
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
Expand All @@ -13,7 +18,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for DataProtection Management</name>
<description>This package contains Microsoft Azure SDK for DataProtection Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Open API 2.0 Specs for Azure Data Protection service. Package tag package-2023-01.</description>
<description>This package contains Microsoft Azure SDK for DataProtection Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Open API 2.0 Specs for Azure Data Protection service. Package tag package-2023-05.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand All @@ -38,7 +43,8 @@
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.skip>true</jacoco.skip>
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import com.azure.resourcemanager.dataprotection.implementation.DataProtectionOperationsImpl;
import com.azure.resourcemanager.dataprotection.implementation.DataProtectionsImpl;
import com.azure.resourcemanager.dataprotection.implementation.DeletedBackupInstancesImpl;
import com.azure.resourcemanager.dataprotection.implementation.DppResourceGuardProxiesImpl;
import com.azure.resourcemanager.dataprotection.implementation.ExportJobsImpl;
import com.azure.resourcemanager.dataprotection.implementation.ExportJobsOperationResultsImpl;
import com.azure.resourcemanager.dataprotection.implementation.JobsImpl;
Expand All @@ -49,6 +50,7 @@
import com.azure.resourcemanager.dataprotection.models.DataProtectionOperations;
import com.azure.resourcemanager.dataprotection.models.DataProtections;
import com.azure.resourcemanager.dataprotection.models.DeletedBackupInstances;
import com.azure.resourcemanager.dataprotection.models.DppResourceGuardProxies;
import com.azure.resourcemanager.dataprotection.models.ExportJobs;
import com.azure.resourcemanager.dataprotection.models.ExportJobsOperationResults;
import com.azure.resourcemanager.dataprotection.models.Jobs;
Expand All @@ -64,7 +66,6 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
import java.util.stream.Collectors;

/** Entry point to DataProtectionManager. Open API 2.0 Specs for Azure Data Protection service. */
Expand Down Expand Up @@ -103,6 +104,8 @@ public final class DataProtectionManager {

private ResourceGuards resourceGuards;

private DppResourceGuardProxies dppResourceGuardProxies;

private final DataProtectionClient clientObject;

private DataProtectionManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Expand All @@ -112,7 +115,7 @@ private DataProtectionManager(HttpPipeline httpPipeline, AzureProfile profile, D
new DataProtectionClientBuilder()
.pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(UUID.fromString(profile.getSubscriptionId()))
.subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval)
.buildClient();
}
Expand Down Expand Up @@ -268,7 +271,7 @@ public DataProtectionManager authenticate(TokenCredential credential, AzureProfi
.append("-")
.append("com.azure.resourcemanager.dataprotection")
.append("/")
.append("1.0.0-beta.3");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down Expand Up @@ -536,6 +539,19 @@ public ResourceGuards resourceGuards() {
return resourceGuards;
}

/**
* Gets the resource collection API of DppResourceGuardProxies. It manages ResourceGuardProxyBaseResource.
*
* @return Resource collection API of DppResourceGuardProxies.
*/
public DppResourceGuardProxies dppResourceGuardProxies() {
if (this.dppResourceGuardProxies == null) {
this.dppResourceGuardProxies =
new DppResourceGuardProxiesImpl(clientObject.getDppResourceGuardProxies(), this);
}
return dppResourceGuardProxies;
}

/**
* @return Wrapped service client DataProtectionClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import com.azure.core.http.HttpPipeline;
import java.time.Duration;
import java.util.UUID;

/** The interface for DataProtectionClient class. */
public interface DataProtectionClient {
Expand All @@ -15,7 +14,7 @@ public interface DataProtectionClient {
*
* @return the subscriptionId value.
*/
UUID getSubscriptionId();
String getSubscriptionId();

/**
* Gets server parameter.
Expand Down Expand Up @@ -163,4 +162,11 @@ public interface DataProtectionClient {
* @return the ResourceGuardsClient object.
*/
ResourceGuardsClient getResourceGuards();

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

package com.azure.resourcemanager.dataprotection.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardProxyBaseResourceInner;
import com.azure.resourcemanager.dataprotection.fluent.models.UnlockDeleteResponseInner;
import com.azure.resourcemanager.dataprotection.models.UnlockDeleteRequest;

/** An instance of this class provides access to all the operations defined in DppResourceGuardProxiesClient. */
public interface DppResourceGuardProxiesClient {
/**
* Returns the list of ResourceGuardProxies associated with the vault.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param vaultName The name of the backup vault.
* @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 list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ResourceGuardProxyBaseResourceInner> list(String resourceGroupName, String vaultName);

/**
* Returns the list of ResourceGuardProxies associated with the vault.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param vaultName The name of the backup vault.
* @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 list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ResourceGuardProxyBaseResourceInner> list(
String resourceGroupName, String vaultName, Context context);

/**
* Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param vaultName The name of the backup vault.
* @param resourceGuardProxyName name of the resource guard proxy.
* @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 resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs
* along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<ResourceGuardProxyBaseResourceInner> getWithResponse(
String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context);

/**
* Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param vaultName The name of the backup vault.
* @param resourceGuardProxyName name of the resource guard proxy.
* @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 resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ResourceGuardProxyBaseResourceInner get(String resourceGroupName, String vaultName, String resourceGuardProxyName);

/**
* Creates or Updates a ResourceGuardProxy.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param vaultName The name of the backup vault.
* @param resourceGuardProxyName name of the resource guard proxy.
* @param parameters Request body for operation.
* @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 resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs
* along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<ResourceGuardProxyBaseResourceInner> createOrUpdateWithResponse(
String resourceGroupName,
String vaultName,
String resourceGuardProxyName,
ResourceGuardProxyBaseResourceInner parameters,
Context context);

/**
* Creates or Updates a ResourceGuardProxy.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param vaultName The name of the backup vault.
* @param resourceGuardProxyName name of the resource guard proxy.
* @param parameters Request body for 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 resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ResourceGuardProxyBaseResourceInner createOrUpdate(
String resourceGroupName,
String vaultName,
String resourceGuardProxyName,
ResourceGuardProxyBaseResourceInner parameters);

/**
* Deletes the ResourceGuardProxy.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param vaultName The name of the backup vault.
* @param resourceGuardProxyName name of the resource guard proxy.
* @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 {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<Void> deleteWithResponse(
String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context);

/**
* Deletes the ResourceGuardProxy.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param vaultName The name of the backup vault.
* @param resourceGuardProxyName name of the resource guard proxy.
* @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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String resourceGroupName, String vaultName, String resourceGuardProxyName);

/**
* UnlockDelete call for ResourceGuardProxy, executed before one can delete it.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param vaultName The name of the backup vault.
* @param resourceGuardProxyName name of the resource guard proxy.
* @param parameters Request body for operation.
* @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 response of Unlock Delete API along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<UnlockDeleteResponseInner> unlockDeleteWithResponse(
String resourceGroupName,
String vaultName,
String resourceGuardProxyName,
UnlockDeleteRequest parameters,
Context context);

/**
* UnlockDelete call for ResourceGuardProxy, executed before one can delete it.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param vaultName The name of the backup vault.
* @param resourceGuardProxyName name of the resource guard proxy.
* @param parameters Request body for 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 response of Unlock Delete API.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
UnlockDeleteResponseInner unlockDelete(
String resourceGroupName, String vaultName, String resourceGuardProxyName, UnlockDeleteRequest parameters);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.dataprotection.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.dataprotection.models.DppResource;
import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBase;
import com.fasterxml.jackson.annotation.JsonProperty;

/** ResourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs. */
@Fluent
public final class ResourceGuardProxyBaseResourceInner extends DppResource {
/*
* ResourceGuardProxyBaseResource properties
*/
@JsonProperty(value = "properties")
private ResourceGuardProxyBase properties;

/** Creates an instance of ResourceGuardProxyBaseResourceInner class. */
public ResourceGuardProxyBaseResourceInner() {
}

/**
* Get the properties property: ResourceGuardProxyBaseResource properties.
*
* @return the properties value.
*/
public ResourceGuardProxyBase properties() {
return this.properties;
}

/**
* Set the properties property: ResourceGuardProxyBaseResource properties.
*
* @param properties the properties value to set.
* @return the ResourceGuardProxyBaseResourceInner object itself.
*/
public ResourceGuardProxyBaseResourceInner withProperties(ResourceGuardProxyBase properties) {
this.properties = properties;
return this;
}

/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
public void validate() {
super.validate();
if (properties() != null) {
properties().validate();
}
}
}
Loading

0 comments on commit fd86746

Please sign in to comment.