Skip to content

Commit

Permalink
mgmt, standbypool from tsp (Azure#39706)
Browse files Browse the repository at this point in the history
  • Loading branch information
weidongxu-microsoft authored Apr 19, 2024
1 parent 5385946 commit 27e9b3b
Show file tree
Hide file tree
Showing 124 changed files with 1,965 additions and 2,772 deletions.
140 changes: 50 additions & 90 deletions eng/emitter-package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions eng/emitter-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"@typespec/compiler": "0.55.0",
"@typespec/versioning": "0.55.0",
"@azure-tools/typespec-azure-core": "0.41.0",
"@azure-tools/typespec-azure-resource-manager": "0.41.0",
"@azure-tools/typespec-autorest": "0.41.1",
"@typespec/http": "0.55.0",
"@azure-tools/typespec-client-generator-core": "0.41.3"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Release History

## 1.0.0-beta.1 (2024-04-12)
## 1.0.0-beta.1 (2024-04-25)

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

65 changes: 9 additions & 56 deletions sdk/standbypool/azure-resourcemanager-standbypool/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
* Samples for Operations List.
*/
public final class OperationsListSamples {
/*
* x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/Operations_List.json
*/
/**
* Sample code: Operations_List.
*
Expand Down Expand Up @@ -65,9 +62,6 @@ import java.util.Map;
* Samples for StandbyContainerGroupPools CreateOrUpdate.
*/
public final class StandbyContainerGroupPoolsCreateOrUpdateSamples {
/*
* x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_CreateOrUpdate.json
*/
/**
* Sample code: StandbyContainerGroupPools_CreateOrUpdate.
*
Expand Down Expand Up @@ -113,9 +107,6 @@ public final class StandbyContainerGroupPoolsCreateOrUpdateSamples {
* Samples for StandbyContainerGroupPools Delete.
*/
public final class StandbyContainerGroupPoolsDeleteSamples {
/*
* x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_Delete.json
*/
/**
* Sample code: StandbyContainerGroupPools_Delete.
*
Expand All @@ -135,9 +126,6 @@ public final class StandbyContainerGroupPoolsDeleteSamples {
* Samples for StandbyContainerGroupPools GetByResourceGroup.
*/
public final class StandbyContainerGroupPoolsGetByResourceGroupSamples {
/*
* x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_Get.json
*/
/**
* Sample code: StandbyContainerGroupPools_Get.
*
Expand All @@ -157,9 +145,6 @@ public final class StandbyContainerGroupPoolsGetByResourceGroupSamples {
* Samples for StandbyContainerGroupPools List.
*/
public final class StandbyContainerGroupPoolsListSamples {
/*
* x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_ListBySubscription.json
*/
/**
* Sample code: StandbyContainerGroupPools_ListBySubscription.
*
Expand All @@ -179,9 +164,6 @@ public final class StandbyContainerGroupPoolsListSamples {
* Samples for StandbyContainerGroupPools ListByResourceGroup.
*/
public final class StandbyContainerGroupPoolsListByResourceGroupSamples {
/*
* x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_ListByResourceGroup.json
*/
/**
* Sample code: StandbyContainerGroupPools_ListByResourceGroup.
*
Expand All @@ -197,10 +179,10 @@ public final class StandbyContainerGroupPoolsListByResourceGroupSamples {
### StandbyContainerGroupPools_Update

```java
import com.azure.resourcemanager.standbypool.models.ContainerGroupProfileUpdate;
import com.azure.resourcemanager.standbypool.models.ContainerGroupPropertiesUpdate;
import com.azure.resourcemanager.standbypool.models.ContainerGroupProfile;
import com.azure.resourcemanager.standbypool.models.ContainerGroupProperties;
import com.azure.resourcemanager.standbypool.models.RefillPolicy;
import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolElasticityProfileUpdate;
import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolElasticityProfile;
import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResource;
import com.azure.resourcemanager.standbypool.models.StandbyContainerGroupPoolResourceUpdateProperties;
import com.azure.resourcemanager.standbypool.models.Subnet;
Expand All @@ -212,9 +194,6 @@ import java.util.Map;
* Samples for StandbyContainerGroupPools Update.
*/
public final class StandbyContainerGroupPoolsUpdateSamples {
/*
* x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_Update.json
*/
/**
* Sample code: StandbyContainerGroupPools_Update.
*
Expand All @@ -228,11 +207,10 @@ public final class StandbyContainerGroupPoolsUpdateSamples {
resource.update()
.withTags(mapOf())
.withProperties(new StandbyContainerGroupPoolResourceUpdateProperties()
.withElasticityProfile(
new StandbyContainerGroupPoolElasticityProfileUpdate().withMaxReadyCapacity(1743L)
.withRefillPolicy(RefillPolicy.ALWAYS))
.withContainerGroupProperties(new ContainerGroupPropertiesUpdate()
.withContainerGroupProfile(new ContainerGroupProfileUpdate().withId(
.withElasticityProfile(new StandbyContainerGroupPoolElasticityProfile().withMaxReadyCapacity(1743L)
.withRefillPolicy(RefillPolicy.ALWAYS))
.withContainerGroupProperties(new ContainerGroupProperties()
.withContainerGroupProfile(new ContainerGroupProfile().withId(
"/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile")
.withRevision(2L))
.withSubnetIds(Arrays.asList(new Subnet().withId(
Expand Down Expand Up @@ -267,9 +245,6 @@ import java.util.Map;
* Samples for StandbyVirtualMachinePools CreateOrUpdate.
*/
public final class StandbyVirtualMachinePoolsCreateOrUpdateSamples {
/*
* x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_CreateOrUpdate.json
*/
/**
* Sample code: StandbyVirtualMachinePools_CreateOrUpdate.
*
Expand Down Expand Up @@ -311,9 +286,6 @@ public final class StandbyVirtualMachinePoolsCreateOrUpdateSamples {
* Samples for StandbyVirtualMachinePools Delete.
*/
public final class StandbyVirtualMachinePoolsDeleteSamples {
/*
* x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_Delete.json
*/
/**
* Sample code: StandbyVirtualMachinePools_Delete.
*
Expand All @@ -333,9 +305,6 @@ public final class StandbyVirtualMachinePoolsDeleteSamples {
* Samples for StandbyVirtualMachinePools GetByResourceGroup.
*/
public final class StandbyVirtualMachinePoolsGetByResourceGroupSamples {
/*
* x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_Get.json
*/
/**
* Sample code: StandbyVirtualMachinePools_Get.
*
Expand All @@ -355,9 +324,6 @@ public final class StandbyVirtualMachinePoolsGetByResourceGroupSamples {
* Samples for StandbyVirtualMachinePools List.
*/
public final class StandbyVirtualMachinePoolsListSamples {
/*
* x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_ListBySubscription.json
*/
/**
* Sample code: StandbyVirtualMachinePools_ListBySubscription.
*
Expand All @@ -377,9 +343,6 @@ public final class StandbyVirtualMachinePoolsListSamples {
* Samples for StandbyVirtualMachinePools ListByResourceGroup.
*/
public final class StandbyVirtualMachinePoolsListByResourceGroupSamples {
/*
* x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_ListByResourceGroup.json
*/
/**
* Sample code: StandbyVirtualMachinePools_ListByResourceGroup.
*
Expand All @@ -395,7 +358,7 @@ public final class StandbyVirtualMachinePoolsListByResourceGroupSamples {
### StandbyVirtualMachinePools_Update

```java
import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolElasticityProfileUpdate;
import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolElasticityProfile;
import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResource;
import com.azure.resourcemanager.standbypool.models.StandbyVirtualMachinePoolResourceUpdateProperties;
import com.azure.resourcemanager.standbypool.models.VirtualMachineState;
Expand All @@ -406,9 +369,6 @@ import java.util.Map;
* Samples for StandbyVirtualMachinePools Update.
*/
public final class StandbyVirtualMachinePoolsUpdateSamples {
/*
* x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_Update.json
*/
/**
* Sample code: StandbyVirtualMachinePools_Update.
*
Expand All @@ -422,8 +382,7 @@ public final class StandbyVirtualMachinePoolsUpdateSamples {
resource.update()
.withTags(mapOf())
.withProperties(new StandbyVirtualMachinePoolResourceUpdateProperties()
.withElasticityProfile(
new StandbyVirtualMachinePoolElasticityProfileUpdate().withMaxReadyCapacity(304L))
.withElasticityProfile(new StandbyVirtualMachinePoolElasticityProfile().withMaxReadyCapacity(304L))
.withVirtualMachineState(VirtualMachineState.RUNNING)
.withAttachedVirtualMachineScaleSetId(
"/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"))
Expand Down Expand Up @@ -451,9 +410,6 @@ public final class StandbyVirtualMachinePoolsUpdateSamples {
* Samples for StandbyVirtualMachines Get.
*/
public final class StandbyVirtualMachinesGetSamples {
/*
* x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachines_Get.json
*/
/**
* Sample code: StandbyVirtualMachines_Get.
*
Expand All @@ -473,9 +429,6 @@ public final class StandbyVirtualMachinesGetSamples {
* Samples for StandbyVirtualMachines ListByStandbyVirtualMachinePoolResource.
*/
public final class StandbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSamples {
/*
* x-ms-original-file: specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.json
*/
/**
* Sample code: StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.standbypool;

Expand All @@ -23,10 +23,10 @@
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.standbypool.fluent.StandbyPoolMgmtClient;
import com.azure.resourcemanager.standbypool.fluent.StandbyPoolClient;
import com.azure.resourcemanager.standbypool.implementation.OperationsImpl;
import com.azure.resourcemanager.standbypool.implementation.StandbyContainerGroupPoolsImpl;
import com.azure.resourcemanager.standbypool.implementation.StandbyPoolMgmtClientBuilder;
import com.azure.resourcemanager.standbypool.implementation.StandbyPoolClientBuilder;
import com.azure.resourcemanager.standbypool.implementation.StandbyVirtualMachinePoolsImpl;
import com.azure.resourcemanager.standbypool.implementation.StandbyVirtualMachinesImpl;
import com.azure.resourcemanager.standbypool.models.Operations;
Expand All @@ -46,18 +46,18 @@
public final class StandbyPoolManager {
private Operations operations;

private StandbyContainerGroupPools standbyContainerGroupPools;

private StandbyVirtualMachinePools standbyVirtualMachinePools;

private StandbyVirtualMachines standbyVirtualMachines;

private final StandbyPoolMgmtClient clientObject;
private StandbyContainerGroupPools standbyContainerGroupPools;

private final StandbyPoolClient clientObject;

private StandbyPoolManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
this.clientObject = new StandbyPoolMgmtClientBuilder().pipeline(httpPipeline)
this.clientObject = new StandbyPoolClientBuilder().pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval)
Expand Down Expand Up @@ -274,19 +274,6 @@ public Operations operations() {
return operations;
}

/**
* Gets the resource collection API of StandbyContainerGroupPools. It manages StandbyContainerGroupPoolResource.
*
* @return Resource collection API of StandbyContainerGroupPools.
*/
public StandbyContainerGroupPools standbyContainerGroupPools() {
if (this.standbyContainerGroupPools == null) {
this.standbyContainerGroupPools
= new StandbyContainerGroupPoolsImpl(clientObject.getStandbyContainerGroupPools(), this);
}
return standbyContainerGroupPools;
}

/**
* Gets the resource collection API of StandbyVirtualMachinePools. It manages StandbyVirtualMachinePoolResource.
*
Expand Down Expand Up @@ -314,12 +301,25 @@ public StandbyVirtualMachines standbyVirtualMachines() {
}

/**
* Gets wrapped service client StandbyPoolMgmtClient providing direct access to the underlying auto-generated API
* Gets the resource collection API of StandbyContainerGroupPools. It manages StandbyContainerGroupPoolResource.
*
* @return Resource collection API of StandbyContainerGroupPools.
*/
public StandbyContainerGroupPools standbyContainerGroupPools() {
if (this.standbyContainerGroupPools == null) {
this.standbyContainerGroupPools
= new StandbyContainerGroupPoolsImpl(clientObject.getStandbyContainerGroupPools(), this);
}
return standbyContainerGroupPools;
}

/**
* Gets wrapped service client StandbyPoolClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
*
* @return Wrapped service client StandbyPoolMgmtClient.
* @return Wrapped service client StandbyPoolClient.
*/
public StandbyPoolMgmtClient serviceClient() {
public StandbyPoolClient serviceClient() {
return this.clientObject;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.standbypool.fluent;

Expand Down
Loading

0 comments on commit 27e9b3b

Please sign in to comment.