Skip to content

Commit

Permalink
mgmt restructure compute package (#11742)
Browse files Browse the repository at this point in the history
  • Loading branch information
weidongxu-microsoft authored Jun 4, 2020
1 parent 00494e1 commit 1c661bd
Show file tree
Hide file tree
Showing 561 changed files with 28,057 additions and 8,500 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.management.compute.models;
package com.azure.management.compute;

import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
Expand All @@ -12,8 +12,8 @@
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;

/** A builder for creating a new instance of the ComputeManagementClientImpl type. */
@ServiceClientBuilder(serviceClients = {ComputeManagementClientImpl.class})
/** A builder for creating a new instance of the ComputeManagementClient type. */
@ServiceClientBuilder(serviceClients = {ComputeManagementClient.class})
public final class ComputeManagementClientBuilder {
/*
* Subscription credentials which uniquely identify Microsoft Azure
Expand All @@ -37,16 +37,16 @@ public ComputeManagementClientBuilder subscriptionId(String subscriptionId) {
/*
* server parameter
*/
private String host;
private String endpoint;

/**
* Sets server parameter.
*
* @param host the host value.
* @param endpoint the endpoint value.
* @return the ComputeManagementClientBuilder.
*/
public ComputeManagementClientBuilder host(String host) {
this.host = host;
public ComputeManagementClientBuilder endpoint(String endpoint) {
this.endpoint = endpoint;
return this;
}

Expand Down Expand Up @@ -83,13 +83,13 @@ public ComputeManagementClientBuilder pipeline(HttpPipeline pipeline) {
}

/**
* Builds an instance of ComputeManagementClientImpl with the provided parameters.
* Builds an instance of ComputeManagementClient with the provided parameters.
*
* @return an instance of ComputeManagementClientImpl.
* @return an instance of ComputeManagementClient.
*/
public ComputeManagementClientImpl buildClient() {
if (host == null) {
this.host = "https://management.azure.com";
public ComputeManagementClient buildClient() {
if (endpoint == null) {
this.endpoint = "https://management.azure.com";
}
if (environment == null) {
this.environment = AzureEnvironment.AZURE;
Expand All @@ -100,9 +100,7 @@ public ComputeManagementClientImpl buildClient() {
.policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
.build();
}
ComputeManagementClientImpl client = new ComputeManagementClientImpl(pipeline, environment);
client.setSubscriptionId(this.subscriptionId);
client.setHost(this.host);
ComputeManagementClient client = new ComputeManagementClient(pipeline, environment, subscriptionId, endpoint);
return client;
}
}
Original file line number Diff line number Diff line change
@@ -1,25 +1,37 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.management.compute.implementation;
package com.azure.management.compute;

import com.azure.core.credential.TokenCredential;
import com.azure.core.http.HttpPipeline;
import com.azure.management.compute.AvailabilitySets;
import com.azure.management.compute.ComputeSkus;
import com.azure.management.compute.ComputeUsages;
import com.azure.management.compute.Disks;
import com.azure.management.compute.Galleries;
import com.azure.management.compute.GalleryImageVersions;
import com.azure.management.compute.GalleryImages;
import com.azure.management.compute.Snapshots;
import com.azure.management.compute.VirtualMachineCustomImages;
import com.azure.management.compute.VirtualMachineExtensionImages;
import com.azure.management.compute.VirtualMachineImages;
import com.azure.management.compute.VirtualMachineScaleSets;
import com.azure.management.compute.VirtualMachines;
import com.azure.management.compute.models.ComputeManagementClientBuilder;
import com.azure.management.compute.models.ComputeManagementClientImpl;
import com.azure.management.compute.implementation.AvailabilitySetsImpl;
import com.azure.management.compute.implementation.ComputeSkusImpl;
import com.azure.management.compute.implementation.ComputeUsagesImpl;
import com.azure.management.compute.implementation.DisksImpl;
import com.azure.management.compute.implementation.GalleriesImpl;
import com.azure.management.compute.implementation.GalleryImageVersionsImpl;
import com.azure.management.compute.implementation.GalleryImagesImpl;
import com.azure.management.compute.implementation.SnapshotsImpl;
import com.azure.management.compute.implementation.VirtualMachineCustomImagesImpl;
import com.azure.management.compute.implementation.VirtualMachineExtensionImagesImpl;
import com.azure.management.compute.implementation.VirtualMachineImagesImpl;
import com.azure.management.compute.implementation.VirtualMachinePublishersImpl;
import com.azure.management.compute.implementation.VirtualMachineScaleSetsImpl;
import com.azure.management.compute.implementation.VirtualMachinesImpl;
import com.azure.management.compute.models.AvailabilitySets;
import com.azure.management.compute.models.ComputeSkus;
import com.azure.management.compute.models.ComputeUsages;
import com.azure.management.compute.models.Disks;
import com.azure.management.compute.models.Galleries;
import com.azure.management.compute.models.GalleryImageVersions;
import com.azure.management.compute.models.GalleryImages;
import com.azure.management.compute.models.Snapshots;
import com.azure.management.compute.models.VirtualMachineCustomImages;
import com.azure.management.compute.models.VirtualMachineExtensionImages;
import com.azure.management.compute.models.VirtualMachineImages;
import com.azure.management.compute.models.VirtualMachineScaleSets;
import com.azure.management.compute.models.VirtualMachines;
import com.azure.management.graphrbac.implementation.GraphRbacManager;
import com.azure.management.network.implementation.NetworkManager;
import com.azure.management.resources.fluentcore.arm.AzureConfigurable;
Expand All @@ -31,11 +43,11 @@
import com.azure.management.storage.StorageManager;

/** Entry point to Azure compute resource management. */
public final class ComputeManager extends Manager<ComputeManager, ComputeManagementClientImpl> {
public final class ComputeManager extends Manager<ComputeManager, ComputeManagementClient> {
// The service managers
private StorageManager storageManager;
private NetworkManager networkManager;
private GraphRbacManager rbacManager;
private final StorageManager storageManager;
private final NetworkManager networkManager;
private final GraphRbacManager rbacManager;

// The collections
private AvailabilitySets availabilitySets;
Expand Down Expand Up @@ -151,9 +163,9 @@ public VirtualMachineImages virtualMachineImages() {
virtualMachineImages =
new VirtualMachineImagesImpl(
new VirtualMachinePublishersImpl(
super.innerManagementClient.virtualMachineImages(),
super.innerManagementClient.virtualMachineExtensionImages()),
super.innerManagementClient.virtualMachineImages());
super.innerManagementClient.getVirtualMachineImages(),
super.innerManagementClient.getVirtualMachineExtensionImages()),
super.innerManagementClient.getVirtualMachineImages());
}
return virtualMachineImages;
}
Expand All @@ -164,8 +176,8 @@ public VirtualMachineExtensionImages virtualMachineExtensionImages() {
virtualMachineExtensionImages =
new VirtualMachineExtensionImagesImpl(
new VirtualMachinePublishersImpl(
super.innerManagementClient.virtualMachineImages(),
super.innerManagementClient.virtualMachineExtensionImages()));
super.innerManagementClient.getVirtualMachineImages(),
super.innerManagementClient.getVirtualMachineExtensionImages()));
}
return virtualMachineExtensionImages;
}
Expand Down
Loading

0 comments on commit 1c661bd

Please sign in to comment.