Skip to content

Commit

Permalink
[Automation] Generate Fluent Lite from graphservicesprod#package-2023…
Browse files Browse the repository at this point in the history
…-04-13 (#35605)

* [Automation] External Change

* [Automation] Generate Fluent Lite from graphservicesprod#package-2023-04-13
  • Loading branch information
azure-sdk committed Jun 26, 2023
1 parent 28f1a93 commit d060ccb
Show file tree
Hide file tree
Showing 30 changed files with 1,282 additions and 1,446 deletions.
2 changes: 1 addition & 1 deletion eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ com.azure.resourcemanager:azure-resourcemanager-reservations;1.0.0-beta.2;1.0.0-
com.azure.resourcemanager:azure-resourcemanager-storagemover;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-containerservicefleet;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-voiceservices;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-graphservices;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-graphservices;1.0.0-beta.1;1.0.0
com.azure.resourcemanager:azure-resourcemanager-paloaltonetworks-ngfw;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-newrelicobservability;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-qumulo;1.0.0;1.1.0-beta.1
Expand Down
2 changes: 1 addition & 1 deletion sdk/avs/azure-resourcemanager-avs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-resources</artifactId>
<version>2.27.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-resources;dependency} -->
<version>2.28.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-resources;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
Expand Down
24 changes: 20 additions & 4 deletions sdk/graphservices/azure-resourcemanager-graphservices/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0 (2023-06-26)

### Features Added
- Azure Resource Manager GraphServices client library for Java. This package contains Microsoft Azure SDK for GraphServices Management SDK. Self service experience for Microsoft Graph metered services. Package tag package-2023-04-13. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Breaking Changes

### Bugs Fixed
* `models.AccountOperations` was removed

#### `GraphServicesManager` was modified

* `accountOperations()` was removed

### Features Added

#### `models.Accounts` was modified

### Other Changes
* `getByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was added
* `deleteByResourceGroup(java.lang.String,java.lang.String)` was added
* `getByResourceGroupWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
* `deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was added
* `define(java.lang.String)` was added
* `getByResourceGroup(java.lang.String,java.lang.String)` was added
* `deleteById(java.lang.String)` was added
* `getById(java.lang.String)` was added
* `deleteByResourceGroupWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added

## 1.0.0-beta.1 (2023-03-16)

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

Azure Resource Manager GraphServices client library for Java.

This package contains Microsoft Azure SDK for GraphServices Management SDK. Self service experience for Microsoft Graph metered services. Package tag package-2022-09-22-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 GraphServices Management SDK. Self service experience for Microsoft Graph metered services. Package tag package-2023-04-13. 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-graphservices</artifactId>
<version>1.0.0-beta.1</version>
<version>1.0.0</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
151 changes: 67 additions & 84 deletions sdk/graphservices/azure-resourcemanager-graphservices/SAMPLE.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
# Code snippets and samples


## AccountOperation

