Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReleasePR azure-resourcemanager-confluent] [Hub Generated] Review request for Microsoft.Confluent to add version stable/2021-12-01 #25107

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,7 +1,8 @@
# Release History

## 1.0.0-beta.3 (Unreleased)
## 1.0.0-beta.1 (2021-10-29)

- Azure Resource Manager Confluent client library for Java. This package contains Microsoft Azure SDK for Confluent Management SDK. Package tag package-preview-2021-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## 1.0.0-beta.2 (2021-05-13)

Expand Down
7 changes: 5 additions & 2 deletions sdk/confluent/azure-resourcemanager-confluent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager Confluent client library for Java.

This package contains Microsoft Azure SDK for Confluent Management SDK. Package tag package-2021-03-01-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 Confluent Management SDK. Package tag package-preview-2021-09. 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-confluent</artifactId>
<version>1.0.0-beta.2</version>
<version>1.0.0-beta.3</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down Expand Up @@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on

## Examples

[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/confluent/azure-resourcemanager-confluent/SAMPLE.md)


## Troubleshooting

## Next steps
Expand Down
321 changes: 321 additions & 0 deletions sdk/confluent/azure-resourcemanager-confluent/SAMPLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,321 @@
# Code snippets and samples


## MarketplaceAgreements

- [Create](#marketplaceagreements_create)
- [List](#marketplaceagreements_list)

## Organization

- [Create](#organization_create)
- [Delete](#organization_delete)
- [GetByResourceGroup](#organization_getbyresourcegroup)
- [List](#organization_list)
- [ListByResourceGroup](#organization_listbyresourcegroup)
- [Update](#organization_update)

## OrganizationOperations

- [List](#organizationoperations_list)

## Validations

- [ValidateOrganization](#validations_validateorganization)
### MarketplaceAgreements_Create

```java
import com.azure.core.util.Context;

/** Samples for MarketplaceAgreements Create. */
public final class MarketplaceAgreementsCreateSamples {
/*
* x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/MarketplaceAgreements_Create.json
*/
/**
* Sample code: MarketplaceAgreements_Create.
*
* @param manager Entry point to ConfluentManager.
*/
public static void marketplaceAgreementsCreate(com.azure.resourcemanager.confluent.ConfluentManager manager) {
manager.marketplaceAgreements().createWithResponse(null, Context.NONE);
}
}
```

### MarketplaceAgreements_List

```java
import com.azure.core.util.Context;

/** Samples for MarketplaceAgreements List. */
public final class MarketplaceAgreementsListSamples {
/*
* x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/MarketplaceAgreements_List.json
*/
/**
* Sample code: MarketplaceAgreements_List.
*
* @param manager Entry point to ConfluentManager.
*/
public static void marketplaceAgreementsList(com.azure.resourcemanager.confluent.ConfluentManager manager) {
manager.marketplaceAgreements().list(Context.NONE);
}
}
```

### Organization_Create

```java
import com.azure.resourcemanager.confluent.models.OfferDetail;
import com.azure.resourcemanager.confluent.models.UserDetail;
import java.util.HashMap;
import java.util.Map;

/** Samples for Organization Create. */
public final class OrganizationCreateSamples {
/*
* x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/Organization_Create.json
*/
/**
* Sample code: Organization_Create.
*
* @param manager Entry point to ConfluentManager.
*/
public static void organizationCreate(com.azure.resourcemanager.confluent.ConfluentManager manager) {
manager
.organizations()
.define("myOrganization")
.withRegion("West US")
.withExistingResourceGroup("myResourceGroup")
.withOfferDetail(
new OfferDetail()
.withPublisherId("string")
.withId("string")
.withPlanId("string")
.withPlanName("string")
.withTermUnit("string"))
.withUserDetail(
new UserDetail()
.withFirstName("string")
.withLastName("string")
.withEmailAddress("contoso@microsoft.com"))
.withTags(mapOf("Environment", "Dev"))
.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;
}
}
```

### Organization_Delete

```java
import com.azure.core.util.Context;

/** Samples for Organization Delete. */
public final class OrganizationDeleteSamples {
/*
* x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/Organization_Delete.json
*/
/**
* Sample code: Confluent_Delete.
*
* @param manager Entry point to ConfluentManager.
*/
public static void confluentDelete(com.azure.resourcemanager.confluent.ConfluentManager manager) {
manager.organizations().delete("myResourceGroup", "myOrganization", Context.NONE);
}
}
```

### Organization_GetByResourceGroup

```java
import com.azure.core.util.Context;

/** Samples for Organization GetByResourceGroup. */
public final class OrganizationGetByResourceGroupSamples {
/*
* x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/Organization_Get.json
*/
/**
* Sample code: Organization_Get.
*
* @param manager Entry point to ConfluentManager.
*/
public static void organizationGet(com.azure.resourcemanager.confluent.ConfluentManager manager) {
manager.organizations().getByResourceGroupWithResponse("myResourceGroup", "myOrganization", Context.NONE);
}
}
```

### Organization_List

```java
import com.azure.core.util.Context;

/** Samples for Organization List. */
public final class OrganizationListSamples {
/*
* x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/Organization_ListBySubscription.json
*/
/**
* Sample code: Organization_ListBySubscription.
*
* @param manager Entry point to ConfluentManager.
*/
public static void organizationListBySubscription(com.azure.resourcemanager.confluent.ConfluentManager manager) {
manager.organizations().list(Context.NONE);
}
}
```

### Organization_ListByResourceGroup

```java
import com.azure.core.util.Context;

/** Samples for Organization ListByResourceGroup. */
public final class OrganizationListByResourceGroupSamples {
/*
* x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/Organization_ListByResourceGroup.json
*/
/**
* Sample code: Organization_ListByResourceGroup.
*
* @param manager Entry point to ConfluentManager.
*/
public static void organizationListByResourceGroup(com.azure.resourcemanager.confluent.ConfluentManager manager) {
manager.organizations().listByResourceGroup("myResourceGroup", Context.NONE);
}
}
```

### Organization_Update

```java
import com.azure.core.util.Context;
import com.azure.resourcemanager.confluent.models.OrganizationResource;
import java.util.HashMap;
import java.util.Map;

/** Samples for Organization Update. */
public final class OrganizationUpdateSamples {
/*
* x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/Organization_Update.json
*/
/**
* Sample code: Confluent_Update.
*
* @param manager Entry point to ConfluentManager.
*/
public static void confluentUpdate(com.azure.resourcemanager.confluent.ConfluentManager manager) {
OrganizationResource resource =
manager
.organizations()
.getByResourceGroupWithResponse("myResourceGroup", "myOrganization", Context.NONE)
.getValue();
resource.update().withTags(mapOf("client", "dev-client", "env", "dev")).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;
}
}
```

### OrganizationOperations_List

```java
import com.azure.core.util.Context;

/** Samples for OrganizationOperations List. */
public final class OrganizationOperationsListSamples {
/*
* x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/OrganizationOperations_List.json
*/
/**
* Sample code: OrganizationOperations_List.
*
* @param manager Entry point to ConfluentManager.
*/
public static void organizationOperationsList(com.azure.resourcemanager.confluent.ConfluentManager manager) {
manager.organizationOperations().list(Context.NONE);
}
}
```

### Validations_ValidateOrganization

```java
import com.azure.core.util.Context;
import com.azure.resourcemanager.confluent.fluent.models.OrganizationResourceInner;
import com.azure.resourcemanager.confluent.models.OfferDetail;
import com.azure.resourcemanager.confluent.models.UserDetail;
import java.util.HashMap;
import java.util.Map;

/** Samples for Validations ValidateOrganization. */
public final class ValidationsValidateOrganizationSamples {
/*
* x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/Validations_ValidateOrganizations.json
*/
/**
* Sample code: Validations_ValidateOrganizations.
*
* @param manager Entry point to ConfluentManager.
*/
public static void validationsValidateOrganizations(com.azure.resourcemanager.confluent.ConfluentManager manager) {
manager
.validations()
.validateOrganizationWithResponse(
"myResourceGroup",
"myOrganization",
new OrganizationResourceInner()
.withLocation("West US")
.withTags(mapOf("Environment", "Dev"))
.withOfferDetail(
new OfferDetail()
.withPublisherId("string")
.withId("string")
.withPlanId("string")
.withPlanName("string")
.withTermUnit("string"))
.withUserDetail(
new UserDetail()
.withFirstName("string")
.withLastName("string")
.withEmailAddress("abc@microsoft.com")),
Context.NONE);
}

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

Loading