Skip to content

Commit

Permalink
regen
Browse files Browse the repository at this point in the history
  • Loading branch information
weidongxu-microsoft committed Aug 27, 2024
1 parent dd92221 commit 3549ba4
Show file tree
Hide file tree
Showing 330 changed files with 4,839 additions and 3,559 deletions.
606 changes: 352 additions & 254 deletions sdk/avs/azure-resourcemanager-avs/SAMPLE.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -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.avs.fluent.AVSClient;
import com.azure.resourcemanager.avs.fluent.AvsClient;
import com.azure.resourcemanager.avs.implementation.AddonsImpl;
import com.azure.resourcemanager.avs.implementation.AuthorizationsImpl;
import com.azure.resourcemanager.avs.implementation.AVSClientBuilder;
import com.azure.resourcemanager.avs.implementation.AvsClientBuilder;
import com.azure.resourcemanager.avs.implementation.CloudLinksImpl;
import com.azure.resourcemanager.avs.implementation.ClustersImpl;
import com.azure.resourcemanager.avs.implementation.DatastoresImpl;
Expand Down Expand Up @@ -87,8 +87,6 @@ public final class AvsManager {

private GlobalReachConnections globalReachConnections;

private WorkloadNetworks workloadNetworks;

private CloudLinks cloudLinks;

private Addons addons;
Expand All @@ -105,12 +103,14 @@ public final class AvsManager {

private IscsiPaths iscsiPaths;

private final AVSClient clientObject;
private WorkloadNetworks workloadNetworks;

private final AvsClient clientObject;

private AvsManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
this.clientObject = new AVSClientBuilder().pipeline(httpPipeline)
this.clientObject = new AvsClientBuilder().pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval)
Expand Down Expand Up @@ -412,20 +412,6 @@ public GlobalReachConnections globalReachConnections() {
return globalReachConnections;
}

/**
* Gets the resource collection API of WorkloadNetworks. It manages WorkloadNetworkSegment, WorkloadNetworkDhcp,
* WorkloadNetworkPortMirroring, WorkloadNetworkVMGroup, WorkloadNetworkDnsService, WorkloadNetworkDnsZone,
* WorkloadNetworkPublicIp.
*
* @return Resource collection API of WorkloadNetworks.
*/
public WorkloadNetworks workloadNetworks() {
if (this.workloadNetworks == null) {
this.workloadNetworks = new WorkloadNetworksImpl(clientObject.getWorkloadNetworks(), this);
}
return workloadNetworks;
}

/**
* Gets the resource collection API of CloudLinks. It manages CloudLink.
*
Expand Down Expand Up @@ -511,7 +497,7 @@ public ScriptExecutions scriptExecutions() {
}

/**
* Gets the resource collection API of IscsiPaths.
* Gets the resource collection API of IscsiPaths. It manages IscsiPath.
*
* @return Resource collection API of IscsiPaths.
*/
Expand All @@ -523,12 +509,26 @@ public IscsiPaths iscsiPaths() {
}

/**
* Gets wrapped service client AVSClient providing direct access to the underlying auto-generated API
* Gets the resource collection API of WorkloadNetworks. It manages WorkloadNetworkSegment, WorkloadNetworkDhcp,
* WorkloadNetworkPortMirroring, WorkloadNetworkVMGroup, WorkloadNetworkDnsService, WorkloadNetworkDnsZone,
* WorkloadNetworkPublicIp.
*
* @return Resource collection API of WorkloadNetworks.
*/
public WorkloadNetworks workloadNetworks() {
if (this.workloadNetworks == null) {
this.workloadNetworks = new WorkloadNetworksImpl(clientObject.getWorkloadNetworks(), this);
}
return workloadNetworks;
}

/**
* Gets wrapped service client AvsClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
*
* @return Wrapped service client AVSClient.
* @return Wrapped service client AvsClient.
*/
public AVSClient serviceClient() {
public AvsClient serviceClient() {
return this.clientObject;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import java.time.Duration;

/**
* The interface for AVSClient class.
* The interface for AvsClient class.
*/
public interface AVSClient {
public interface AvsClient {
/**
* Gets Server parameter.
*
Expand Down Expand Up @@ -102,13 +102,6 @@ public interface AVSClient {
*/
GlobalReachConnectionsClient getGlobalReachConnections();

/**
* Gets the WorkloadNetworksClient object to access its operations.
*
* @return the WorkloadNetworksClient object.
*/
WorkloadNetworksClient getWorkloadNetworks();

/**
* Gets the CloudLinksClient object to access its operations.
*
Expand Down Expand Up @@ -164,4 +157,11 @@ public interface AVSClient {
* @return the IscsiPathsClient object.
*/
IscsiPathsClient getIscsiPaths();

/**
* Gets the WorkloadNetworksClient object to access its operations.
*
* @return the WorkloadNetworksClient object.
*/
WorkloadNetworksClient getWorkloadNetworks();
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,33 +50,37 @@ PagedIterable<IscsiPathInner> listByPrivateCloud(String resourceGroupName, Strin
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param privateCloudName Name of the private cloud.
* @param iscsiPathName Name of the iSCSI path resource.
* @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 a IscsiPath along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<IscsiPathInner> getWithResponse(String resourceGroupName, String privateCloudName, Context context);
Response<IscsiPathInner> getWithResponse(String resourceGroupName, String privateCloudName, String iscsiPathName,
Context context);

/**
* Get a IscsiPath.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param privateCloudName Name of the private cloud.
* @param iscsiPathName Name of the iSCSI path resource.
* @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 a IscsiPath.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
IscsiPathInner get(String resourceGroupName, String privateCloudName);
IscsiPathInner get(String resourceGroupName, String privateCloudName, String iscsiPathName);

/**
* Create a IscsiPath.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param privateCloudName Name of the private cloud.
* @param iscsiPathName Name of the iSCSI path resource.
* @param resource Resource create parameters.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
Expand All @@ -85,13 +89,14 @@ PagedIterable<IscsiPathInner> listByPrivateCloud(String resourceGroupName, Strin
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<IscsiPathInner>, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName,
String privateCloudName, IscsiPathInner resource);
String privateCloudName, String iscsiPathName, IscsiPathInner resource);

/**
* Create a IscsiPath.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param privateCloudName Name of the private cloud.
* @param iscsiPathName Name of the iSCSI path resource.
* @param resource Resource create parameters.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
Expand All @@ -101,27 +106,30 @@ SyncPoller<PollResult<IscsiPathInner>, IscsiPathInner> beginCreateOrUpdate(Strin
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<IscsiPathInner>, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName,
String privateCloudName, IscsiPathInner resource, Context context);
String privateCloudName, String iscsiPathName, IscsiPathInner resource, Context context);

/**
* Create a IscsiPath.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param privateCloudName Name of the private cloud.
* @param iscsiPathName Name of the iSCSI path resource.
* @param resource Resource create parameters.
* @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 an iSCSI path resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource);
IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, String iscsiPathName,
IscsiPathInner resource);

/**
* Create a IscsiPath.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param privateCloudName Name of the private cloud.
* @param iscsiPathName Name of the iSCSI path resource.
* @param resource Resource create parameters.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
Expand All @@ -130,58 +138,64 @@ SyncPoller<PollResult<IscsiPathInner>, IscsiPathInner> beginCreateOrUpdate(Strin
* @return an iSCSI path resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource,
Context context);
IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, String iscsiPathName,
IscsiPathInner resource, Context context);

/**
* Delete a IscsiPath.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param privateCloudName Name of the private cloud.
* @param iscsiPathName Name of the iSCSI path resource.
* @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 SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String privateCloudName);
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String privateCloudName,
String iscsiPathName);

/**
* Delete a IscsiPath.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param privateCloudName Name of the private cloud.
* @param iscsiPathName Name of the iSCSI path resource.
* @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 SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String privateCloudName, Context context);
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String privateCloudName,
String iscsiPathName, Context context);

/**
* Delete a IscsiPath.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param privateCloudName Name of the private cloud.
* @param iscsiPathName Name of the iSCSI path resource.
* @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 privateCloudName);
void delete(String resourceGroupName, String privateCloudName, String iscsiPathName);

/**
* Delete a IscsiPath.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param privateCloudName Name of the private cloud.
* @param iscsiPathName Name of the iSCSI path resource.
* @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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String resourceGroupName, String privateCloudName, Context context);
void delete(String resourceGroupName, String privateCloudName, String iscsiPathName, Context context);
}
Loading

0 comments on commit 3549ba4

Please sign in to comment.