- [CreateAndUpdate](#accountoperation_createandupdate)
- [Delete](#accountoperation_delete)
- [GetByResourceGroup](#accountoperation_getbyresourcegroup)
- [Update](#accountoperation_update)

## Accounts

- [CreateAndUpdate](#accounts_createandupdate)
- [Delete](#accounts_delete)
- [GetByResourceGroup](#accounts_getbyresourcegroup)
- [List](#accounts_list)
- [ListByResourceGroup](#accounts_listbyresourcegroup)
- [Update](#accounts_update)

## Operation
## Operations

- [List](#operation_list)
### AccountOperation_CreateAndUpdate
- [List](#operations_list)
### Accounts_CreateAndUpdate

```java
import com.azure.resourcemanager.graphservices.models.AccountResourceProperties;
import java.util.HashMap;
import java.util.Map;

/** Samples for AccountOperation CreateAndUpdate. */
public final class AccountOperationCreateAndUpdateSamples {
/** Samples for Accounts CreateAndUpdate. */
public final class AccountsCreateAndUpdateSamples {
/*
* x-ms-original-file: specification/graphservicesprod/resource-manager/Microsoft.GraphServices/preview/2022-09-22-preview/examples/Accounts_Create.json
* x-ms-original-file: specification/graphservicesprod/resource-manager/Microsoft.GraphServices/stable/2023-04-13/examples/Accounts_Create.json
*/
/**
* Sample code: Create Account resource.
Expand All @@ -35,35 +30,23 @@ public final class AccountOperationCreateAndUpdateSamples {
*/
public static void createAccountResource(com.azure.resourcemanager.graphservices.GraphServicesManager manager) {
manager
.accountOperations()
.accounts()
.define("11111111-aaaa-1111-bbbb-1111111111111")
.withRegion((String) null)
.withExistingResourceGroup("testResourceGroupGRAM")
.withProperties(new AccountResourceProperties().withAppId("11111111-aaaa-1111-bbbb-111111111111"))
.withTags(mapOf("tag1", "value1", "tag2", "value2"))
.create();
}

@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;
}
}
```

### AccountOperation_Delete
### Accounts_Delete

```java
/** Samples for AccountOperation Delete. */
public final class AccountOperationDeleteSamples {
/** Samples for Accounts Delete. */
public final class AccountsDeleteSamples {
/*
* x-ms-original-file: specification/graphservicesprod/resource-manager/Microsoft.GraphServices/preview/2022-09-22-preview/examples/Accounts_Delete.json
* x-ms-original-file: specification/graphservicesprod/resource-manager/Microsoft.GraphServices/stable/2023-04-13/examples/Accounts_Delete.json
*/
/**
* Sample code: Delete account resource.
Expand All @@ -72,20 +55,20 @@ public final class AccountOperationDeleteSamples {
*/
public static void deleteAccountResource(com.azure.resourcemanager.graphservices.GraphServicesManager manager) {
manager
.accountOperations()
.accounts()
.deleteByResourceGroupWithResponse(
"testResourceGroupGRAM", "11111111-aaaa-1111-bbbb-111111111111", com.azure.core.util.Context.NONE);
}
}
```

### AccountOperation_GetByResourceGroup
### Accounts_GetByResourceGroup

```java
/** Samples for AccountOperation GetByResourceGroup. */
public final class AccountOperationGetByResourceGroupSamples {
/** Samples for Accounts GetByResourceGroup. */
public final class AccountsGetByResourceGroupSamples {
/*
* x-ms-original-file: specification/graphservicesprod/resource-manager/Microsoft.GraphServices/preview/2022-09-22-preview/examples/Accounts_Get.json
* x-ms-original-file: specification/graphservicesprod/resource-manager/Microsoft.GraphServices/stable/2023-04-13/examples/Accounts_Get.json
*/
/**
* Sample code: Get accounts.
Expand All @@ -94,60 +77,20 @@ public final class AccountOperationGetByResourceGroupSamples {
*/
public static void getAccounts(com.azure.resourcemanager.graphservices.GraphServicesManager manager) {
manager
.accountOperations()
.accounts()
.getByResourceGroupWithResponse(
"testResourceGroupGRAM", "11111111-aaaa-1111-bbbb-111111111111", com.azure.core.util.Context.NONE);
}
}
```

### AccountOperation_Update

```java
import com.azure.resourcemanager.graphservices.models.AccountResource;
import java.util.HashMap;
import java.util.Map;

/** Samples for AccountOperation Update. */
public final class AccountOperationUpdateSamples {
/*
* x-ms-original-file: specification/graphservicesprod/resource-manager/Microsoft.GraphServices/preview/2022-09-22-preview/examples/Accounts_Update.json
*/
/**
* Sample code: Update account resource.
*
* @param manager Entry point to GraphServicesManager.
*/
public static void updateAccountResource(com.azure.resourcemanager.graphservices.GraphServicesManager manager) {
AccountResource resource =
manager
.accountOperations()
.getByResourceGroupWithResponse(
"testResourceGroupGRAM", "11111111-aaaa-1111-bbbb-111111111111", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply();
}

@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;
}
}
```

### Accounts_List

```java
/** Samples for Accounts List. */
public final class AccountsListSamples {
/*
* x-ms-original-file: specification/graphservicesprod/resource-manager/Microsoft.GraphServices/preview/2022-09-22-preview/examples/Accounts_List_Sub.json
* x-ms-original-file: specification/graphservicesprod/resource-manager/Microsoft.GraphServices/stable/2023-04-13/examples/Accounts_List_Sub.json
*/
/**
* Sample code: Get list of accounts by subscription.
Expand All @@ -167,7 +110,7 @@ public final class AccountsListSamples {
/** Samples for Accounts ListByResourceGroup. */
public final class AccountsListByResourceGroupSamples {
/*
* x-ms-original-file: specification/graphservicesprod/resource-manager/Microsoft.GraphServices/preview/2022-09-22-preview/examples/Accounts_List.json
* x-ms-original-file: specification/graphservicesprod/resource-manager/Microsoft.GraphServices/stable/2023-04-13/examples/Accounts_List.json
*/
/**
* Sample code: Create or update account resource.
Expand All @@ -181,13 +124,53 @@ public final class AccountsListByResourceGroupSamples {
}
```

### Operation_List
### Accounts_Update

```java
import com.azure.resourcemanager.graphservices.models.AccountResource;
import java.util.HashMap;
import java.util.Map;

/** Samples for Accounts Update. */
public final class AccountsUpdateSamples {
/*
* x-ms-original-file: specification/graphservicesprod/resource-manager/Microsoft.GraphServices/stable/2023-04-13/examples/Accounts_Update.json
*/
/**
* Sample code: Update account resource.
*
* @param manager Entry point to GraphServicesManager.
*/
public static void updateAccountResource(com.azure.resourcemanager.graphservices.GraphServicesManager manager) {
AccountResource resource =
manager
.accounts()
.getByResourceGroupWithResponse(
"testResourceGroupGRAM", "11111111-aaaa-1111-bbbb-111111111111", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply();
}

@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;
}
}
```

### Operations_List

```java
/** Samples for Operation List. */
public final class OperationListSamples {
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
* x-ms-original-file: specification/graphservicesprod/resource-manager/Microsoft.GraphServices/preview/2022-09-22-preview/examples/Operations_List.json
* x-ms-original-file: specification/graphservicesprod/resource-manager/Microsoft.GraphServices/stable/2023-04-13/examples/Operations_List.json
*/
/**
* Sample code: Get list of operations.
Expand Down
4 changes: 2 additions & 2 deletions sdk/graphservices/azure-resourcemanager-graphservices/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

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

<name>Microsoft Azure SDK for GraphServices Management</name>
<description>This package contains Microsoft Azure SDK for GraphServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Self service experience for Microsoft Graph metered services. Package tag package-2022-09-22-preview.</description>
<description>This package contains Microsoft Azure SDK for GraphServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Self service experience for Microsoft Graph metered services. Package tag package-2023-04-13.</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 @@ -24,11 +24,9 @@
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.graphservices.fluent.GraphServices;
import com.azure.resourcemanager.graphservices.implementation.AccountOperationsImpl;
import com.azure.resourcemanager.graphservices.implementation.AccountsImpl;
import com.azure.resourcemanager.graphservices.implementation.GraphServicesBuilder;
import com.azure.resourcemanager.graphservices.implementation.OperationsImpl;
import com.azure.resourcemanager.graphservices.models.AccountOperations;
import com.azure.resourcemanager.graphservices.models.Accounts;
import com.azure.resourcemanager.graphservices.models.Operations;
import java.time.Duration;
Expand All @@ -42,8 +40,6 @@
public final class GraphServicesManager {
private Accounts accounts;

private AccountOperations accountOperations;

private Operations operations;

private final GraphServices clientObject;
Expand Down Expand Up @@ -211,7 +207,7 @@ public GraphServicesManager authenticate(TokenCredential credential, AzureProfil
.append("-")
.append("com.azure.resourcemanager.graphservices")
.append("/")
.append("1.0.0-beta.1");
.append("1.0.0");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down Expand Up @@ -269,7 +265,7 @@ public GraphServicesManager authenticate(TokenCredential credential, AzureProfil
}

/**
* Gets the resource collection API of Accounts.
* Gets the resource collection API of Accounts. It manages AccountResource.
*
* @return Resource collection API of Accounts.
*/
Expand All @@ -280,18 +276,6 @@ public Accounts accounts() {
return accounts;
}

/**
* Gets the resource collection API of AccountOperations. It manages AccountResource.
*
* @return Resource collection API of AccountOperations.
*/
public AccountOperations accountOperations() {
if (this.accountOperations == null) {
this.accountOperations = new AccountOperationsImpl(clientObject.getAccountOperations(), this);
}
return accountOperations;
}

/**
* Gets the resource collection API of Operations.
*
Expand Down
Loading

0 comments on commit d060ccb

Please sign in to comment.