Skip to content

Commit

Permalink
[Automation] Generate Fluent Lite from Swagger extendedlocation#packa…
Browse files Browse the repository at this point in the history
…ge-2021-08-15 (#43681)
  • Loading branch information
azure-sdk authored Jan 3, 2025
1 parent af26a48 commit 0626802
Show file tree
Hide file tree
Showing 56 changed files with 95 additions and 4,922 deletions.
2 changes: 1 addition & 1 deletion eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ com.azure.resourcemanager:azure-resourcemanager-purview;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-mysqlflexibleserver;1.0.0-beta.6;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-baremetalinfrastructure;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-quota;1.0.0;1.1.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-extendedlocation;1.0.0-beta.3;1.0.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-extendedlocation;1.0.0-beta.3;1.0.0
com.azure.resourcemanager:azure-resourcemanager-logz;1.0.0-beta.3;1.0.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-storagepool;1.0.0-beta.3;1.0.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-dataprotection;1.3.0;1.4.0-beta.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# Release History

## 1.0.0-beta.4 (Unreleased)
## 1.0.0 (2025-01-03)

### Features Added

### Breaking Changes

### Bugs Fixed
- Azure Resource Manager CustomLocations client library for Java. This package contains Microsoft Azure SDK for CustomLocations Management SDK. The customLocations Rest API spec. Package tag package-2021-08-15. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Other Changes

- Release for Azure Resource Manager CustomLocations client library for Java.

## 1.0.0-beta.3 (2024-10-10)

- Azure Resource Manager CustomLocations client library for Java. This package contains Microsoft Azure SDK for CustomLocations Management SDK. The customLocations Rest API spec. Package tag package-2021-08-31-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager CustomLocations client library for Java.

This package contains Microsoft Azure SDK for CustomLocations Management SDK. The customLocations Rest API spec. Package tag package-2021-08-31-preview. 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 CustomLocations Management SDK. The customLocations Rest API spec. Package tag package-2021-08-15. 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-extendedlocation</artifactId>
<version>1.0.0-beta.3</version>
<version>1.0.0</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
246 changes: 8 additions & 238 deletions sdk/extendedlocation/azure-resourcemanager-extendedlocation/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,12 @@

- [CreateOrUpdate](#customlocations_createorupdate)
- [Delete](#customlocations_delete)
- [FindTargetResourceGroup](#customlocations_findtargetresourcegroup)
- [GetByResourceGroup](#customlocations_getbyresourcegroup)
- [List](#customlocations_list)
- [ListByResourceGroup](#customlocations_listbyresourcegroup)
- [ListEnabledResourceTypes](#customlocations_listenabledresourcetypes)
- [ListOperations](#customlocations_listoperations)
- [Update](#customlocations_update)

## ResourceSyncRules

- [CreateOrUpdate](#resourcesyncrules_createorupdate)
- [Delete](#resourcesyncrules_delete)
- [Get](#resourcesyncrules_get)
- [ListByCustomLocationId](#resourcesyncrules_listbycustomlocationid)
- [Update](#resourcesyncrules_update)
### CustomLocations_CreateOrUpdate

```java
Expand All @@ -34,7 +25,7 @@ import java.util.Arrays;
public final class CustomLocationsCreateOrUpdateSamples {
/*
* x-ms-original-file:
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/stable/2021-08-15/examples/
* CustomLocationsCreate_Update.json
*/
/**
Expand Down Expand Up @@ -71,7 +62,7 @@ public final class CustomLocationsCreateOrUpdateSamples {
public final class CustomLocationsDeleteSamples {
/*
* x-ms-original-file:
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/stable/2021-08-15/examples/
* CustomLocationsDelete.json
*/
/**
Expand All @@ -85,50 +76,6 @@ public final class CustomLocationsDeleteSamples {
}
```

### CustomLocations_FindTargetResourceGroup

```java
import com.azure.resourcemanager.extendedlocation.models.CustomLocationFindTargetResourceGroupProperties;
import java.util.HashMap;
import java.util.Map;

/**
* Samples for CustomLocations FindTargetResourceGroup.
*/
public final class CustomLocationsFindTargetResourceGroupSamples {
/*
* x-ms-original-file:
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/
* CustomLocationsFindTargetResourceGroup.json
*/
/**
* Sample code: Post Custom Location Find Target Resource Group.
*
* @param manager Entry point to CustomLocationsManager.
*/
public static void postCustomLocationFindTargetResourceGroup(
com.azure.resourcemanager.extendedlocation.CustomLocationsManager manager) {
manager.customLocations()
.findTargetResourceGroupWithResponse("testresourcegroup", "customLocation01",
new CustomLocationFindTargetResourceGroupProperties()
.withLabels(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")),
com.azure.core.util.Context.NONE);
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
```

### CustomLocations_GetByResourceGroup

```java
Expand All @@ -138,7 +85,7 @@ public final class CustomLocationsFindTargetResourceGroupSamples {
public final class CustomLocationsGetByResourceGroupSamples {
/*
* x-ms-original-file:
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/stable/2021-08-15/examples/
* CustomLocationsGet.json
*/
/**
Expand All @@ -162,7 +109,7 @@ public final class CustomLocationsGetByResourceGroupSamples {
public final class CustomLocationsListSamples {
/*
* x-ms-original-file:
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/stable/2021-08-15/examples/
* CustomLocationsListBySubscription.json
*/
/**
Expand All @@ -186,7 +133,7 @@ public final class CustomLocationsListSamples {
public final class CustomLocationsListByResourceGroupSamples {
/*
* x-ms-original-file:
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/stable/2021-08-15/examples/
* CustomLocationsListByResourceGroup.json
*/
/**
Expand All @@ -210,7 +157,7 @@ public final class CustomLocationsListByResourceGroupSamples {
public final class CustomLocationsListEnabledResourceTypesSamples {
/*
* x-ms-original-file:
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/stable/2021-08-15/examples/
* CustomLocationsListEnabledResourceTypes.json
*/
/**
Expand All @@ -234,7 +181,7 @@ public final class CustomLocationsListEnabledResourceTypesSamples {
public final class CustomLocationsListOperationsSamples {
/*
* x-ms-original-file:
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/stable/2021-08-15/examples/
* CustomLocationsListOperations.json
*/
/**
Expand Down Expand Up @@ -265,7 +212,7 @@ import java.util.Map;
public final class CustomLocationsUpdateSamples {
/*
* x-ms-original-file:
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/stable/2021-08-15/examples/
* CustomLocationsPatch.json
*/
/**
Expand Down Expand Up @@ -300,180 +247,3 @@ public final class CustomLocationsUpdateSamples {
}
```

### ResourceSyncRules_CreateOrUpdate

```java
import com.azure.resourcemanager.extendedlocation.models.MatchExpressionsProperties;
import com.azure.resourcemanager.extendedlocation.models.ResourceSyncRulePropertiesSelector;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

/**
* Samples for ResourceSyncRules CreateOrUpdate.
*/
public final class ResourceSyncRulesCreateOrUpdateSamples {
/*
* x-ms-original-file:
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/
* ResourceSyncRulesCreate_Update.json
*/
/**
* Sample code: Create/Update Resource Sync Rule.
*
* @param manager Entry point to CustomLocationsManager.
*/
public static void
createUpdateResourceSyncRule(com.azure.resourcemanager.extendedlocation.CustomLocationsManager manager) {
manager.resourceSyncRules()
.define("resourceSyncRule01")
.withRegion("West US")
.withExistingCustomLocation("testresourcegroup", "customLocation01")
.withPriority(999)
.withSelector(new ResourceSyncRulePropertiesSelector()
.withMatchExpressions(Arrays.asList(new MatchExpressionsProperties().withKey("fakeTokenPlaceholder")
.withOperator("In")
.withValues(Arrays.asList("value4"))))
.withMatchLabels(mapOf("key1", "fakeTokenPlaceholder")))
.withTargetResourceGroup(
"/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testresourcegroup")
.create();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
```

### ResourceSyncRules_Delete

```java
/**
* Samples for ResourceSyncRules Delete.
*/
public final class ResourceSyncRulesDeleteSamples {
/*
* x-ms-original-file:
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/
* ResourceSyncRulesDelete.json
*/
/**
* Sample code: Delete Resource Sync Rule.
*
* @param manager Entry point to CustomLocationsManager.
*/
public static void
deleteResourceSyncRule(com.azure.resourcemanager.extendedlocation.CustomLocationsManager manager) {
manager.resourceSyncRules()
.deleteWithResponse("testresourcegroup", "customLocation01", "resourceSyncRule01",
com.azure.core.util.Context.NONE);
}
}
```

### ResourceSyncRules_Get

```java
/**
* Samples for ResourceSyncRules Get.
*/
public final class ResourceSyncRulesGetSamples {
/*
* x-ms-original-file:
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/
* ResourceSyncRulesGet.json
*/
/**
* Sample code: Get Custom Location.
*
* @param manager Entry point to CustomLocationsManager.
*/
public static void getCustomLocation(com.azure.resourcemanager.extendedlocation.CustomLocationsManager manager) {
manager.resourceSyncRules()
.getWithResponse("testresourcegroup", "customLocation01", "resourceSyncRule01",
com.azure.core.util.Context.NONE);
}
}
```

### ResourceSyncRules_ListByCustomLocationId

```java
/**
* Samples for ResourceSyncRules ListByCustomLocationId.
*/
public final class ResourceSyncRulesListByCustomLocationIdSamples {
/*
* x-ms-original-file:
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/
* ResourceSyncRulesListByCustomLocationID.json
*/
/**
* Sample code: List Resource Sync Rules by subscription.
*
* @param manager Entry point to CustomLocationsManager.
*/
public static void
listResourceSyncRulesBySubscription(com.azure.resourcemanager.extendedlocation.CustomLocationsManager manager) {
manager.resourceSyncRules()
.listByCustomLocationId("testresourcegroup", "customLocation01", com.azure.core.util.Context.NONE);
}
}
```

### ResourceSyncRules_Update

```java
import com.azure.resourcemanager.extendedlocation.models.ResourceSyncRule;
import java.util.HashMap;
import java.util.Map;

/**
* Samples for ResourceSyncRules Update.
*/
public final class ResourceSyncRulesUpdateSamples {
/*
* x-ms-original-file:
* specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/
* ResourceSyncRulesPatch.json
*/
/**
* Sample code: Update Resource Sync Rule.
*
* @param manager Entry point to CustomLocationsManager.
*/
public static void
updateResourceSyncRule(com.azure.resourcemanager.extendedlocation.CustomLocationsManager manager) {
ResourceSyncRule resource = manager.resourceSyncRules()
.getWithResponse("testresourcegroup", "customLocation01", "resourceSyncRule01",
com.azure.core.util.Context.NONE)
.getValue();
resource.update()
.withTags(mapOf("tier", "testing"))
.withTargetResourceGroup("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testrg/")
.apply();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
```

Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-extendedlocation</artifactId>
<version>1.0.0-beta.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-extendedlocation;current} -->
<version>1.0.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-extendedlocation;current} -->
<packaging>jar</packaging>

<name>Microsoft Azure SDK for CustomLocations Management</name>
<description>This package contains Microsoft Azure SDK for CustomLocations Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The customLocations Rest API spec. Package tag package-2021-08-31-preview.</description>
<description>This package contains Microsoft Azure SDK for CustomLocations Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The customLocations Rest API spec. Package tag package-2021-08-15.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand All @@ -45,7 +45,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<revapi.skip>true</revapi.skip>
<spotless.skip>false</spotless.skip>
</properties>
<dependencies>
<dependency>
Expand Down
Loading

0 comments on commit 0626802

Please sign in to comment.