diff --git a/core/src/main/java/com/microsoft/windowsazure/core/ServiceClient.java b/core/src/main/java/com/microsoft/windowsazure/core/ServiceClient.java index cdedc4a72d643..146018448d82c 100644 --- a/core/src/main/java/com/microsoft/windowsazure/core/ServiceClient.java +++ b/core/src/main/java/com/microsoft/windowsazure/core/ServiceClient.java @@ -18,11 +18,13 @@ import com.microsoft.windowsazure.core.pipeline.apache.HttpRequestInterceptorAdapter; import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; import com.microsoft.windowsazure.core.pipeline.apache.HttpResponseInterceptorAdapter; +import java.io.Closeable; +import java.io.IOException; import java.util.concurrent.ExecutorService; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; -public abstract class ServiceClient implements FilterableService { +public abstract class ServiceClient implements FilterableService, Closeable { private final ExecutorService executorService; public ExecutorService getExecutorService() { return this.executorService; } @@ -78,4 +80,10 @@ public TClient withResponseFilterLast(ServiceResponseFilter serviceResponseFilte httpClientBuilder.addInterceptorLast(new HttpResponseInterceptorAdapter(serviceResponseFilter)); return this.newInstance(httpClientBuilder, executorService); } + + @Override + public void close() throws IOException + { + httpClient.close(); + } } diff --git a/core/src/main/java/com/microsoft/windowsazure/core/ServiceOperations.java b/core/src/main/java/com/microsoft/windowsazure/core/ServiceOperations.java index a8949274d820b..6bc4b9fe6f3b1 100644 --- a/core/src/main/java/com/microsoft/windowsazure/core/ServiceOperations.java +++ b/core/src/main/java/com/microsoft/windowsazure/core/ServiceOperations.java @@ -15,4 +15,5 @@ package com.microsoft.windowsazure.core; public interface ServiceOperations { + TClient getClient(); } \ No newline at end of file diff --git a/core/src/main/java/com/microsoft/windowsazure/tracing/ClientRequestTrackingHandler.java b/core/src/main/java/com/microsoft/windowsazure/tracing/ClientRequestTrackingHandler.java new file mode 100644 index 0000000000000..2fa06e286ce81 --- /dev/null +++ b/core/src/main/java/com/microsoft/windowsazure/tracing/ClientRequestTrackingHandler.java @@ -0,0 +1,44 @@ +/** + * Copyright Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.microsoft.windowsazure.tracing; + +import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestContext; +import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; +import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseContext; +import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; + +public class ClientRequestTrackingHandler implements ServiceRequestFilter, ServiceResponseFilter { + private final String trackingId; + + public String getTrackingId() { return trackingId; } + + public ClientRequestTrackingHandler(String trackingId) + { + this.trackingId = trackingId; + } + + @Override + public void filter (ServiceRequestContext request) + { + request.setHeader("client-tracking-id", trackingId); + } + + @Override + public void filter (ServiceRequestContext request, ServiceResponseContext response) + { + response.setHeader("client-tracking-id", trackingId); + } +} diff --git a/core/src/main/java/com/microsoft/windowsazure/tracing/CloudTracing.java b/core/src/main/java/com/microsoft/windowsazure/tracing/CloudTracing.java new file mode 100644 index 0000000000000..319288cb59c69 --- /dev/null +++ b/core/src/main/java/com/microsoft/windowsazure/tracing/CloudTracing.java @@ -0,0 +1,222 @@ +/** + * Copyright Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.microsoft.windowsazure.tracing; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import org.apache.http.HttpRequest; +import org.apache.http.HttpResponse; + +/** + * Provides tracing utilities that insight into all aspects of client + * operations via implementations of the ICloudTracingInterceptor + * interface. All tracing is global. + */ +public class CloudTracing { + /** + * The collection of tracing interceptors to notify. + */ + private static final List interceptors; + + /** + * Gets the collection of tracing interceptors to notify. + * + * @return the collection of tracing interceptors. + */ + static List getInterceptors() + { + return interceptors; + } + + /** + * Gets a value indicating whether tracing is enabled. + * Tracing can be disabled for performance. + */ + private static boolean isEnabled; + + /** + * Gets the value indicating whether tracing is enabled. + * + * @return Boolean value indicating if tracing is enabled. + */ + public static boolean getIsEnabled() + { + return isEnabled; + } + + /** + * Sets the value indicating whether tracing is enabled. + * + * @param enabled Boolean value indicating if tracing is enabled. + */ + public static void setIsEnabled(boolean enabled) + { + isEnabled = enabled; + } + + static + { + isEnabled = true; + interceptors = Collections.synchronizedList(new ArrayList()); + } + + /** + * Add a tracing interceptor to be notified of changes. + * + * @param cloudTracingInterceptor The tracing interceptor. + */ + public static void addTracingInterceptor(CloudTracingInterceptor cloudTracingInterceptor) + { + if (cloudTracingInterceptor == null) + { + throw new NullPointerException(); + } + + interceptors.add(cloudTracingInterceptor); + } + + /** + * Remove a tracing interceptor from change notifications. + * + * @param cloudTracingInterceptor The tracing interceptor. + * @return True if the tracing interceptor was found and removed; false + * otherwise. + */ + public static boolean removeTracingInterceptor(CloudTracingInterceptor cloudTracingInterceptor) + { + if (cloudTracingInterceptor == null) + { + throw new NullPointerException(); + } + + return interceptors.remove(cloudTracingInterceptor); + } + + private static long nextInvocationId = 0; + + public static long getNextInvocationId() + { + return ++nextInvocationId; + } + + public static void information(String message, Object... parameters) + { + if (isEnabled) + { + information(String.format(message, parameters)); + } + } + + public static void configuration(String source, String name, String value) + { + if (isEnabled) + { + synchronized (interceptors) + { + for (CloudTracingInterceptor writer: interceptors) + { + writer.configuration(source, name, value); + } + } + } + } + + public static void information(String message) + { + if (isEnabled) + { + synchronized (interceptors) + { + for (CloudTracingInterceptor writer: interceptors) + { + writer.information(message); + } + } + } + } + + public static void enter(String invocationId, Object instance, String method, HashMap parameters) + { + if (isEnabled) + { + synchronized (interceptors) + { + for (CloudTracingInterceptor writer: interceptors) + { + writer.enter(invocationId, instance, method, parameters); + } + } + } + } + + public static void sendRequest(String invocationId, HttpRequest request) + { + if (isEnabled) + { + synchronized (interceptors) + { + for (CloudTracingInterceptor writer: interceptors) + { + writer.sendRequest(invocationId, request); + } + } + } + } + + public static void receiveResponse(String invocationId, HttpResponse response) + { + if (isEnabled) + { + synchronized (interceptors) + { + for (CloudTracingInterceptor writer: interceptors) + { + writer.receiveResponse(invocationId, response); + } + } + } + } + + public static void error(String invocationId, Exception ex) + { + if (isEnabled) + { + synchronized (interceptors) + { + for (CloudTracingInterceptor writer: interceptors) + { + writer.error(invocationId, ex); + } + } + } + } + + public static void exit(String invocationId, Object result) + { + if (isEnabled) + { + synchronized (interceptors) + { + for (CloudTracingInterceptor writer: interceptors) + { + writer.exit(invocationId, result); + } + } + } + } +} diff --git a/core/src/main/java/com/microsoft/windowsazure/tracing/CloudTracingInterceptor.java b/core/src/main/java/com/microsoft/windowsazure/tracing/CloudTracingInterceptor.java new file mode 100644 index 0000000000000..02209df7ae35c --- /dev/null +++ b/core/src/main/java/com/microsoft/windowsazure/tracing/CloudTracingInterceptor.java @@ -0,0 +1,87 @@ +/** + * Copyright Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.microsoft.windowsazure.tracing; + +import java.util.HashMap; +import org.apache.http.HttpRequest; +import org.apache.http.HttpResponse; + +/** + * The CloudTracingInterceptor provides useful information about cloud + * operations. Interception is global and a tracing interceptor can be + * added via CloudContext.Configuration.Tracing.AddTracingInterceptor. + */ +public interface CloudTracingInterceptor +{ + /** + * Trace information. + * + * @param message The information to trace. + */ + void information(String message); + + /** + * Probe configuration for the value of a setting. + * + * @param source The configuration source. + * @param name The name of the setting. + * @param value The value of the setting in the source. + */ + void configuration(String source, String name, String value); + + /** + * Enter a method. + * + * @param invocationId Method invocation identifier. + * @param instance The instance with the method. + * @param method Name of the method. + * @param parameters Method parameters. + */ + void enter(String invocationId, Object instance, String method, HashMap parameters); + + /** + * Send an HTTP request. + * + * @param invocationId Method invocation identifier. + * @param request The request about to be sent. + */ + void sendRequest(String invocationId, HttpRequest request); + + /** + * Receive an HTTP response. + * + * @param invocationId Method invocation identifier. + * @param response The response instance. + */ + void receiveResponse(String invocationId, HttpResponse response); + + /** + * Raise an error. + * + * @param invocationId Method invocation identifier. + * @param exception The error. + */ + void error(String invocationId, Exception exception); + + /** + * Exit a method. Note: Exit will not be called in the event of an + * error. + * + * @param invocationId Method invocation identifier. + * @param returnValue Method return value. + */ + void exit(String invocationId, Object returnValue); +} \ No newline at end of file diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ComputeManagementClient.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ComputeManagementClient.java index eecabac956ad2..e3f08d5946e70 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ComputeManagementClient.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ComputeManagementClient.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,9 +23,10 @@ package com.microsoft.windowsazure.management.compute; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.core.FilterableService; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.compute.models.ComputeOperationStatusResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.net.URI; import java.util.concurrent.Future; @@ -38,7 +41,7 @@ * http://msdn.microsoft.com/en-us/library/windowsazure/ee460799.aspx for more * information) */ -public interface ComputeManagementClient +public interface ComputeManagementClient extends FilterableService { /** * The URI used as the base for all Service Management requests. @@ -61,7 +64,7 @@ public interface ComputeManagementClient * http://msdn.microsoft.com/en-us/library/windowsazure/ee460812.aspx for * more information) */ - DeploymentOperations getDeployments(); + DeploymentOperations getDeploymentsOperations(); /** * The Service Management API includes operations for managing the hosted @@ -69,7 +72,7 @@ public interface ComputeManagementClient * http://msdn.microsoft.com/en-us/library/windowsazure/ee460812.aspx for * more information) */ - HostedServiceOperations getHostedServices(); + HostedServiceOperations getHostedServicesOperations(); /** * Operations for determining the version of the Windows Azure Guest @@ -77,14 +80,14 @@ public interface ComputeManagementClient * http://msdn.microsoft.com/en-us/library/windowsazure/ff684169.aspx for * more information) */ - OperatingSystemOperations getOperatingSystems(); + OperatingSystemOperations getOperatingSystemsOperations(); /** * Operations for managing service certificates for your subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/ee795178.aspx for * more information) */ - ServiceCertificateOperations getServiceCertificates(); + ServiceCertificateOperations getServiceCertificatesOperations(); /** * The Service Management API includes operations for managing the disks in @@ -92,7 +95,7 @@ public interface ComputeManagementClient * http://msdn.microsoft.com/en-us/library/windowsazure/jj157188.aspx for * more information) */ - VirtualMachineDiskOperations getVirtualMachineDisks(); + VirtualMachineDiskOperations getVirtualMachineDisksOperations(); /** * The Service Management API includes operations for managing the OS images @@ -100,7 +103,7 @@ public interface ComputeManagementClient * http://msdn.microsoft.com/en-us/library/windowsazure/jj157175.aspx for * more information) */ - VirtualMachineImageOperations getVirtualMachineImages(); + VirtualMachineImageOperations getVirtualMachineImagesOperations(); /** * The Service Management API includes operations for managing the virtual @@ -108,7 +111,7 @@ public interface ComputeManagementClient * http://msdn.microsoft.com/en-us/library/windowsazure/jj157206.aspx for * more information) */ - VirtualMachineOperations getVirtualMachines(); + VirtualMachineOperations getVirtualMachinesOperations(); /** * The Get Operation Status operation returns the status of thespecified diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ComputeManagementClientImpl.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ComputeManagementClientImpl.java index 2a109a072b0d3..493db1515ba15 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ComputeManagementClientImpl.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ComputeManagementClientImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,20 +23,22 @@ package com.microsoft.windowsazure.management.compute; +import com.microsoft.windowsazure.core.ServiceClient; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.ManagementConfiguration; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; import com.microsoft.windowsazure.management.compute.models.CertificateFormat; import com.microsoft.windowsazure.management.compute.models.ComputeOperationStatusResponse; import com.microsoft.windowsazure.management.compute.models.HostingResources; import com.microsoft.windowsazure.management.compute.models.LoadBalancerProbeTransportProtocol; import com.microsoft.windowsazure.management.compute.models.OperationStatus; -import com.microsoft.windowsazure.management.compute.models.RollbackUpdateOrUpgradeMode; -import com.microsoft.windowsazure.services.core.ServiceClient; -import com.microsoft.windowsazure.services.core.ServiceException; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.net.URI; +import java.util.HashMap; import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import javax.inject.Inject; import javax.inject.Named; @@ -43,6 +47,7 @@ import javax.xml.parsers.ParserConfigurationException; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.HttpClientBuilder; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -56,7 +61,7 @@ * http://msdn.microsoft.com/en-us/library/windowsazure/ee460799.aspx for more * information) */ -public class ComputeManagementClientImpl extends ServiceClient implements ComputeManagementClient +public class ComputeManagementClientImpl extends ServiceClient implements ComputeManagementClient { private URI baseUri; @@ -85,7 +90,7 @@ public class ComputeManagementClientImpl extends ServiceClient tracingParameters = new HashMap(); + tracingParameters.put("requestId", requestId); + CloudTracing.enter(invocationId, this, "getOperationStatusAsync", tracingParameters); + } // Construct URL String url = this.getBaseUri() + "/" + this.getCredentials().getSubscriptionId() + "/operations/" + requestId; @@ -287,15 +314,27 @@ public ComputeOperationStatusResponse getOperationStatus(String requestId) throw HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -372,6 +411,10 @@ public ComputeOperationStatusResponse getOperationStatus(String requestId) throw result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -496,42 +539,4 @@ static String loadBalancerProbeTransportProtocolToString(LoadBalancerProbeTransp } throw new IllegalArgumentException("value"); } - - /** - * Parse enum values for type RollbackUpdateOrUpgradeMode. - * - * @param value The value to parse. - * @return The enum value. - */ - static RollbackUpdateOrUpgradeMode parseRollbackUpdateOrUpgradeMode(String value) - { - if (value == "auto") - { - return RollbackUpdateOrUpgradeMode.Auto; - } - if (value == "manual") - { - return RollbackUpdateOrUpgradeMode.Manual; - } - throw new IllegalArgumentException("value"); - } - - /** - * Convert an enum of type RollbackUpdateOrUpgradeMode to a string. - * - * @param value The value to convert to a string. - * @return The enum value as a string. - */ - static String rollbackUpdateOrUpgradeModeToString(RollbackUpdateOrUpgradeMode value) - { - if (value == RollbackUpdateOrUpgradeMode.Auto) - { - return "auto"; - } - if (value == RollbackUpdateOrUpgradeMode.Manual) - { - return "manual"; - } - throw new IllegalArgumentException("value"); - } } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ComputeManagementService.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ComputeManagementService.java index 74c4b9b1f4e2f..c0a80da4444af 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ComputeManagementService.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ComputeManagementService.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.compute; -import com.microsoft.windowsazure.services.core.Configuration; +import com.microsoft.windowsazure.Configuration; /** * diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/DeploymentOperations.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/DeploymentOperations.java index 40cde94fcd234..d44936d9dee62 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/DeploymentOperations.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/DeploymentOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,8 @@ package com.microsoft.windowsazure.management.compute; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.compute.models.ComputeOperationStatusResponse; import com.microsoft.windowsazure.management.compute.models.DeploymentChangeConfigurationParameters; import com.microsoft.windowsazure.management.compute.models.DeploymentCreateParameters; @@ -33,7 +36,6 @@ import com.microsoft.windowsazure.management.compute.models.DeploymentUpdateStatusParameters; import com.microsoft.windowsazure.management.compute.models.DeploymentUpgradeParameters; import com.microsoft.windowsazure.management.compute.models.DeploymentWalkUpgradeDomainParameters; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; @@ -180,10 +182,12 @@ public interface DeploymentOperations * * @param serviceName The name of the cloud service. * @param deploymentName The name of your deployment. + * @param deleteFromStorage Optional. Specifies that the source blob for the + * disk should also be deleted from storage. * @return A standard service response including an HTTP status code and * request ID. */ - OperationResponse beginDeletingByName(String serviceName, String deploymentName) throws IOException, ServiceException; + OperationResponse beginDeletingByName(String serviceName, String deploymentName, boolean deleteFromStorage) throws IOException, ServiceException; /** * The Delete Deployment operation deletes the specified deployment. The @@ -196,10 +200,12 @@ public interface DeploymentOperations * * @param serviceName The name of the cloud service. * @param deploymentName The name of your deployment. + * @param deleteFromStorage Optional. Specifies that the source blob for the + * disk should also be deleted from storage. * @return A standard service response including an HTTP status code and * request ID. */ - Future beginDeletingByNameAsync(String serviceName, String deploymentName); + Future beginDeletingByNameAsync(String serviceName, String deploymentName, boolean deleteFromStorage); /** * The Delete Deployment operation deletes the specified deployment. The @@ -830,7 +836,7 @@ public interface DeploymentOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse changeConfigurationByName(String serviceName, String deploymentName, DeploymentChangeConfigurationParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse changeConfigurationByName(String serviceName, String deploymentName, DeploymentChangeConfigurationParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Change Deployment Configuration operation initiates a change to the @@ -884,7 +890,7 @@ public interface DeploymentOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse changeConfigurationBySlot(String serviceName, DeploymentSlot deploymentSlot, DeploymentChangeConfigurationParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse changeConfigurationBySlot(String serviceName, DeploymentSlot deploymentSlot, DeploymentChangeConfigurationParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Change Deployment Configuration operation initiates a change to the @@ -936,7 +942,7 @@ public interface DeploymentOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse create(String serviceName, DeploymentSlot deploymentSlot, DeploymentCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, URISyntaxException, ParseException; + ComputeOperationStatusResponse create(String serviceName, DeploymentSlot deploymentSlot, DeploymentCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, ServiceException, URISyntaxException, ParseException; /** * The Create Deployment operation uploads a new service package and creates @@ -974,6 +980,8 @@ public interface DeploymentOperations * * @param serviceName The name of the cloud service. * @param deploymentName The name of your deployment. + * @param deleteFromStorage Optional. Specifies that the source blob for the + * disk should also be deleted from storage. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -984,7 +992,7 @@ public interface DeploymentOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse deleteByName(String serviceName, String deploymentName) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse deleteByName(String serviceName, String deploymentName, boolean deleteFromStorage) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Delete Deployment operation deletes the specified deployment. The @@ -997,6 +1005,8 @@ public interface DeploymentOperations * * @param serviceName The name of the cloud service. * @param deploymentName The name of your deployment. + * @param deleteFromStorage Optional. Specifies that the source blob for the + * disk should also be deleted from storage. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -1007,7 +1017,7 @@ public interface DeploymentOperations * the failed request, and also includes error information regarding the * failure. */ - Future deleteByNameAsync(String serviceName, String deploymentName); + Future deleteByNameAsync(String serviceName, String deploymentName, boolean deleteFromStorage); /** * The Delete Deployment operation deletes the specified deployment. The @@ -1030,7 +1040,7 @@ public interface DeploymentOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse deleteBySlot(String serviceName, DeploymentSlot deploymentSlot) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse deleteBySlot(String serviceName, DeploymentSlot deploymentSlot) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Delete Deployment operation deletes the specified deployment. The @@ -1206,7 +1216,7 @@ public interface DeploymentOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse rebootRoleInstanceByDeploymentName(String serviceName, String deploymentName, String roleInstanceName) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse rebootRoleInstanceByDeploymentName(String serviceName, String deploymentName, String roleInstanceName) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Reboot Role Instance operation requests a reboot of a role instance @@ -1256,7 +1266,7 @@ public interface DeploymentOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse rebootRoleInstanceByDeploymentSlot(String serviceName, DeploymentSlot deploymentSlot, String roleInstanceName) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse rebootRoleInstanceByDeploymentSlot(String serviceName, DeploymentSlot deploymentSlot, String roleInstanceName) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Reboot Role Instance operation requests a reboot of a role instance @@ -1306,7 +1316,7 @@ public interface DeploymentOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse reimageRoleInstanceByDeploymentName(String serviceName, String deploymentName, String roleInstanceName) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse reimageRoleInstanceByDeploymentName(String serviceName, String deploymentName, String roleInstanceName) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Reimage Role Instance operation requests a reimage of a role instance @@ -1356,7 +1366,7 @@ public interface DeploymentOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse reimageRoleInstanceByDeploymentSlot(String serviceName, DeploymentSlot deploymentSlot, String roleInstanceName) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse reimageRoleInstanceByDeploymentSlot(String serviceName, DeploymentSlot deploymentSlot, String roleInstanceName) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Reimage Role Instance operation requests a reimage of a role instance @@ -1490,7 +1500,7 @@ public interface DeploymentOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse swap(String serviceName, DeploymentSwapParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse swap(String serviceName, DeploymentSwapParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Swap Deployment operation initiates a virtual IP address swap between @@ -1542,7 +1552,7 @@ public interface DeploymentOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse updateStatusByDeploymentName(String serviceName, String deploymentName, DeploymentUpdateStatusParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse updateStatusByDeploymentName(String serviceName, String deploymentName, DeploymentUpdateStatusParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Update Deployment Status operation initiates a change in the running @@ -1596,7 +1606,7 @@ public interface DeploymentOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse updateStatusByDeploymentSlot(String serviceName, DeploymentSlot deploymentSlot, DeploymentUpdateStatusParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse updateStatusByDeploymentSlot(String serviceName, DeploymentSlot deploymentSlot, DeploymentUpdateStatusParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Update Deployment Status operation initiates a change in the running @@ -1669,7 +1679,7 @@ public interface DeploymentOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse upgradeByName(String serviceName, String deploymentName, DeploymentUpgradeParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse upgradeByName(String serviceName, String deploymentName, DeploymentUpgradeParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Upgrade Deployment operation initiates an update of role instances in @@ -1761,7 +1771,7 @@ public interface DeploymentOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse upgradeBySlot(String serviceName, DeploymentSlot deploymentSlot, DeploymentUpgradeParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse upgradeBySlot(String serviceName, DeploymentSlot deploymentSlot, DeploymentUpgradeParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Upgrade Deployment operation initiates an update of role instances in @@ -1853,7 +1863,7 @@ public interface DeploymentOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse walkUpgradeDomainByDeploymentName(String serviceName, String deploymentName, DeploymentWalkUpgradeDomainParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse walkUpgradeDomainByDeploymentName(String serviceName, String deploymentName, DeploymentWalkUpgradeDomainParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Walk Upgrade Domain operation specifies an update domain in which a @@ -1945,7 +1955,7 @@ public interface DeploymentOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse walkUpgradeDomainByDeploymentSlot(String serviceName, DeploymentSlot deploymentSlot, DeploymentWalkUpgradeDomainParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse walkUpgradeDomainByDeploymentSlot(String serviceName, DeploymentSlot deploymentSlot, DeploymentWalkUpgradeDomainParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Walk Upgrade Domain operation specifies an update domain in which a diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/DeploymentOperationsImpl.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/DeploymentOperationsImpl.java index 7d171f52ef6be..7c47ab0cb2158 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/DeploymentOperationsImpl.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/DeploymentOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,10 @@ package com.microsoft.windowsazure.management.compute; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.compute.models.AccessControlListRule; import com.microsoft.windowsazure.management.compute.models.ComputeOperationStatusResponse; import com.microsoft.windowsazure.management.compute.models.ConfigurationSet; @@ -67,9 +72,8 @@ import com.microsoft.windowsazure.management.compute.models.VirtualMachineWindowsRemoteManagementListenerType; import com.microsoft.windowsazure.management.compute.models.WindowsRemoteManagementListener; import com.microsoft.windowsazure.management.compute.models.WindowsRemoteManagementSettings; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.utils.pipeline.CustomHttpDelete; +import com.microsoft.windowsazure.tracing.ClientRequestTrackingHandler; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -81,6 +85,7 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.HashMap; import java.util.Map; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; @@ -229,6 +234,17 @@ public OperationResponse beginChangingConfigurationByName(String serviceName, St } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginChangingConfigurationByNameAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/?comp=config"; @@ -238,7 +254,7 @@ public OperationResponse beginChangingConfigurationByName(String serviceName, St // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -349,11 +365,23 @@ public OperationResponse beginChangingConfigurationByName(String serviceName, St // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -366,6 +394,10 @@ public OperationResponse beginChangingConfigurationByName(String serviceName, St result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -464,6 +496,17 @@ public OperationResponse beginChangingConfigurationBySlot(String serviceName, De } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentSlot", deploymentSlot); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginChangingConfigurationBySlotAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deploymentslots/" + deploymentSlot + "/?comp=config"; @@ -473,7 +516,7 @@ public OperationResponse beginChangingConfigurationBySlot(String serviceName, De // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -584,11 +627,23 @@ public OperationResponse beginChangingConfigurationBySlot(String serviceName, De // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -601,6 +656,10 @@ public OperationResponse beginChangingConfigurationBySlot(String serviceName, De result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -711,6 +770,17 @@ public OperationResponse beginCreating(String serviceName, DeploymentSlot deploy } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentSlot", deploymentSlot); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginCreatingAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deploymentslots/" + deploymentSlot; @@ -720,7 +790,7 @@ public OperationResponse beginCreating(String serviceName, DeploymentSlot deploy // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -843,11 +913,23 @@ public OperationResponse beginCreating(String serviceName, DeploymentSlot deploy // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -860,6 +942,10 @@ public OperationResponse beginCreating(String serviceName, DeploymentSlot deploy result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -874,17 +960,19 @@ public OperationResponse beginCreating(String serviceName, DeploymentSlot deploy * * @param serviceName The name of the cloud service. * @param deploymentName The name of your deployment. + * @param deleteFromStorage Optional. Specifies that the source blob for the + * disk should also be deleted from storage. * @return A standard service response including an HTTP status code and * request ID. */ @Override - public Future beginDeletingByNameAsync(final String serviceName, final String deploymentName) + public Future beginDeletingByNameAsync(final String serviceName, final String deploymentName, final boolean deleteFromStorage) { return this.getClient().getExecutorService().submit(new Callable() { @Override public OperationResponse call() throws Exception { - return beginDeletingByName(serviceName, deploymentName); + return beginDeletingByName(serviceName, deploymentName, deleteFromStorage); } }); } @@ -900,11 +988,13 @@ public OperationResponse call() throws Exception * * @param serviceName The name of the cloud service. * @param deploymentName The name of your deployment. + * @param deleteFromStorage Optional. Specifies that the source blob for the + * disk should also be deleted from storage. * @return A standard service response including an HTTP status code and * request ID. */ @Override - public OperationResponse beginDeletingByName(String serviceName, String deploymentName) throws IOException, ServiceException + public OperationResponse beginDeletingByName(String serviceName, String deploymentName, boolean deleteFromStorage) throws IOException, ServiceException { // Validate if (serviceName == null) @@ -917,23 +1007,50 @@ public OperationResponse beginDeletingByName(String serviceName, String deployme } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("deleteFromStorage", deleteFromStorage); + CloudTracing.enter(invocationId, this, "beginDeletingByNameAsync", tracingParameters); + } // Construct URL - String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName; + String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "?"; + if (deleteFromStorage == true) + { + url = url + "&comp=" + URLEncoder.encode("media"); + } // Create HTTP transport objects CustomHttpDelete httpRequest = new CustomHttpDelete(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -946,6 +1063,10 @@ public OperationResponse beginDeletingByName(String serviceName, String deployme result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -999,6 +1120,16 @@ public OperationResponse beginDeletingBySlot(String serviceName, DeploymentSlot } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentSlot", deploymentSlot); + CloudTracing.enter(invocationId, this, "beginDeletingBySlotAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deploymentslots/" + deploymentSlot; @@ -1007,15 +1138,27 @@ public OperationResponse beginDeletingBySlot(String serviceName, DeploymentSlot CustomHttpDelete httpRequest = new CustomHttpDelete(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1028,6 +1171,10 @@ public OperationResponse beginDeletingBySlot(String serviceName, DeploymentSlot result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1093,6 +1240,17 @@ public OperationResponse beginRebootingRoleInstanceByDeploymentName(String servi } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("roleInstanceName", roleInstanceName); + CloudTracing.enter(invocationId, this, "beginRebootingRoleInstanceByDeploymentNameAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/roleinstances/" + roleInstanceName + "?comp=reboot"; @@ -1103,15 +1261,27 @@ public OperationResponse beginRebootingRoleInstanceByDeploymentName(String servi // Set Headers httpRequest.setHeader("Content-Length", "0"); httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1124,6 +1294,10 @@ public OperationResponse beginRebootingRoleInstanceByDeploymentName(String servi result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1185,6 +1359,17 @@ public OperationResponse beginRebootingRoleInstanceByDeploymentSlot(String servi } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentSlot", deploymentSlot); + tracingParameters.put("roleInstanceName", roleInstanceName); + CloudTracing.enter(invocationId, this, "beginRebootingRoleInstanceByDeploymentSlotAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deploymentslots/" + deploymentSlot + "/roleinstances/" + roleInstanceName + "?comp=reboot"; @@ -1195,15 +1380,27 @@ public OperationResponse beginRebootingRoleInstanceByDeploymentSlot(String servi // Set Headers httpRequest.setHeader("Content-Length", "0"); httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1216,6 +1413,10 @@ public OperationResponse beginRebootingRoleInstanceByDeploymentSlot(String servi result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1281,6 +1482,17 @@ public OperationResponse beginReimagingRoleInstanceByDeploymentName(String servi } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("roleInstanceName", roleInstanceName); + CloudTracing.enter(invocationId, this, "beginReimagingRoleInstanceByDeploymentNameAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/roleinstances/" + roleInstanceName + "?comp=reimage"; @@ -1291,15 +1503,27 @@ public OperationResponse beginReimagingRoleInstanceByDeploymentName(String servi // Set Headers httpRequest.setHeader("Content-Length", "0"); httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1312,6 +1536,10 @@ public OperationResponse beginReimagingRoleInstanceByDeploymentName(String servi result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1373,6 +1601,17 @@ public OperationResponse beginReimagingRoleInstanceByDeploymentSlot(String servi } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentSlot", deploymentSlot); + tracingParameters.put("roleInstanceName", roleInstanceName); + CloudTracing.enter(invocationId, this, "beginReimagingRoleInstanceByDeploymentSlotAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deploymentslots/" + deploymentSlot + "/roleinstances/" + roleInstanceName + "?comp=reimage"; @@ -1383,15 +1622,27 @@ public OperationResponse beginReimagingRoleInstanceByDeploymentSlot(String servi // Set Headers httpRequest.setHeader("Content-Length", "0"); httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1404,6 +1655,10 @@ public OperationResponse beginReimagingRoleInstanceByDeploymentSlot(String servi result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1470,6 +1725,16 @@ public OperationResponse beginSwapping(String serviceName, DeploymentSwapParamet } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginSwappingAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName; @@ -1479,7 +1744,7 @@ public OperationResponse beginSwapping(String serviceName, DeploymentSwapParamet // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -1514,11 +1779,23 @@ public OperationResponse beginSwapping(String serviceName, DeploymentSwapParamet // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1531,6 +1808,10 @@ public OperationResponse beginSwapping(String serviceName, DeploymentSwapParamet result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1601,6 +1882,17 @@ public OperationResponse beginUpdatingStatusByDeploymentName(String serviceName, } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginUpdatingStatusByDeploymentNameAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/?comp=status"; @@ -1610,7 +1902,7 @@ public OperationResponse beginUpdatingStatusByDeploymentName(String serviceName, // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -1638,11 +1930,23 @@ public OperationResponse beginUpdatingStatusByDeploymentName(String serviceName, // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1655,6 +1959,10 @@ public OperationResponse beginUpdatingStatusByDeploymentName(String serviceName, result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1721,6 +2029,17 @@ public OperationResponse beginUpdatingStatusByDeploymentSlot(String serviceName, } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentSlot", deploymentSlot); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginUpdatingStatusByDeploymentSlotAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deploymentslots/" + deploymentSlot + "/?comp=status"; @@ -1730,7 +2049,7 @@ public OperationResponse beginUpdatingStatusByDeploymentSlot(String serviceName, // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -1758,11 +2077,23 @@ public OperationResponse beginUpdatingStatusByDeploymentSlot(String serviceName, // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1775,6 +2106,10 @@ public OperationResponse beginUpdatingStatusByDeploymentSlot(String serviceName, result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1927,6 +2262,17 @@ public OperationResponse beginUpgradingByName(String serviceName, String deploym } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginUpgradingByNameAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/?comp=upgrade"; @@ -1936,7 +2282,7 @@ public OperationResponse beginUpgradingByName(String serviceName, String deploym // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -2056,11 +2402,23 @@ public OperationResponse beginUpgradingByName(String serviceName, String deploym // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2073,6 +2431,10 @@ public OperationResponse beginUpgradingByName(String serviceName, String deploym result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -2221,6 +2583,17 @@ public OperationResponse beginUpgradingBySlot(String serviceName, DeploymentSlot } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentSlot", deploymentSlot); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginUpgradingBySlotAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deploymentslots/" + deploymentSlot + "/?comp=upgrade"; @@ -2230,7 +2603,7 @@ public OperationResponse beginUpgradingBySlot(String serviceName, DeploymentSlot // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -2350,11 +2723,23 @@ public OperationResponse beginUpgradingBySlot(String serviceName, DeploymentSlot // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2367,6 +2752,10 @@ public OperationResponse beginUpgradingBySlot(String serviceName, DeploymentSlot result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -2474,6 +2863,17 @@ public OperationResponse beginWalkingUpgradeDomainByDeploymentName(String servic } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginWalkingUpgradeDomainByDeploymentNameAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "?comp=walkupgradedomain"; @@ -2483,7 +2883,7 @@ public OperationResponse beginWalkingUpgradeDomainByDeploymentName(String servic // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -2511,11 +2911,23 @@ public OperationResponse beginWalkingUpgradeDomainByDeploymentName(String servic // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2528,6 +2940,10 @@ public OperationResponse beginWalkingUpgradeDomainByDeploymentName(String servic result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -2631,6 +3047,17 @@ public OperationResponse beginWalkingUpgradeDomainByDeploymentSlot(String servic } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentSlot", deploymentSlot); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginWalkingUpgradeDomainByDeploymentSlotAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deploymentslots/" + deploymentSlot + "/?comp=walkupgradedomain"; @@ -2640,7 +3067,7 @@ public OperationResponse beginWalkingUpgradeDomainByDeploymentSlot(String servic // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -2668,11 +3095,23 @@ public OperationResponse beginWalkingUpgradeDomainByDeploymentSlot(String servic // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2685,6 +3124,10 @@ public OperationResponse beginWalkingUpgradeDomainByDeploymentSlot(String servic result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -2751,29 +3194,63 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse changeConfigurationByName(String serviceName, String deploymentName, DeploymentChangeConfigurationParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse changeConfigurationByName(String serviceName, String deploymentName, DeploymentChangeConfigurationParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getDeployments().beginChangingConfigurationByNameAsync(serviceName, deploymentName, parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "changeConfigurationByNameAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getDeploymentsOperations().beginChangingConfigurationByNameAsync(serviceName, deploymentName, parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -2839,29 +3316,63 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse changeConfigurationBySlot(String serviceName, DeploymentSlot deploymentSlot, DeploymentChangeConfigurationParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse changeConfigurationBySlot(String serviceName, DeploymentSlot deploymentSlot, DeploymentChangeConfigurationParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getDeployments().beginChangingConfigurationBySlotAsync(serviceName, deploymentSlot, parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentSlot", deploymentSlot); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "changeConfigurationBySlotAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getDeploymentsOperations().beginChangingConfigurationBySlotAsync(serviceName, deploymentSlot, parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -2923,29 +3434,63 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse create(String serviceName, DeploymentSlot deploymentSlot, DeploymentCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, URISyntaxException, ParseException + public ComputeOperationStatusResponse create(String serviceName, DeploymentSlot deploymentSlot, DeploymentCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, ServiceException, URISyntaxException, ParseException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getDeployments().beginCreatingAsync(serviceName, deploymentSlot, parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentSlot", deploymentSlot); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getDeploymentsOperations().beginCreatingAsync(serviceName, deploymentSlot, parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -2959,6 +3504,8 @@ public ComputeOperationStatusResponse create(String serviceName, DeploymentSlot * * @param serviceName The name of the cloud service. * @param deploymentName The name of your deployment. + * @param deleteFromStorage Optional. Specifies that the source blob for the + * disk should also be deleted from storage. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -2970,13 +3517,13 @@ public ComputeOperationStatusResponse create(String serviceName, DeploymentSlot * failure. */ @Override - public Future deleteByNameAsync(final String serviceName, final String deploymentName) + public Future deleteByNameAsync(final String serviceName, final String deploymentName, final boolean deleteFromStorage) { return this.getClient().getExecutorService().submit(new Callable() { @Override public ComputeOperationStatusResponse call() throws Exception { - return deleteByName(serviceName, deploymentName); + return deleteByName(serviceName, deploymentName, deleteFromStorage); } }); } @@ -2992,6 +3539,8 @@ public ComputeOperationStatusResponse call() throws Exception * * @param serviceName The name of the cloud service. * @param deploymentName The name of your deployment. + * @param deleteFromStorage Optional. Specifies that the source blob for the + * disk should also be deleted from storage. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -3003,29 +3552,63 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse deleteByName(String serviceName, String deploymentName) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse deleteByName(String serviceName, String deploymentName, boolean deleteFromStorage) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getDeployments().beginDeletingByNameAsync(serviceName, deploymentName).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("deleteFromStorage", deleteFromStorage); + CloudTracing.enter(invocationId, this, "deleteByNameAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getDeploymentsOperations().beginDeletingByNameAsync(serviceName, deploymentName, deleteFromStorage).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -3083,29 +3666,62 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse deleteBySlot(String serviceName, DeploymentSlot deploymentSlot) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse deleteBySlot(String serviceName, DeploymentSlot deploymentSlot) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getDeployments().beginDeletingBySlotAsync(serviceName, deploymentSlot).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentSlot", deploymentSlot); + CloudTracing.enter(invocationId, this, "deleteBySlotAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getDeploymentsOperations().beginDeletingBySlotAsync(serviceName, deploymentSlot).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -3154,6 +3770,16 @@ public DeploymentGetResponse getByName(String serviceName, String deploymentName } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + CloudTracing.enter(invocationId, this, "getByNameAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName; @@ -3162,15 +3788,27 @@ public DeploymentGetResponse getByName(String serviceName, String deploymentName HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -3490,13 +4128,13 @@ public DeploymentGetResponse getByName(String serviceName, String deploymentName roleInstance.setRoleName(roleNameInstance2); } - NodeList elements35 = roleListElement.getElementsByTagName("OSVersion"); - Element oSVersionElement = elements35.getLength() > 0 ? ((Element)elements35.item(0)) : null; - if (oSVersionElement != null) + NodeList elements35 = roleListElement.getElementsByTagName("OsVersion"); + Element osVersionElement = elements35.getLength() > 0 ? ((Element)elements35.item(0)) : null; + if (osVersionElement != null) { - String oSVersionInstance; - oSVersionInstance = oSVersionElement.getTextContent(); - roleInstance.setOSVersion(oSVersionInstance); + String osVersionInstance; + osVersionInstance = osVersionElement.getTextContent(); + roleInstance.setOSVersion(osVersionInstance); } NodeList elements36 = roleListElement.getElementsByTagName("RoleType"); @@ -4320,11 +4958,11 @@ public DeploymentGetResponse getByName(String serviceName, String deploymentName Element virtualIPsSequenceElement = elements125.getLength() > 0 ? ((Element)elements125.item(0)) : null; if (virtualIPsSequenceElement != null) { - for (int i14 = 0; i14 < virtualIPsSequenceElement.getElementsByTagName("VirtualIPAddress").getLength(); i14 = i14 + 1) + for (int i14 = 0; i14 < virtualIPsSequenceElement.getElementsByTagName("VirtualIP").getLength(); i14 = i14 + 1) { - org.w3c.dom.Element virtualIPsElement = ((org.w3c.dom.Element)virtualIPsSequenceElement.getElementsByTagName("VirtualIPAddress").item(i14)); - VirtualIPAddress virtualIPAddressInstance = new VirtualIPAddress(); - result.getVirtualIPAddresses().add(virtualIPAddressInstance); + org.w3c.dom.Element virtualIPsElement = ((org.w3c.dom.Element)virtualIPsSequenceElement.getElementsByTagName("VirtualIP").item(i14)); + VirtualIPAddress virtualIPInstance = new VirtualIPAddress(); + result.getVirtualIPAddresses().add(virtualIPInstance); NodeList elements126 = virtualIPsElement.getElementsByTagName("Address"); Element addressElement = elements126.getLength() > 0 ? ((Element)elements126.item(0)) : null; @@ -4332,20 +4970,47 @@ public DeploymentGetResponse getByName(String serviceName, String deploymentName { InetAddress addressInstance; addressInstance = InetAddress.getByName(addressElement.getTextContent()); - virtualIPAddressInstance.setAddress(addressInstance); + virtualIPInstance.setAddress(addressInstance); + } + + NodeList elements127 = virtualIPsElement.getElementsByTagName("Name"); + Element nameElement4 = elements127.getLength() > 0 ? ((Element)elements127.item(0)) : null; + if (nameElement4 != null) + { + String nameInstance4; + nameInstance4 = nameElement4.getTextContent(); + virtualIPInstance.setName(nameInstance4); + } + + NodeList elements128 = virtualIPsElement.getElementsByTagName("IsDnsProgrammed"); + Element isDnsProgrammedElement = elements128.getLength() > 0 ? ((Element)elements128.item(0)) : null; + if (isDnsProgrammedElement != null && (isDnsProgrammedElement.getTextContent() != null && isDnsProgrammedElement.getTextContent().isEmpty() != true) == false) + { + boolean isDnsProgrammedInstance; + isDnsProgrammedInstance = Boolean.parseBoolean(isDnsProgrammedElement.getTextContent()); + virtualIPInstance.setIsDnsProgrammed(isDnsProgrammedInstance); } } } - NodeList elements127 = deploymentElement.getElementsByTagName("Dns"); - Element dnsElement = elements127.getLength() > 0 ? ((Element)elements127.item(0)) : null; + NodeList elements129 = deploymentElement.getElementsByTagName("ReservedIPName"); + Element reservedIPNameElement = elements129.getLength() > 0 ? ((Element)elements129.item(0)) : null; + if (reservedIPNameElement != null) + { + String reservedIPNameInstance; + reservedIPNameInstance = reservedIPNameElement.getTextContent(); + result.setReservedIPName(reservedIPNameInstance); + } + + NodeList elements130 = deploymentElement.getElementsByTagName("Dns"); + Element dnsElement = elements130.getLength() > 0 ? ((Element)elements130.item(0)) : null; if (dnsElement != null) { DnsSettings dnsInstance = new DnsSettings(); result.setDnsSettings(dnsInstance); - NodeList elements128 = dnsElement.getElementsByTagName("DnsServers"); - Element dnsServersSequenceElement = elements128.getLength() > 0 ? ((Element)elements128.item(0)) : null; + NodeList elements131 = dnsElement.getElementsByTagName("DnsServers"); + Element dnsServersSequenceElement = elements131.getLength() > 0 ? ((Element)elements131.item(0)) : null; if (dnsServersSequenceElement != null) { for (int i15 = 0; i15 < dnsServersSequenceElement.getElementsByTagName("DnsServer").getLength(); i15 = i15 + 1) @@ -4354,17 +5019,17 @@ public DeploymentGetResponse getByName(String serviceName, String deploymentName DnsServer dnsServerInstance = new DnsServer(); dnsInstance.getDnsServers().add(dnsServerInstance); - NodeList elements129 = dnsServersElement.getElementsByTagName("Name"); - Element nameElement4 = elements129.getLength() > 0 ? ((Element)elements129.item(0)) : null; - if (nameElement4 != null) + NodeList elements132 = dnsServersElement.getElementsByTagName("Name"); + Element nameElement5 = elements132.getLength() > 0 ? ((Element)elements132.item(0)) : null; + if (nameElement5 != null) { - String nameInstance4; - nameInstance4 = nameElement4.getTextContent(); - dnsServerInstance.setName(nameInstance4); + String nameInstance5; + nameInstance5 = nameElement5.getTextContent(); + dnsServerInstance.setName(nameInstance5); } - NodeList elements130 = dnsServersElement.getElementsByTagName("Address"); - Element addressElement2 = elements130.getLength() > 0 ? ((Element)elements130.item(0)) : null; + NodeList elements133 = dnsServersElement.getElementsByTagName("Address"); + Element addressElement2 = elements133.getLength() > 0 ? ((Element)elements133.item(0)) : null; if (addressElement2 != null) { InetAddress addressInstance2; @@ -4375,15 +5040,15 @@ public DeploymentGetResponse getByName(String serviceName, String deploymentName } } - NodeList elements131 = deploymentElement.getElementsByTagName("ExtensionConfiguration"); - Element extensionConfigurationElement = elements131.getLength() > 0 ? ((Element)elements131.item(0)) : null; + NodeList elements134 = deploymentElement.getElementsByTagName("ExtensionConfiguration"); + Element extensionConfigurationElement = elements134.getLength() > 0 ? ((Element)elements134.item(0)) : null; if (extensionConfigurationElement != null) { ExtensionConfiguration extensionConfigurationInstance = new ExtensionConfiguration(); result.setExtensionConfiguration(extensionConfigurationInstance); - NodeList elements132 = extensionConfigurationElement.getElementsByTagName("AllRoles"); - Element allRolesSequenceElement = elements132.getLength() > 0 ? ((Element)elements132.item(0)) : null; + NodeList elements135 = extensionConfigurationElement.getElementsByTagName("AllRoles"); + Element allRolesSequenceElement = elements135.getLength() > 0 ? ((Element)elements135.item(0)) : null; if (allRolesSequenceElement != null) { for (int i16 = 0; i16 < allRolesSequenceElement.getElementsByTagName("Extension").getLength(); i16 = i16 + 1) @@ -4392,8 +5057,8 @@ public DeploymentGetResponse getByName(String serviceName, String deploymentName ExtensionConfiguration.Extension extensionInstance = new ExtensionConfiguration.Extension(); extensionConfigurationInstance.getAllRoles().add(extensionInstance); - NodeList elements133 = allRolesElement.getElementsByTagName("Id"); - Element idElement = elements133.getLength() > 0 ? ((Element)elements133.item(0)) : null; + NodeList elements136 = allRolesElement.getElementsByTagName("Id"); + Element idElement = elements136.getLength() > 0 ? ((Element)elements136.item(0)) : null; if (idElement != null) { String idInstance; @@ -4403,8 +5068,8 @@ public DeploymentGetResponse getByName(String serviceName, String deploymentName } } - NodeList elements134 = extensionConfigurationElement.getElementsByTagName("NamedRoles"); - Element namedRolesSequenceElement = elements134.getLength() > 0 ? ((Element)elements134.item(0)) : null; + NodeList elements137 = extensionConfigurationElement.getElementsByTagName("NamedRoles"); + Element namedRolesSequenceElement = elements137.getLength() > 0 ? ((Element)elements137.item(0)) : null; if (namedRolesSequenceElement != null) { for (int i17 = 0; i17 < namedRolesSequenceElement.getElementsByTagName("Role").getLength(); i17 = i17 + 1) @@ -4413,8 +5078,8 @@ public DeploymentGetResponse getByName(String serviceName, String deploymentName ExtensionConfiguration.NamedRole roleInstance2 = new ExtensionConfiguration.NamedRole(); extensionConfigurationInstance.getNamedRoles().add(roleInstance2); - NodeList elements135 = namedRolesElement.getElementsByTagName("RoleName"); - Element roleNameElement3 = elements135.getLength() > 0 ? ((Element)elements135.item(0)) : null; + NodeList elements138 = namedRolesElement.getElementsByTagName("RoleName"); + Element roleNameElement3 = elements138.getLength() > 0 ? ((Element)elements138.item(0)) : null; if (roleNameElement3 != null) { String roleNameInstance3; @@ -4422,8 +5087,8 @@ public DeploymentGetResponse getByName(String serviceName, String deploymentName roleInstance2.setRoleName(roleNameInstance3); } - NodeList elements136 = namedRolesElement.getElementsByTagName("Extensions"); - Element extensionsSequenceElement = elements136.getLength() > 0 ? ((Element)elements136.item(0)) : null; + NodeList elements139 = namedRolesElement.getElementsByTagName("Extensions"); + Element extensionsSequenceElement = elements139.getLength() > 0 ? ((Element)elements139.item(0)) : null; if (extensionsSequenceElement != null) { for (int i18 = 0; i18 < extensionsSequenceElement.getElementsByTagName("Extension").getLength(); i18 = i18 + 1) @@ -4432,8 +5097,8 @@ public DeploymentGetResponse getByName(String serviceName, String deploymentName ExtensionConfiguration.Extension extensionInstance2 = new ExtensionConfiguration.Extension(); roleInstance2.getExtensions().add(extensionInstance2); - NodeList elements137 = extensionsElement.getElementsByTagName("Id"); - Element idElement2 = elements137.getLength() > 0 ? ((Element)elements137.item(0)) : null; + NodeList elements140 = extensionsElement.getElementsByTagName("Id"); + Element idElement2 = elements140.getLength() > 0 ? ((Element)elements140.item(0)) : null; if (idElement2 != null) { String idInstance2; @@ -4453,6 +5118,10 @@ public DeploymentGetResponse getByName(String serviceName, String deploymentName result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -4498,6 +5167,16 @@ public DeploymentGetResponse getBySlot(String serviceName, DeploymentSlot deploy } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentSlot", deploymentSlot); + CloudTracing.enter(invocationId, this, "getBySlotAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deploymentslots/" + deploymentSlot; @@ -4506,15 +5185,27 @@ public DeploymentGetResponse getBySlot(String serviceName, DeploymentSlot deploy HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -4834,13 +5525,13 @@ public DeploymentGetResponse getBySlot(String serviceName, DeploymentSlot deploy roleInstance.setRoleName(roleNameInstance2); } - NodeList elements35 = roleListElement.getElementsByTagName("OSVersion"); - Element oSVersionElement = elements35.getLength() > 0 ? ((Element)elements35.item(0)) : null; - if (oSVersionElement != null) + NodeList elements35 = roleListElement.getElementsByTagName("OsVersion"); + Element osVersionElement = elements35.getLength() > 0 ? ((Element)elements35.item(0)) : null; + if (osVersionElement != null) { - String oSVersionInstance; - oSVersionInstance = oSVersionElement.getTextContent(); - roleInstance.setOSVersion(oSVersionInstance); + String osVersionInstance; + osVersionInstance = osVersionElement.getTextContent(); + roleInstance.setOSVersion(osVersionInstance); } NodeList elements36 = roleListElement.getElementsByTagName("RoleType"); @@ -5664,11 +6355,11 @@ public DeploymentGetResponse getBySlot(String serviceName, DeploymentSlot deploy Element virtualIPsSequenceElement = elements125.getLength() > 0 ? ((Element)elements125.item(0)) : null; if (virtualIPsSequenceElement != null) { - for (int i14 = 0; i14 < virtualIPsSequenceElement.getElementsByTagName("VirtualIPAddress").getLength(); i14 = i14 + 1) + for (int i14 = 0; i14 < virtualIPsSequenceElement.getElementsByTagName("VirtualIP").getLength(); i14 = i14 + 1) { - org.w3c.dom.Element virtualIPsElement = ((org.w3c.dom.Element)virtualIPsSequenceElement.getElementsByTagName("VirtualIPAddress").item(i14)); - VirtualIPAddress virtualIPAddressInstance = new VirtualIPAddress(); - result.getVirtualIPAddresses().add(virtualIPAddressInstance); + org.w3c.dom.Element virtualIPsElement = ((org.w3c.dom.Element)virtualIPsSequenceElement.getElementsByTagName("VirtualIP").item(i14)); + VirtualIPAddress virtualIPInstance = new VirtualIPAddress(); + result.getVirtualIPAddresses().add(virtualIPInstance); NodeList elements126 = virtualIPsElement.getElementsByTagName("Address"); Element addressElement = elements126.getLength() > 0 ? ((Element)elements126.item(0)) : null; @@ -5676,20 +6367,47 @@ public DeploymentGetResponse getBySlot(String serviceName, DeploymentSlot deploy { InetAddress addressInstance; addressInstance = InetAddress.getByName(addressElement.getTextContent()); - virtualIPAddressInstance.setAddress(addressInstance); + virtualIPInstance.setAddress(addressInstance); + } + + NodeList elements127 = virtualIPsElement.getElementsByTagName("Name"); + Element nameElement4 = elements127.getLength() > 0 ? ((Element)elements127.item(0)) : null; + if (nameElement4 != null) + { + String nameInstance4; + nameInstance4 = nameElement4.getTextContent(); + virtualIPInstance.setName(nameInstance4); + } + + NodeList elements128 = virtualIPsElement.getElementsByTagName("IsDnsProgrammed"); + Element isDnsProgrammedElement = elements128.getLength() > 0 ? ((Element)elements128.item(0)) : null; + if (isDnsProgrammedElement != null && (isDnsProgrammedElement.getTextContent() != null && isDnsProgrammedElement.getTextContent().isEmpty() != true) == false) + { + boolean isDnsProgrammedInstance; + isDnsProgrammedInstance = Boolean.parseBoolean(isDnsProgrammedElement.getTextContent()); + virtualIPInstance.setIsDnsProgrammed(isDnsProgrammedInstance); } } } - NodeList elements127 = deploymentElement.getElementsByTagName("Dns"); - Element dnsElement = elements127.getLength() > 0 ? ((Element)elements127.item(0)) : null; + NodeList elements129 = deploymentElement.getElementsByTagName("ReservedIPName"); + Element reservedIPNameElement = elements129.getLength() > 0 ? ((Element)elements129.item(0)) : null; + if (reservedIPNameElement != null) + { + String reservedIPNameInstance; + reservedIPNameInstance = reservedIPNameElement.getTextContent(); + result.setReservedIPName(reservedIPNameInstance); + } + + NodeList elements130 = deploymentElement.getElementsByTagName("Dns"); + Element dnsElement = elements130.getLength() > 0 ? ((Element)elements130.item(0)) : null; if (dnsElement != null) { DnsSettings dnsInstance = new DnsSettings(); result.setDnsSettings(dnsInstance); - NodeList elements128 = dnsElement.getElementsByTagName("DnsServers"); - Element dnsServersSequenceElement = elements128.getLength() > 0 ? ((Element)elements128.item(0)) : null; + NodeList elements131 = dnsElement.getElementsByTagName("DnsServers"); + Element dnsServersSequenceElement = elements131.getLength() > 0 ? ((Element)elements131.item(0)) : null; if (dnsServersSequenceElement != null) { for (int i15 = 0; i15 < dnsServersSequenceElement.getElementsByTagName("DnsServer").getLength(); i15 = i15 + 1) @@ -5698,17 +6416,17 @@ public DeploymentGetResponse getBySlot(String serviceName, DeploymentSlot deploy DnsServer dnsServerInstance = new DnsServer(); dnsInstance.getDnsServers().add(dnsServerInstance); - NodeList elements129 = dnsServersElement.getElementsByTagName("Name"); - Element nameElement4 = elements129.getLength() > 0 ? ((Element)elements129.item(0)) : null; - if (nameElement4 != null) + NodeList elements132 = dnsServersElement.getElementsByTagName("Name"); + Element nameElement5 = elements132.getLength() > 0 ? ((Element)elements132.item(0)) : null; + if (nameElement5 != null) { - String nameInstance4; - nameInstance4 = nameElement4.getTextContent(); - dnsServerInstance.setName(nameInstance4); + String nameInstance5; + nameInstance5 = nameElement5.getTextContent(); + dnsServerInstance.setName(nameInstance5); } - NodeList elements130 = dnsServersElement.getElementsByTagName("Address"); - Element addressElement2 = elements130.getLength() > 0 ? ((Element)elements130.item(0)) : null; + NodeList elements133 = dnsServersElement.getElementsByTagName("Address"); + Element addressElement2 = elements133.getLength() > 0 ? ((Element)elements133.item(0)) : null; if (addressElement2 != null) { InetAddress addressInstance2; @@ -5719,15 +6437,15 @@ public DeploymentGetResponse getBySlot(String serviceName, DeploymentSlot deploy } } - NodeList elements131 = deploymentElement.getElementsByTagName("ExtensionConfiguration"); - Element extensionConfigurationElement = elements131.getLength() > 0 ? ((Element)elements131.item(0)) : null; + NodeList elements134 = deploymentElement.getElementsByTagName("ExtensionConfiguration"); + Element extensionConfigurationElement = elements134.getLength() > 0 ? ((Element)elements134.item(0)) : null; if (extensionConfigurationElement != null) { ExtensionConfiguration extensionConfigurationInstance = new ExtensionConfiguration(); result.setExtensionConfiguration(extensionConfigurationInstance); - NodeList elements132 = extensionConfigurationElement.getElementsByTagName("AllRoles"); - Element allRolesSequenceElement = elements132.getLength() > 0 ? ((Element)elements132.item(0)) : null; + NodeList elements135 = extensionConfigurationElement.getElementsByTagName("AllRoles"); + Element allRolesSequenceElement = elements135.getLength() > 0 ? ((Element)elements135.item(0)) : null; if (allRolesSequenceElement != null) { for (int i16 = 0; i16 < allRolesSequenceElement.getElementsByTagName("Extension").getLength(); i16 = i16 + 1) @@ -5736,8 +6454,8 @@ public DeploymentGetResponse getBySlot(String serviceName, DeploymentSlot deploy ExtensionConfiguration.Extension extensionInstance = new ExtensionConfiguration.Extension(); extensionConfigurationInstance.getAllRoles().add(extensionInstance); - NodeList elements133 = allRolesElement.getElementsByTagName("Id"); - Element idElement = elements133.getLength() > 0 ? ((Element)elements133.item(0)) : null; + NodeList elements136 = allRolesElement.getElementsByTagName("Id"); + Element idElement = elements136.getLength() > 0 ? ((Element)elements136.item(0)) : null; if (idElement != null) { String idInstance; @@ -5747,8 +6465,8 @@ public DeploymentGetResponse getBySlot(String serviceName, DeploymentSlot deploy } } - NodeList elements134 = extensionConfigurationElement.getElementsByTagName("NamedRoles"); - Element namedRolesSequenceElement = elements134.getLength() > 0 ? ((Element)elements134.item(0)) : null; + NodeList elements137 = extensionConfigurationElement.getElementsByTagName("NamedRoles"); + Element namedRolesSequenceElement = elements137.getLength() > 0 ? ((Element)elements137.item(0)) : null; if (namedRolesSequenceElement != null) { for (int i17 = 0; i17 < namedRolesSequenceElement.getElementsByTagName("Role").getLength(); i17 = i17 + 1) @@ -5757,8 +6475,8 @@ public DeploymentGetResponse getBySlot(String serviceName, DeploymentSlot deploy ExtensionConfiguration.NamedRole roleInstance2 = new ExtensionConfiguration.NamedRole(); extensionConfigurationInstance.getNamedRoles().add(roleInstance2); - NodeList elements135 = namedRolesElement.getElementsByTagName("RoleName"); - Element roleNameElement3 = elements135.getLength() > 0 ? ((Element)elements135.item(0)) : null; + NodeList elements138 = namedRolesElement.getElementsByTagName("RoleName"); + Element roleNameElement3 = elements138.getLength() > 0 ? ((Element)elements138.item(0)) : null; if (roleNameElement3 != null) { String roleNameInstance3; @@ -5766,8 +6484,8 @@ public DeploymentGetResponse getBySlot(String serviceName, DeploymentSlot deploy roleInstance2.setRoleName(roleNameInstance3); } - NodeList elements136 = namedRolesElement.getElementsByTagName("Extensions"); - Element extensionsSequenceElement = elements136.getLength() > 0 ? ((Element)elements136.item(0)) : null; + NodeList elements139 = namedRolesElement.getElementsByTagName("Extensions"); + Element extensionsSequenceElement = elements139.getLength() > 0 ? ((Element)elements139.item(0)) : null; if (extensionsSequenceElement != null) { for (int i18 = 0; i18 < extensionsSequenceElement.getElementsByTagName("Extension").getLength(); i18 = i18 + 1) @@ -5776,8 +6494,8 @@ public DeploymentGetResponse getBySlot(String serviceName, DeploymentSlot deploy ExtensionConfiguration.Extension extensionInstance2 = new ExtensionConfiguration.Extension(); roleInstance2.getExtensions().add(extensionInstance2); - NodeList elements137 = extensionsElement.getElementsByTagName("Id"); - Element idElement2 = elements137.getLength() > 0 ? ((Element)elements137.item(0)) : null; + NodeList elements140 = extensionsElement.getElementsByTagName("Id"); + Element idElement2 = elements140.getLength() > 0 ? ((Element)elements140.item(0)) : null; if (idElement2 != null) { String idInstance2; @@ -5797,6 +6515,10 @@ public DeploymentGetResponse getBySlot(String serviceName, DeploymentSlot deploy result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -5870,6 +6592,17 @@ public OperationResponse getPackageByName(String serviceName, String deploymentN } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "getPackageByNameAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/package?containerUri=" + parameters.getContainerUri() + " +"; @@ -5882,15 +6615,27 @@ public OperationResponse getPackageByName(String serviceName, String deploymentN HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -5903,6 +6648,10 @@ public OperationResponse getPackageByName(String serviceName, String deploymentN result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -5972,6 +6721,17 @@ public OperationResponse getPackageBySlot(String serviceName, DeploymentSlot dep } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentSlot", deploymentSlot); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "getPackageBySlotAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deploymentslots/" + deploymentSlot + "/package?containerUri=" + parameters.getContainerUri() + " +"; @@ -5984,15 +6744,27 @@ public OperationResponse getPackageBySlot(String serviceName, DeploymentSlot dep HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -6005,6 +6777,10 @@ public OperationResponse getPackageBySlot(String serviceName, DeploymentSlot dep result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -6067,29 +6843,63 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse rebootRoleInstanceByDeploymentName(String serviceName, String deploymentName, String roleInstanceName) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse rebootRoleInstanceByDeploymentName(String serviceName, String deploymentName, String roleInstanceName) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getDeployments().beginRebootingRoleInstanceByDeploymentNameAsync(serviceName, deploymentName, roleInstanceName).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("roleInstanceName", roleInstanceName); + CloudTracing.enter(invocationId, this, "rebootRoleInstanceByDeploymentNameAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getDeploymentsOperations().beginRebootingRoleInstanceByDeploymentNameAsync(serviceName, deploymentName, roleInstanceName).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -6151,29 +6961,63 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse rebootRoleInstanceByDeploymentSlot(String serviceName, DeploymentSlot deploymentSlot, String roleInstanceName) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse rebootRoleInstanceByDeploymentSlot(String serviceName, DeploymentSlot deploymentSlot, String roleInstanceName) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getDeployments().beginRebootingRoleInstanceByDeploymentSlotAsync(serviceName, deploymentSlot, roleInstanceName).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentSlot", deploymentSlot); + tracingParameters.put("roleInstanceName", roleInstanceName); + CloudTracing.enter(invocationId, this, "rebootRoleInstanceByDeploymentSlotAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getDeploymentsOperations().beginRebootingRoleInstanceByDeploymentSlotAsync(serviceName, deploymentSlot, roleInstanceName).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -6235,29 +7079,63 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse reimageRoleInstanceByDeploymentName(String serviceName, String deploymentName, String roleInstanceName) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse reimageRoleInstanceByDeploymentName(String serviceName, String deploymentName, String roleInstanceName) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getDeployments().beginReimagingRoleInstanceByDeploymentNameAsync(serviceName, deploymentName, roleInstanceName).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("roleInstanceName", roleInstanceName); + CloudTracing.enter(invocationId, this, "reimageRoleInstanceByDeploymentNameAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getDeploymentsOperations().beginReimagingRoleInstanceByDeploymentNameAsync(serviceName, deploymentName, roleInstanceName).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -6319,29 +7197,63 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse reimageRoleInstanceByDeploymentSlot(String serviceName, DeploymentSlot deploymentSlot, String roleInstanceName) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse reimageRoleInstanceByDeploymentSlot(String serviceName, DeploymentSlot deploymentSlot, String roleInstanceName) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getDeployments().beginReimagingRoleInstanceByDeploymentSlotAsync(serviceName, deploymentSlot, roleInstanceName).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentSlot", deploymentSlot); + tracingParameters.put("roleInstanceName", roleInstanceName); + CloudTracing.enter(invocationId, this, "reimageRoleInstanceByDeploymentSlotAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getDeploymentsOperations().beginReimagingRoleInstanceByDeploymentSlotAsync(serviceName, deploymentSlot, roleInstanceName).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -6413,16 +7325,27 @@ public OperationResponse rollbackUpdateOrUpgradeByDeploymentName(String serviceN } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "rollbackUpdateOrUpgradeByDeploymentNameAsync", tracingParameters); + } // Construct URL - String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "?comp=rollback"; + String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/?comp=rollback"; // Create HTTP transport objects HttpPost httpRequest = new HttpPost(url); // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -6434,7 +7357,7 @@ public OperationResponse rollbackUpdateOrUpgradeByDeploymentName(String serviceN requestDoc.appendChild(rollbackUpdateOrUpgradeElement); Element modeElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "Mode"); - modeElement.appendChild(requestDoc.createTextNode(ComputeManagementClientImpl.rollbackUpdateOrUpgradeModeToString(parameters.getMode()))); + modeElement.appendChild(requestDoc.createTextNode(parameters.getMode().toString())); rollbackUpdateOrUpgradeElement.appendChild(modeElement); Element forceElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "Force"); @@ -6454,11 +7377,23 @@ public OperationResponse rollbackUpdateOrUpgradeByDeploymentName(String serviceN // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -6471,6 +7406,10 @@ public OperationResponse rollbackUpdateOrUpgradeByDeploymentName(String serviceN result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -6539,16 +7478,27 @@ public OperationResponse rollbackUpdateOrUpgradeByDeploymentSlot(String serviceN } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentSlot", deploymentSlot); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "rollbackUpdateOrUpgradeByDeploymentSlotAsync", tracingParameters); + } // Construct URL - String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deploymentslots/" + deploymentSlot + "?comp=rollback"; + String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deploymentslots/" + deploymentSlot + "/?comp=rollback"; // Create HTTP transport objects HttpPost httpRequest = new HttpPost(url); // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -6560,7 +7510,7 @@ public OperationResponse rollbackUpdateOrUpgradeByDeploymentSlot(String serviceN requestDoc.appendChild(rollbackUpdateOrUpgradeElement); Element modeElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "Mode"); - modeElement.appendChild(requestDoc.createTextNode(ComputeManagementClientImpl.rollbackUpdateOrUpgradeModeToString(parameters.getMode()))); + modeElement.appendChild(requestDoc.createTextNode(parameters.getMode().toString())); rollbackUpdateOrUpgradeElement.appendChild(modeElement); Element forceElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "Force"); @@ -6580,11 +7530,23 @@ public OperationResponse rollbackUpdateOrUpgradeByDeploymentSlot(String serviceN // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -6597,6 +7559,10 @@ public OperationResponse rollbackUpdateOrUpgradeByDeploymentSlot(String serviceN result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -6659,29 +7625,62 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse swap(String serviceName, DeploymentSwapParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse swap(String serviceName, DeploymentSwapParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getDeployments().beginSwappingAsync(serviceName, parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "swapAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getDeploymentsOperations().beginSwappingAsync(serviceName, parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -6747,29 +7746,63 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse updateStatusByDeploymentName(String serviceName, String deploymentName, DeploymentUpdateStatusParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse updateStatusByDeploymentName(String serviceName, String deploymentName, DeploymentUpdateStatusParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getDeployments().beginUpdatingStatusByDeploymentNameAsync(serviceName, deploymentName, parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateStatusByDeploymentNameAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getDeploymentsOperations().beginUpdatingStatusByDeploymentNameAsync(serviceName, deploymentName, parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -6835,29 +7868,63 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse updateStatusByDeploymentSlot(String serviceName, DeploymentSlot deploymentSlot, DeploymentUpdateStatusParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse updateStatusByDeploymentSlot(String serviceName, DeploymentSlot deploymentSlot, DeploymentUpdateStatusParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getDeployments().beginUpdatingStatusByDeploymentSlotAsync(serviceName, deploymentSlot, parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentSlot", deploymentSlot); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateStatusByDeploymentSlotAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getDeploymentsOperations().beginUpdatingStatusByDeploymentSlotAsync(serviceName, deploymentSlot, parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -6961,29 +8028,63 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse upgradeByName(String serviceName, String deploymentName, DeploymentUpgradeParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse upgradeByName(String serviceName, String deploymentName, DeploymentUpgradeParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getDeployments().beginUpgradingByNameAsync(serviceName, deploymentName, parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "upgradeByNameAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getDeploymentsOperations().beginUpgradingByNameAsync(serviceName, deploymentName, parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -7087,29 +8188,63 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse upgradeBySlot(String serviceName, DeploymentSlot deploymentSlot, DeploymentUpgradeParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse upgradeBySlot(String serviceName, DeploymentSlot deploymentSlot, DeploymentUpgradeParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getDeployments().beginUpgradingBySlotAsync(serviceName, deploymentSlot, parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentSlot", deploymentSlot); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "upgradeBySlotAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getDeploymentsOperations().beginUpgradingBySlotAsync(serviceName, deploymentSlot, parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -7213,29 +8348,63 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse walkUpgradeDomainByDeploymentName(String serviceName, String deploymentName, DeploymentWalkUpgradeDomainParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse walkUpgradeDomainByDeploymentName(String serviceName, String deploymentName, DeploymentWalkUpgradeDomainParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getDeployments().beginWalkingUpgradeDomainByDeploymentNameAsync(serviceName, deploymentName, parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "walkUpgradeDomainByDeploymentNameAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getDeploymentsOperations().beginWalkingUpgradeDomainByDeploymentNameAsync(serviceName, deploymentName, parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -7339,28 +8508,62 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse walkUpgradeDomainByDeploymentSlot(String serviceName, DeploymentSlot deploymentSlot, DeploymentWalkUpgradeDomainParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse walkUpgradeDomainByDeploymentSlot(String serviceName, DeploymentSlot deploymentSlot, DeploymentWalkUpgradeDomainParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getDeployments().beginWalkingUpgradeDomainByDeploymentSlotAsync(serviceName, deploymentSlot, parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentSlot", deploymentSlot); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "walkUpgradeDomainByDeploymentSlotAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getDeploymentsOperations().beginWalkingUpgradeDomainByDeploymentSlotAsync(serviceName, deploymentSlot, parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/Exports.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/Exports.java index 454a8218153de..f81d53551c519 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/Exports.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/Exports.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.compute; -import com.microsoft.windowsazure.services.core.Builder; +import com.microsoft.windowsazure.core.Builder; /** * The Class Exports. diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/HostedServiceOperations.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/HostedServiceOperations.java index 1692f9def86f0..5aae7298d45a9 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/HostedServiceOperations.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/HostedServiceOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,8 @@ package com.microsoft.windowsazure.management.compute; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.compute.models.ComputeOperationStatusResponse; import com.microsoft.windowsazure.management.compute.models.HostedServiceAddExtensionParameters; import com.microsoft.windowsazure.management.compute.models.HostedServiceCheckNameAvailabilityResponse; @@ -33,7 +36,6 @@ import com.microsoft.windowsazure.management.compute.models.HostedServiceListExtensionsResponse; import com.microsoft.windowsazure.management.compute.models.HostedServiceListResponse; import com.microsoft.windowsazure.management.compute.models.HostedServiceUpdateParameters; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; @@ -75,7 +77,7 @@ public interface HostedServiceOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse addExtension(String serviceName, HostedServiceAddExtensionParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse addExtension(String serviceName, HostedServiceAddExtensionParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Add Extension operation adds an available extension to your cloud @@ -135,6 +137,30 @@ public interface HostedServiceOperations */ Future beginAddingExtensionAsync(String serviceName, HostedServiceAddExtensionParameters parameters); + /** + * The Delete Hosted Service operation deletes the specified cloud service + * from Windows Azure. (see + * http://msdn.microsoft.com/en-us/library/windowsazure/gg441305.aspx for + * more information) + * + * @param serviceName The name of the cloud service. + * @return A standard service response including an HTTP status code and + * request ID. + */ + OperationResponse beginDeletingAll(String serviceName) throws IOException, ServiceException; + + /** + * The Delete Hosted Service operation deletes the specified cloud service + * from Windows Azure. (see + * http://msdn.microsoft.com/en-us/library/windowsazure/gg441305.aspx for + * more information) + * + * @param serviceName The name of the cloud service. + * @return A standard service response including an HTTP status code and + * request ID. + */ + Future beginDeletingAllAsync(String serviceName); + /** * The Delete Extension operation deletes the specified extension from a * cloud service. (see @@ -196,7 +222,7 @@ public interface HostedServiceOperations * @return A standard service response including an HTTP status code and * request ID. */ - OperationResponse create(HostedServiceCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, URISyntaxException, ParseException; + OperationResponse create(HostedServiceCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, ServiceException, URISyntaxException, ParseException; /** * The Create Hosted Service operation creates a new cloud service in @@ -235,6 +261,44 @@ public interface HostedServiceOperations */ Future deleteAsync(String serviceName); + /** + * The Delete Hosted Service operation deletes the specified cloud service + * from Windows Azure. (see + * http://msdn.microsoft.com/en-us/library/windowsazure/gg441305.aspx for + * more information) + * + * @param serviceName The name of the cloud service. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. + */ + ComputeOperationStatusResponse deleteAll(String serviceName) throws InterruptedException, ExecutionException, ServiceException, IOException; + + /** + * The Delete Hosted Service operation deletes the specified cloud service + * from Windows Azure. (see + * http://msdn.microsoft.com/en-us/library/windowsazure/gg441305.aspx for + * more information) + * + * @param serviceName The name of the cloud service. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. + */ + Future deleteAllAsync(String serviceName); + /** * The Delete Extension operation deletes the specified extension from a * cloud service. (see @@ -254,7 +318,7 @@ public interface HostedServiceOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse deleteExtension(String serviceName, String extensionId) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse deleteExtension(String serviceName, String extensionId) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Delete Extension operation deletes the specified extension from a diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/HostedServiceOperationsImpl.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/HostedServiceOperationsImpl.java index 03307772c4f71..422094748655d 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/HostedServiceOperationsImpl.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/HostedServiceOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,10 @@ package com.microsoft.windowsazure.management.compute; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.compute.models.AccessControlListRule; import com.microsoft.windowsazure.management.compute.models.ComputeOperationStatusResponse; import com.microsoft.windowsazure.management.compute.models.ConfigurationSet; @@ -70,9 +75,8 @@ import com.microsoft.windowsazure.management.compute.models.VirtualMachineWindowsRemoteManagementListenerType; import com.microsoft.windowsazure.management.compute.models.WindowsRemoteManagementListener; import com.microsoft.windowsazure.management.compute.models.WindowsRemoteManagementSettings; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.utils.pipeline.CustomHttpDelete; +import com.microsoft.windowsazure.tracing.ClientRequestTrackingHandler; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -83,6 +87,7 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.HashMap; import java.util.Map; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; @@ -190,29 +195,62 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse addExtension(String serviceName, HostedServiceAddExtensionParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse addExtension(String serviceName, HostedServiceAddExtensionParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getHostedServices().beginAddingExtensionAsync(serviceName, parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "addExtensionAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getHostedServicesOperations().beginAddingExtensionAsync(serviceName, parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -280,6 +318,16 @@ public OperationResponse beginAddingExtension(String serviceName, HostedServiceA } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginAddingExtensionAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/extensions"; @@ -289,7 +337,7 @@ public OperationResponse beginAddingExtension(String serviceName, HostedServiceA // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -356,11 +404,122 @@ public OperationResponse beginAddingExtension(String serviceName, HostedServiceA // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + // Create Result + OperationResponse result = null; + result = new OperationResponse(); + result.setStatusCode(statusCode); + if (httpResponse.getHeaders("x-ms-request-id").length > 0) + { + result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + return result; + } + + /** + * The Delete Hosted Service operation deletes the specified cloud service + * from Windows Azure. (see + * http://msdn.microsoft.com/en-us/library/windowsazure/gg441305.aspx for + * more information) + * + * @param serviceName The name of the cloud service. + * @return A standard service response including an HTTP status code and + * request ID. + */ + @Override + public Future beginDeletingAllAsync(final String serviceName) + { + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public OperationResponse call() throws Exception + { + return beginDeletingAll(serviceName); + } + }); + } + + /** + * The Delete Hosted Service operation deletes the specified cloud service + * from Windows Azure. (see + * http://msdn.microsoft.com/en-us/library/windowsazure/gg441305.aspx for + * more information) + * + * @param serviceName The name of the cloud service. + * @return A standard service response including an HTTP status code and + * request ID. + */ + @Override + public OperationResponse beginDeletingAll(String serviceName) throws IOException, ServiceException + { + // Validate + if (serviceName == null) + { + throw new NullPointerException("serviceName"); + } + + // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + CloudTracing.enter(invocationId, this, "beginDeletingAllAsync", tracingParameters); + } + + // Construct URL + String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "?comp=media"; + + // Create HTTP transport objects + CustomHttpDelete httpRequest = new CustomHttpDelete(url); + + // Set Headers + httpRequest.setHeader("x-ms-version", "2013-11-01"); + + // Send Request + HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } + httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } + int statusCode = httpResponse.getStatusLine().getStatusCode(); + if (statusCode != 202) + { + ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -373,6 +532,10 @@ public OperationResponse beginAddingExtension(String serviceName, HostedServiceA result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -427,6 +590,16 @@ public OperationResponse beginDeletingExtension(String serviceName, String exten } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("extensionId", extensionId); + CloudTracing.enter(invocationId, this, "beginDeletingExtensionAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/extensions/" + extensionId; @@ -435,15 +608,27 @@ public OperationResponse beginDeletingExtension(String serviceName, String exten CustomHttpDelete httpRequest = new CustomHttpDelete(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200 && statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -456,6 +641,10 @@ public OperationResponse beginDeletingExtension(String serviceName, String exten result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -500,6 +689,15 @@ public HostedServiceCheckNameAvailabilityResponse checkNameAvailability(String s // TODO: Validate serviceName is a valid DNS name. // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + CloudTracing.enter(invocationId, this, "checkNameAvailabilityAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/operations/isavailable/" + serviceName; @@ -508,15 +706,27 @@ public HostedServiceCheckNameAvailabilityResponse checkNameAvailability(String s HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -558,6 +768,10 @@ public HostedServiceCheckNameAvailabilityResponse checkNameAvailability(String s result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -596,7 +810,7 @@ public OperationResponse call() throws Exception * request ID. */ @Override - public OperationResponse create(HostedServiceCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, URISyntaxException, ParseException + public OperationResponse create(HostedServiceCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, ServiceException, URISyntaxException, ParseException { // Validate if (parameters == null) @@ -623,6 +837,15 @@ public OperationResponse create(HostedServiceCreateParameters parameters) throws } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices"; @@ -632,7 +855,7 @@ public OperationResponse create(HostedServiceCreateParameters parameters) throws // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -706,11 +929,23 @@ public OperationResponse create(HostedServiceCreateParameters parameters) throws // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 201) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -723,6 +958,10 @@ public OperationResponse create(HostedServiceCreateParameters parameters) throws result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -768,6 +1007,15 @@ public OperationResponse delete(String serviceName) throws IOException, ServiceE } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName; @@ -776,15 +1024,27 @@ public OperationResponse delete(String serviceName) throws IOException, ServiceE CustomHttpDelete httpRequest = new CustomHttpDelete(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -797,9 +1057,117 @@ public OperationResponse delete(String serviceName) throws IOException, ServiceE result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } + /** + * The Delete Hosted Service operation deletes the specified cloud service + * from Windows Azure. (see + * http://msdn.microsoft.com/en-us/library/windowsazure/gg441305.aspx for + * more information) + * + * @param serviceName The name of the cloud service. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. + */ + @Override + public Future deleteAllAsync(final String serviceName) + { + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public ComputeOperationStatusResponse call() throws Exception + { + return deleteAll(serviceName); + } + }); + } + + /** + * The Delete Hosted Service operation deletes the specified cloud service + * from Windows Azure. (see + * http://msdn.microsoft.com/en-us/library/windowsazure/gg441305.aspx for + * more information) + * + * @param serviceName The name of the cloud service. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. + */ + @Override + public ComputeOperationStatusResponse deleteAll(String serviceName) throws InterruptedException, ExecutionException, ServiceException, IOException + { + ComputeManagementClient client2 = this.getClient(); + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + CloudTracing.enter(invocationId, this, "deleteAllAsync", tracingParameters); + } + try + { + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getHostedServicesOperations().beginDeletingAllAsync(serviceName).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } + } + } + /** * The Delete Extension operation deletes the specified extension from a * cloud service. (see @@ -851,29 +1219,62 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse deleteExtension(String serviceName, String extensionId) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse deleteExtension(String serviceName, String extensionId) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getHostedServices().beginDeletingExtensionAsync(serviceName, extensionId).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("extensionId", extensionId); + CloudTracing.enter(invocationId, this, "deleteExtensionAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getHostedServicesOperations().beginDeletingExtensionAsync(serviceName, extensionId).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -920,6 +1321,15 @@ public HostedServiceGetResponse get(String serviceName) throws IOException, Serv } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName; @@ -928,15 +1338,27 @@ public HostedServiceGetResponse get(String serviceName) throws IOException, Serv HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1070,6 +1492,10 @@ public HostedServiceGetResponse get(String serviceName) throws IOException, Serv result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1119,6 +1545,15 @@ public HostedServiceGetDetailedResponse getDetailed(String serviceName) throws I } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + CloudTracing.enter(invocationId, this, "getDetailedAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "?embed-detail=true"; @@ -1127,15 +1562,27 @@ public HostedServiceGetDetailedResponse getDetailed(String serviceName) throws I HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1465,13 +1912,13 @@ public HostedServiceGetDetailedResponse getDetailed(String serviceName) throws I roleInstance.setRoleName(roleNameInstance2); } - NodeList elements36 = roleListElement.getElementsByTagName("OSVersion"); - Element oSVersionElement = elements36.getLength() > 0 ? ((Element)elements36.item(0)) : null; - if (oSVersionElement != null) + NodeList elements36 = roleListElement.getElementsByTagName("OsVersion"); + Element osVersionElement = elements36.getLength() > 0 ? ((Element)elements36.item(0)) : null; + if (osVersionElement != null) { - String oSVersionInstance; - oSVersionInstance = oSVersionElement.getTextContent(); - roleInstance.setOSVersion(oSVersionInstance); + String osVersionInstance; + osVersionInstance = osVersionElement.getTextContent(); + roleInstance.setOSVersion(osVersionInstance); } NodeList elements37 = roleListElement.getElementsByTagName("RoleType"); @@ -2292,11 +2739,11 @@ public HostedServiceGetDetailedResponse getDetailed(String serviceName) throws I Element virtualIPsSequenceElement = elements126.getLength() > 0 ? ((Element)elements126.item(0)) : null; if (virtualIPsSequenceElement != null) { - for (int i15 = 0; i15 < virtualIPsSequenceElement.getElementsByTagName("VirtualIPAddress").getLength(); i15 = i15 + 1) + for (int i15 = 0; i15 < virtualIPsSequenceElement.getElementsByTagName("VirtualIP").getLength(); i15 = i15 + 1) { - org.w3c.dom.Element virtualIPsElement = ((org.w3c.dom.Element)virtualIPsSequenceElement.getElementsByTagName("VirtualIPAddress").item(i15)); - VirtualIPAddress virtualIPAddressInstance = new VirtualIPAddress(); - deploymentInstance.getVirtualIPAddresses().add(virtualIPAddressInstance); + org.w3c.dom.Element virtualIPsElement = ((org.w3c.dom.Element)virtualIPsSequenceElement.getElementsByTagName("VirtualIP").item(i15)); + VirtualIPAddress virtualIPInstance = new VirtualIPAddress(); + deploymentInstance.getVirtualIPAddresses().add(virtualIPInstance); NodeList elements127 = virtualIPsElement.getElementsByTagName("Address"); Element addressElement = elements127.getLength() > 0 ? ((Element)elements127.item(0)) : null; @@ -2304,20 +2751,38 @@ public HostedServiceGetDetailedResponse getDetailed(String serviceName) throws I { InetAddress addressInstance; addressInstance = InetAddress.getByName(addressElement.getTextContent()); - virtualIPAddressInstance.setAddress(addressInstance); + virtualIPInstance.setAddress(addressInstance); + } + + NodeList elements128 = virtualIPsElement.getElementsByTagName("Name"); + Element nameElement4 = elements128.getLength() > 0 ? ((Element)elements128.item(0)) : null; + if (nameElement4 != null) + { + String nameInstance4; + nameInstance4 = nameElement4.getTextContent(); + virtualIPInstance.setName(nameInstance4); + } + + NodeList elements129 = virtualIPsElement.getElementsByTagName("IsDnsProgrammed"); + Element isDnsProgrammedElement = elements129.getLength() > 0 ? ((Element)elements129.item(0)) : null; + if (isDnsProgrammedElement != null && (isDnsProgrammedElement.getTextContent() != null && isDnsProgrammedElement.getTextContent().isEmpty() != true) == false) + { + boolean isDnsProgrammedInstance; + isDnsProgrammedInstance = Boolean.parseBoolean(isDnsProgrammedElement.getTextContent()); + virtualIPInstance.setIsDnsProgrammed(isDnsProgrammedInstance); } } } - NodeList elements128 = deploymentsElement.getElementsByTagName("Dns"); - Element dnsElement = elements128.getLength() > 0 ? ((Element)elements128.item(0)) : null; + NodeList elements130 = deploymentsElement.getElementsByTagName("Dns"); + Element dnsElement = elements130.getLength() > 0 ? ((Element)elements130.item(0)) : null; if (dnsElement != null) { DnsSettings dnsInstance = new DnsSettings(); deploymentInstance.setDnsSettings(dnsInstance); - NodeList elements129 = dnsElement.getElementsByTagName("DnsServers"); - Element dnsServersSequenceElement = elements129.getLength() > 0 ? ((Element)elements129.item(0)) : null; + NodeList elements131 = dnsElement.getElementsByTagName("DnsServers"); + Element dnsServersSequenceElement = elements131.getLength() > 0 ? ((Element)elements131.item(0)) : null; if (dnsServersSequenceElement != null) { for (int i16 = 0; i16 < dnsServersSequenceElement.getElementsByTagName("DnsServer").getLength(); i16 = i16 + 1) @@ -2326,17 +2791,17 @@ public HostedServiceGetDetailedResponse getDetailed(String serviceName) throws I DnsServer dnsServerInstance = new DnsServer(); dnsInstance.getDnsServers().add(dnsServerInstance); - NodeList elements130 = dnsServersElement.getElementsByTagName("Name"); - Element nameElement4 = elements130.getLength() > 0 ? ((Element)elements130.item(0)) : null; - if (nameElement4 != null) + NodeList elements132 = dnsServersElement.getElementsByTagName("Name"); + Element nameElement5 = elements132.getLength() > 0 ? ((Element)elements132.item(0)) : null; + if (nameElement5 != null) { - String nameInstance4; - nameInstance4 = nameElement4.getTextContent(); - dnsServerInstance.setName(nameInstance4); + String nameInstance5; + nameInstance5 = nameElement5.getTextContent(); + dnsServerInstance.setName(nameInstance5); } - NodeList elements131 = dnsServersElement.getElementsByTagName("Address"); - Element addressElement2 = elements131.getLength() > 0 ? ((Element)elements131.item(0)) : null; + NodeList elements133 = dnsServersElement.getElementsByTagName("Address"); + Element addressElement2 = elements133.getLength() > 0 ? ((Element)elements133.item(0)) : null; if (addressElement2 != null) { InetAddress addressInstance2; @@ -2349,8 +2814,8 @@ public HostedServiceGetDetailedResponse getDetailed(String serviceName) throws I } } - NodeList elements132 = hostedServiceElement.getElementsByTagName("Url"); - Element urlElement2 = elements132.getLength() > 0 ? ((Element)elements132.item(0)) : null; + NodeList elements134 = hostedServiceElement.getElementsByTagName("Url"); + Element urlElement2 = elements134.getLength() > 0 ? ((Element)elements134.item(0)) : null; if (urlElement2 != null) { URI urlInstance2; @@ -2358,8 +2823,8 @@ public HostedServiceGetDetailedResponse getDetailed(String serviceName) throws I result.setUri(urlInstance2); } - NodeList elements133 = hostedServiceElement.getElementsByTagName("ServiceName"); - Element serviceNameElement = elements133.getLength() > 0 ? ((Element)elements133.item(0)) : null; + NodeList elements135 = hostedServiceElement.getElementsByTagName("ServiceName"); + Element serviceNameElement = elements135.getLength() > 0 ? ((Element)elements135.item(0)) : null; if (serviceNameElement != null) { String serviceNameInstance; @@ -2367,15 +2832,15 @@ public HostedServiceGetDetailedResponse getDetailed(String serviceName) throws I result.setServiceName(serviceNameInstance); } - NodeList elements134 = hostedServiceElement.getElementsByTagName("HostedServiceProperties"); - Element hostedServicePropertiesElement = elements134.getLength() > 0 ? ((Element)elements134.item(0)) : null; + NodeList elements136 = hostedServiceElement.getElementsByTagName("HostedServiceProperties"); + Element hostedServicePropertiesElement = elements136.getLength() > 0 ? ((Element)elements136.item(0)) : null; if (hostedServicePropertiesElement != null) { HostedServiceProperties hostedServicePropertiesInstance = new HostedServiceProperties(); result.setProperties(hostedServicePropertiesInstance); - NodeList elements135 = hostedServicePropertiesElement.getElementsByTagName("Description"); - Element descriptionElement2 = elements135.getLength() > 0 ? ((Element)elements135.item(0)) : null; + NodeList elements137 = hostedServicePropertiesElement.getElementsByTagName("Description"); + Element descriptionElement2 = elements137.getLength() > 0 ? ((Element)elements137.item(0)) : null; if (descriptionElement2 != null) { String descriptionInstance2; @@ -2383,8 +2848,8 @@ public HostedServiceGetDetailedResponse getDetailed(String serviceName) throws I hostedServicePropertiesInstance.setDescription(descriptionInstance2); } - NodeList elements136 = hostedServicePropertiesElement.getElementsByTagName("AffinityGroup"); - Element affinityGroupElement = elements136.getLength() > 0 ? ((Element)elements136.item(0)) : null; + NodeList elements138 = hostedServicePropertiesElement.getElementsByTagName("AffinityGroup"); + Element affinityGroupElement = elements138.getLength() > 0 ? ((Element)elements138.item(0)) : null; if (affinityGroupElement != null) { String affinityGroupInstance; @@ -2392,8 +2857,8 @@ public HostedServiceGetDetailedResponse getDetailed(String serviceName) throws I hostedServicePropertiesInstance.setAffinityGroup(affinityGroupInstance); } - NodeList elements137 = hostedServicePropertiesElement.getElementsByTagName("Location"); - Element locationElement = elements137.getLength() > 0 ? ((Element)elements137.item(0)) : null; + NodeList elements139 = hostedServicePropertiesElement.getElementsByTagName("Location"); + Element locationElement = elements139.getLength() > 0 ? ((Element)elements139.item(0)) : null; if (locationElement != null) { String locationInstance; @@ -2401,8 +2866,8 @@ public HostedServiceGetDetailedResponse getDetailed(String serviceName) throws I hostedServicePropertiesInstance.setLocation(locationInstance); } - NodeList elements138 = hostedServicePropertiesElement.getElementsByTagName("Label"); - Element labelElement3 = elements138.getLength() > 0 ? ((Element)elements138.item(0)) : null; + NodeList elements140 = hostedServicePropertiesElement.getElementsByTagName("Label"); + Element labelElement3 = elements140.getLength() > 0 ? ((Element)elements140.item(0)) : null; if (labelElement3 != null) { String labelInstance3; @@ -2410,8 +2875,8 @@ public HostedServiceGetDetailedResponse getDetailed(String serviceName) throws I hostedServicePropertiesInstance.setLabel(labelInstance3); } - NodeList elements139 = hostedServicePropertiesElement.getElementsByTagName("Status"); - Element statusElement3 = elements139.getLength() > 0 ? ((Element)elements139.item(0)) : null; + NodeList elements141 = hostedServicePropertiesElement.getElementsByTagName("Status"); + Element statusElement3 = elements141.getLength() > 0 ? ((Element)elements141.item(0)) : null; if (statusElement3 != null) { HostedServiceStatus statusInstance3; @@ -2419,8 +2884,8 @@ public HostedServiceGetDetailedResponse getDetailed(String serviceName) throws I hostedServicePropertiesInstance.setStatus(statusInstance3); } - NodeList elements140 = hostedServicePropertiesElement.getElementsByTagName("DateCreated"); - Element dateCreatedElement = elements140.getLength() > 0 ? ((Element)elements140.item(0)) : null; + NodeList elements142 = hostedServicePropertiesElement.getElementsByTagName("DateCreated"); + Element dateCreatedElement = elements142.getLength() > 0 ? ((Element)elements142.item(0)) : null; if (dateCreatedElement != null) { Calendar dateCreatedInstance; @@ -2431,8 +2896,8 @@ public HostedServiceGetDetailedResponse getDetailed(String serviceName) throws I hostedServicePropertiesInstance.setDateCreated(dateCreatedInstance); } - NodeList elements141 = hostedServicePropertiesElement.getElementsByTagName("DateLastModified"); - Element dateLastModifiedElement = elements141.getLength() > 0 ? ((Element)elements141.item(0)) : null; + NodeList elements143 = hostedServicePropertiesElement.getElementsByTagName("DateLastModified"); + Element dateLastModifiedElement = elements143.getLength() > 0 ? ((Element)elements143.item(0)) : null; if (dateLastModifiedElement != null) { Calendar dateLastModifiedInstance; @@ -2443,17 +2908,17 @@ public HostedServiceGetDetailedResponse getDetailed(String serviceName) throws I hostedServicePropertiesInstance.setDateLastModified(dateLastModifiedInstance); } - NodeList elements142 = hostedServicePropertiesElement.getElementsByTagName("ExtendedProperties"); - Element extendedPropertiesSequenceElement2 = elements142.getLength() > 0 ? ((Element)elements142.item(0)) : null; + NodeList elements144 = hostedServicePropertiesElement.getElementsByTagName("ExtendedProperties"); + Element extendedPropertiesSequenceElement2 = elements144.getLength() > 0 ? ((Element)elements144.item(0)) : null; if (extendedPropertiesSequenceElement2 != null) { for (int i17 = 0; i17 < extendedPropertiesSequenceElement2.getElementsByTagName("ExtendedProperty").getLength(); i17 = i17 + 1) { org.w3c.dom.Element extendedPropertiesElement2 = ((org.w3c.dom.Element)extendedPropertiesSequenceElement2.getElementsByTagName("ExtendedProperty").item(i17)); - NodeList elements143 = extendedPropertiesElement2.getElementsByTagName("Name"); - String extendedPropertiesKey2 = elements143.getLength() > 0 ? ((org.w3c.dom.Element)elements143.item(0)).getTextContent() : null; - NodeList elements144 = extendedPropertiesElement2.getElementsByTagName("Value"); - String extendedPropertiesValue2 = elements144.getLength() > 0 ? ((org.w3c.dom.Element)elements144.item(0)).getTextContent() : null; + NodeList elements145 = extendedPropertiesElement2.getElementsByTagName("Name"); + String extendedPropertiesKey2 = elements145.getLength() > 0 ? ((org.w3c.dom.Element)elements145.item(0)).getTextContent() : null; + NodeList elements146 = extendedPropertiesElement2.getElementsByTagName("Value"); + String extendedPropertiesValue2 = elements146.getLength() > 0 ? ((org.w3c.dom.Element)elements146.item(0)).getTextContent() : null; hostedServicePropertiesInstance.getExtendedProperties().put(extendedPropertiesKey2, extendedPropertiesValue2); } } @@ -2466,6 +2931,10 @@ public HostedServiceGetDetailedResponse getDetailed(String serviceName) throws I result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -2518,6 +2987,16 @@ public HostedServiceGetExtensionResponse getExtension(String serviceName, String } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("extensionId", extensionId); + CloudTracing.enter(invocationId, this, "getExtensionAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/extensions/" + extensionId; @@ -2526,15 +3005,27 @@ public HostedServiceGetExtensionResponse getExtension(String serviceName, String HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2621,6 +3112,10 @@ public HostedServiceGetExtensionResponse getExtension(String serviceName, String result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -2658,6 +3153,14 @@ public HostedServiceListResponse list() throws IOException, ServiceException, Pa // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices"; @@ -2666,15 +3169,27 @@ public HostedServiceListResponse list() throws IOException, ServiceException, Pa HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2815,6 +3330,10 @@ public HostedServiceListResponse list() throws IOException, ServiceException, Pa result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -2858,6 +3377,14 @@ public HostedServiceListAvailableExtensionsResponse listAvailableExtensions() th // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listAvailableExtensionsAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/extensions"; @@ -2866,15 +3393,27 @@ public HostedServiceListAvailableExtensionsResponse listAvailableExtensions() th HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2986,6 +3525,10 @@ public HostedServiceListAvailableExtensionsResponse listAvailableExtensions() th result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -3030,6 +3573,15 @@ public HostedServiceListExtensionsResponse listExtensions(String serviceName) th // TODO: Validate serviceName is a valid DNS name. // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + CloudTracing.enter(invocationId, this, "listExtensionsAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/extensions"; @@ -3038,15 +3590,27 @@ public HostedServiceListExtensionsResponse listExtensions(String serviceName) th HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -3140,6 +3704,10 @@ public HostedServiceListExtensionsResponse listExtensions(String serviceName) th result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -3203,6 +3771,16 @@ public OperationResponse update(String serviceName, HostedServiceUpdateParameter } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName; @@ -3212,7 +3790,7 @@ public OperationResponse update(String serviceName, HostedServiceUpdateParameter // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -3271,11 +3849,23 @@ public OperationResponse update(String serviceName, HostedServiceUpdateParameter // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -3288,6 +3878,10 @@ public OperationResponse update(String serviceName, HostedServiceUpdateParameter result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/OperatingSystemOperations.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/OperatingSystemOperations.java index 4356575327cf0..341e8e13f9fc9 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/OperatingSystemOperations.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/OperatingSystemOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,9 +23,9 @@ package com.microsoft.windowsazure.management.compute; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.compute.models.OperatingSystemListFamiliesResponse; import com.microsoft.windowsazure.management.compute.models.OperatingSystemListResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.net.URISyntaxException; import java.text.ParseException; diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/OperatingSystemOperationsImpl.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/OperatingSystemOperationsImpl.java index 666fdc75f36e8..cd4d80e654c77 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/OperatingSystemOperationsImpl.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/OperatingSystemOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,14 +23,16 @@ package com.microsoft.windowsazure.management.compute; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.compute.models.OperatingSystemListFamiliesResponse; import com.microsoft.windowsazure.management.compute.models.OperatingSystemListResponse; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.net.URISyntaxException; import java.text.ParseException; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.Future; import javax.xml.parsers.DocumentBuilder; @@ -114,6 +118,14 @@ public OperatingSystemListResponse list() throws IOException, ServiceException, // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/operatingsystems"; @@ -122,15 +134,27 @@ public OperatingSystemListResponse list() throws IOException, ServiceException, HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -215,6 +239,10 @@ public OperatingSystemListResponse list() throws IOException, ServiceException, result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -262,6 +290,14 @@ public OperatingSystemListFamiliesResponse listFamilies() throws IOException, Se // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listFamiliesAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/operatingsystemfamilies"; @@ -270,15 +306,27 @@ public OperatingSystemListFamiliesResponse listFamilies() throws IOException, Se HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -375,6 +423,10 @@ public OperatingSystemListFamiliesResponse listFamilies() throws IOException, Se result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ServiceCertificateOperations.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ServiceCertificateOperations.java index f38b385bc8af0..47ca2b7c56e37 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ServiceCertificateOperations.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ServiceCertificateOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,14 +23,14 @@ package com.microsoft.windowsazure.management.compute; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.compute.models.ComputeOperationStatusResponse; import com.microsoft.windowsazure.management.compute.models.ServiceCertificateCreateParameters; import com.microsoft.windowsazure.management.compute.models.ServiceCertificateDeleteParameters; import com.microsoft.windowsazure.management.compute.models.ServiceCertificateGetParameters; import com.microsoft.windowsazure.management.compute.models.ServiceCertificateGetResponse; import com.microsoft.windowsazure.management.compute.models.ServiceCertificateListResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; @@ -133,7 +135,7 @@ public interface ServiceCertificateOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse create(String serviceName, ServiceCertificateCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, URISyntaxException, ParseException; + ComputeOperationStatusResponse create(String serviceName, ServiceCertificateCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, ServiceException, URISyntaxException, ParseException; /** * The Add Service Certificate operation adds a certificate to a hosted diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ServiceCertificateOperationsImpl.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ServiceCertificateOperationsImpl.java index 426fd18b88c53..53906cf453315 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ServiceCertificateOperationsImpl.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/ServiceCertificateOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,10 @@ package com.microsoft.windowsazure.management.compute; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.compute.models.ComputeOperationStatusResponse; import com.microsoft.windowsazure.management.compute.models.OperationStatus; import com.microsoft.windowsazure.management.compute.models.ServiceCertificateCreateParameters; @@ -29,9 +34,8 @@ import com.microsoft.windowsazure.management.compute.models.ServiceCertificateGetParameters; import com.microsoft.windowsazure.management.compute.models.ServiceCertificateGetResponse; import com.microsoft.windowsazure.management.compute.models.ServiceCertificateListResponse; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.utils.pipeline.CustomHttpDelete; +import com.microsoft.windowsazure.tracing.ClientRequestTrackingHandler; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -39,6 +43,7 @@ import java.net.URI; import java.net.URISyntaxException; import java.text.ParseException; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; @@ -145,6 +150,16 @@ public OperationResponse beginCreating(String serviceName, ServiceCertificateCre } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginCreatingAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/certificates"; @@ -154,7 +169,7 @@ public OperationResponse beginCreating(String serviceName, ServiceCertificateCre // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -193,11 +208,23 @@ public OperationResponse beginCreating(String serviceName, ServiceCertificateCre // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -210,6 +237,10 @@ public OperationResponse beginCreating(String serviceName, ServiceCertificateCre result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -276,6 +307,15 @@ public OperationResponse beginDeleting(ServiceCertificateDeleteParameters parame } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginDeletingAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + parameters.getServiceName() + "/certificates/" + parameters.getThumbprintAlgorithm() + "-" + parameters.getThumbprint(); @@ -284,15 +324,27 @@ public OperationResponse beginDeleting(ServiceCertificateDeleteParameters parame CustomHttpDelete httpRequest = new CustomHttpDelete(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -305,6 +357,10 @@ public OperationResponse beginDeleting(ServiceCertificateDeleteParameters parame result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -365,29 +421,62 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse create(String serviceName, ServiceCertificateCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, URISyntaxException, ParseException + public ComputeOperationStatusResponse create(String serviceName, ServiceCertificateCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, ServiceException, URISyntaxException, ParseException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getServiceCertificates().beginCreatingAsync(serviceName, parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getServiceCertificatesOperations().beginCreatingAsync(serviceName, parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -448,26 +537,58 @@ public ComputeOperationStatusResponse call() throws Exception public ComputeOperationStatusResponse delete(ServiceCertificateDeleteParameters parameters) throws IOException, ServiceException, InterruptedException, ExecutionException, ServiceException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getServiceCertificates().beginDeletingAsync(parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getServiceCertificatesOperations().beginDeletingAsync(parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -525,6 +646,15 @@ public ServiceCertificateGetResponse get(ServiceCertificateGetParameters paramet } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + parameters.getServiceName() + "/certificates/" + parameters.getThumbprintAlgorithm() + "-" + parameters.getThumbprint(); @@ -533,15 +663,27 @@ public ServiceCertificateGetResponse get(ServiceCertificateGetParameters paramet HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -574,6 +716,10 @@ public ServiceCertificateGetResponse get(ServiceCertificateGetParameters paramet result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -618,6 +764,15 @@ public ServiceCertificateListResponse list(String serviceName) throws IOExceptio // TODO: Validate serviceName is a valid DNS name. // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/certificates"; @@ -626,15 +781,27 @@ public ServiceCertificateListResponse list(String serviceName) throws IOExceptio HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -701,6 +868,10 @@ public ServiceCertificateListResponse list(String serviceName) throws IOExceptio result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineDiskOperations.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineDiskOperations.java index 43298e50a962f..0c0ea69d89c84 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineDiskOperations.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineDiskOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,9 @@ package com.microsoft.windowsazure.management.compute; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; +import com.microsoft.windowsazure.management.compute.models.ComputeOperationStatusResponse; import com.microsoft.windowsazure.management.compute.models.VirtualMachineDiskCreateDataDiskParameters; import com.microsoft.windowsazure.management.compute.models.VirtualMachineDiskCreateDiskParameters; import com.microsoft.windowsazure.management.compute.models.VirtualMachineDiskCreateDiskResponse; @@ -31,10 +35,10 @@ import com.microsoft.windowsazure.management.compute.models.VirtualMachineDiskUpdateDataDiskParameters; import com.microsoft.windowsazure.management.compute.models.VirtualMachineDiskUpdateDiskParameters; import com.microsoft.windowsazure.management.compute.models.VirtualMachineDiskUpdateDiskResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; +import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerConfigurationException; @@ -49,6 +53,40 @@ */ public interface VirtualMachineDiskOperations { + /** + * The Delete Data Disk operation removes the specified data disk from a + * virtual machine. (see + * http://msdn.microsoft.com/en-us/library/windowsazure/jj157179.aspx for + * more information) + * + * @param serviceName The name of your service. + * @param deploymentName The name of the deployment. + * @param roleName The name of the role to delete the data disk from. + * @param logicalUnitNumber The logical unit number of the disk. + * @param deleteFromStorage Optional. Specifies that the source blob for the + * disk should also be deleted from storage. + * @return A standard service response including an HTTP status code and + * request ID. + */ + OperationResponse beginDeletingDataDisk(String serviceName, String deploymentName, String roleName, int logicalUnitNumber, boolean deleteFromStorage) throws IOException, ServiceException; + + /** + * The Delete Data Disk operation removes the specified data disk from a + * virtual machine. (see + * http://msdn.microsoft.com/en-us/library/windowsazure/jj157179.aspx for + * more information) + * + * @param serviceName The name of your service. + * @param deploymentName The name of the deployment. + * @param roleName The name of the role to delete the data disk from. + * @param logicalUnitNumber The logical unit number of the disk. + * @param deleteFromStorage Optional. Specifies that the source blob for the + * disk should also be deleted from storage. + * @return A standard service response including an HTTP status code and + * request ID. + */ + Future beginDeletingDataDiskAsync(String serviceName, String deploymentName, String roleName, int logicalUnitNumber, boolean deleteFromStorage); + /** * The Add Data Disk operation adds a data disk to a virtual machine. There * are three ways to create the data disk using the Add Data Disk @@ -145,10 +183,19 @@ public interface VirtualMachineDiskOperations * @param deploymentName The name of the deployment. * @param roleName The name of the role to delete the data disk from. * @param logicalUnitNumber The logical unit number of the disk. - * @return A standard service response including an HTTP status code and - * request ID. + * @param deleteFromStorage Optional. Specifies that the source blob for the + * disk should also be deleted from storage. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. */ - OperationResponse deleteDataDisk(String serviceName, String deploymentName, String roleName, int logicalUnitNumber) throws IOException, ServiceException; + ComputeOperationStatusResponse deleteDataDisk(String serviceName, String deploymentName, String roleName, int logicalUnitNumber, boolean deleteFromStorage) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Delete Data Disk operation removes the specified data disk from a @@ -160,10 +207,19 @@ public interface VirtualMachineDiskOperations * @param deploymentName The name of the deployment. * @param roleName The name of the role to delete the data disk from. * @param logicalUnitNumber The logical unit number of the disk. - * @return A standard service response including an HTTP status code and - * request ID. + * @param deleteFromStorage Optional. Specifies that the source blob for the + * disk should also be deleted from storage. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. */ - Future deleteDataDiskAsync(String serviceName, String deploymentName, String roleName, int logicalUnitNumber); + Future deleteDataDiskAsync(String serviceName, String deploymentName, String roleName, int logicalUnitNumber, boolean deleteFromStorage); /** * The Delete Disk operation deletes the specified data or operating system diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineDiskOperationsImpl.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineDiskOperationsImpl.java index 62e49d978ae38..a5a944ab21772 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineDiskOperationsImpl.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineDiskOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,12 @@ package com.microsoft.windowsazure.management.compute; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.exception.ServiceException; +import com.microsoft.windowsazure.management.compute.models.ComputeOperationStatusResponse; +import com.microsoft.windowsazure.management.compute.models.OperationStatus; import com.microsoft.windowsazure.management.compute.models.VirtualHardDiskHostCaching; import com.microsoft.windowsazure.management.compute.models.VirtualMachineDiskCreateDataDiskParameters; import com.microsoft.windowsazure.management.compute.models.VirtualMachineDiskCreateDiskParameters; @@ -32,9 +39,8 @@ import com.microsoft.windowsazure.management.compute.models.VirtualMachineDiskUpdateDataDiskParameters; import com.microsoft.windowsazure.management.compute.models.VirtualMachineDiskUpdateDiskParameters; import com.microsoft.windowsazure.management.compute.models.VirtualMachineDiskUpdateDiskResponse; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.utils.pipeline.CustomHttpDelete; +import com.microsoft.windowsazure.tracing.ClientRequestTrackingHandler; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -42,7 +48,9 @@ import java.net.URI; import java.net.URISyntaxException; import java.net.URLEncoder; +import java.util.HashMap; import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -89,6 +97,131 @@ public class VirtualMachineDiskOperationsImpl implements ServiceOperations beginDeletingDataDiskAsync(final String serviceName, final String deploymentName, final String roleName, final int logicalUnitNumber, final boolean deleteFromStorage) + { + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public OperationResponse call() throws Exception + { + return beginDeletingDataDisk(serviceName, deploymentName, roleName, logicalUnitNumber, deleteFromStorage); + } + }); + } + + /** + * The Delete Data Disk operation removes the specified data disk from a + * virtual machine. (see + * http://msdn.microsoft.com/en-us/library/windowsazure/jj157179.aspx for + * more information) + * + * @param serviceName The name of your service. + * @param deploymentName The name of the deployment. + * @param roleName The name of the role to delete the data disk from. + * @param logicalUnitNumber The logical unit number of the disk. + * @param deleteFromStorage Optional. Specifies that the source blob for the + * disk should also be deleted from storage. + * @return A standard service response including an HTTP status code and + * request ID. + */ + @Override + public OperationResponse beginDeletingDataDisk(String serviceName, String deploymentName, String roleName, int logicalUnitNumber, boolean deleteFromStorage) throws IOException, ServiceException + { + // Validate + if (serviceName == null) + { + throw new NullPointerException("serviceName"); + } + if (deploymentName == null) + { + throw new NullPointerException("deploymentName"); + } + if (roleName == null) + { + throw new NullPointerException("roleName"); + } + + // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("roleName", roleName); + tracingParameters.put("logicalUnitNumber", logicalUnitNumber); + tracingParameters.put("deleteFromStorage", deleteFromStorage); + CloudTracing.enter(invocationId, this, "beginDeletingDataDiskAsync", tracingParameters); + } + + // Construct URL + String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/roles/" + roleName + "/DataDisks/" + logicalUnitNumber + "?"; + if (deleteFromStorage == true) + { + url = url + "&comp=" + URLEncoder.encode("media"); + } + + // Create HTTP transport objects + CustomHttpDelete httpRequest = new CustomHttpDelete(url); + + // Set Headers + httpRequest.setHeader("x-ms-version", "2013-11-01"); + + // Send Request + HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } + httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } + int statusCode = httpResponse.getStatusLine().getStatusCode(); + if (statusCode != 202) + { + ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + // Create Result + OperationResponse result = null; + result = new OperationResponse(); + result.setStatusCode(statusCode); + if (httpResponse.getHeaders("x-ms-request-id").length > 0) + { + result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + return result; + } + /** * The Add Data Disk operation adds a data disk to a virtual machine. There * are three ways to create the data disk using the Add Data Disk @@ -185,6 +318,18 @@ public OperationResponse createDataDisk(String serviceName, String deploymentNam } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("roleName", roleName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createDataDiskAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/roles/" + roleName + "/DataDisks"; @@ -194,7 +339,7 @@ public OperationResponse createDataDisk(String serviceName, String deploymentNam // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -258,11 +403,23 @@ public OperationResponse createDataDisk(String serviceName, String deploymentNam // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 201) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -275,6 +432,10 @@ public OperationResponse createDataDisk(String serviceName, String deploymentNam result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -332,6 +493,15 @@ public VirtualMachineDiskCreateDiskResponse createDisk(VirtualMachineDiskCreateD } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createDiskAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/disks"; @@ -341,7 +511,7 @@ public VirtualMachineDiskCreateDiskResponse createDisk(VirtualMachineDiskCreateD // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -384,11 +554,23 @@ public VirtualMachineDiskCreateDiskResponse createDisk(VirtualMachineDiskCreateD // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -528,6 +710,10 @@ public VirtualMachineDiskCreateDiskResponse createDisk(VirtualMachineDiskCreateD result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -541,17 +727,26 @@ public VirtualMachineDiskCreateDiskResponse createDisk(VirtualMachineDiskCreateD * @param deploymentName The name of the deployment. * @param roleName The name of the role to delete the data disk from. * @param logicalUnitNumber The logical unit number of the disk. - * @return A standard service response including an HTTP status code and - * request ID. + * @param deleteFromStorage Optional. Specifies that the source blob for the + * disk should also be deleted from storage. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. */ @Override - public Future deleteDataDiskAsync(final String serviceName, final String deploymentName, final String roleName, final int logicalUnitNumber) + public Future deleteDataDiskAsync(final String serviceName, final String deploymentName, final String roleName, final int logicalUnitNumber, final boolean deleteFromStorage) { - return this.getClient().getExecutorService().submit(new Callable() { + return this.getClient().getExecutorService().submit(new Callable() { @Override - public OperationResponse call() throws Exception + public ComputeOperationStatusResponse call() throws Exception { - return deleteDataDisk(serviceName, deploymentName, roleName, logicalUnitNumber); + return deleteDataDisk(serviceName, deploymentName, roleName, logicalUnitNumber, deleteFromStorage); } }); } @@ -566,57 +761,78 @@ public OperationResponse call() throws Exception * @param deploymentName The name of the deployment. * @param roleName The name of the role to delete the data disk from. * @param logicalUnitNumber The logical unit number of the disk. - * @return A standard service response including an HTTP status code and - * request ID. + * @param deleteFromStorage Optional. Specifies that the source blob for the + * disk should also be deleted from storage. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. */ @Override - public OperationResponse deleteDataDisk(String serviceName, String deploymentName, String roleName, int logicalUnitNumber) throws IOException, ServiceException + public ComputeOperationStatusResponse deleteDataDisk(String serviceName, String deploymentName, String roleName, int logicalUnitNumber, boolean deleteFromStorage) throws InterruptedException, ExecutionException, ServiceException, IOException { - // Validate - if (serviceName == null) - { - throw new NullPointerException("serviceName"); - } - if (deploymentName == null) + ComputeManagementClient client2 = this.getClient(); + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - throw new NullPointerException("deploymentName"); + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("roleName", roleName); + tracingParameters.put("logicalUnitNumber", logicalUnitNumber); + tracingParameters.put("deleteFromStorage", deleteFromStorage); + CloudTracing.enter(invocationId, this, "deleteDataDiskAsync", tracingParameters); } - if (roleName == null) + try { - throw new NullPointerException("roleName"); - } - - // Tracing - - // Construct URL - String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/roles/" + roleName + "/DataDisks/" + logicalUnitNumber; - - // Create HTTP transport objects - CustomHttpDelete httpRequest = new CustomHttpDelete(url); - - // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); - - // Send Request - HttpResponse httpResponse = null; - httpResponse = this.getClient().getHttpClient().execute(httpRequest); - int statusCode = httpResponse.getStatusLine().getStatusCode(); - if (statusCode != 200) - { - ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getVirtualMachineDisksOperations().beginDeletingDataDiskAsync(serviceName, deploymentName, roleName, logicalUnitNumber, deleteFromStorage).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; } - - // Create Result - OperationResponse result = null; - result = new OperationResponse(); - result.setStatusCode(statusCode); - if (httpResponse.getHeaders("x-ms-request-id").length > 0) + finally { - result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -665,6 +881,16 @@ public OperationResponse deleteDisk(String diskName, boolean deleteFromStorage) } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("diskName", diskName); + tracingParameters.put("deleteFromStorage", deleteFromStorage); + CloudTracing.enter(invocationId, this, "deleteDiskAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/disks/" + diskName + "?"; @@ -677,15 +903,27 @@ public OperationResponse deleteDisk(String diskName, boolean deleteFromStorage) CustomHttpDelete httpRequest = new CustomHttpDelete(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -698,6 +936,10 @@ public OperationResponse deleteDisk(String diskName, boolean deleteFromStorage) result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -755,6 +997,18 @@ public VirtualMachineDiskGetDataDiskResponse getDataDisk(String serviceName, Str } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("roleName", roleName); + tracingParameters.put("logicalUnitNumber", logicalUnitNumber); + CloudTracing.enter(invocationId, this, "getDataDiskAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/roles/" + roleName + "/DataDisks/" + logicalUnitNumber; @@ -763,15 +1017,27 @@ public VirtualMachineDiskGetDataDiskResponse getDataDisk(String serviceName, Str HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -849,6 +1115,10 @@ public VirtualMachineDiskGetDataDiskResponse getDataDisk(String serviceName, Str result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -892,6 +1162,15 @@ public VirtualMachineDiskGetDiskResponse getDisk(String diskName) throws IOExcep } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("diskName", diskName); + CloudTracing.enter(invocationId, this, "getDiskAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/disks/" + diskName; @@ -900,15 +1179,27 @@ public VirtualMachineDiskGetDiskResponse getDisk(String diskName) throws IOExcep HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1057,6 +1348,10 @@ public VirtualMachineDiskGetDiskResponse getDisk(String diskName) throws IOExcep result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1094,6 +1389,14 @@ public VirtualMachineDiskListResponse listDisks() throws IOException, ServiceExc // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listDisksAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/disks"; @@ -1102,15 +1405,27 @@ public VirtualMachineDiskListResponse listDisks() throws IOException, ServiceExc HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1266,6 +1581,10 @@ public VirtualMachineDiskListResponse listDisks() throws IOException, ServiceExc result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1337,6 +1656,19 @@ public OperationResponse updateDataDisk(String serviceName, String deploymentNam } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("roleName", roleName); + tracingParameters.put("logicalUnitNumber", logicalUnitNumber); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateDataDiskAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/roles/" + roleName + "/DataDisks/" + logicalUnitNumber; @@ -1346,7 +1678,7 @@ public OperationResponse updateDataDisk(String serviceName, String deploymentNam // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -1403,11 +1735,23 @@ public OperationResponse updateDataDisk(String serviceName, String deploymentNam // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1420,6 +1764,10 @@ public OperationResponse updateDataDisk(String serviceName, String deploymentNam result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1479,6 +1827,16 @@ public VirtualMachineDiskUpdateDiskResponse updateDisk(String diskName, VirtualM } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("diskName", diskName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateDiskAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/disks/" + diskName; @@ -1488,7 +1846,7 @@ public VirtualMachineDiskUpdateDiskResponse updateDisk(String diskName, VirtualM // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -1541,11 +1899,23 @@ public VirtualMachineDiskUpdateDiskResponse updateDisk(String diskName, VirtualM // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1641,6 +2011,10 @@ public VirtualMachineDiskUpdateDiskResponse updateDisk(String diskName, VirtualM result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineImageOperations.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineImageOperations.java index 032fcf11ca07c..e8ca450e54a53 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineImageOperations.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineImageOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,14 +23,14 @@ package com.microsoft.windowsazure.management.compute; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.compute.models.VirtualMachineImageCreateParameters; import com.microsoft.windowsazure.management.compute.models.VirtualMachineImageCreateResponse; import com.microsoft.windowsazure.management.compute.models.VirtualMachineImageGetResponse; import com.microsoft.windowsazure.management.compute.models.VirtualMachineImageListResponse; import com.microsoft.windowsazure.management.compute.models.VirtualMachineImageUpdateParameters; import com.microsoft.windowsazure.management.compute.models.VirtualMachineImageUpdateResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; @@ -59,7 +61,7 @@ public interface VirtualMachineImageOperations * @return Parameters returned from the Create Virtual Machine Image * operation. */ - VirtualMachineImageCreateResponse create(VirtualMachineImageCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, URISyntaxException, ParseException; + VirtualMachineImageCreateResponse create(VirtualMachineImageCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, ServiceException, URISyntaxException, ParseException; /** * The Add OS Image operation adds an operating system image that is stored @@ -108,7 +110,7 @@ public interface VirtualMachineImageOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj157191.aspx for * more information) * - * @param imageName The name of the OS image to retrieve + * @param imageName The name of the OS image to retrieve. * @return A virtual machine image associated with your subscription. */ VirtualMachineImageGetResponse get(String imageName) throws IOException, ServiceException, ParserConfigurationException, SAXException, URISyntaxException, ParseException; @@ -119,7 +121,7 @@ public interface VirtualMachineImageOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj157191.aspx for * more information) * - * @param imageName The name of the OS image to retrieve + * @param imageName The name of the OS image to retrieve. * @return A virtual machine image associated with your subscription. */ Future getAsync(String imageName); diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineImageOperationsImpl.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineImageOperationsImpl.java index 11f7dfacf1788..938aa772551e6 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineImageOperationsImpl.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineImageOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,10 @@ package com.microsoft.windowsazure.management.compute; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.compute.models.VirtualMachineImageCreateParameters; import com.microsoft.windowsazure.management.compute.models.VirtualMachineImageCreateResponse; import com.microsoft.windowsazure.management.compute.models.VirtualMachineImageGetResponse; @@ -29,9 +34,7 @@ import com.microsoft.windowsazure.management.compute.models.VirtualMachineImageUpdateParameters; import com.microsoft.windowsazure.management.compute.models.VirtualMachineImageUpdateResponse; import com.microsoft.windowsazure.management.compute.models.VirtualMachineRoleSize; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.utils.pipeline.CustomHttpDelete; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -42,6 +45,7 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.HashMap; import java.util.TimeZone; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; @@ -126,7 +130,7 @@ public VirtualMachineImageCreateResponse call() throws Exception * operation. */ @Override - public VirtualMachineImageCreateResponse create(VirtualMachineImageCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, URISyntaxException, ParseException + public VirtualMachineImageCreateResponse create(VirtualMachineImageCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, ServiceException, URISyntaxException, ParseException { // Validate if (parameters == null) @@ -151,6 +155,15 @@ public VirtualMachineImageCreateResponse create(VirtualMachineImageCreateParamet } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/images"; @@ -160,7 +173,7 @@ public VirtualMachineImageCreateResponse create(VirtualMachineImageCreateParamet // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -273,11 +286,23 @@ public VirtualMachineImageCreateResponse create(VirtualMachineImageCreateParamet // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -475,6 +500,10 @@ public VirtualMachineImageCreateResponse create(VirtualMachineImageCreateParamet result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -524,6 +553,16 @@ public OperationResponse delete(String imageName, boolean deleteFromStorage) thr } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("imageName", imageName); + tracingParameters.put("deleteFromStorage", deleteFromStorage); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/images/" + imageName + "?"; @@ -536,15 +575,27 @@ public OperationResponse delete(String imageName, boolean deleteFromStorage) thr CustomHttpDelete httpRequest = new CustomHttpDelete(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -557,6 +608,10 @@ public OperationResponse delete(String imageName, boolean deleteFromStorage) thr result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -566,7 +621,7 @@ public OperationResponse delete(String imageName, boolean deleteFromStorage) thr * http://msdn.microsoft.com/en-us/library/windowsazure/jj157191.aspx for * more information) * - * @param imageName The name of the OS image to retrieve + * @param imageName The name of the OS image to retrieve. * @return A virtual machine image associated with your subscription. */ @Override @@ -587,7 +642,7 @@ public VirtualMachineImageGetResponse call() throws Exception * http://msdn.microsoft.com/en-us/library/windowsazure/jj157191.aspx for * more information) * - * @param imageName The name of the OS image to retrieve + * @param imageName The name of the OS image to retrieve. * @return A virtual machine image associated with your subscription. */ @Override @@ -600,6 +655,15 @@ public VirtualMachineImageGetResponse get(String imageName) throws IOException, } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("imageName", imageName); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/images/" + imageName; @@ -608,15 +672,27 @@ public VirtualMachineImageGetResponse get(String imageName) throws IOException, HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -823,6 +899,10 @@ public VirtualMachineImageGetResponse get(String imageName) throws IOException, result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -860,6 +940,14 @@ public VirtualMachineImageListResponse list() throws IOException, ServiceExcepti // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/images"; @@ -868,15 +956,27 @@ public VirtualMachineImageListResponse list() throws IOException, ServiceExcepti HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1081,6 +1181,10 @@ public VirtualMachineImageListResponse list() throws IOException, ServiceExcepti result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1138,6 +1242,16 @@ public VirtualMachineImageUpdateResponse update(String imageName, VirtualMachine } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("imageName", imageName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/images/" + imageName; @@ -1147,7 +1261,7 @@ public VirtualMachineImageUpdateResponse update(String imageName, VirtualMachine // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -1244,11 +1358,23 @@ public VirtualMachineImageUpdateResponse update(String imageName, VirtualMachine // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1446,6 +1572,10 @@ public VirtualMachineImageUpdateResponse update(String imageName, VirtualMachine result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineOperations.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineOperations.java index f22e83703a0f8..a4e9b09d1a781 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineOperations.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,8 @@ package com.microsoft.windowsazure.management.compute; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.compute.models.ComputeOperationStatusResponse; import com.microsoft.windowsazure.management.compute.models.VirtualMachineCaptureParameters; import com.microsoft.windowsazure.management.compute.models.VirtualMachineCreateDeploymentParameters; @@ -33,7 +36,6 @@ import com.microsoft.windowsazure.management.compute.models.VirtualMachineStartRolesParameters; import com.microsoft.windowsazure.management.compute.models.VirtualMachineUpdateLoadBalancedSetParameters; import com.microsoft.windowsazure.management.compute.models.VirtualMachineUpdateParameters; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; @@ -147,10 +149,12 @@ public interface VirtualMachineOperations * @param serviceName The name of your service. * @param deploymentName The name of your deployment. * @param virtualMachineName The name of the virtual machine to delete. + * @param deleteFromStorage Optional. Specifies that the source blob(s) for + * the virtual machine should also be deleted from storage. * @return A standard service response including an HTTP status code and * request ID. */ - OperationResponse beginDeleting(String serviceName, String deploymentName, String virtualMachineName) throws IOException, ServiceException; + OperationResponse beginDeleting(String serviceName, String deploymentName, String virtualMachineName, boolean deleteFromStorage) throws IOException, ServiceException; /** * The Delete Role operation deletes the specified virtual machine. (see @@ -160,10 +164,12 @@ public interface VirtualMachineOperations * @param serviceName The name of your service. * @param deploymentName The name of your deployment. * @param virtualMachineName The name of the virtual machine to delete. + * @param deleteFromStorage Optional. Specifies that the source blob(s) for + * the virtual machine should also be deleted from storage. * @return A standard service response including an HTTP status code and * request ID. */ - Future beginDeletingAsync(String serviceName, String deploymentName, String virtualMachineName); + Future beginDeletingAsync(String serviceName, String deploymentName, String virtualMachineName, boolean deleteFromStorage); /** * The Restart role operation restarts the specified virtual machine. (see @@ -199,7 +205,7 @@ public interface VirtualMachineOperations * @param serviceName The name of your service. * @param deploymentName The name of your deployment. * @param virtualMachineName The name of the virtual machine to shutdown. - * @param parameters The parameters for the shutdown vm operation + * @param parameters The parameters for the shutdown vm operation. * @return A standard service response including an HTTP status code and * request ID. */ @@ -213,7 +219,7 @@ public interface VirtualMachineOperations * @param serviceName The name of your service. * @param deploymentName The name of your deployment. * @param virtualMachineName The name of the virtual machine to shutdown. - * @param parameters The parameters for the shutdown vm operation + * @param parameters The parameters for the shutdown vm operation. * @return A standard service response including an HTTP status code and * request ID. */ @@ -428,7 +434,7 @@ public interface VirtualMachineOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse create(String serviceName, String deploymentName, VirtualMachineCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, URISyntaxException, ParseException; + ComputeOperationStatusResponse create(String serviceName, String deploymentName, VirtualMachineCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, ServiceException, URISyntaxException, ParseException; /** * The Add Role operation adds a virtual machine to an existing deployment. @@ -485,7 +491,7 @@ public interface VirtualMachineOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse createDeployment(String serviceName, VirtualMachineCreateDeploymentParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse createDeployment(String serviceName, VirtualMachineCreateDeploymentParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Create Virtual Machine Deployment operation provisions a virtual @@ -521,6 +527,8 @@ public interface VirtualMachineOperations * @param serviceName The name of your service. * @param deploymentName The name of your deployment. * @param virtualMachineName The name of the virtual machine to delete. + * @param deleteFromStorage Optional. Specifies that the source blob(s) for + * the virtual machine should also be deleted from storage. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -531,7 +539,7 @@ public interface VirtualMachineOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse delete(String serviceName, String deploymentName, String virtualMachineName) throws IOException, ServiceException, InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse delete(String serviceName, String deploymentName, String virtualMachineName, boolean deleteFromStorage) throws IOException, ServiceException, InterruptedException, ExecutionException, ServiceException; /** * The Delete Role operation deletes the specified virtual machine. (see @@ -541,6 +549,8 @@ public interface VirtualMachineOperations * @param serviceName The name of your service. * @param deploymentName The name of your deployment. * @param virtualMachineName The name of the virtual machine to delete. + * @param deleteFromStorage Optional. Specifies that the source blob(s) for + * the virtual machine should also be deleted from storage. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -551,7 +561,7 @@ public interface VirtualMachineOperations * the failed request, and also includes error information regarding the * failure. */ - Future deleteAsync(String serviceName, String deploymentName, String virtualMachineName); + Future deleteAsync(String serviceName, String deploymentName, String virtualMachineName, boolean deleteFromStorage); /** * The Get Role operation retrieves information about the specified virtual @@ -623,7 +633,7 @@ public interface VirtualMachineOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse restart(String serviceName, String deploymentName, String virtualMachineName) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse restart(String serviceName, String deploymentName, String virtualMachineName) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Restart role operation restarts the specified virtual machine. (see @@ -653,7 +663,7 @@ public interface VirtualMachineOperations * @param serviceName The name of your service. * @param deploymentName The name of your deployment. * @param virtualMachineName The name of the virtual machine to shutdown. - * @param parameters The parameters for the shutdown vm operation + * @param parameters The parameters for the shutdown vm operation. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -664,7 +674,7 @@ public interface VirtualMachineOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse shutdown(String serviceName, String deploymentName, String virtualMachineName, VirtualMachineShutdownParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse shutdown(String serviceName, String deploymentName, String virtualMachineName, VirtualMachineShutdownParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Shutdown Role operation shuts down the specified virtual machine. @@ -674,7 +684,7 @@ public interface VirtualMachineOperations * @param serviceName The name of your service. * @param deploymentName The name of your deployment. * @param virtualMachineName The name of the virtual machine to shutdown. - * @param parameters The parameters for the shutdown vm operation + * @param parameters The parameters for the shutdown vm operation. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -704,7 +714,7 @@ public interface VirtualMachineOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse shutdownRoles(String serviceName, String deploymentName, VirtualMachineShutdownRolesParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse shutdownRoles(String serviceName, String deploymentName, VirtualMachineShutdownRolesParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Shutdown Roles operation stops the specified set of virtual machines. @@ -743,7 +753,7 @@ public interface VirtualMachineOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse start(String serviceName, String deploymentName, String virtualMachineName) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse start(String serviceName, String deploymentName, String virtualMachineName) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Start Role operation starts the specified virtual machine. (see @@ -781,7 +791,7 @@ public interface VirtualMachineOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse startRoles(String serviceName, String deploymentName, VirtualMachineStartRolesParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse startRoles(String serviceName, String deploymentName, VirtualMachineStartRolesParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Start Roles operation starts the specified set of virtual machines. @@ -867,7 +877,7 @@ public interface VirtualMachineOperations * the failed request, and also includes error information regarding the * failure. */ - ComputeOperationStatusResponse updateLoadBalancedEndpointSet(String serviceName, String deploymentName, VirtualMachineUpdateLoadBalancedSetParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + ComputeOperationStatusResponse updateLoadBalancedEndpointSet(String serviceName, String deploymentName, VirtualMachineUpdateLoadBalancedSetParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The UpdateLoadBalancedEndpointSet operation changes the specified diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineOperationsImpl.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineOperationsImpl.java index a46edbae38af8..c287f80c6d13d 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineOperationsImpl.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,11 @@ package com.microsoft.windowsazure.management.compute; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.core.utils.StreamUtils; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.compute.models.AccessControlListRule; import com.microsoft.windowsazure.management.compute.models.ComputeOperationStatusResponse; import com.microsoft.windowsazure.management.compute.models.ConfigurationSet; @@ -57,10 +63,8 @@ import com.microsoft.windowsazure.management.compute.models.VirtualMachineWindowsRemoteManagementListenerType; import com.microsoft.windowsazure.management.compute.models.WindowsRemoteManagementListener; import com.microsoft.windowsazure.management.compute.models.WindowsRemoteManagementSettings; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.utils.StreamUtils; -import com.microsoft.windowsazure.services.core.utils.pipeline.CustomHttpDelete; +import com.microsoft.windowsazure.tracing.ClientRequestTrackingHandler; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -68,7 +72,9 @@ import java.net.InetAddress; import java.net.URI; import java.net.URISyntaxException; +import java.net.URLEncoder; import java.text.ParseException; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; @@ -273,6 +279,17 @@ public OperationResponse beginCreating(String serviceName, String deploymentName } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginCreatingAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/roles"; @@ -282,7 +299,7 @@ public OperationResponse beginCreating(String serviceName, String deploymentName // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -815,11 +832,23 @@ public OperationResponse beginCreating(String serviceName, String deploymentName // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -832,6 +861,10 @@ public OperationResponse beginCreating(String serviceName, String deploymentName result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -991,6 +1024,16 @@ public OperationResponse beginCreatingDeployment(String serviceName, VirtualMach } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginCreatingDeploymentAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments"; @@ -1000,7 +1043,7 @@ public OperationResponse beginCreatingDeployment(String serviceName, VirtualMach // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -1038,9 +1081,9 @@ public OperationResponse beginCreatingDeployment(String serviceName, VirtualMach if (roleListItem.getOSVersion() != null) { - Element oSVersionElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "OSVersion"); - oSVersionElement.appendChild(requestDoc.createTextNode(roleListItem.getOSVersion())); - roleElement.appendChild(oSVersionElement); + Element osVersionElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "OsVersion"); + osVersionElement.appendChild(requestDoc.createTextNode(roleListItem.getOSVersion())); + roleElement.appendChild(osVersionElement); } if (roleListItem.getRoleType() != null) @@ -1605,6 +1648,13 @@ public OperationResponse beginCreatingDeployment(String serviceName, VirtualMach } } + if (parameters.getReservedIPName() != null) + { + Element reservedIPNameElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "ReservedIPName"); + reservedIPNameElement.appendChild(requestDoc.createTextNode(parameters.getReservedIPName())); + deploymentElement.appendChild(reservedIPNameElement); + } + DOMSource domSource = new DOMSource(requestDoc); StringWriter stringWriter = new StringWriter(); StreamResult streamResult = new StreamResult(stringWriter); @@ -1618,11 +1668,23 @@ public OperationResponse beginCreatingDeployment(String serviceName, VirtualMach // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1635,6 +1697,10 @@ public OperationResponse beginCreatingDeployment(String serviceName, VirtualMach result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1646,17 +1712,19 @@ public OperationResponse beginCreatingDeployment(String serviceName, VirtualMach * @param serviceName The name of your service. * @param deploymentName The name of your deployment. * @param virtualMachineName The name of the virtual machine to delete. + * @param deleteFromStorage Optional. Specifies that the source blob(s) for + * the virtual machine should also be deleted from storage. * @return A standard service response including an HTTP status code and * request ID. */ @Override - public Future beginDeletingAsync(final String serviceName, final String deploymentName, final String virtualMachineName) + public Future beginDeletingAsync(final String serviceName, final String deploymentName, final String virtualMachineName, final boolean deleteFromStorage) { return this.getClient().getExecutorService().submit(new Callable() { @Override public OperationResponse call() throws Exception { - return beginDeleting(serviceName, deploymentName, virtualMachineName); + return beginDeleting(serviceName, deploymentName, virtualMachineName, deleteFromStorage); } }); } @@ -1669,11 +1737,13 @@ public OperationResponse call() throws Exception * @param serviceName The name of your service. * @param deploymentName The name of your deployment. * @param virtualMachineName The name of the virtual machine to delete. + * @param deleteFromStorage Optional. Specifies that the source blob(s) for + * the virtual machine should also be deleted from storage. * @return A standard service response including an HTTP status code and * request ID. */ @Override - public OperationResponse beginDeleting(String serviceName, String deploymentName, String virtualMachineName) throws IOException, ServiceException + public OperationResponse beginDeleting(String serviceName, String deploymentName, String virtualMachineName, boolean deleteFromStorage) throws IOException, ServiceException { // Validate if (serviceName == null) @@ -1690,23 +1760,51 @@ public OperationResponse beginDeleting(String serviceName, String deploymentName } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("virtualMachineName", virtualMachineName); + tracingParameters.put("deleteFromStorage", deleteFromStorage); + CloudTracing.enter(invocationId, this, "beginDeletingAsync", tracingParameters); + } // Construct URL - String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/roles/" + virtualMachineName; + String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/roles/" + virtualMachineName + "?"; + if (deleteFromStorage == true) + { + url = url + "&comp=" + URLEncoder.encode("media"); + } // Create HTTP transport objects CustomHttpDelete httpRequest = new CustomHttpDelete(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1719,6 +1817,10 @@ public OperationResponse beginDeleting(String serviceName, String deploymentName result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1774,6 +1876,17 @@ public OperationResponse beginRestarting(String serviceName, String deploymentNa } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("virtualMachineName", virtualMachineName); + CloudTracing.enter(invocationId, this, "beginRestartingAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/roleinstances/" + virtualMachineName + "/Operations"; @@ -1783,7 +1896,7 @@ public OperationResponse beginRestarting(String serviceName, String deploymentNa // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -1794,11 +1907,23 @@ public OperationResponse beginRestarting(String serviceName, String deploymentNa // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1811,6 +1936,10 @@ public OperationResponse beginRestarting(String serviceName, String deploymentNa result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1822,7 +1951,7 @@ public OperationResponse beginRestarting(String serviceName, String deploymentNa * @param serviceName The name of your service. * @param deploymentName The name of your deployment. * @param virtualMachineName The name of the virtual machine to shutdown. - * @param parameters The parameters for the shutdown vm operation + * @param parameters The parameters for the shutdown vm operation. * @return A standard service response including an HTTP status code and * request ID. */ @@ -1846,7 +1975,7 @@ public OperationResponse call() throws Exception * @param serviceName The name of your service. * @param deploymentName The name of your deployment. * @param virtualMachineName The name of the virtual machine to shutdown. - * @param parameters The parameters for the shutdown vm operation + * @param parameters The parameters for the shutdown vm operation. * @return A standard service response including an HTTP status code and * request ID. */ @@ -1872,6 +2001,18 @@ public OperationResponse beginShutdown(String serviceName, String deploymentName } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("virtualMachineName", virtualMachineName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginShutdownAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/roleinstances/" + virtualMachineName + "/Operations"; @@ -1881,7 +2022,7 @@ public OperationResponse beginShutdown(String serviceName, String deploymentName // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -1913,11 +2054,23 @@ public OperationResponse beginShutdown(String serviceName, String deploymentName // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1930,6 +2083,10 @@ public OperationResponse beginShutdown(String serviceName, String deploymentName result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1983,6 +2140,17 @@ public OperationResponse beginShuttingDownRoles(String serviceName, String deplo } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginShuttingDownRolesAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/Roles/Operations"; @@ -1992,7 +2160,7 @@ public OperationResponse beginShuttingDownRoles(String serviceName, String deplo // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -2039,11 +2207,23 @@ public OperationResponse beginShuttingDownRoles(String serviceName, String deplo // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2056,6 +2236,10 @@ public OperationResponse beginShuttingDownRoles(String serviceName, String deplo result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -2111,6 +2295,17 @@ public OperationResponse beginStarting(String serviceName, String deploymentName } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("virtualMachineName", virtualMachineName); + CloudTracing.enter(invocationId, this, "beginStartingAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/roleinstances/" + virtualMachineName + "/Operations"; @@ -2120,7 +2315,7 @@ public OperationResponse beginStarting(String serviceName, String deploymentName // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -2131,11 +2326,23 @@ public OperationResponse beginStarting(String serviceName, String deploymentName // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2148,6 +2355,10 @@ public OperationResponse beginStarting(String serviceName, String deploymentName result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -2199,6 +2410,17 @@ public OperationResponse beginStartingRoles(String serviceName, String deploymen } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginStartingRolesAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/Roles/Operations"; @@ -2208,7 +2430,7 @@ public OperationResponse beginStartingRoles(String serviceName, String deploymen // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -2248,11 +2470,23 @@ public OperationResponse beginStartingRoles(String serviceName, String deploymen // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2265,6 +2499,10 @@ public OperationResponse beginStartingRoles(String serviceName, String deploymen result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -2415,6 +2653,18 @@ public OperationResponse beginUpdating(String serviceName, String deploymentName } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("virtualMachineName", virtualMachineName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginUpdatingAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/roles/" + virtualMachineName; @@ -2424,7 +2674,7 @@ public OperationResponse beginUpdating(String serviceName, String deploymentName // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -2954,11 +3204,23 @@ public OperationResponse beginUpdating(String serviceName, String deploymentName // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2971,6 +3233,10 @@ public OperationResponse beginUpdating(String serviceName, String deploymentName result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -3037,6 +3303,17 @@ public OperationResponse beginUpdatingLoadBalancedEndpointSet(String serviceName } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginUpdatingLoadBalancedEndpointSetAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "?comp=UpdateLbSet"; @@ -3046,7 +3323,7 @@ public OperationResponse beginUpdatingLoadBalancedEndpointSet(String serviceName // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -3202,11 +3479,23 @@ public OperationResponse beginUpdatingLoadBalancedEndpointSet(String serviceName // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -3219,6 +3508,10 @@ public OperationResponse beginUpdatingLoadBalancedEndpointSet(String serviceName result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -3383,6 +3676,18 @@ public OperationResponse capture(String serviceName, String deploymentName, Stri } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("virtualMachineName", virtualMachineName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "captureAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/roleinstances/" + virtualMachineName + "/Operations"; @@ -3392,7 +3697,7 @@ public OperationResponse capture(String serviceName, String deploymentName, Stri // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -3816,11 +4121,23 @@ public OperationResponse capture(String serviceName, String deploymentName, Stri // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 201) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -3833,6 +4150,10 @@ public OperationResponse capture(String serviceName, String deploymentName, Stri result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -3907,29 +4228,63 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse create(String serviceName, String deploymentName, VirtualMachineCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, URISyntaxException, ParseException + public ComputeOperationStatusResponse create(String serviceName, String deploymentName, VirtualMachineCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException, ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, ServiceException, URISyntaxException, ParseException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getVirtualMachines().beginCreatingAsync(serviceName, deploymentName, parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getVirtualMachinesOperations().beginCreatingAsync(serviceName, deploymentName, parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -3993,29 +4348,62 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse createDeployment(String serviceName, VirtualMachineCreateDeploymentParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse createDeployment(String serviceName, VirtualMachineCreateDeploymentParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getVirtualMachines().beginCreatingDeploymentAsync(serviceName, parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createDeploymentAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getVirtualMachinesOperations().beginCreatingDeploymentAsync(serviceName, parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -4026,6 +4414,8 @@ public ComputeOperationStatusResponse createDeployment(String serviceName, Virtu * @param serviceName The name of your service. * @param deploymentName The name of your deployment. * @param virtualMachineName The name of the virtual machine to delete. + * @param deleteFromStorage Optional. Specifies that the source blob(s) for + * the virtual machine should also be deleted from storage. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -4037,13 +4427,13 @@ public ComputeOperationStatusResponse createDeployment(String serviceName, Virtu * failure. */ @Override - public Future deleteAsync(final String serviceName, final String deploymentName, final String virtualMachineName) + public Future deleteAsync(final String serviceName, final String deploymentName, final String virtualMachineName, final boolean deleteFromStorage) { return this.getClient().getExecutorService().submit(new Callable() { @Override public ComputeOperationStatusResponse call() throws Exception { - return delete(serviceName, deploymentName, virtualMachineName); + return delete(serviceName, deploymentName, virtualMachineName, deleteFromStorage); } }); } @@ -4056,6 +4446,8 @@ public ComputeOperationStatusResponse call() throws Exception * @param serviceName The name of your service. * @param deploymentName The name of your deployment. * @param virtualMachineName The name of the virtual machine to delete. + * @param deleteFromStorage Optional. Specifies that the source blob(s) for + * the virtual machine should also be deleted from storage. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -4067,29 +4459,64 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse delete(String serviceName, String deploymentName, String virtualMachineName) throws IOException, ServiceException, InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse delete(String serviceName, String deploymentName, String virtualMachineName, boolean deleteFromStorage) throws IOException, ServiceException, InterruptedException, ExecutionException, ServiceException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getVirtualMachines().beginDeletingAsync(serviceName, deploymentName, virtualMachineName).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("virtualMachineName", virtualMachineName); + tracingParameters.put("deleteFromStorage", deleteFromStorage); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getVirtualMachinesOperations().beginDeletingAsync(serviceName, deploymentName, virtualMachineName, deleteFromStorage).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -4144,6 +4571,17 @@ public VirtualMachineGetResponse get(String serviceName, String deploymentName, } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("virtualMachineName", virtualMachineName); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/roles/" + virtualMachineName; @@ -4152,15 +4590,27 @@ public VirtualMachineGetResponse get(String serviceName, String deploymentName, HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -4892,6 +5342,10 @@ public VirtualMachineGetResponse get(String serviceName, String deploymentName, result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -4947,6 +5401,17 @@ public VirtualMachineGetRemoteDesktopFileResponse getRemoteDesktopFile(String se } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("virtualMachineName", virtualMachineName); + CloudTracing.enter(invocationId, this, "getRemoteDesktopFileAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/hostedservices/" + serviceName + "/deployments/" + deploymentName + "/roleinstances/" + virtualMachineName + "/ModelFile?FileType=RDP"; @@ -4955,15 +5420,27 @@ public VirtualMachineGetRemoteDesktopFileResponse getRemoteDesktopFile(String se HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2013-06-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -4980,6 +5457,10 @@ public VirtualMachineGetRemoteDesktopFileResponse getRemoteDesktopFile(String se result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -5032,29 +5513,63 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse restart(String serviceName, String deploymentName, String virtualMachineName) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse restart(String serviceName, String deploymentName, String virtualMachineName) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getVirtualMachines().beginRestartingAsync(serviceName, deploymentName, virtualMachineName).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("virtualMachineName", virtualMachineName); + CloudTracing.enter(invocationId, this, "restartAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getVirtualMachinesOperations().beginRestartingAsync(serviceName, deploymentName, virtualMachineName).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -5065,7 +5580,7 @@ public ComputeOperationStatusResponse restart(String serviceName, String deploym * @param serviceName The name of your service. * @param deploymentName The name of your deployment. * @param virtualMachineName The name of the virtual machine to shutdown. - * @param parameters The parameters for the shutdown vm operation + * @param parameters The parameters for the shutdown vm operation. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -5096,7 +5611,7 @@ public ComputeOperationStatusResponse call() throws Exception * @param serviceName The name of your service. * @param deploymentName The name of your deployment. * @param virtualMachineName The name of the virtual machine to shutdown. - * @param parameters The parameters for the shutdown vm operation + * @param parameters The parameters for the shutdown vm operation. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -5108,29 +5623,64 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse shutdown(String serviceName, String deploymentName, String virtualMachineName, VirtualMachineShutdownParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse shutdown(String serviceName, String deploymentName, String virtualMachineName, VirtualMachineShutdownParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getVirtualMachines().beginShutdownAsync(serviceName, deploymentName, virtualMachineName, parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("virtualMachineName", virtualMachineName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "shutdownAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getVirtualMachinesOperations().beginShutdownAsync(serviceName, deploymentName, virtualMachineName, parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -5180,29 +5730,63 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse shutdownRoles(String serviceName, String deploymentName, VirtualMachineShutdownRolesParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse shutdownRoles(String serviceName, String deploymentName, VirtualMachineShutdownRolesParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getVirtualMachines().beginShuttingDownRolesAsync(serviceName, deploymentName, parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "shutdownRolesAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getVirtualMachinesOperations().beginShuttingDownRolesAsync(serviceName, deploymentName, parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -5254,29 +5838,63 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse start(String serviceName, String deploymentName, String virtualMachineName) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse start(String serviceName, String deploymentName, String virtualMachineName) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getVirtualMachines().beginStartingAsync(serviceName, deploymentName, virtualMachineName).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("virtualMachineName", virtualMachineName); + CloudTracing.enter(invocationId, this, "startAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getVirtualMachinesOperations().beginStartingAsync(serviceName, deploymentName, virtualMachineName).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -5324,29 +5942,63 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse startRoles(String serviceName, String deploymentName, VirtualMachineStartRolesParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse startRoles(String serviceName, String deploymentName, VirtualMachineStartRolesParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getVirtualMachines().beginStartingRolesAsync(serviceName, deploymentName, parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "startRolesAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getVirtualMachinesOperations().beginStartingRolesAsync(serviceName, deploymentName, parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -5407,26 +6059,61 @@ public ComputeOperationStatusResponse call() throws Exception public ComputeOperationStatusResponse update(String serviceName, String deploymentName, String virtualMachineName, VirtualMachineUpdateParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, URISyntaxException, ParseException, InterruptedException, ExecutionException, ServiceException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getVirtualMachines().beginUpdatingAsync(serviceName, deploymentName, virtualMachineName, parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("virtualMachineName", virtualMachineName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getVirtualMachinesOperations().beginUpdatingAsync(serviceName, deploymentName, virtualMachineName, parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -5482,28 +6169,62 @@ public ComputeOperationStatusResponse call() throws Exception * failure. */ @Override - public ComputeOperationStatusResponse updateLoadBalancedEndpointSet(String serviceName, String deploymentName, VirtualMachineUpdateLoadBalancedSetParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public ComputeOperationStatusResponse updateLoadBalancedEndpointSet(String serviceName, String deploymentName, VirtualMachineUpdateLoadBalancedSetParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { ComputeManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getVirtualMachines().beginUpdatingLoadBalancedEndpointSetAsync(serviceName, deploymentName, parameters).get(); - ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("deploymentName", deploymentName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateLoadBalancedEndpointSetAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getVirtualMachinesOperations().beginUpdatingLoadBalancedEndpointSetAsync(serviceName, deploymentName, parameters).get(); + ComputeOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/AccessControlListRule.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/AccessControlListRule.java index b30f756e193ee..426d3de73cd53 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/AccessControlListRule.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/AccessControlListRule.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -22,55 +24,57 @@ package com.microsoft.windowsazure.management.compute.models; /** -* An access control rule for a public endpoint +* An access control rule for a public endpoint. */ public class AccessControlListRule { private String action; /** - * the action allowed by this Access Control List Rule + * the action allowed by this Access Control List Rule. */ public String getAction() { return this.action; } /** - * the action allowed by this Access Control List Rule + * the action allowed by this Access Control List Rule. */ public void setAction(String action) { this.action = action; } private String description; /** - * the description for this Access Control List Rule + * the description for this Access Control List Rule. */ public String getDescription() { return this.description; } /** - * the description for this Access Control List Rule + * the description for this Access Control List Rule. */ public void setDescription(String description) { this.description = description; } private Integer order; /** - * the order of application for this Access Control List Rule + * the order of application for this Access Control List Rule. */ public Integer getOrder() { return this.order; } /** - * the order of application for this Access Control List Rule + * the order of application for this Access Control List Rule. */ public void setOrder(Integer order) { this.order = order; } private String remoteSubnet; /** - * the remote subnet that is granted access for this Access Control List Rule + * the remote subnet that is granted access for this Access Control List + * Rule. */ public String getRemoteSubnet() { return this.remoteSubnet; } /** - * the remote subnet that is granted access for this Access Control List Rule + * the remote subnet that is granted access for this Access Control List + * Rule. */ public void setRemoteSubnet(String remoteSubnet) { this.remoteSubnet = remoteSubnet; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/CertificateFormat.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/CertificateFormat.java index c0226d5dab0ef..3f45dc1553789 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/CertificateFormat.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/CertificateFormat.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/CertificateThumbprintAlgorithms.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/CertificateThumbprintAlgorithms.java index ab5e0a84c79c9..14a3304da2e59 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/CertificateThumbprintAlgorithms.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/CertificateThumbprintAlgorithms.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ComputeOperationStatusResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ComputeOperationStatusResponse.java index 344e018b0d18d..ce601483b0f78 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ComputeOperationStatusResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ComputeOperationStatusResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The response body contains the status of the specified asynchronous diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ConfigurationSet.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ConfigurationSet.java index bfb3656f7d492..882e9e565e353 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ConfigurationSet.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ConfigurationSet.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ConfigurationSetTypes.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ConfigurationSetTypes.java index a4512c33f12a7..d25e4a0189d95 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ConfigurationSetTypes.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ConfigurationSetTypes.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DataVirtualHardDisk.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DataVirtualHardDisk.java index f5d6c80cf8db7..44db4bf7ab46c 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DataVirtualHardDisk.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DataVirtualHardDisk.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentChangeConfigurationMode.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentChangeConfigurationMode.java index db50dd0b05658..99500f99ed8fa 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentChangeConfigurationMode.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentChangeConfigurationMode.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentChangeConfigurationParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentChangeConfigurationParameters.java index 0272bb13207b5..3a1e08ad53eae 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentChangeConfigurationParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentChangeConfigurationParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -31,14 +33,12 @@ public class DeploymentChangeConfigurationParameters private String configuration; /** - * Required. The base-64 encoded service configuration file for the - * deployment. + * Required. The encoded service configuration file for the deployment. */ public String getConfiguration() { return this.configuration; } /** - * Required. The base-64 encoded service configuration file for the - * deployment. + * Required. The encoded service configuration file for the deployment. */ public void setConfiguration(String configuration) { this.configuration = configuration; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentCreateParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentCreateParameters.java index fa56629e5b5cb..0212ae2d4d87a 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentCreateParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentCreateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -32,14 +34,12 @@ public class DeploymentCreateParameters private String configuration; /** - * Required. The base-64 encoded service configuration file for the - * deployment. + * Required. The service configuration file for the deployment. */ public String getConfiguration() { return this.configuration; } /** - * Required. The base-64 encoded service configuration file for the - * deployment. + * Required. The service configuration file for the deployment. */ public void setConfiguration(String configuration) { this.configuration = configuration; } @@ -96,18 +96,18 @@ public class DeploymentCreateParameters private String label; /** - * Required. A name for the hosted service that is base-64 encoded. The name - * can be up to 100 characters in length. It is recommended that the label - * be unique within the subscription. The name can be used identify the - * hosted service for your tracking purposes. + * Required. A name for the hosted service. The name can be up to 100 + * characters in length. It is recommended that the label be unique within + * the subscription. The name can be used identify the hosted service for + * your tracking purposes. */ public String getLabel() { return this.label; } /** - * Required. A name for the hosted service that is base-64 encoded. The name - * can be up to 100 characters in length. It is recommended that the label - * be unique within the subscription. The name can be used identify the - * hosted service for your tracking purposes. + * Required. A name for the hosted service. The name can be up to 100 + * characters in length. It is recommended that the label be unique within + * the subscription. The name can be used identify the hosted service for + * your tracking purposes. */ public void setLabel(String label) { this.label = label; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentGetPackageParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentGetPackageParameters.java index 992ded6e137ca..fb7c8d86c9243 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentGetPackageParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentGetPackageParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentGetResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentGetResponse.java index f16b8ff08a713..afc04fad26536 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentGetResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; import java.util.ArrayList; import java.util.Calendar; @@ -35,12 +37,12 @@ public class DeploymentGetResponse extends OperationResponse private String configuration; /** - * The base-64 encoded the configuration file of the deployment. + * The configuration file of the deployment. */ public String getConfiguration() { return this.configuration; } /** - * The base-64 encoded the configuration file of the deployment. + * The configuration file of the deployment. */ public void setConfiguration(String configuration) { this.configuration = configuration; } @@ -125,14 +127,14 @@ public class DeploymentGetResponse extends OperationResponse private String label; /** - * The base-64 encoded user supplied name of the deployment. This name can - * be used identify the deployment for your tracking purposes. + * The user supplied name of the deployment. This name can be used identify + * the deployment for tracking purposes. */ public String getLabel() { return this.label; } /** - * The base-64 encoded user supplied name of the deployment. This name can - * be used identify the deployment for your tracking purposes. + * The user supplied name of the deployment. This name can be used identify + * the deployment for tracking purposes. */ public void setLabel(String label) { this.label = label; } @@ -196,6 +198,18 @@ public class DeploymentGetResponse extends OperationResponse */ public void setPrivateId(String privateId) { this.privateId = privateId; } + private String reservedIPName; + + /** + * Preview Only. The name of the Reserved IP that the deployment belongs to. + */ + public String getReservedIPName() { return this.reservedIPName; } + + /** + * Preview Only. The name of the Reserved IP that the deployment belongs to. + */ + public void setReservedIPName(String reservedIPName) { this.reservedIPName = reservedIPName; } + private ArrayList roleInstances; /** @@ -291,14 +305,14 @@ public class DeploymentGetResponse extends OperationResponse private URI uri; /** - * The URL used to access the hosted service. For example, if the service + * The URL used to access the hosted service. For example, if the service * name is MyService you could access the access the service by calling: * http://MyService.cloudapp.net */ public URI getUri() { return this.uri; } /** - * The URL used to access the hosted service. For example, if the service + * The URL used to access the hosted service. For example, if the service * name is MyService you could access the access the service by calling: * http://MyService.cloudapp.net */ diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentRollbackUpdateOrUpgradeParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentRollbackUpdateOrUpgradeParameters.java index 456a5834edeb9..bf890e7585567 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentRollbackUpdateOrUpgradeParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentRollbackUpdateOrUpgradeParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -29,16 +31,16 @@ public class DeploymentRollbackUpdateOrUpgradeParameters private boolean force; /** - * Required. Specifies whether the rollback should proceed even when it will - * cause local data to be lost from some role instances. True if the - * rollback should proceed; otherwise false. + * Specifies whether the rollback should proceed even when it will cause + * local data to be lost from some role instances. True if the rollback + * should proceed; otherwise false. */ public boolean getForce() { return this.force; } /** - * Required. Specifies whether the rollback should proceed even when it will - * cause local data to be lost from some role instances. True if the - * rollback should proceed; otherwise false. + * Specifies whether the rollback should proceed even when it will cause + * local data to be lost from some role instances. True if the rollback + * should proceed; otherwise false. */ public void setForce(boolean force) { this.force = force; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentSlot.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentSlot.java index 9e92abf6586aa..36652061ea7bf 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentSlot.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentSlot.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentStatus.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentStatus.java index 35efaaaf34f5a..acaafc90e21a6 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentStatus.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentStatus.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentSwapParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentSwapParameters.java index d2139f2f4e472..a4fd8ded4bcbc 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentSwapParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentSwapParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentUpdateStatusParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentUpdateStatusParameters.java index 3397d72fe9ae6..361219bd22add 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentUpdateStatusParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentUpdateStatusParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentUpgradeMode.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentUpgradeMode.java index c7fd7a483bd8d..4858b61eef5a3 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentUpgradeMode.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentUpgradeMode.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentUpgradeParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentUpgradeParameters.java index b219bd4543fb1..0d5996d396e58 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentUpgradeParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentUpgradeParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -32,14 +34,12 @@ public class DeploymentUpgradeParameters private String configuration; /** - * Required. The base-64 encoded service configuration file for the - * deployment. + * Required. The service configuration file for the deployment. */ public String getConfiguration() { return this.configuration; } /** - * Required. The base-64 encoded service configuration file for the - * deployment. + * Required. The service configuration file for the deployment. */ public void setConfiguration(String configuration) { this.configuration = configuration; } @@ -112,18 +112,18 @@ public class DeploymentUpgradeParameters private String label; /** - * Required. A name for the hosted service that is base-64 encoded. The name - * can be up to 100 characters in length. It is recommended that the label - * be unique within the subscription. The name can be used identify the - * hosted service for your tracking purposes. + * Required. A name for the hosted service. The name can be up to 100 + * characters in length. It is recommended that the label be unique within + * the subscription. The name can be used identify the hosted service for + * your tracking purposes. */ public String getLabel() { return this.label; } /** - * Required. A name for the hosted service that is base-64 encoded. The name - * can be up to 100 characters in length. It is recommended that the label - * be unique within the subscription. The name can be used identify the - * hosted service for your tracking purposes. + * Required. A name for the hosted service. The name can be up to 100 + * characters in length. It is recommended that the label be unique within + * the subscription. The name can be used identify the hosted service for + * your tracking purposes. */ public void setLabel(String label) { this.label = label; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentUpgradeType.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentUpgradeType.java index 0dd665dcb0d4d..a01e8707952b8 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentUpgradeType.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentUpgradeType.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentWalkUpgradeDomainParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentWalkUpgradeDomainParameters.java index 357fd12f4fa5f..bad1e5471ad99 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentWalkUpgradeDomainParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DeploymentWalkUpgradeDomainParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DnsServer.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DnsServer.java index db8763802830c..faafb92fba0aa 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DnsServer.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DnsServer.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -24,31 +26,31 @@ import java.net.InetAddress; /** -* Information about a DNS Server in the virtual network +* Information about a DNS Server in the virtual network. */ public class DnsServer { private InetAddress address; /** - * The DNS server address + * The DNS server address. */ public InetAddress getAddress() { return this.address; } /** - * The DNS server address + * The DNS server address. */ public void setAddress(InetAddress address) { this.address = address; } private String name; /** - * The name of the DNS server + * The name of the DNS server. */ public String getName() { return this.name; } /** - * The name of the DNS server + * The name of the DNS server. */ public void setName(String name) { this.name = name; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DnsSettings.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DnsSettings.java index 01dd43c23c668..760b11f7185bf 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DnsSettings.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DnsSettings.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DomainJoinCredentials.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DomainJoinCredentials.java index 10e77987347d9..c1736181489aa 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DomainJoinCredentials.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DomainJoinCredentials.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DomainJoinProvisioning.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DomainJoinProvisioning.java index 0ebbadc83e050..6b7b09e1dc3d3 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DomainJoinProvisioning.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DomainJoinProvisioning.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -22,19 +24,19 @@ package com.microsoft.windowsazure.management.compute.models; /** -* The configuration needed to provision the machine in the domain +* The configuration needed to provision the machine in the domain. */ public class DomainJoinProvisioning { private String accountData; /** - * The account infor for joining the domain + * The account infor for joining the domain. */ public String getAccountData() { return this.accountData; } /** - * The account infor for joining the domain + * The account infor for joining the domain. */ public void setAccountData(String accountData) { this.accountData = accountData; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DomainJoinSettings.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DomainJoinSettings.java index 04b7c9c3d711d..046201f8ea623 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DomainJoinSettings.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/DomainJoinSettings.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -77,12 +79,12 @@ public class DomainJoinSettings private DomainJoinProvisioning provisioning; /** - * Additional information for domain join provisioning + * Additional information for domain join provisioning. */ public DomainJoinProvisioning getProvisioning() { return this.provisioning; } /** - * Additional information for domain join provisioning + * Additional information for domain join provisioning. */ public void setProvisioning(DomainJoinProvisioning provisioning) { this.provisioning = provisioning; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/EndpointAcl.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/EndpointAcl.java index 6625c93f53b18..bf504b5f5dc50 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/EndpointAcl.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/EndpointAcl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -24,19 +26,19 @@ import java.util.ArrayList; /** -* The set of access control rules for the endpoint +* The set of access control rules for the endpoint. */ public class EndpointAcl { private ArrayList rules; /** - * The set of access control rules for the endpoint + * The set of access control rules for the endpoint. */ public ArrayList getRules() { return this.rules; } /** - * The set of access control rules for the endpoint + * The set of access control rules for the endpoint. */ public void setRules(ArrayList rules) { this.rules = rules; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ExtensionConfiguration.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ExtensionConfiguration.java index 70961185412fd..fae2d7e129e5d 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ExtensionConfiguration.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ExtensionConfiguration.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -24,7 +26,7 @@ import java.util.ArrayList; /** -* Represents an extension that is added to the cloud service +* Represents an extension that is added to the cloud service. */ public class ExtensionConfiguration { diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceAddExtensionParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceAddExtensionParameters.java index a61463d1d55d9..b793d9bdd7514 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceAddExtensionParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceAddExtensionParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceCheckNameAvailabilityResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceCheckNameAvailabilityResponse.java index 7a469a2d6bda0..3888b34e22123 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceCheckNameAvailabilityResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceCheckNameAvailabilityResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Check Hosted Service Name Availability operation response. diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceCreateParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceCreateParameters.java index 39eefe134a30c..a58e8beefb535 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceCreateParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceCreateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -97,9 +99,9 @@ public class HostedServiceCreateParameters private String label; /** - * Required. A name for the cloud service that is base-64 encoded. The name - * can be up to 100 characters in length. The name can be used identify the - * storage account for your tracking purposes. + * Required. A name for the cloud service. The name can be up to 100 + * characters in length. The name can be used to identify the storage + * account for your tracking purposes. */ public String getLabel() { @@ -114,9 +116,9 @@ public String getLabel() } /** - * Required. A name for the cloud service that is base-64 encoded. The name - * can be up to 100 characters in length. The name can be used identify the - * storage account for your tracking purposes. + * Required. A name for the cloud service. The name can be up to 100 + * characters in length. The name can be used to identify the storage + * account for your tracking purposes. */ public void setLabel(String label) { this.label = label; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceGetDetailedResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceGetDetailedResponse.java index 95296acc29c1b..1a8c217a7940d 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceGetDetailedResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceGetDetailedResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -60,12 +62,12 @@ public static class Deployment private String configuration; /** - * The base-64 encoded the configuration file of the deployment. + * The configuration file of the deployment. */ public String getConfiguration() { return this.configuration; } /** - * The base-64 encoded the configuration file of the deployment. + * The configuration file of the deployment. */ public void setConfiguration(String configuration) { this.configuration = configuration; } @@ -138,14 +140,14 @@ public static class Deployment private String label; /** - * The base-64 encoded user supplied name of the deployment. This name - * can be used identify the deployment for your tracking purposes. + * The user-supplied name of the deployment. This name can be used + * identify the deployment for your tracking purposes. */ public String getLabel() { return this.label; } /** - * The base-64 encoded user supplied name of the deployment. This name - * can be used identify the deployment for your tracking purposes. + * The user-supplied name of the deployment. This name can be used + * identify the deployment for your tracking purposes. */ public void setLabel(String label) { this.label = label; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceGetExtensionResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceGetExtensionResponse.java index 895be0740f407..806c6d446bd64 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceGetExtensionResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceGetExtensionResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Get Extension operation response. diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceGetResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceGetResponse.java index d733eee5b72be..d73eb17f9e616 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceGetResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; /** diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceListAvailableExtensionsResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceListAvailableExtensionsResponse.java index a6167b35c7288..6ae3f0648fba4 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceListAvailableExtensionsResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceListAvailableExtensionsResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; @@ -107,12 +109,12 @@ public static class ExtensionImage private String privateConfigurationSchema; /** - * The base64-encoded schema of the private configuration. + * The schema of the private configuration. */ public String getPrivateConfigurationSchema() { return this.privateConfigurationSchema; } /** - * The base64-encoded schema of the private configuration. + * The schema of the private configuration. */ public void setPrivateConfigurationSchema(String privateConfigurationSchema) { this.privateConfigurationSchema = privateConfigurationSchema; } @@ -133,12 +135,12 @@ public static class ExtensionImage private String publicConfigurationSchema; /** - * The base64-encoded schema of the public configuration. + * The schema of the public configuration. */ public String getPublicConfigurationSchema() { return this.publicConfigurationSchema; } /** - * The base64-encoded schema of the public configuration. + * The schema of the public configuration. */ public void setPublicConfigurationSchema(String publicConfigurationSchema) { this.publicConfigurationSchema = publicConfigurationSchema; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceListExtensionsResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceListExtensionsResponse.java index f1f53321efa9f..6c6ba48cde44f 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceListExtensionsResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceListExtensionsResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceListResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceListResponse.java index c97e094bc35c4..69bffd565b26e 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceListResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; import java.util.ArrayList; import java.util.Iterator; diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceProperties.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceProperties.java index 225b5c10d3d0d..083294cbf175d 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceProperties.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceProperties.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -126,14 +128,14 @@ public class HostedServiceProperties private String label; /** - * The base-64 encoded user supplied name of the cloud service. This name - * can be used identify the service for your tracking purposes. + * The user-supplied name of the cloud service. This name can be used + * identify the service for your tracking purposes. */ public String getLabel() { return this.label; } /** - * The base-64 encoded user supplied name of the cloud service. This name - * can be used identify the service for your tracking purposes. + * The user-supplied name of the cloud service. This name can be used + * identify the service for your tracking purposes. */ public void setLabel(String label) { this.label = label; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceStatus.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceStatus.java index 6a7003c73c711..24ddab62185a3 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceStatus.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceStatus.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceUpdateParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceUpdateParameters.java index e8362814579a4..80bc93ac7328f 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceUpdateParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostedServiceUpdateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -77,20 +79,20 @@ public class HostedServiceUpdateParameters private String label; /** - * Optional. A name for the cloud service that is base64-encoded. The name - * may be up to 100 characters in length. You must specify a value for - * either Label or Description, or for both. It is recommended that the - * label be unique within the subscription. The name can be used identify - * the service for your tracking purposes. + * Optional. A name for the cloud service. The name may be up to 100 + * characters in length. You must specify a value for either Label or + * Description, or for both. It is recommended that the label be unique + * within the subscription. The name can be used identify the service for + * your tracking purposes. */ public String getLabel() { return this.label; } /** - * Optional. A name for the cloud service that is base64-encoded. The name - * may be up to 100 characters in length. You must specify a value for - * either Label or Description, or for both. It is recommended that the - * label be unique within the subscription. The name can be used identify - * the service for your tracking purposes. + * Optional. A name for the cloud service. The name may be up to 100 + * characters in length. You must specify a value for either Label or + * Description, or for both. It is recommended that the label be unique + * within the subscription. The name can be used identify the service for + * your tracking purposes. */ public void setLabel(String label) { this.label = label; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostingResources.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostingResources.java index 50bc3622524f3..df62e4f226d23 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostingResources.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/HostingResources.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/InputEndpoint.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/InputEndpoint.java index c266ea1c166e4..7b739bdd5f255 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/InputEndpoint.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/InputEndpoint.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -31,24 +33,24 @@ public class InputEndpoint private Boolean enableDirectServerReturn; /** - * Specifies whether direct server return is enabled for the endpoint + * Specifies whether direct server return is enabled for the endpoint. */ public Boolean getEnableDirectServerReturn() { return this.enableDirectServerReturn; } /** - * Specifies whether direct server return is enabled for the endpoint + * Specifies whether direct server return is enabled for the endpoint. */ public void setEnableDirectServerReturn(Boolean enableDirectServerReturn) { this.enableDirectServerReturn = enableDirectServerReturn; } private EndpointAcl endpointAcl; /** - * Specifies the list of access control rules for the endpoint + * Specifies the list of access control rules for the endpoint. */ public EndpointAcl getEndpointAcl() { return this.endpointAcl; } /** - * Specifies the list of access control rules for the endpoint + * Specifies the list of access control rules for the endpoint. */ public void setEndpointAcl(EndpointAcl endpointAcl) { this.endpointAcl = endpointAcl; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/InputEndpointTransportProtocol.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/InputEndpointTransportProtocol.java index 8cc8dc7cca43f..b212918bbd21f 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/InputEndpointTransportProtocol.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/InputEndpointTransportProtocol.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/InstanceEndpoint.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/InstanceEndpoint.java index 310b21bcc91f3..09ffc33b92b1c 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/InstanceEndpoint.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/InstanceEndpoint.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/LoadBalancerProbe.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/LoadBalancerProbe.java index f59337e47db08..9bde889a6f782 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/LoadBalancerProbe.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/LoadBalancerProbe.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/LoadBalancerProbeTransportProtocol.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/LoadBalancerProbeTransportProtocol.java index d1e8d8128b4c4..7900bf13df1f2 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/LoadBalancerProbeTransportProtocol.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/LoadBalancerProbeTransportProtocol.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OSVirtualHardDisk.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OSVirtualHardDisk.java index 790dad4a45b64..8d8cd0efb5463 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OSVirtualHardDisk.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OSVirtualHardDisk.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OperatingSystemFamilies.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OperatingSystemFamilies.java index b4b6af53903e5..a93f24c53d6d4 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OperatingSystemFamilies.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OperatingSystemFamilies.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OperatingSystemListFamiliesResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OperatingSystemListFamiliesResponse.java index a4e4338f5ca09..99177f2d7b14e 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OperatingSystemListFamiliesResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OperatingSystemListFamiliesResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; @@ -129,12 +131,12 @@ public static class OperatingSystem private String label; /** - * The base-64 encoded label of the operating system version. + * The label of the operating system version. */ public String getLabel() { return this.label; } /** - * The base-64 encoded label of the operating system version. + * The label of the operating system version. */ public void setLabel(String label) { this.label = label; } @@ -175,12 +177,12 @@ public static class OperatingSystemFamily private String label; /** - * The base-64 encoded label of the operating system family. + * The label of the operating system family. */ public String getLabel() { return this.label; } /** - * The base-64 encoded label of the operating system family. + * The label of the operating system family. */ public void setLabel(String label) { this.label = label; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OperatingSystemListResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OperatingSystemListResponse.java index f68b1e92c7d8f..66fc29c8e1908 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OperatingSystemListResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OperatingSystemListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; @@ -88,12 +90,12 @@ public static class OperatingSystem private String familyLabel; /** - * The base-64 encoded label of the operating system family. + * The label of the operating system family. */ public String getFamilyLabel() { return this.familyLabel; } /** - * The base-64 encoded label of the operating system family. + * The label of the operating system family. */ public void setFamilyLabel(String familyLabel) { this.familyLabel = familyLabel; } @@ -160,12 +162,12 @@ public static class OperatingSystem private String label; /** - * The base-64 encoded label of the operating system version. + * The label of the operating system version. */ public String getLabel() { return this.label; } /** - * The base-64 encoded label of the operating system version. + * The label of the operating system version. */ public void setLabel(String label) { this.label = label; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OperationStatus.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OperationStatus.java index 921d64bc37305..7c5cb037b14df 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OperationStatus.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/OperationStatus.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/PersistentVMDowntime.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/PersistentVMDowntime.java index ec993c1c8b683..4004d3c7334ec 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/PersistentVMDowntime.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/PersistentVMDowntime.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/PostCaptureAction.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/PostCaptureAction.java index 1ac4f221d72ab..45ab0f0b1b5c4 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/PostCaptureAction.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/PostCaptureAction.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/PostShutdownAction.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/PostShutdownAction.java index 62460b1b09b2b..9eb094c2c2adf 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/PostShutdownAction.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/PostShutdownAction.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/Role.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/Role.java index 6111b8fbd0ed4..8059b91e7b29b 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/Role.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/Role.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -85,12 +87,12 @@ public class Role private String label; /** - * The friendly name for the role + * The friendly name for the role. */ public String getLabel() { return this.label; } /** - * The friendly name for the role + * The friendly name for the role. */ public void setLabel(String label) { this.label = label; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/RoleInstance.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/RoleInstance.java index 7eb9007b01aa2..73bd9d8d449e5 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/RoleInstance.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/RoleInstance.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/RoleInstancePowerState.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/RoleInstancePowerState.java index 90519ca172af0..6f69e4e716866 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/RoleInstancePowerState.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/RoleInstancePowerState.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/RoleInstanceStatus.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/RoleInstanceStatus.java index f9dea2feafb57..95a40e66af228 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/RoleInstanceStatus.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/RoleInstanceStatus.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/RollbackUpdateOrUpgradeMode.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/RollbackUpdateOrUpgradeMode.java index 29594caa7d788..daaea423fddf8 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/RollbackUpdateOrUpgradeMode.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/RollbackUpdateOrUpgradeMode.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateCreateParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateCreateParameters.java index 762e4ddbd6bdd..6f72b47e2b1e7 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateCreateParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateCreateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -43,12 +45,12 @@ public class ServiceCertificateCreateParameters private byte[] data; /** - * The base-64 encoded form of the pfx or .cer file. + * The pfx or .cer file. */ public byte[] getData() { return this.data; } /** - * The base-64 encoded form of the pfx or .cer file. + * The pfx or .cer file. */ public void setData(byte[] data) { this.data = data; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateDeleteParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateDeleteParameters.java index 3ac2a67055855..df362bc46f99e 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateDeleteParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateDeleteParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateGetParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateGetParameters.java index 0ef6881766e10..4f61b9f17d9bb 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateGetParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateGetParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateGetResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateGetResponse.java index 2633fc0f8cc70..c3ac35e37db3a 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateGetResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Get Service Certificate operation response. @@ -31,14 +33,14 @@ public class ServiceCertificateGetResponse extends OperationResponse private byte[] data; /** - * The public portion of the X.509 service certificate as a base-64 encoded - * form of the .cer file. + * The public portion of the X.509 service certificate as a form of the .cer + * file. */ public byte[] getData() { return this.data; } /** - * The public portion of the X.509 service certificate as a base-64 encoded - * form of the .cer file. + * The public portion of the X.509 service certificate as a form of the .cer + * file. */ public void setData(byte[] data) { this.data = data; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateListResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateListResponse.java index f833b0b7a4379..25eb457802b8e 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateListResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/ServiceCertificateListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; import java.util.ArrayList; import java.util.Iterator; @@ -83,14 +85,12 @@ public static class Certificate private byte[] data; /** - * The public part of the service certificate as a base-64 encoded .cer - * file. + * The public part of the service certificate as a .cer file. */ public byte[] getData() { return this.data; } /** - * The public part of the service certificate as a base-64 encoded .cer - * file. + * The public part of the service certificate as a .cer file. */ public void setData(byte[] data) { this.data = data; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/SshSettingKeyPair.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/SshSettingKeyPair.java index b4722f71254ee..3287cd7c019a4 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/SshSettingKeyPair.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/SshSettingKeyPair.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/SshSettingPublicKey.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/SshSettingPublicKey.java index 7fd0ad38e86a2..6201082667844 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/SshSettingPublicKey.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/SshSettingPublicKey.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/SshSettings.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/SshSettings.java index 4bc382bbecacb..1fc9af878b0a1 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/SshSettings.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/SshSettings.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/StoredCertificateSettings.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/StoredCertificateSettings.java index dbbfe4eacaf21..b8ac673c3f2d4 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/StoredCertificateSettings.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/StoredCertificateSettings.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/UpdatedDeploymentStatus.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/UpdatedDeploymentStatus.java index e5dfb9ffeb401..a67a9fa8b0a29 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/UpdatedDeploymentStatus.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/UpdatedDeploymentStatus.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/UpgradeDomainState.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/UpgradeDomainState.java index 9600e71eeec86..21540b6460854 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/UpgradeDomainState.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/UpgradeDomainState.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/UpgradeStatus.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/UpgradeStatus.java index f03a1ce1c1342..7bcf18328ad36 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/UpgradeStatus.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/UpgradeStatus.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualHardDiskHostCaching.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualHardDiskHostCaching.java index 48ddad8d2b064..5cd4a06dd6bcf 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualHardDiskHostCaching.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualHardDiskHostCaching.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualIPAddress.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualIPAddress.java index 85b0ab36ef86e..42730065862f8 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualIPAddress.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualIPAddress.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -40,6 +42,30 @@ public class VirtualIPAddress */ public void setAddress(InetAddress address) { this.address = address; } + private Boolean isDnsProgrammed; + + /** + * Indicates whether the IP address is DNS programmed. + */ + public Boolean getIsDnsProgrammed() { return this.isDnsProgrammed; } + + /** + * Indicates whether the IP address is DNS programmed. + */ + public void setIsDnsProgrammed(Boolean isDnsProgrammed) { this.isDnsProgrammed = isDnsProgrammed; } + + private String name; + + /** + * The name of the virtual IP. + */ + public String getName() { return this.name; } + + /** + * The name of the virtual IP. + */ + public void setName(String name) { this.name = name; } + /** * Initializes a new instance of the VirtualIPAddress class. * diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineCaptureParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineCaptureParameters.java index 15e2b7a836257..9295a0467e5f2 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineCaptureParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineCaptureParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineCreateDeploymentParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineCreateDeploymentParameters.java index 2e4668e6e3dba..182ac0f3cbf45 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineCreateDeploymentParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineCreateDeploymentParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -86,6 +88,22 @@ public class VirtualMachineCreateDeploymentParameters */ public void setName(String name) { this.name = name; } + private String reservedIPName; + + /** + * Optional and Preview Only. Specifies the name of an existing reserved IP + * to which the deployment will belong. Reserved IPs are created by calling + * the Create Reserved IP operation. + */ + public String getReservedIPName() { return this.reservedIPName; } + + /** + * Optional and Preview Only. Specifies the name of an existing reserved IP + * to which the deployment will belong. Reserved IPs are created by calling + * the Create Reserved IP operation. + */ + public void setReservedIPName(String reservedIPName) { this.reservedIPName = reservedIPName; } + private ArrayList roles; /** diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineCreateParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineCreateParameters.java index 4fcfb39e64291..6f224ffdc844b 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineCreateParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineCreateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskCreateDataDiskParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskCreateDataDiskParameters.java index 03a62d2dfef22..8c3d8822a1769 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskCreateDataDiskParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskCreateDataDiskParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskCreateDiskParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskCreateDiskParameters.java index 0cc3a350b2210..d6a91e447f941 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskCreateDiskParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskCreateDiskParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskCreateDiskResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskCreateDiskResponse.java index 36a7ee2aa3155..26c0de0cd2fa3 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskCreateDiskResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskCreateDiskResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; /** diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskGetDataDiskResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskGetDataDiskResponse.java index c78f8e2dc2f17..1c0ad343a850c 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskGetDataDiskResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskGetDataDiskResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; /** diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskGetDiskResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskGetDiskResponse.java index 9924e1e9a33de..0c61bb4be9013 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskGetDiskResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskGetDiskResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; /** @@ -50,12 +52,12 @@ public class VirtualMachineDiskGetDiskResponse extends OperationResponse private Boolean isCorrupted; /** - * Specifies thether the disk is known to be corrupt + * Specifies thether the disk is known to be corrupt. */ public Boolean getIsCorrupted() { return this.isCorrupted; } /** - * Specifies thether the disk is known to be corrupt + * Specifies thether the disk is known to be corrupt. */ public void setIsCorrupted(Boolean isCorrupted) { this.isCorrupted = isCorrupted; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskListResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskListResponse.java index 0bee47dd3573a..497edc080ac6b 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskListResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; import java.util.ArrayList; import java.util.Iterator; @@ -87,12 +89,12 @@ public static class VirtualMachineDisk private Boolean isCorrupted; /** - * Specifies thether the disk is known to be corrupt + * Specifies thether the disk is known to be corrupt. */ public Boolean getIsCorrupted() { return this.isCorrupted; } /** - * Specifies thether the disk is known to be corrupt + * Specifies thether the disk is known to be corrupt. */ public void setIsCorrupted(Boolean isCorrupted) { this.isCorrupted = isCorrupted; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskUpdateDataDiskParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskUpdateDataDiskParameters.java index ea3dfc00755a2..5c2da997cd700 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskUpdateDataDiskParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskUpdateDataDiskParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskUpdateDiskParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskUpdateDiskParameters.java index 1f644b8eecf82..73801f3a336fd 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskUpdateDiskParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskUpdateDiskParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskUpdateDiskResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskUpdateDiskResponse.java index 64f493c442c0f..b7d99b4d04f1a 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskUpdateDiskResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineDiskUpdateDiskResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; /** diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineGetRemoteDesktopFileResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineGetRemoteDesktopFileResponse.java index 87f5304a04c9a..514a3ee776e8c 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineGetRemoteDesktopFileResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineGetRemoteDesktopFileResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Download RDP file operation response. diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineGetResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineGetResponse.java index 88e57df26401d..5ca880700b66b 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineGetResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; /** diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageCreateParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageCreateParameters.java index 6509d2481c53d..1b88dcead809c 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageCreateParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageCreateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageCreateResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageCreateResponse.java index e18d5993b7365..74ae0521c6cb9 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageCreateResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageCreateResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; import java.util.Calendar; diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageGetResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageGetResponse.java index bc78e9d29e9f2..10361310320a6 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageGetResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; import java.util.Calendar; @@ -95,12 +97,12 @@ public class VirtualMachineImageGetResponse extends OperationResponse private URI iconUri; /** - * Provides the URI to the icon for this Operating System Image + * Provides the URI to the icon for this Operating System Image. */ public URI getIconUri() { return this.iconUri; } /** - * Provides the URI to the icon for this Operating System Image + * Provides the URI to the icon for this Operating System Image. */ public void setIconUri(URI iconUri) { this.iconUri = iconUri; } @@ -267,12 +269,12 @@ public class VirtualMachineImageGetResponse extends OperationResponse private String publisherName; /** - * The name of the publisher of this OS Image in Windows Azure + * The name of the publisher of this OS Image in Windows Azure. */ public String getPublisherName() { return this.publisherName; } /** - * The name of the publisher of this OS Image in Windows Azure + * The name of the publisher of this OS Image in Windows Azure. */ public void setPublisherName(String publisherName) { this.publisherName = publisherName; } @@ -293,12 +295,12 @@ public class VirtualMachineImageGetResponse extends OperationResponse private Boolean showInGui; /** - * Indicates whther the image should be shown in the windows azure portal + * Indicates whther the image should be shown in the windows azure portal. */ public Boolean getShowInGui() { return this.showInGui; } /** - * Indicates whther the image should be shown in the windows azure portal + * Indicates whther the image should be shown in the windows azure portal. */ public void setShowInGui(Boolean showInGui) { this.showInGui = showInGui; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageListResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageListResponse.java index f110fdc4247f8..ac939807b7ec3 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageListResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; import java.util.ArrayList; import java.util.Calendar; @@ -310,12 +312,12 @@ public static class VirtualMachineImage private String publisherName; /** - * The name of the publisher of this OS Image in Windows Azure + * The name of the publisher of this OS Image in Windows Azure. */ public String getPublisherName() { return this.publisherName; } /** - * The name of the publisher of this OS Image in Windows Azure + * The name of the publisher of this OS Image in Windows Azure. */ public void setPublisherName(String publisherName) { this.publisherName = publisherName; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageOperatingSystemType.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageOperatingSystemType.java index 476c1501a7fc4..6988848fd6a5c 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageOperatingSystemType.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageOperatingSystemType.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageUpdateParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageUpdateParameters.java index 352d381b353b5..46d50ebc13f70 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageUpdateParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageUpdateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageUpdateResponse.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageUpdateResponse.java index 228b7bb0dd292..f8127a1981391 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageUpdateResponse.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineImageUpdateResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.compute.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; import java.util.Calendar; diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineRoleSize.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineRoleSize.java index 566b29158e999..a1ac3aa0fdbe4 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineRoleSize.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineRoleSize.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -41,4 +43,8 @@ public enum VirtualMachineRoleSize A6, A7, + + A8, + + A9, } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineRoleType.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineRoleType.java index d3d32ce7f1bd8..82889fb13bbf5 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineRoleType.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineRoleType.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineShutdownParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineShutdownParameters.java index 8e8af31d239b1..6fcdeb14be908 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineShutdownParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineShutdownParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -22,7 +24,7 @@ package com.microsoft.windowsazure.management.compute.models; /** -* The parameters required for shutting down the virtual machine +* The parameters required for shutting down the virtual machine. */ public class VirtualMachineShutdownParameters { diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineShutdownRolesParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineShutdownRolesParameters.java index c9ac976d6c569..7e41b91642ef4 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineShutdownRolesParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineShutdownRolesParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -24,7 +26,7 @@ import java.util.ArrayList; /** -* Parameters for the shutdown roles operation +* Parameters for the shutdown roles operation. */ public class VirtualMachineShutdownRolesParameters { @@ -45,12 +47,12 @@ public class VirtualMachineShutdownRolesParameters private ArrayList roles; /** - * The set of roles to shut down + * The set of roles to shut down. */ public ArrayList getRoles() { return this.roles; } /** - * The set of roles to shut down + * The set of roles to shut down. */ public void setRoles(ArrayList roles) { this.roles = roles; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineStartRolesParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineStartRolesParameters.java index 95f2775d93eb5..4e0f9600ca12d 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineStartRolesParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineStartRolesParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -24,19 +26,19 @@ import java.util.ArrayList; /** -* Parameters for the start roles operation +* Parameters for the start roles operation. */ public class VirtualMachineStartRolesParameters { private ArrayList roles; /** - * The set of roles to shut down + * The set of roles to shut down. */ public ArrayList getRoles() { return this.roles; } /** - * The set of roles to shut down + * The set of roles to shut down. */ public void setRoles(ArrayList roles) { this.roles = roles; } diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineUpdateLoadBalancedSetParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineUpdateLoadBalancedSetParameters.java index e3011e85acc4d..a08b4214b9d74 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineUpdateLoadBalancedSetParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineUpdateLoadBalancedSetParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -25,7 +27,7 @@ import java.util.ArrayList; /** -* The set of parameters required to update a load balanced endpoint set +* The set of parameters required to update a load balanced endpoint set. */ public class VirtualMachineUpdateLoadBalancedSetParameters { @@ -52,7 +54,7 @@ public VirtualMachineUpdateLoadBalancedSetParameters() } /** - * The modeled external endpoint for a persistent VM role + * The modeled external endpoint for a persistent VM role. */ public static class InputEndpoint { diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineUpdateParameters.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineUpdateParameters.java index f178f2393ac06..035c8d7cc0b4e 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineUpdateParameters.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineUpdateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineWindowsRemoteManagementListenerType.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineWindowsRemoteManagementListenerType.java index 9dac20dbd15f7..d660d05a670a3 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineWindowsRemoteManagementListenerType.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineWindowsRemoteManagementListenerType.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/WindowsRemoteManagementListener.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/WindowsRemoteManagementListener.java index f57a7f2cea622..619b021c897ad 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/WindowsRemoteManagementListener.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/WindowsRemoteManagementListener.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/WindowsRemoteManagementSettings.java b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/WindowsRemoteManagementSettings.java index 25d1b778535ce..5c96d65de98a1 100644 --- a/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/WindowsRemoteManagementSettings.java +++ b/management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/WindowsRemoteManagementSettings.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/AlertsClient.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/AlertsClient.java index 8ff6ed8062d43..ddcc62e576a5c 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/AlertsClient.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/AlertsClient.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,10 +23,11 @@ package com.microsoft.windowsazure.management.monitoring.alerts; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.core.FilterableService; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; import java.net.URI; -public interface AlertsClient +public interface AlertsClient extends FilterableService { /** * Optional base uri parameter for Azure REST. @@ -44,10 +47,10 @@ public interface AlertsClient /** * Operations for managing the alert incidents. */ - IncidentOperations getIncidents(); + IncidentOperations getIncidentsOperations(); /** * Operations for managing the alert rules. */ - RuleOperations getRules(); + RuleOperations getRulesOperations(); } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/AlertsClientImpl.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/AlertsClientImpl.java index 66405e735154b..96d7f45e5e10d 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/AlertsClientImpl.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/AlertsClientImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,14 +23,16 @@ package com.microsoft.windowsazure.management.monitoring.alerts; +import com.microsoft.windowsazure.core.ServiceClient; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; import com.microsoft.windowsazure.management.ManagementConfiguration; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; -import com.microsoft.windowsazure.services.core.ServiceClient; import java.net.URI; +import java.util.concurrent.ExecutorService; import javax.inject.Inject; import javax.inject.Named; +import org.apache.http.impl.client.HttpClientBuilder; -public class AlertsClientImpl extends ServiceClient implements AlertsClient +public class AlertsClientImpl extends ServiceClient implements AlertsClient { private URI baseUri; @@ -54,22 +58,24 @@ public class AlertsClientImpl extends ServiceClient implements /** * Operations for managing the alert incidents. */ - public IncidentOperations getIncidents() { return this.incidents; } + public IncidentOperations getIncidentsOperations() { return this.incidents; } private RuleOperations rules; /** * Operations for managing the alert rules. */ - public RuleOperations getRules() { return this.rules; } + public RuleOperations getRulesOperations() { return this.rules; } /** * Initializes a new instance of the AlertsClientImpl class. * + * @param httpBuilder The HTTP client builder. + * @param executorService The executor service. */ - private AlertsClientImpl() + private AlertsClientImpl(HttpClientBuilder httpBuilder, ExecutorService executorService) { - super(); + super(httpBuilder, executorService); this.incidents = new IncidentOperationsImpl(this); this.rules = new RuleOperationsImpl(this); } @@ -77,6 +83,8 @@ private AlertsClientImpl() /** * Initializes a new instance of the AlertsClientImpl class. * + * @param httpBuilder The HTTP client builder. + * @param executorService The executor service. * @param credentials When you create a Windows Azure subscription, it is * uniquely identified by a subscription ID. The subscription ID forms part * of the URI for every call that you make to the Service Management API. @@ -85,9 +93,9 @@ private AlertsClientImpl() * service is secure. No anonymous requests are allowed. * @param baseUri Optional base uri parameter for Azure REST. */ - public AlertsClientImpl(SubscriptionCloudCredentials credentials, URI baseUri) + public AlertsClientImpl(HttpClientBuilder httpBuilder, ExecutorService executorService, SubscriptionCloudCredentials credentials, URI baseUri) { - this(); + this(httpBuilder, executorService); if (credentials == null) { throw new NullPointerException("credentials"); @@ -98,13 +106,14 @@ public AlertsClientImpl(SubscriptionCloudCredentials credentials, URI baseUri) } this.credentials = credentials; this.baseUri = baseUri; - - httpClient = credentials.initializeClient(); } /** * Initializes a new instance of the AlertsClientImpl class. + * Initializes a new instance of the AlertsClientImpl class. * + * @param httpBuilder The HTTP client builder. + * @param executorService The executor service. * @param credentials When you create a Windows Azure subscription, it is * uniquely identified by a subscription ID. The subscription ID forms part * of the URI for every call that you make to the Service Management API. @@ -113,16 +122,24 @@ public AlertsClientImpl(SubscriptionCloudCredentials credentials, URI baseUri) * service is secure. No anonymous requests are allowed. */ @Inject - public AlertsClientImpl(@Named(ManagementConfiguration.SUBSCRIPTION_CLOUD_CREDENTIALS) SubscriptionCloudCredentials credentials) throws java.net.URISyntaxException + public AlertsClientImpl(HttpClientBuilder httpBuilder, ExecutorService executorService, @Named(ManagementConfiguration.SUBSCRIPTION_CLOUD_CREDENTIALS) SubscriptionCloudCredentials credentials) throws java.net.URISyntaxException { - this(); + this(httpBuilder, executorService); if (credentials == null) { throw new NullPointerException("credentials"); } this.credentials = credentials; this.baseUri = new URI("https://management.core.windows.net"); - - httpClient = credentials.initializeClient(); + } + + /** + * + * @param httpBuilder The HTTP client builder. + * @param executorService The executor service. + */ + protected AlertsClientImpl newInstance(HttpClientBuilder httpBuilder, ExecutorService executorService) + { + return new AlertsClientImpl(httpBuilder, executorService, this.getCredentials(), this.getBaseUri()); } } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/AlertsService.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/AlertsService.java index 51187b953944d..a115c4e65afd9 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/AlertsService.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/AlertsService.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.monitoring.alerts; -import com.microsoft.windowsazure.services.core.Configuration; +import com.microsoft.windowsazure.Configuration; /** * diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/Exports.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/Exports.java index ccaf2e1ceb899..baa77757920ce 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/Exports.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/Exports.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.monitoring.alerts; -import com.microsoft.windowsazure.services.core.Builder; +import com.microsoft.windowsazure.core.Builder; /** * The Class Exports. diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/IncidentOperations.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/IncidentOperations.java index fc229eefa7ca3..34136ef56989b 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/IncidentOperations.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/IncidentOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,9 +23,9 @@ package com.microsoft.windowsazure.management.monitoring.alerts; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.monitoring.alerts.models.IncidentGetResponse; import com.microsoft.windowsazure.management.monitoring.alerts.models.IncidentListResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.text.ParseException; import java.util.concurrent.Future; diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/IncidentOperationsImpl.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/IncidentOperationsImpl.java index 05fd1b4e3dc08..ddeb4465b744f 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/IncidentOperationsImpl.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/IncidentOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,17 +23,19 @@ package com.microsoft.windowsazure.management.monitoring.alerts; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.monitoring.alerts.models.Incident; import com.microsoft.windowsazure.management.monitoring.alerts.models.IncidentCollection; import com.microsoft.windowsazure.management.monitoring.alerts.models.IncidentGetResponse; import com.microsoft.windowsazure.management.monitoring.alerts.models.IncidentListResponse; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.Future; import org.apache.http.HttpResponse; @@ -95,6 +99,15 @@ public IncidentGetResponse get(String incidentId) throws IOException, ServiceExc } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("incidentId", incidentId); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/monitoring/alertincidents/" + incidentId; @@ -105,15 +118,27 @@ public IncidentGetResponse get(String incidentId) throws IOException, ServiceExc // Set Headers httpRequest.setHeader("Accept", "application/json"); httpRequest.setHeader("Content-Type", "application/json"); - httpRequest.setHeader("x-ms-version", "2012-08-01"); + httpRequest.setHeader("x-ms-version", "2013-10-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromJson(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -183,6 +208,10 @@ public IncidentGetResponse get(String incidentId) throws IOException, ServiceExc result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -212,6 +241,14 @@ public IncidentListResponse listActiveForSubscription() throws IOException, Serv // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listActiveForSubscriptionAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/monitoring/alertincidents?$filter=IsActive eq true"; @@ -222,15 +259,27 @@ public IncidentListResponse listActiveForSubscription() throws IOException, Serv // Set Headers httpRequest.setHeader("Accept", "application/json"); httpRequest.setHeader("Content-Type", "application/json"); - httpRequest.setHeader("x-ms-version", "2012-08-01"); + httpRequest.setHeader("x-ms-version", "2013-10-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromJson(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -310,6 +359,10 @@ public IncidentListResponse listActiveForSubscription() throws IOException, Serv result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -347,6 +400,16 @@ public IncidentListResponse listForRule(String ruleId, boolean isActive) throws } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("ruleId", ruleId); + tracingParameters.put("isActive", isActive); + CloudTracing.enter(invocationId, this, "listForRuleAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/monitoring/alertrules/" + ruleId + "/alertincidents?$filter=IsActive eq " + isActive; @@ -357,15 +420,27 @@ public IncidentListResponse listForRule(String ruleId, boolean isActive) throws // Set Headers httpRequest.setHeader("Accept", "application/json"); httpRequest.setHeader("Content-Type", "application/json"); - httpRequest.setHeader("x-ms-version", "2012-08-01"); + httpRequest.setHeader("x-ms-version", "2013-10-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromJson(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -445,6 +520,10 @@ public IncidentListResponse listForRule(String ruleId, boolean isActive) throws result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/RuleOperations.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/RuleOperations.java index 6eab3f87267e5..dad8e26b2608b 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/RuleOperations.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/RuleOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,11 +23,11 @@ package com.microsoft.windowsazure.management.monitoring.alerts; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.monitoring.alerts.models.RuleCreateOrUpdateParameters; import com.microsoft.windowsazure.management.monitoring.alerts.models.RuleGetResponse; import com.microsoft.windowsazure.management.monitoring.alerts.models.RuleListResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.text.ParseException; @@ -83,12 +85,14 @@ public interface RuleOperations Future getAsync(String ruleId); /** + * List the alert rules within a subscription. * * @return The List Rules operation response. */ RuleListResponse list() throws IOException, ServiceException, ParseException; /** + * List the alert rules within a subscription. * * @return The List Rules operation response. */ diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/RuleOperationsImpl.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/RuleOperationsImpl.java index dc40bcac61f29..1db76eb892a82 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/RuleOperationsImpl.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/RuleOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,12 @@ package com.microsoft.windowsazure.management.monitoring.alerts; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.TimeSpan8601Converter; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.exception.ServiceException; +import com.microsoft.windowsazure.management.monitoring.alerts.models.ConditionOperator; import com.microsoft.windowsazure.management.monitoring.alerts.models.Rule; import com.microsoft.windowsazure.management.monitoring.alerts.models.RuleAction; import com.microsoft.windowsazure.management.monitoring.alerts.models.RuleCollection; @@ -31,10 +38,7 @@ import com.microsoft.windowsazure.management.monitoring.alerts.models.RuleListResponse; import com.microsoft.windowsazure.management.monitoring.alerts.models.RuleMetricDataSource; import com.microsoft.windowsazure.management.monitoring.alerts.models.ThresholdRuleCondition; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.TimeSpan8601Converter; -import com.microsoft.windowsazure.services.core.utils.pipeline.CustomHttpDelete; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -42,6 +46,7 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.HashMap; import java.util.TimeZone; import java.util.concurrent.Callable; import java.util.concurrent.Future; @@ -112,6 +117,15 @@ public OperationResponse createOrUpdate(RuleCreateOrUpdateParameters parameters) } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createOrUpdateAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/monitoring/alertrules/" + parameters.getRule().getId(); @@ -122,7 +136,7 @@ public OperationResponse createOrUpdate(RuleCreateOrUpdateParameters parameters) // Set Headers httpRequest.setHeader("Accept", "application/json"); httpRequest.setHeader("Content-Type", "application/json"); - httpRequest.setHeader("x-ms-version", "2012-08-01"); + httpRequest.setHeader("x-ms-version", "2013-10-01"); // Serialize Request String requestContent = null; @@ -186,10 +200,7 @@ public OperationResponse createOrUpdate(RuleCreateOrUpdateParameters parameters) } } - if (derived.getOperator() != null) - { - conditionValue.put("Operator", derived.getOperator()); - } + conditionValue.put("Operator", derived.getOperator().toString()); conditionValue.put("Threshold", derived.getThreshold()); @@ -240,11 +251,23 @@ public OperationResponse createOrUpdate(RuleCreateOrUpdateParameters parameters) // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200 && statusCode != 201) { - ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + ServiceException ex = ServiceException.createFromJson(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -257,6 +280,10 @@ public OperationResponse createOrUpdate(RuleCreateOrUpdateParameters parameters) result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -294,6 +321,15 @@ public OperationResponse delete(String ruleId) throws IOException, ServiceExcept } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("ruleId", ruleId); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/monitoring/alertrules/" + ruleId; @@ -304,15 +340,27 @@ public OperationResponse delete(String ruleId) throws IOException, ServiceExcept // Set Headers httpRequest.setHeader("Accept", "application/json"); httpRequest.setHeader("Content-Type", "application/json"); - httpRequest.setHeader("x-ms-version", "2012-08-01"); + httpRequest.setHeader("x-ms-version", "2013-10-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { - ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + ServiceException ex = ServiceException.createFromJson(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -325,6 +373,10 @@ public OperationResponse delete(String ruleId) throws IOException, ServiceExcept result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -360,6 +412,15 @@ public RuleGetResponse get(String ruleId) throws IOException, ServiceException, } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("ruleId", ruleId); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/monitoring/alertrules/" + ruleId; @@ -370,15 +431,27 @@ public RuleGetResponse get(String ruleId) throws IOException, ServiceException, // Set Headers httpRequest.setHeader("Accept", "application/json"); httpRequest.setHeader("Content-Type", "application/json"); - httpRequest.setHeader("x-ms-version", "2012-08-01"); + httpRequest.setHeader("x-ms-version", "2013-10-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromJson(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -473,8 +546,8 @@ public RuleGetResponse get(String ruleId) throws IOException, ServiceException, JsonNode operatorValue = conditionValue.get("Operator"); if (operatorValue != null) { - String operatorInstance; - operatorInstance = operatorValue.getTextValue(); + ConditionOperator operatorInstance; + operatorInstance = ConditionOperator.valueOf(operatorValue.getTextValue()); thresholdRuleConditionInstance.setOperator(operatorInstance); } @@ -546,10 +619,15 @@ public RuleGetResponse get(String ruleId) throws IOException, ServiceException, result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** + * List the alert rules within a subscription. * * @return The List Rules operation response. */ @@ -566,6 +644,7 @@ public RuleListResponse call() throws Exception } /** + * List the alert rules within a subscription. * * @return The List Rules operation response. */ @@ -575,6 +654,14 @@ public RuleListResponse list() throws IOException, ServiceException, ParseExcept // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/monitoring/alertrules"; @@ -585,15 +672,27 @@ public RuleListResponse list() throws IOException, ServiceException, ParseExcept // Set Headers httpRequest.setHeader("Accept", "application/json"); httpRequest.setHeader("Content-Type", "application/json"); - httpRequest.setHeader("x-ms-version", "2012-08-01"); + httpRequest.setHeader("x-ms-version", "2013-10-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromJson(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -696,8 +795,8 @@ public RuleListResponse list() throws IOException, ServiceException, ParseExcept JsonNode operatorValue = conditionValue.get("Operator"); if (operatorValue != null) { - String operatorInstance; - operatorInstance = operatorValue.getTextValue(); + ConditionOperator operatorInstance; + operatorInstance = ConditionOperator.valueOf(operatorValue.getTextValue()); thresholdRuleConditionInstance.setOperator(operatorInstance); } @@ -771,6 +870,10 @@ public RuleListResponse list() throws IOException, ServiceException, ParseExcept result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/ConditionOperator.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/ConditionOperator.java new file mode 100644 index 0000000000000..620977d71ef86 --- /dev/null +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/ConditionOperator.java @@ -0,0 +1,35 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.management.monitoring.alerts.models; + +public enum ConditionOperator +{ + GreaterThan, + + GreaterThanOrEqual, + + LessThan, + + LessThanOrEqual, +} diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/Incident.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/Incident.java index 8bcfa1a457269..530344dc0bb4e 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/Incident.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/Incident.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -24,7 +26,7 @@ import java.util.Calendar; /** -* An alert incident. +* An alert incident indicates the activation status of an alert rule. */ public class Incident { @@ -81,12 +83,12 @@ public class Incident private String ruleId; /** - * Rule identifier. + * Rule identifier that is associated with the incident. */ public String getRuleId() { return this.ruleId; } /** - * Rule identifier. + * Rule identifier that is associated with the incident. */ public void setRuleId(String ruleId) { this.ruleId = ruleId; } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/IncidentCollection.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/IncidentCollection.java index 0b92feb21e3f2..e636c68a3a1c5 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/IncidentCollection.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/IncidentCollection.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/IncidentGetResponse.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/IncidentGetResponse.java index 42b7467596b5d..cfefd82704d50 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/IncidentGetResponse.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/IncidentGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.monitoring.alerts.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Get Incident operation response. diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/IncidentListResponse.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/IncidentListResponse.java index b36c2ab18fb63..2e3db49fa708a 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/IncidentListResponse.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/IncidentListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.monitoring.alerts.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The List incidents operation response. diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/Rule.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/Rule.java index d71e7e1595d61..076bd9ea75782 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/Rule.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/Rule.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleAction.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleAction.java index 22a30cb605163..3890bea72c870 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleAction.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleAction.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleCollection.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleCollection.java index 975ddce8c1890..f5002a29e47eb 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleCollection.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleCollection.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleCondition.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleCondition.java index 096a9b4542818..968b2dcd01db6 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleCondition.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleCondition.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleCreateOrUpdateParameters.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleCreateOrUpdateParameters.java index 149ab8505674d..aded11910b090 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleCreateOrUpdateParameters.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleCreateOrUpdateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleDataSource.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleDataSource.java index f3228695ab322..84c7429220460 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleDataSource.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleDataSource.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleEmailAction.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleEmailAction.java index 7f77e94cddf88..76cdf59b356fa 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleEmailAction.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleEmailAction.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -24,31 +26,33 @@ import java.util.ArrayList; /** -* A rule email action. +* Specifies the action to send email when the rule condition is evaluated. */ public class RuleEmailAction extends RuleAction { private ArrayList customEmails; /** - * Custom emails. + * The email address of an adminstrative user. */ public ArrayList getCustomEmails() { return this.customEmails; } /** - * Custom emails. + * The email address of an adminstrative user. */ public void setCustomEmails(ArrayList customEmails) { this.customEmails = customEmails; } private boolean sendToServiceOwners; /** - * Whether to send email to service owners or not. + * This indicates if email is sent to sevice adminstrator and + * co-administrators. */ public boolean getSendToServiceOwners() { return this.sendToServiceOwners; } /** - * Whether to send email to service owners or not. + * This indicates if email is sent to sevice adminstrator and + * co-administrators. */ public void setSendToServiceOwners(boolean sendToServiceOwners) { this.sendToServiceOwners = sendToServiceOwners; } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleGetResponse.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleGetResponse.java index cc26bef2455e7..74ba1d2c74958 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleGetResponse.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.monitoring.alerts.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Get Rule operation response. diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleListResponse.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleListResponse.java index 43fcdcdf5d457..70106ac847004 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleListResponse.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.monitoring.alerts.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The List Rules operation response. diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleMetricDataSource.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleMetricDataSource.java index d3889c09c820f..04ed6245ac47c 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleMetricDataSource.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/RuleMetricDataSource.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -41,12 +43,14 @@ public class RuleMetricDataSource extends RuleDataSource private String metricNamespace; /** - * Metric namespace. + * Metric namespace. When creating a rule on endpoint monitoring metrics, + * WindowsAzure.Availability namespace is required. */ public String getMetricNamespace() { return this.metricNamespace; } /** - * Metric namespace. + * Metric namespace. When creating a rule on endpoint monitoring metrics, + * WindowsAzure.Availability namespace is required. */ public void setMetricNamespace(String metricNamespace) { this.metricNamespace = metricNamespace; } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/ThresholdRuleCondition.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/ThresholdRuleCondition.java index 5677e6ea5b776..2732c8b9dfe64 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/ThresholdRuleCondition.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/alerts/models/ThresholdRuleCondition.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -40,17 +42,17 @@ public class ThresholdRuleCondition extends RuleCondition */ public void setDataSource(RuleDataSource dataSource) { this.dataSource = dataSource; } - private String operator; + private ConditionOperator operator; /** * Condition operator. */ - public String getOperator() { return this.operator; } + public ConditionOperator getOperator() { return this.operator; } /** * Condition operator. */ - public void setOperator(String operator) { this.operator = operator; } + public void setOperator(ConditionOperator operator) { this.operator = operator; } private double threshold; @@ -67,12 +69,14 @@ public class ThresholdRuleCondition extends RuleCondition private Duration windowSize; /** - * Condition window size. + * The time period over which the alert rule is evaluated. Condition window + * size depends on the metric. */ public Duration getWindowSize() { return this.windowSize; } /** - * Condition window size. + * The time period over which the alert rule is evaluated. Condition window + * size depends on the metric. */ public void setWindowSize(Duration windowSize) { this.windowSize = windowSize; } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/AutoscaleClient.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/AutoscaleClient.java index 5ba3316ccae8d..26572839ff433 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/AutoscaleClient.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/AutoscaleClient.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,10 +23,11 @@ package com.microsoft.windowsazure.management.monitoring.autoscale; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.core.FilterableService; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; import java.net.URI; -public interface AutoscaleClient +public interface AutoscaleClient extends FilterableService { /** * Optional base uri parameter. @@ -44,5 +47,5 @@ public interface AutoscaleClient /** * Operations for managing the autoscale settings. */ - SettingOperations getSettings(); + SettingOperations getSettingsOperations(); } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/AutoscaleClientImpl.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/AutoscaleClientImpl.java index 100c1e35726c8..ac0f6af3d5ff2 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/AutoscaleClientImpl.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/AutoscaleClientImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,14 +23,16 @@ package com.microsoft.windowsazure.management.monitoring.autoscale; +import com.microsoft.windowsazure.core.ServiceClient; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; import com.microsoft.windowsazure.management.ManagementConfiguration; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; -import com.microsoft.windowsazure.services.core.ServiceClient; import java.net.URI; +import java.util.concurrent.ExecutorService; import javax.inject.Inject; import javax.inject.Named; +import org.apache.http.impl.client.HttpClientBuilder; -public class AutoscaleClientImpl extends ServiceClient implements AutoscaleClient +public class AutoscaleClientImpl extends ServiceClient implements AutoscaleClient { private URI baseUri; @@ -54,21 +58,25 @@ public class AutoscaleClientImpl extends ServiceClient impl /** * Operations for managing the autoscale settings. */ - public SettingOperations getSettings() { return this.settings; } + public SettingOperations getSettingsOperations() { return this.settings; } /** * Initializes a new instance of the AutoscaleClientImpl class. * + * @param httpBuilder The HTTP client builder. + * @param executorService The executor service. */ - private AutoscaleClientImpl() + private AutoscaleClientImpl(HttpClientBuilder httpBuilder, ExecutorService executorService) { - super(); + super(httpBuilder, executorService); this.settings = new SettingOperationsImpl(this); } /** * Initializes a new instance of the AutoscaleClientImpl class. * + * @param httpBuilder The HTTP client builder. + * @param executorService The executor service. * @param credentials When you create a Windows Azure subscription, it is * uniquely identified by a subscription ID. The subscription ID forms part * of the URI for every call that you make to the Service Management API. @@ -77,9 +85,9 @@ private AutoscaleClientImpl() * service is secure. No anonymous requests are allowed. * @param baseUri Optional base uri parameter. */ - public AutoscaleClientImpl(SubscriptionCloudCredentials credentials, URI baseUri) + public AutoscaleClientImpl(HttpClientBuilder httpBuilder, ExecutorService executorService, SubscriptionCloudCredentials credentials, URI baseUri) { - this(); + this(httpBuilder, executorService); if (credentials == null) { throw new NullPointerException("credentials"); @@ -90,13 +98,14 @@ public AutoscaleClientImpl(SubscriptionCloudCredentials credentials, URI baseUri } this.credentials = credentials; this.baseUri = baseUri; - - httpClient = credentials.initializeClient(); } /** * Initializes a new instance of the AutoscaleClientImpl class. + * Initializes a new instance of the AutoscaleClientImpl class. * + * @param httpBuilder The HTTP client builder. + * @param executorService The executor service. * @param credentials When you create a Windows Azure subscription, it is * uniquely identified by a subscription ID. The subscription ID forms part * of the URI for every call that you make to the Service Management API. @@ -105,16 +114,24 @@ public AutoscaleClientImpl(SubscriptionCloudCredentials credentials, URI baseUri * service is secure. No anonymous requests are allowed. */ @Inject - public AutoscaleClientImpl(@Named(ManagementConfiguration.SUBSCRIPTION_CLOUD_CREDENTIALS) SubscriptionCloudCredentials credentials) throws java.net.URISyntaxException + public AutoscaleClientImpl(HttpClientBuilder httpBuilder, ExecutorService executorService, @Named(ManagementConfiguration.SUBSCRIPTION_CLOUD_CREDENTIALS) SubscriptionCloudCredentials credentials) throws java.net.URISyntaxException { - this(); + this(httpBuilder, executorService); if (credentials == null) { throw new NullPointerException("credentials"); } this.credentials = credentials; this.baseUri = new URI("https://management.core.windows.net"); - - httpClient = credentials.initializeClient(); + } + + /** + * + * @param httpBuilder The HTTP client builder. + * @param executorService The executor service. + */ + protected AutoscaleClientImpl newInstance(HttpClientBuilder httpBuilder, ExecutorService executorService) + { + return new AutoscaleClientImpl(httpBuilder, executorService, this.getCredentials(), this.getBaseUri()); } } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/AutoscaleService.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/AutoscaleService.java index fe5d8e86d921d..a5a30611aabf5 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/AutoscaleService.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/AutoscaleService.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.monitoring.autoscale; -import com.microsoft.windowsazure.services.core.Configuration; +import com.microsoft.windowsazure.Configuration; /** * diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/Exports.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/Exports.java index a2dbaa1efe788..d65b8e2c8322c 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/Exports.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/Exports.java @@ -15,7 +15,7 @@ package com.microsoft.windowsazure.management.monitoring.autoscale; -import com.microsoft.windowsazure.services.core.Builder; +import com.microsoft.windowsazure.core.Builder; /** * The Class Exports. diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/SettingOperations.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/SettingOperations.java index cfed7677bc751..06a69937f9ae3 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/SettingOperations.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/SettingOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,10 +23,10 @@ package com.microsoft.windowsazure.management.monitoring.autoscale; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.monitoring.autoscale.models.AutoscaleSettingCreateOrUpdateParameters; import com.microsoft.windowsazure.management.monitoring.autoscale.models.AutoscaleSettingGetResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.text.ParseException; @@ -37,6 +39,8 @@ public interface SettingOperations { /** * + * @param resourceId The resource ID. + * @param parameters Parameters supplied to the operation. * @return A standard service response including an HTTP status code and * request ID. */ @@ -44,6 +48,8 @@ public interface SettingOperations /** * + * @param resourceId The resource ID. + * @param parameters Parameters supplied to the operation. * @return A standard service response including an HTTP status code and * request ID. */ @@ -51,6 +57,7 @@ public interface SettingOperations /** * + * @param resourceId The resource ID. * @return A standard service response including an HTTP status code and * request ID. */ @@ -58,6 +65,7 @@ public interface SettingOperations /** * + * @param resourceId The resource ID. * @return A standard service response including an HTTP status code and * request ID. */ @@ -65,6 +73,7 @@ public interface SettingOperations /** * + * @param resourceId The resource ID. * @return A standard service response including an HTTP status code and * request ID. */ @@ -72,6 +81,7 @@ public interface SettingOperations /** * + * @param resourceId The resource ID. * @return A standard service response including an HTTP status code and * request ID. */ diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/SettingOperationsImpl.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/SettingOperationsImpl.java index dba8973595184..3535b7f7a2f99 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/SettingOperationsImpl.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/SettingOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,11 @@ package com.microsoft.windowsazure.management.monitoring.autoscale; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.TimeSpan8601Converter; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.monitoring.autoscale.models.AutoscaleProfile; import com.microsoft.windowsazure.management.monitoring.autoscale.models.AutoscaleSetting; import com.microsoft.windowsazure.management.monitoring.autoscale.models.AutoscaleSettingCreateOrUpdateParameters; @@ -39,9 +45,7 @@ import com.microsoft.windowsazure.management.monitoring.autoscale.models.ScaleType; import com.microsoft.windowsazure.management.monitoring.autoscale.models.TimeAggregationType; import com.microsoft.windowsazure.management.monitoring.autoscale.models.TimeWindow; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.utils.pipeline.CustomHttpDelete; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -49,9 +53,11 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.HashMap; import java.util.TimeZone; import java.util.concurrent.Callable; import java.util.concurrent.Future; +import javax.xml.datatype.Duration; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPut; @@ -86,6 +92,8 @@ public class SettingOperationsImpl implements ServiceOperations tracingParameters = new HashMap(); + tracingParameters.put("resourceId", resourceId); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createOrUpdateAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/monitoring/autoscalesettings?resourceId=" + resourceId; @@ -130,7 +150,7 @@ public OperationResponse createOrUpdate(String resourceId, AutoscaleSettingCreat // Set Headers httpRequest.setHeader("Accept", "application/json"); httpRequest.setHeader("Content-Type", "application/json"); - httpRequest.setHeader("x-ms-version", "2013-03-01"); + httpRequest.setHeader("x-ms-version", "2013-10-01"); // Serialize Request String requestContent = null; @@ -189,32 +209,26 @@ public OperationResponse createOrUpdate(String resourceId, AutoscaleSettingCreat ObjectNode metricTriggerValue = objectMapper.createObjectNode(); scaleRuleValue.put("MetricTrigger", metricTriggerValue); - if (rulesItem.getMetricTrigger().getName() != null) + if (rulesItem.getMetricTrigger().getMetricName() != null) { - metricTriggerValue.put("Name", rulesItem.getMetricTrigger().getName()); + metricTriggerValue.put("MetricName", rulesItem.getMetricTrigger().getMetricName()); } - if (rulesItem.getMetricTrigger().getNamespace() != null) + if (rulesItem.getMetricTrigger().getMetricNamespace() != null) { - metricTriggerValue.put("Namespace", rulesItem.getMetricTrigger().getNamespace()); + metricTriggerValue.put("MetricNamespace", rulesItem.getMetricTrigger().getMetricNamespace()); } - if (rulesItem.getMetricTrigger().getResource() != null) + if (rulesItem.getMetricTrigger().getMetricSource() != null) { - metricTriggerValue.put("Resource", rulesItem.getMetricTrigger().getResource()); + metricTriggerValue.put("MetricSource", rulesItem.getMetricTrigger().getMetricSource()); } - if (rulesItem.getMetricTrigger().getTimeGrain() != null) - { - metricTriggerValue.put("TimeGrain", rulesItem.getMetricTrigger().getTimeGrain()); - } + metricTriggerValue.put("TimeGrain", TimeSpan8601Converter.format(rulesItem.getMetricTrigger().getTimeGrain())); metricTriggerValue.put("Statistic", rulesItem.getMetricTrigger().getStatistic().toString()); - if (rulesItem.getMetricTrigger().getTimeWindow() != null) - { - metricTriggerValue.put("TimeWindow", rulesItem.getMetricTrigger().getTimeWindow()); - } + metricTriggerValue.put("TimeWindow", TimeSpan8601Converter.format(rulesItem.getMetricTrigger().getTimeWindow())); metricTriggerValue.put("TimeAggregation", rulesItem.getMetricTrigger().getTimeAggregation().toString()); @@ -237,10 +251,7 @@ public OperationResponse createOrUpdate(String resourceId, AutoscaleSettingCreat scaleActionValue.put("Value", rulesItem.getScaleAction().getValue()); } - if (rulesItem.getScaleAction().getCooldown() != null) - { - scaleActionValue.put("Cooldown", rulesItem.getScaleAction().getCooldown()); - } + scaleActionValue.put("Cooldown", TimeSpan8601Converter.format(rulesItem.getScaleAction().getCooldown())); } } autoscaleProfileValue.put("Rules", rulesArray); @@ -317,16 +328,6 @@ public OperationResponse createOrUpdate(String resourceId, AutoscaleSettingCreat settingValue.put("Profiles", profilesArray); } - if (parameters.getSetting().getSubscriptionId() != null) - { - settingValue.put("SubscriptionId", parameters.getSetting().getSubscriptionId()); - } - - if (parameters.getSetting().getSource() != null) - { - settingValue.put("Source", parameters.getSetting().getSource()); - } - settingValue.put("Enabled", parameters.getSetting().getEnabled()); } @@ -340,11 +341,23 @@ public OperationResponse createOrUpdate(String resourceId, AutoscaleSettingCreat // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200 && statusCode != 201) { - ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + ServiceException ex = ServiceException.createFromJson(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -357,11 +370,16 @@ public OperationResponse createOrUpdate(String resourceId, AutoscaleSettingCreat result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** * + * @param resourceId The resource ID. * @return A standard service response including an HTTP status code and * request ID. */ @@ -379,6 +397,7 @@ public OperationResponse call() throws Exception /** * + * @param resourceId The resource ID. * @return A standard service response including an HTTP status code and * request ID. */ @@ -392,6 +411,15 @@ public OperationResponse delete(String resourceId) throws IOException, ServiceEx } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("resourceId", resourceId); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/monitoring/autoscalesettings?resourceId=" + resourceId; @@ -402,15 +430,27 @@ public OperationResponse delete(String resourceId) throws IOException, ServiceEx // Set Headers httpRequest.setHeader("Accept", "application/json"); httpRequest.setHeader("Content-Type", "application/json"); - httpRequest.setHeader("x-ms-version", "2013-03-01"); + httpRequest.setHeader("x-ms-version", "2013-10-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { - ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + ServiceException ex = ServiceException.createFromJson(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -423,11 +463,16 @@ public OperationResponse delete(String resourceId) throws IOException, ServiceEx result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** * + * @param resourceId The resource ID. * @return A standard service response including an HTTP status code and * request ID. */ @@ -445,6 +490,7 @@ public AutoscaleSettingGetResponse call() throws Exception /** * + * @param resourceId The resource ID. * @return A standard service response including an HTTP status code and * request ID. */ @@ -458,6 +504,15 @@ public AutoscaleSettingGetResponse get(String resourceId) throws IOException, Se } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("resourceId", resourceId); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/monitoring/autoscalesettings?resourceId=" + resourceId; @@ -468,15 +523,27 @@ public AutoscaleSettingGetResponse get(String resourceId) throws IOException, Se // Set Headers httpRequest.setHeader("Accept", "application/json"); httpRequest.setHeader("Content-Type", "application/json"); - httpRequest.setHeader("x-ms-version", "2013-03-01"); + httpRequest.setHeader("x-ms-version", "2013-10-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromJson(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -554,35 +621,35 @@ public AutoscaleSettingGetResponse get(String resourceId) throws IOException, Se MetricTrigger metricTriggerInstance = new MetricTrigger(); scaleRuleInstance.setMetricTrigger(metricTriggerInstance); - JsonNode nameValue2 = metricTriggerValue.get("Name"); - if (nameValue2 != null) + JsonNode metricNameValue = metricTriggerValue.get("MetricName"); + if (metricNameValue != null) { - String nameInstance2; - nameInstance2 = nameValue2.getTextValue(); - metricTriggerInstance.setName(nameInstance2); + String metricNameInstance; + metricNameInstance = metricNameValue.getTextValue(); + metricTriggerInstance.setMetricName(metricNameInstance); } - JsonNode namespaceValue = metricTriggerValue.get("Namespace"); - if (namespaceValue != null) + JsonNode metricNamespaceValue = metricTriggerValue.get("MetricNamespace"); + if (metricNamespaceValue != null) { - String namespaceInstance; - namespaceInstance = namespaceValue.getTextValue(); - metricTriggerInstance.setNamespace(namespaceInstance); + String metricNamespaceInstance; + metricNamespaceInstance = metricNamespaceValue.getTextValue(); + metricTriggerInstance.setMetricNamespace(metricNamespaceInstance); } - JsonNode resourceValue = metricTriggerValue.get("Resource"); - if (resourceValue != null) + JsonNode metricSourceValue = metricTriggerValue.get("MetricSource"); + if (metricSourceValue != null) { - String resourceInstance; - resourceInstance = resourceValue.getTextValue(); - metricTriggerInstance.setResource(resourceInstance); + String metricSourceInstance; + metricSourceInstance = metricSourceValue.getTextValue(); + metricTriggerInstance.setMetricSource(metricSourceInstance); } JsonNode timeGrainValue = metricTriggerValue.get("TimeGrain"); if (timeGrainValue != null) { - String timeGrainInstance; - timeGrainInstance = timeGrainValue.getTextValue(); + Duration timeGrainInstance; + timeGrainInstance = TimeSpan8601Converter.parse(timeGrainValue.getTextValue()); metricTriggerInstance.setTimeGrain(timeGrainInstance); } @@ -597,8 +664,8 @@ public AutoscaleSettingGetResponse get(String resourceId) throws IOException, Se JsonNode timeWindowValue = metricTriggerValue.get("TimeWindow"); if (timeWindowValue != null) { - String timeWindowInstance; - timeWindowInstance = timeWindowValue.getTextValue(); + Duration timeWindowInstance; + timeWindowInstance = TimeSpan8601Converter.parse(timeWindowValue.getTextValue()); metricTriggerInstance.setTimeWindow(timeWindowInstance); } @@ -660,8 +727,8 @@ public AutoscaleSettingGetResponse get(String resourceId) throws IOException, Se JsonNode cooldownValue = scaleActionValue.get("Cooldown"); if (cooldownValue != null) { - String cooldownInstance; - cooldownInstance = cooldownValue.getTextValue(); + Duration cooldownInstance; + cooldownInstance = TimeSpan8601Converter.parse(cooldownValue.getTextValue()); scaleActionInstance.setCooldown(cooldownInstance); } } @@ -764,22 +831,6 @@ public AutoscaleSettingGetResponse get(String resourceId) throws IOException, Se } } - JsonNode subscriptionIdValue = responseDoc.get("SubscriptionId"); - if (subscriptionIdValue != null) - { - String subscriptionIdInstance; - subscriptionIdInstance = subscriptionIdValue.getTextValue(); - settingInstance.setSubscriptionId(subscriptionIdInstance); - } - - JsonNode sourceValue = responseDoc.get("Source"); - if (sourceValue != null) - { - String sourceInstance; - sourceInstance = sourceValue.getTextValue(); - settingInstance.setSource(sourceInstance); - } - JsonNode enabledValue = responseDoc.get("Enabled"); if (enabledValue != null) { @@ -795,6 +846,10 @@ public AutoscaleSettingGetResponse get(String resourceId) throws IOException, Se result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/AutoscaleProfile.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/AutoscaleProfile.java index 6db0bed7d4ad6..dcfd95a442be5 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/AutoscaleProfile.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/AutoscaleProfile.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/AutoscaleSetting.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/AutoscaleSetting.java index a439ea76085cf..620b8ad1dda6c 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/AutoscaleSetting.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/AutoscaleSetting.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -40,18 +42,6 @@ public class AutoscaleSetting public void setProfiles(ArrayList profiles) { this.profiles = profiles; } - private String source; - - public String getSource() { return this.source; } - - public void setSource(String source) { this.source = source; } - - private String subscriptionId; - - public String getSubscriptionId() { return this.subscriptionId; } - - public void setSubscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; } - /** * Initializes a new instance of the AutoscaleSetting class. * diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/AutoscaleSettingCreateOrUpdateParameters.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/AutoscaleSettingCreateOrUpdateParameters.java index f995e5da10b95..6443d9e6fec3a 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/AutoscaleSettingCreateOrUpdateParameters.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/AutoscaleSettingCreateOrUpdateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/AutoscaleSettingGetResponse.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/AutoscaleSettingGetResponse.java index 4a67371bcabc8..8654d4e7d8fb9 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/AutoscaleSettingGetResponse.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/AutoscaleSettingGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.monitoring.autoscale.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * A standard service response including an HTTP status code and request ID. diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ComparisonOperationType.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ComparisonOperationType.java index 705a19b3a5eac..cbad6bec9cd4b 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ComparisonOperationType.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ComparisonOperationType.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/MetricStatisticType.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/MetricStatisticType.java index 76343960c807e..51cbeeea87f1d 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/MetricStatisticType.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/MetricStatisticType.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/MetricTrigger.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/MetricTrigger.java index a4eee0fc5f84c..f06cb31d44bdf 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/MetricTrigger.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/MetricTrigger.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,58 +23,60 @@ package com.microsoft.windowsazure.management.monitoring.autoscale.models; +import javax.xml.datatype.Duration; + /** * A rule that provides the triggers and parameters for the scaling action. */ public class MetricTrigger { - private String name; + private String metricName; /** - * The name of the trigger. + * The name of the metric. */ - public String getName() { return this.name; } + public String getMetricName() { return this.metricName; } /** - * The name of the trigger. + * The name of the metric. */ - public void setName(String name) { this.name = name; } + public void setMetricName(String metricName) { this.metricName = metricName; } - private String namespace; + private String metricNamespace; /** - * A namespace identifier for the service in which the deployment is running. + * The namespace of the metric. */ - public String getNamespace() { return this.namespace; } + public String getMetricNamespace() { return this.metricNamespace; } /** - * A namespace identifier for the service in which the deployment is running. + * The namespace of the metric. */ - public void setNamespace(String namespace) { this.namespace = namespace; } + public void setMetricNamespace(String metricNamespace) { this.metricNamespace = metricNamespace; } - private ComparisonOperationType operator; + private String metricSource; /** - * The operator that is used to evaluate the metric. + * The metric source. */ - public ComparisonOperationType getOperator() { return this.operator; } + public String getMetricSource() { return this.metricSource; } /** - * The operator that is used to evaluate the metric. + * The metric source. */ - public void setOperator(ComparisonOperationType operator) { this.operator = operator; } + public void setMetricSource(String metricSource) { this.metricSource = metricSource; } - private String resource; + private ComparisonOperationType operator; /** - * The resource path of the deployment. + * The operator that is used to evaluate the metric. */ - public String getResource() { return this.resource; } + public ComparisonOperationType getOperator() { return this.operator; } /** - * The resource path of the deployment. + * The operator that is used to evaluate the metric. */ - public void setResource(String resource) { this.resource = resource; } + public void setOperator(ComparisonOperationType operator) { this.operator = operator; } private MetricStatisticType statistic; @@ -110,29 +114,29 @@ public class MetricTrigger */ public void setTimeAggregation(TimeAggregationType timeAggregation) { this.timeAggregation = timeAggregation; } - private String timeGrain; + private Duration timeGrain; /** * The frequency of data collection. */ - public String getTimeGrain() { return this.timeGrain; } + public Duration getTimeGrain() { return this.timeGrain; } /** * The frequency of data collection. */ - public void setTimeGrain(String timeGrain) { this.timeGrain = timeGrain; } + public void setTimeGrain(Duration timeGrain) { this.timeGrain = timeGrain; } - private String timeWindow; + private Duration timeWindow; /** * The range of time in which instance data is collected. */ - public String getTimeWindow() { return this.timeWindow; } + public Duration getTimeWindow() { return this.timeWindow; } /** * The range of time in which instance data is collected. */ - public void setTimeWindow(String timeWindow) { this.timeWindow = timeWindow; } + public void setTimeWindow(Duration timeWindow) { this.timeWindow = timeWindow; } /** * Initializes a new instance of the MetricTrigger class. diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/Recurrence.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/Recurrence.java index 3da16b5c526e7..4f5232c5dd526 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/Recurrence.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/Recurrence.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/RecurrenceFrequency.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/RecurrenceFrequency.java index 2afa31a159e7d..644642eb758c1 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/RecurrenceFrequency.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/RecurrenceFrequency.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -24,7 +26,7 @@ public enum RecurrenceFrequency { /** - * No recurrence + * No recurrence. */ None, diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/RecurrentSchedule.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/RecurrentSchedule.java index 97b5576c97982..2ffe56923325a 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/RecurrentSchedule.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/RecurrentSchedule.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleAction.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleAction.java index 8e14372c15f5d..f71047ff4bd27 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleAction.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleAction.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,22 +23,24 @@ package com.microsoft.windowsazure.management.monitoring.autoscale.models; +import javax.xml.datatype.Duration; + /** * The action for scaling. */ public class ScaleAction { - private String cooldown; + private Duration cooldown; /** * The cooldown interval for scaling action. */ - public String getCooldown() { return this.cooldown; } + public Duration getCooldown() { return this.cooldown; } /** * The cooldown interval for scaling action. */ - public void setCooldown(String cooldown) { this.cooldown = cooldown; } + public void setCooldown(Duration cooldown) { this.cooldown = cooldown; } private ScaleDirection direction; diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleCapacity.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleCapacity.java index 4debe1f9f02c0..7483f2f0e98b7 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleCapacity.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleCapacity.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleDirection.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleDirection.java index 237dac5bcc4ac..1cd8489a5c3cd 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleDirection.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleDirection.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleRule.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleRule.java index 7aaf436c24826..6bbfdf1d670df 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleRule.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleRule.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleType.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleType.java index 77283f73349b7..e14c7c2be0e89 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleType.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/ScaleType.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/TimeAggregationType.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/TimeAggregationType.java index bc99bd9158fc6..33ec48dd3b2cc 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/TimeAggregationType.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/TimeAggregationType.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/TimeWindow.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/TimeWindow.java index 0d461c5e8df2a..eb38318759527 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/TimeWindow.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/autoscale/models/TimeWindow.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/Exports.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/Exports.java index a7299b0148bd1..af28388bf983f 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/Exports.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/Exports.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.monitoring.metrics; -import com.microsoft.windowsazure.services.core.Builder; +import com.microsoft.windowsazure.core.Builder; /** * The Class Exports. diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricDefinitionOperations.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricDefinitionOperations.java index 3fbc84b0ab9e4..8cf96025e649e 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricDefinitionOperations.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricDefinitionOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,8 +23,8 @@ package com.microsoft.windowsazure.management.monitoring.metrics; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.monitoring.metrics.models.MetricDefinitionListResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.net.URISyntaxException; import java.text.ParseException; @@ -35,9 +37,12 @@ public interface MetricDefinitionOperations * The List Metric Definitions operation lists the metric definitions for * the resource. * - * @param resourceId The id of the resource. + * @param resourceId The id of the resource.The resource id can be built + * using the resource id builder class under utilities * @param metricNames The names of the metrics. - * @param metricNamespace The namespace of the metrics. + * @param metricNamespace The namespace of the metrics.The value is either + * null or WindowsAzure.Availability.WindowsAzure.Availability returns the + * metric definitions for endpoint monitoring metrics * @return The List Metric Definitions operation response. */ MetricDefinitionListResponse list(String resourceId, ArrayList metricNames, String metricNamespace) throws IOException, ServiceException, URISyntaxException, ParseException; @@ -46,9 +51,12 @@ public interface MetricDefinitionOperations * The List Metric Definitions operation lists the metric definitions for * the resource. * - * @param resourceId The id of the resource. + * @param resourceId The id of the resource.The resource id can be built + * using the resource id builder class under utilities * @param metricNames The names of the metrics. - * @param metricNamespace The namespace of the metrics. + * @param metricNamespace The namespace of the metrics.The value is either + * null or WindowsAzure.Availability.WindowsAzure.Availability returns the + * metric definitions for endpoint monitoring metrics * @return The List Metric Definitions operation response. */ Future listAsync(String resourceId, ArrayList metricNames, String metricNamespace); diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricDefinitionOperationsImpl.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricDefinitionOperationsImpl.java index 0dcf1e580d1e0..8aaf7310354c9 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricDefinitionOperationsImpl.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricDefinitionOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,20 +23,22 @@ package com.microsoft.windowsazure.management.monitoring.metrics; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.TimeSpan8601Converter; +import com.microsoft.windowsazure.core.utils.CommaStringBuilder; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.monitoring.metrics.models.MetricAvailability; import com.microsoft.windowsazure.management.monitoring.metrics.models.MetricDefinition; import com.microsoft.windowsazure.management.monitoring.metrics.models.MetricDefinitionCollection; import com.microsoft.windowsazure.management.monitoring.metrics.models.MetricDefinitionListResponse; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.TimeSpan8601Converter; -import com.microsoft.windowsazure.services.core.utils.CommaStringBuilder; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.net.URISyntaxException; import java.net.URLEncoder; import java.text.ParseException; import java.util.ArrayList; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.Future; import javax.xml.datatype.Duration; @@ -68,9 +72,12 @@ public class MetricDefinitionOperationsImpl implements ServiceOperations me } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("resourceId", resourceId); + tracingParameters.put("metricNames", metricNames); + tracingParameters.put("metricNamespace", metricNamespace); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/monitoring/metricdefinitions/query?"; @@ -122,15 +143,27 @@ public MetricDefinitionListResponse list(String resourceId, ArrayList me // Set Headers httpRequest.setHeader("Accept", "application/json"); - httpRequest.setHeader("x-ms-version", "2012-08-01"); + httpRequest.setHeader("x-ms-version", "2013-10-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromJson(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -254,6 +287,10 @@ public MetricDefinitionListResponse list(String resourceId, ArrayList me result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricSettingOperations.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricSettingOperations.java index 3c7ae68d2b2eb..4b1c291852e4c 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricSettingOperations.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricSettingOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,10 +23,10 @@ package com.microsoft.windowsazure.management.monitoring.metrics; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.monitoring.metrics.models.MetricSettingListResponse; import com.microsoft.windowsazure.management.monitoring.metrics.models.MetricSettingsPutParameters; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricSettingOperationsImpl.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricSettingOperationsImpl.java index 2e1d0bdd754bf..6de92d7e8ed00 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricSettingOperationsImpl.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricSettingOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,9 @@ package com.microsoft.windowsazure.management.monitoring.metrics; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.monitoring.metrics.models.AvailabilityMetricSettingValue; import com.microsoft.windowsazure.management.monitoring.metrics.models.EndpointConfig; import com.microsoft.windowsazure.management.monitoring.metrics.models.MetricSetting; @@ -29,8 +33,7 @@ import com.microsoft.windowsazure.management.monitoring.metrics.models.MetricSettingListResponse; import com.microsoft.windowsazure.management.monitoring.metrics.models.MetricSettingsPutParameters; import com.microsoft.windowsazure.management.monitoring.metrics.models.NameConfig; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -39,6 +42,7 @@ import java.net.URISyntaxException; import java.net.URLEncoder; import java.text.ParseException; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.Future; import org.apache.http.HttpResponse; @@ -120,6 +124,15 @@ public OperationResponse createOrUpdate(MetricSettingsPutParameters parameters) } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createOrUpdateAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/monitoring/metricsettings"; @@ -130,7 +143,7 @@ public OperationResponse createOrUpdate(MetricSettingsPutParameters parameters) // Set Headers httpRequest.setHeader("Accept", "application/json"); httpRequest.setHeader("Content-Type", "application/json"); - httpRequest.setHeader("x-ms-version", "2012-08-01"); + httpRequest.setHeader("x-ms-version", "2013-10-01"); // Serialize Request String requestContent = null; @@ -175,48 +188,6 @@ public OperationResponse createOrUpdate(MetricSettingsPutParameters parameters) valueValue.put("AvailableLocations", availableLocationsArray); } - if (derived.getDefaultMetrics() != null) - { - ArrayNode defaultMetricsArray = objectMapper.createArrayNode(); - for (NameConfig defaultMetricsItem : derived.getDefaultMetrics()) - { - ObjectNode nameConfigValue2 = objectMapper.createObjectNode(); - defaultMetricsArray.add(nameConfigValue2); - - if (defaultMetricsItem.getName() != null) - { - nameConfigValue2.put("Name", defaultMetricsItem.getName()); - } - - if (defaultMetricsItem.getDisplayName() != null) - { - nameConfigValue2.put("DisplayName", defaultMetricsItem.getDisplayName()); - } - } - valueValue.put("DefaultMetrics", defaultMetricsArray); - } - - if (derived.getAvailabilityMetrics() != null) - { - ArrayNode availabilityMetricsArray = objectMapper.createArrayNode(); - for (NameConfig availabilityMetricsItem : derived.getAvailabilityMetrics()) - { - ObjectNode nameConfigValue3 = objectMapper.createObjectNode(); - availabilityMetricsArray.add(nameConfigValue3); - - if (availabilityMetricsItem.getName() != null) - { - nameConfigValue3.put("Name", availabilityMetricsItem.getName()); - } - - if (availabilityMetricsItem.getDisplayName() != null) - { - nameConfigValue3.put("DisplayName", availabilityMetricsItem.getDisplayName()); - } - } - valueValue.put("AvailabilityMetrics", availabilityMetricsArray); - } - if (derived.getEndpoints() != null) { ArrayNode endpointsArray = objectMapper.createArrayNode(); @@ -244,8 +215,6 @@ public OperationResponse createOrUpdate(MetricSettingsPutParameters parameters) { endpointConfigValue.put("Url", endpointsItem.getUrl().toString()); } - - endpointConfigValue.put("TestIntervalInSeconds", endpointsItem.getTestIntervalInSeconds()); } valueValue.put("Endpoints", endpointsArray); } @@ -260,11 +229,23 @@ public OperationResponse createOrUpdate(MetricSettingsPutParameters parameters) // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { - ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + ServiceException ex = ServiceException.createFromJson(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -277,6 +258,10 @@ public OperationResponse createOrUpdate(MetricSettingsPutParameters parameters) result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -322,6 +307,16 @@ public MetricSettingListResponse list(String resourceId, String metricNamespace) } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("resourceId", resourceId); + tracingParameters.put("metricNamespace", metricNamespace); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/monitoring/metricsettings?"; @@ -333,15 +328,27 @@ public MetricSettingListResponse list(String resourceId, String metricNamespace) // Set Headers httpRequest.setHeader("Accept", "application/json"); - httpRequest.setHeader("x-ms-version", "2012-08-01"); + httpRequest.setHeader("x-ms-version", "2013-10-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromJson(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -416,58 +423,6 @@ public MetricSettingListResponse list(String resourceId, String metricNamespace) } } - ArrayNode defaultMetricsArray = ((ArrayNode)valueValue2.get("DefaultMetrics")); - if (defaultMetricsArray != null) - { - for (JsonNode defaultMetricsValue : defaultMetricsArray) - { - NameConfig nameConfigInstance2 = new NameConfig(); - availabilityMetricSettingValueInstance.getDefaultMetrics().add(nameConfigInstance2); - - JsonNode nameValue2 = defaultMetricsValue.get("Name"); - if (nameValue2 != null) - { - String nameInstance2; - nameInstance2 = nameValue2.getTextValue(); - nameConfigInstance2.setName(nameInstance2); - } - - JsonNode displayNameValue2 = defaultMetricsValue.get("DisplayName"); - if (displayNameValue2 != null) - { - String displayNameInstance2; - displayNameInstance2 = displayNameValue2.getTextValue(); - nameConfigInstance2.setDisplayName(displayNameInstance2); - } - } - } - - ArrayNode availabilityMetricsArray = ((ArrayNode)valueValue2.get("AvailabilityMetrics")); - if (availabilityMetricsArray != null) - { - for (JsonNode availabilityMetricsValue : availabilityMetricsArray) - { - NameConfig nameConfigInstance3 = new NameConfig(); - availabilityMetricSettingValueInstance.getAvailabilityMetrics().add(nameConfigInstance3); - - JsonNode nameValue3 = availabilityMetricsValue.get("Name"); - if (nameValue3 != null) - { - String nameInstance3; - nameInstance3 = nameValue3.getTextValue(); - nameConfigInstance3.setName(nameInstance3); - } - - JsonNode displayNameValue3 = availabilityMetricsValue.get("DisplayName"); - if (displayNameValue3 != null) - { - String displayNameInstance3; - displayNameInstance3 = displayNameValue3.getTextValue(); - nameConfigInstance3.setDisplayName(displayNameInstance3); - } - } - } - ArrayNode endpointsArray = ((ArrayNode)valueValue2.get("Endpoints")); if (endpointsArray != null) { @@ -484,12 +439,12 @@ public MetricSettingListResponse list(String resourceId, String metricNamespace) endpointConfigInstance.setConfigId(configIdInstance); } - JsonNode nameValue4 = endpointsValue.get("Name"); - if (nameValue4 != null) + JsonNode nameValue2 = endpointsValue.get("Name"); + if (nameValue2 != null) { - String nameInstance4; - nameInstance4 = nameValue4.getTextValue(); - endpointConfigInstance.setName(nameInstance4); + String nameInstance2; + nameInstance2 = nameValue2.getTextValue(); + endpointConfigInstance.setName(nameInstance2); } JsonNode locationValue = endpointsValue.get("Location"); @@ -507,14 +462,6 @@ public MetricSettingListResponse list(String resourceId, String metricNamespace) urlInstance = new URI(urlValue.getTextValue()); endpointConfigInstance.setUrl(urlInstance); } - - JsonNode testIntervalInSecondsValue = endpointsValue.get("TestIntervalInSeconds"); - if (testIntervalInSecondsValue != null) - { - int testIntervalInSecondsInstance; - testIntervalInSecondsInstance = testIntervalInSecondsValue.getIntValue(); - endpointConfigInstance.setTestIntervalInSeconds(testIntervalInSecondsInstance); - } } } metricSettingInstance.setValue(availabilityMetricSettingValueInstance); @@ -530,6 +477,10 @@ public MetricSettingListResponse list(String resourceId, String metricNamespace) result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricValueOperations.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricValueOperations.java index cf340d7cfb7f1..39aafa089e3e6 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricValueOperations.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricValueOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,8 +23,8 @@ package com.microsoft.windowsazure.management.monitoring.metrics; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.monitoring.metrics.models.MetricValueListResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.net.URISyntaxException; import java.text.ParseException; diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricValueOperationsImpl.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricValueOperationsImpl.java index 6f3d574aeea33..31cffb5e97745 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricValueOperationsImpl.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricValueOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,14 +23,15 @@ package com.microsoft.windowsazure.management.monitoring.metrics; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.TimeSpan8601Converter; +import com.microsoft.windowsazure.core.utils.CommaStringBuilder; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.monitoring.metrics.models.MetricValue; import com.microsoft.windowsazure.management.monitoring.metrics.models.MetricValueListResponse; import com.microsoft.windowsazure.management.monitoring.metrics.models.MetricValueSet; import com.microsoft.windowsazure.management.monitoring.metrics.models.MetricValueSetCollection; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.TimeSpan8601Converter; -import com.microsoft.windowsazure.services.core.utils.CommaStringBuilder; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.net.URISyntaxException; @@ -37,6 +40,7 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; +import java.util.HashMap; import java.util.TimeZone; import java.util.concurrent.Callable; import java.util.concurrent.Future; @@ -121,6 +125,20 @@ public MetricValueListResponse list(String resourceId, ArrayList metricN } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("resourceId", resourceId); + tracingParameters.put("metricNames", metricNames); + tracingParameters.put("metricNamespace", metricNamespace); + tracingParameters.put("timeGrain", timeGrain); + tracingParameters.put("startTime", startTime); + tracingParameters.put("endTime", endTime); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mmZ"); @@ -143,15 +161,27 @@ public MetricValueListResponse list(String resourceId, ArrayList metricN // Set Headers httpRequest.setHeader("Accept", "application/json"); - httpRequest.setHeader("x-ms-version", "2012-08-01"); + httpRequest.setHeader("x-ms-version", "2013-10-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromJson(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -324,6 +354,10 @@ public MetricValueListResponse list(String resourceId, ArrayList metricN result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricsClient.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricsClient.java index 19babd4b96f2d..837820766da76 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricsClient.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricsClient.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,10 +23,11 @@ package com.microsoft.windowsazure.management.monitoring.metrics; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.core.FilterableService; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; import java.net.URI; -public interface MetricsClient +public interface MetricsClient extends FilterableService { /** * Optional base uri parameter. @@ -32,13 +35,13 @@ public interface MetricsClient URI getBaseUri(); /** - * Windows Azure subscription id + * Windows Azure subscription id. */ SubscriptionCloudCredentials getCredentials(); - MetricDefinitionOperations getMetricDefinitions(); + MetricDefinitionOperations getMetricDefinitionsOperations(); - MetricSettingOperations getMetricSettings(); + MetricSettingOperations getMetricSettingsOperations(); - MetricValueOperations getMetricValues(); + MetricValueOperations getMetricValuesOperations(); } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricsClientImpl.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricsClientImpl.java index 09359e238916d..9663b974887f2 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricsClientImpl.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricsClientImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,14 +23,16 @@ package com.microsoft.windowsazure.management.monitoring.metrics; +import com.microsoft.windowsazure.core.ServiceClient; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; import com.microsoft.windowsazure.management.ManagementConfiguration; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; -import com.microsoft.windowsazure.services.core.ServiceClient; import java.net.URI; +import java.util.concurrent.ExecutorService; import javax.inject.Inject; import javax.inject.Named; +import org.apache.http.impl.client.HttpClientBuilder; -public class MetricsClientImpl extends ServiceClient implements MetricsClient +public class MetricsClientImpl extends ServiceClient implements MetricsClient { private URI baseUri; @@ -40,29 +44,31 @@ public class MetricsClientImpl extends ServiceClient implemen private SubscriptionCloudCredentials credentials; /** - * Windows Azure subscription id + * Windows Azure subscription id. */ public SubscriptionCloudCredentials getCredentials() { return this.credentials; } private MetricDefinitionOperations metricDefinitions; - public MetricDefinitionOperations getMetricDefinitions() { return this.metricDefinitions; } + public MetricDefinitionOperations getMetricDefinitionsOperations() { return this.metricDefinitions; } private MetricSettingOperations metricSettings; - public MetricSettingOperations getMetricSettings() { return this.metricSettings; } + public MetricSettingOperations getMetricSettingsOperations() { return this.metricSettings; } private MetricValueOperations metricValues; - public MetricValueOperations getMetricValues() { return this.metricValues; } + public MetricValueOperations getMetricValuesOperations() { return this.metricValues; } /** * Initializes a new instance of the MetricsClientImpl class. * + * @param httpBuilder The HTTP client builder. + * @param executorService The executor service. */ - private MetricsClientImpl() + private MetricsClientImpl(HttpClientBuilder httpBuilder, ExecutorService executorService) { - super(); + super(httpBuilder, executorService); this.metricDefinitions = new MetricDefinitionOperationsImpl(this); this.metricSettings = new MetricSettingOperationsImpl(this); this.metricValues = new MetricValueOperationsImpl(this); @@ -71,12 +77,14 @@ private MetricsClientImpl() /** * Initializes a new instance of the MetricsClientImpl class. * - * @param credentials Windows Azure subscription id + * @param httpBuilder The HTTP client builder. + * @param executorService The executor service. + * @param credentials Windows Azure subscription id. * @param baseUri Optional base uri parameter. */ - public MetricsClientImpl(SubscriptionCloudCredentials credentials, URI baseUri) + public MetricsClientImpl(HttpClientBuilder httpBuilder, ExecutorService executorService, SubscriptionCloudCredentials credentials, URI baseUri) { - this(); + this(httpBuilder, executorService); if (credentials == null) { throw new NullPointerException("credentials"); @@ -87,26 +95,35 @@ public MetricsClientImpl(SubscriptionCloudCredentials credentials, URI baseUri) } this.credentials = credentials; this.baseUri = baseUri; - - httpClient = credentials.initializeClient(); } /** * Initializes a new instance of the MetricsClientImpl class. + * Initializes a new instance of the MetricsClientImpl class. * - * @param credentials Windows Azure subscription id + * @param httpBuilder The HTTP client builder. + * @param executorService The executor service. + * @param credentials Windows Azure subscription id. */ @Inject - public MetricsClientImpl(@Named(ManagementConfiguration.SUBSCRIPTION_CLOUD_CREDENTIALS) SubscriptionCloudCredentials credentials) throws java.net.URISyntaxException + public MetricsClientImpl(HttpClientBuilder httpBuilder, ExecutorService executorService, @Named(ManagementConfiguration.SUBSCRIPTION_CLOUD_CREDENTIALS) SubscriptionCloudCredentials credentials) throws java.net.URISyntaxException { - this(); + this(httpBuilder, executorService); if (credentials == null) { throw new NullPointerException("credentials"); } this.credentials = credentials; this.baseUri = new URI("https://management.core.windows.net"); - - httpClient = credentials.initializeClient(); + } + + /** + * + * @param httpBuilder The HTTP client builder. + * @param executorService The executor service. + */ + protected MetricsClientImpl newInstance(HttpClientBuilder httpBuilder, ExecutorService executorService) + { + return new MetricsClientImpl(httpBuilder, executorService, this.getCredentials(), this.getBaseUri()); } } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricsService.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricsService.java index 393d8d8387400..c7f19f37ee17c 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricsService.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/MetricsService.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.monitoring.metrics; -import com.microsoft.windowsazure.services.core.Configuration; +import com.microsoft.windowsazure.Configuration; /** * diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/AvailabilityMetricSettingValue.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/AvailabilityMetricSettingValue.java index 6e7b9dcabe283..34942b864d84e 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/AvailabilityMetricSettingValue.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/AvailabilityMetricSettingValue.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -24,55 +26,31 @@ import java.util.ArrayList; /** -* An availability metric setting response. +* The setting for Endpoint monitoring. */ public class AvailabilityMetricSettingValue extends MetricSettingValue { - private ArrayList availabilityMetrics; - - /** - * The metric settings availability metrics. - */ - public ArrayList getAvailabilityMetrics() { return this.availabilityMetrics; } - - /** - * The metric settings availability metrics. - */ - public void setAvailabilityMetrics(ArrayList availabilityMetrics) { this.availabilityMetrics = availabilityMetrics; } - private ArrayList availableLocations; /** - * The metric settings available locations. + * The locations from which the Urls can be monitored. */ public ArrayList getAvailableLocations() { return this.availableLocations; } /** - * The metric settings available locations. + * The locations from which the Urls can be monitored. */ public void setAvailableLocations(ArrayList availableLocations) { this.availableLocations = availableLocations; } - private ArrayList defaultMetrics; - - /** - * The metric settings default metrics. - */ - public ArrayList getDefaultMetrics() { return this.defaultMetrics; } - - /** - * The metric settings default metrics. - */ - public void setDefaultMetrics(ArrayList defaultMetrics) { this.defaultMetrics = defaultMetrics; } - private ArrayList endpoints; /** - * The metric settings endpoints. + * The configuration for Urls to be monitored using endpoint monitoiring. */ public ArrayList getEndpoints() { return this.endpoints; } /** - * The metric settings endpoints. + * The configuration for Urls to be monitored using endpoint monitoiring. */ public void setEndpoints(ArrayList endpoints) { this.endpoints = endpoints; } @@ -82,9 +60,7 @@ public class AvailabilityMetricSettingValue extends MetricSettingValue */ public AvailabilityMetricSettingValue() { - this.availabilityMetrics = new ArrayList(); this.availableLocations = new ArrayList(); - this.defaultMetrics = new ArrayList(); this.endpoints = new ArrayList(); } } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/EndpointConfig.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/EndpointConfig.java index da7c8f5d44181..ddbb5045e8997 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/EndpointConfig.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/EndpointConfig.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -24,67 +26,55 @@ import java.net.URI; /** -* An availability metric endpoint config. +* The configuration to enable endpoint monitoring for a Url. */ public class EndpointConfig { private String configId; /** - * Availability Metric endpoint config config id. + * The config id for endpoint monitoring config. */ public String getConfigId() { return this.configId; } /** - * Availability Metric endpoint config config id. + * The config id for endpoint monitoring config. */ public void setConfigId(String configId) { this.configId = configId; } private String location; /** - * Availability Metric endpoint config location. + * The location from which the endpoint is monitored. */ public String getLocation() { return this.location; } /** - * Availability Metric endpoint config location. + * The location from which the endpoint is monitored. */ public void setLocation(String location) { this.location = location; } private String name; /** - * Availability Metric endpoint config name. + * The friendly name for the url for which endpoint monitoring is configured. */ public String getName() { return this.name; } /** - * Availability Metric endpoint config name. + * The friendly name for the url for which endpoint monitoring is configured. */ public void setName(String name) { this.name = name; } - private int testIntervalInSeconds; - - /** - * Availability Metric endpoint config test interval in seconds. - */ - public int getTestIntervalInSeconds() { return this.testIntervalInSeconds; } - - /** - * Availability Metric endpoint config test interval in seconds. - */ - public void setTestIntervalInSeconds(int testIntervalInSeconds) { this.testIntervalInSeconds = testIntervalInSeconds; } - private URI url; /** - * Availability Metric endpoint config Url. + * The Url to be monitored. */ public URI getUrl() { return this.url; } /** - * Availability Metric endpoint config Url. + * The Url to be monitored. */ public void setUrl(URI url) { this.url = url; } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricAvailability.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricAvailability.java index 6cf76912389ba..3b10cc5b461bf 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricAvailability.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricAvailability.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -24,31 +26,32 @@ import javax.xml.datatype.Duration; /** -* A metric availability. +* Metric availability specifies the time grain (aggregation interval) and the +* retention period for that timegrain. */ public class MetricAvailability { private Duration retention; /** - * Metric definition is alertable. + * The retention period for the metric at the specified timegrain. */ public Duration getRetention() { return this.retention; } /** - * Metric definition is alertable. + * The retention period for the metric at the specified timegrain. */ public void setRetention(Duration retention) { this.retention = retention; } private Duration timeGrain; /** - * Metric availability time grain. + * The time grain specifies the aggregation interval for the metric. */ public Duration getTimeGrain() { return this.timeGrain; } /** - * Metric availability time grain. + * The time grain specifies the aggregation interval for the metric. */ public void setTimeGrain(Duration timeGrain) { this.timeGrain = timeGrain; } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricDefinition.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricDefinition.java index ce45383dfc2b3..489ecfd0947e9 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricDefinition.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricDefinition.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -25,115 +27,125 @@ import javax.xml.datatype.Duration; /** -* A metric definition. +* Metric definition class specifies the metadata for a metric. */ public class MetricDefinition { private String displayName; /** - * Metric definition display name. + * Metric display name. */ public String getDisplayName() { return this.displayName; } /** - * Metric definition display name. + * Metric display name. */ public void setDisplayName(String displayName) { this.displayName = displayName; } private boolean isAlertable; /** - * Metric definition is alertable. + * Specifies if the metric is alertable. Alerts can be defined on a metric + * only if this property is true. */ public boolean getIsAlertable() { return this.isAlertable; } /** - * Metric definition is alertable. + * Specifies if the metric is alertable. Alerts can be defined on a metric + * only if this property is true. */ public void setIsAlertable(boolean isAlertable) { this.isAlertable = isAlertable; } private ArrayList metricAvailabilities; /** - * Metric definition metric availabilities. + * Metric availability specifies the time grain (aggregation interval) and + * the retention period for the metric in a timegrain. */ public ArrayList getMetricAvailabilities() { return this.metricAvailabilities; } /** - * Metric definition metric availabilities. + * Metric availability specifies the time grain (aggregation interval) and + * the retention period for the metric in a timegrain. */ public void setMetricAvailabilities(ArrayList metricAvailabilities) { this.metricAvailabilities = metricAvailabilities; } private Duration minimumAlertableTimeWindow; /** - * Metric definition minimum alertable time window. + * Specifies the minimum alertable time window for the metric. */ public Duration getMinimumAlertableTimeWindow() { return this.minimumAlertableTimeWindow; } /** - * Metric definition minimum alertable time window. + * Specifies the minimum alertable time window for the metric. */ public void setMinimumAlertableTimeWindow(Duration minimumAlertableTimeWindow) { this.minimumAlertableTimeWindow = minimumAlertableTimeWindow; } private String name; /** - * Metric definition name. + * Get the metric name. */ public String getName() { return this.name; } /** - * Metric definition name. + * Get the metric name. */ public void setName(String name) { this.name = name; } private String namespace; /** - * Metric definition namespace. + * Get the metric namespace. */ public String getNamespace() { return this.namespace; } /** - * Metric definition namespace. + * Get the metric namespace. */ public void setNamespace(String namespace) { this.namespace = namespace; } private String primaryAggregation; /** - * Metric definition primary aggregation. + * Metric primary aggregation specifies the default type for the metrics. + * This indicates if the metric is of type average, total, minimum or + * maximum. */ public String getPrimaryAggregation() { return this.primaryAggregation; } /** - * Metric definition primary aggregation. + * Metric primary aggregation specifies the default type for the metrics. + * This indicates if the metric is of type average, total, minimum or + * maximum. */ public void setPrimaryAggregation(String primaryAggregation) { this.primaryAggregation = primaryAggregation; } private String resourceIdSuffix; /** - * Metric definition resource id suffix. + * Metric resource id suffix specfies the sub-resource path within the the + * resource for the metric. */ public String getResourceIdSuffix() { return this.resourceIdSuffix; } /** - * Metric definition resource id suffix. + * Metric resource id suffix specfies the sub-resource path within the the + * resource for the metric. */ public void setResourceIdSuffix(String resourceIdSuffix) { this.resourceIdSuffix = resourceIdSuffix; } private String unit; /** - * Metric definition unit. + * The unit for the metric. */ public String getUnit() { return this.unit; } /** - * Metric definition unit. + * The unit for the metric. */ public void setUnit(String unit) { this.unit = unit; } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricDefinitionCollection.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricDefinitionCollection.java index f5a82ad8659d2..3d47ff09e02c3 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricDefinitionCollection.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricDefinitionCollection.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -24,19 +26,19 @@ import java.util.ArrayList; /** -* An availability metric name config. +* Represents collection of metric definitions. */ public class MetricDefinitionCollection { private ArrayList value; /** - * The metric definitions. + * The values for the metric definitions. */ public ArrayList getValue() { return this.value; } /** - * The metric definitions. + * The values for the metric definitions. */ public void setValue(ArrayList value) { this.value = value; } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricDefinitionListResponse.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricDefinitionListResponse.java index 8088fa6778335..d45636da4e691 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricDefinitionListResponse.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricDefinitionListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.monitoring.metrics.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The List Metric Definitions operation response. diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSetting.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSetting.java index 64b682c332c43..6aaed1003d84d 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSetting.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSetting.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -29,36 +31,38 @@ public class MetricSetting private String namespace; /** - * Required. The metric settings namespace. + * The metric settings namespace. For endpoint monitoring metrics the + * namespace value is WindowsAzure.Availability */ public String getNamespace() { return this.namespace; } /** - * Required. The metric settings namespace. + * The metric settings namespace. For endpoint monitoring metrics the + * namespace value is WindowsAzure.Availability */ public void setNamespace(String namespace) { this.namespace = namespace; } private String resourceId; /** - * Required. The resource id. + * The resource id of the service. */ public String getResourceId() { return this.resourceId; } /** - * Required. The resource id. + * The resource id of the service. */ public void setResourceId(String resourceId) { this.resourceId = resourceId; } private MetricSettingValue value; /** - * Required. The metric settings value. + * The metric settings value. */ public MetricSettingValue getValue() { return this.value; } /** - * Required. The metric settings value. + * The metric settings value. */ public void setValue(MetricSettingValue value) { this.value = value; } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSettingCollection.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSettingCollection.java index 9b7753f67c2a2..b5727b9ace4b5 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSettingCollection.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSettingCollection.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSettingListResponse.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSettingListResponse.java index 26bbf0aeef483..3ea9233176d60 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSettingListResponse.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSettingListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.monitoring.metrics.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The list metric settings operation response. diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSettingValue.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSettingValue.java index 7549d2c821aa7..8ecde4c362d80 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSettingValue.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSettingValue.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSettingsPutParameters.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSettingsPutParameters.java index 1b92f9ef41871..c34b9eb2894cd 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSettingsPutParameters.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricSettingsPutParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricValue.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricValue.java index eab8c5bc75256..13c9be544ca57 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricValue.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricValue.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -24,91 +26,93 @@ import java.util.Calendar; /** -* A metric value. +* Represents a metric value. */ public class MetricValue { private String annotation; /** - * Metric annotation. + * Specifies annotation for the metric. */ public String getAnnotation() { return this.annotation; } /** - * Metric annotation. + * Specifies annotation for the metric. */ public void setAnnotation(String annotation) { this.annotation = annotation; } private Double average; /** - * Metric average. + * Specifies the average value in the time interval. */ public Double getAverage() { return this.average; } /** - * Metric average. + * Specifies the average value in the time interval. */ public void setAverage(Double average) { this.average = average; } private Integer count; /** - * Metric count. + * Specifies the sample count in the time interval. Can be used to determine + * the number of values that contributed to the average value. */ public Integer getCount() { return this.count; } /** - * Metric count. + * Specifies the sample count in the time interval. Can be used to determine + * the number of values that contributed to the average value. */ public void setCount(Integer count) { this.count = count; } private Double maximum; /** - * Metric maximum. + * Specifies the maximum value in the time interval. */ public Double getMaximum() { return this.maximum; } /** - * Metric maximum. + * Specifies the maximum value in the time interval. */ public void setMaximum(Double maximum) { this.maximum = maximum; } private Double minimum; /** - * Metric minimum. + * Specifies the minimum value in the time interval. */ public Double getMinimum() { return this.minimum; } /** - * Metric minimum. + * Specifies the minimum value in the time interval. */ public void setMinimum(Double minimum) { this.minimum = minimum; } private Calendar timestamp; /** - * Metric timestamp. + * The timestamp for the metric value. */ public Calendar getTimestamp() { return this.timestamp; } /** - * Metric timestamp. + * The timestamp for the metric value. */ public void setTimestamp(Calendar timestamp) { this.timestamp = timestamp; } private Double total; /** - * Metric total. + * Specifies the total value in the time interval. */ public Double getTotal() { return this.total; } /** - * Metric total. + * Specifies the total value in the time interval. */ public void setTotal(Double total) { this.total = total; } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricValueListResponse.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricValueListResponse.java index a6dbd3f608067..bab4abe58128a 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricValueListResponse.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricValueListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.monitoring.metrics.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The List Metric values operation response. diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricValueSet.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricValueSet.java index 903ba282a19f9..021b84faf7d1b 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricValueSet.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricValueSet.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -26,7 +28,7 @@ import javax.xml.datatype.Duration; /** -* A metric value set. +* A metric value set represents a set of metric values in a time period. */ public class MetricValueSet { @@ -45,12 +47,12 @@ public class MetricValueSet private Calendar endTime; /** - * Metric end time. + * The end time in UTC for the metric queried. */ public Calendar getEndTime() { return this.endTime; } /** - * Metric end time. + * The end time in UTC for the metric queried. */ public void setEndTime(Calendar endTime) { this.endTime = endTime; } @@ -105,24 +107,24 @@ public class MetricValueSet private Calendar startTime; /** - * Metric start time. + * The start time in UTC for the metric queried. */ public Calendar getStartTime() { return this.startTime; } /** - * Metric start time. + * The start time in UTC for the metric queried. */ public void setStartTime(Calendar startTime) { this.startTime = startTime; } private Duration timeGrain; /** - * Metric time grain. + * The time grain specifies the aggregation period of the metric value. */ public Duration getTimeGrain() { return this.timeGrain; } /** - * Metric time grain. + * The time grain specifies the aggregation period of the metric value. */ public void setTimeGrain(Duration timeGrain) { this.timeGrain = timeGrain; } diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricValueSetCollection.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricValueSetCollection.java index 220615cd321d0..9a4e83e70dab2 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricValueSetCollection.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/MetricValueSetCollection.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/NameConfig.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/NameConfig.java index a223028ead2e2..6d2405980484e 100644 --- a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/NameConfig.java +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/metrics/models/NameConfig.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/models/EndpointMonitoringLocation.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/models/EndpointMonitoringLocation.java new file mode 100644 index 0000000000000..93049d00fcb27 --- /dev/null +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/models/EndpointMonitoringLocation.java @@ -0,0 +1,70 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.management.monitoring.models; + +/** +* Endpoint monitoring location. +*/ +public class EndpointMonitoringLocation +{ + /** + * Location - Chicago, IL USA. + */ + public static final String USChicagoIL = "us-il-ch1-azr"; + + /** + * Location - San Antonio, TX USA. + */ + public static final String USSanAntonioTX = "us-tx-sn1-azr"; + + /** + * Location - San Jose, CA USA. + */ + public static final String USSanJoseCA = "us-ca-sjc-azr"; + + /** + * Location - Ashburn, VA USA. + */ + public static final String USAshburnVA = "us-va-ash-azr"; + + /** + * Location - Dublin, Ireland. + */ + public static final String IEDublin = "emea-gb-db3-azr"; + + /** + * Location - Amsterdam, Netherlands. + */ + public static final String NLAmsterdam = "emea-nl-ams-azr"; + + /** + * Location - Hongkong. + */ + public static final String HKHongkong = "apac-hk-hkn-azr"; + + /** + * Location - Singapore. + */ + public static final String SGSingapore = "apac-sg-sin-azr"; +} diff --git a/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/models/MetricNamespace.java b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/models/MetricNamespace.java new file mode 100644 index 0000000000000..4f5b3ed9ce976 --- /dev/null +++ b/management-monitoring/src/main/java/com/microsoft/windowsazure/management/monitoring/models/MetricNamespace.java @@ -0,0 +1,40 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.management.monitoring.models; + +/** +* Metric namespace value. +*/ +public class MetricNamespace +{ + /** + * Empty namespace. + */ + public static final String None = ""; + + /** + * Endpoint monitoring metric namespace. + */ + public static final String EndpointMonitoring = "WindowsAzure.Availability"; +} diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/Exports.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/Exports.java index cf730ea29f51e..498b12d4e613e 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/Exports.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/Exports.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.scheduler; -import com.microsoft.windowsazure.services.core.Builder; +import com.microsoft.windowsazure.core.Builder; /** * The Class Exports. diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/JobCollectionOperations.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/JobCollectionOperations.java index 45a6ef4fa8db9..6cdc04cf39ced 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/JobCollectionOperations.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/JobCollectionOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,8 @@ package com.microsoft.windowsazure.management.scheduler; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.scheduler.models.JobCollectionCheckNameAvailabilityResponse; import com.microsoft.windowsazure.management.scheduler.models.JobCollectionCreateParameters; import com.microsoft.windowsazure.management.scheduler.models.JobCollectionCreateResponse; @@ -29,7 +32,6 @@ import com.microsoft.windowsazure.management.scheduler.models.JobCollectionUpdateParameters; import com.microsoft.windowsazure.management.scheduler.models.JobCollectionUpdateResponse; import com.microsoft.windowsazure.management.scheduler.models.SchedulerOperationStatusResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.concurrent.ExecutionException; @@ -66,7 +68,7 @@ public interface JobCollectionOperations Future beginCreatingAsync(String cloudServiceName, String jobCollectionName, JobCollectionCreateParameters parameters); /** - * Deletes a job collection + * Deletes a job collection. * * @param cloudServiceName The name of the cloud service. * @param jobCollectionName The name of the job collection to delete. @@ -76,7 +78,7 @@ public interface JobCollectionOperations OperationResponse beginDeleting(String cloudServiceName, String jobCollectionName) throws IOException, ServiceException; /** - * Deletes a job collection + * Deletes a job collection. * * @param cloudServiceName The name of the cloud service. * @param jobCollectionName The name of the job collection to delete. @@ -151,7 +153,7 @@ public interface JobCollectionOperations * the failed request, and also includes error information regarding the * failure. */ - SchedulerOperationStatusResponse create(String cloudServiceName, String jobCollectionName, JobCollectionCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + SchedulerOperationStatusResponse create(String cloudServiceName, String jobCollectionName, JobCollectionCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * Create a job collection. @@ -174,7 +176,7 @@ public interface JobCollectionOperations Future createAsync(String cloudServiceName, String jobCollectionName, JobCollectionCreateParameters parameters); /** - * Deletes a job collection + * Deletes a job collection. * * @param cloudServiceName The name of the cloud service. * @param jobCollectionName The name of the job collection to delete. @@ -188,10 +190,10 @@ public interface JobCollectionOperations * the failed request, and also includes error information regarding the * failure. */ - SchedulerOperationStatusResponse delete(String cloudServiceName, String jobCollectionName) throws InterruptedException, ExecutionException, ServiceException; + SchedulerOperationStatusResponse delete(String cloudServiceName, String jobCollectionName) throws InterruptedException, ExecutionException, ServiceException, IOException; /** - * Deletes a job collection + * Deletes a job collection. * * @param cloudServiceName The name of the cloud service. * @param jobCollectionName The name of the job collection to delete. @@ -243,7 +245,7 @@ public interface JobCollectionOperations * the failed request, and also includes error information regarding the * failure. */ - SchedulerOperationStatusResponse update(String cloudServiceName, String jobCollectionName, JobCollectionUpdateParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + SchedulerOperationStatusResponse update(String cloudServiceName, String jobCollectionName, JobCollectionUpdateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * Update a job collection. diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/JobCollectionOperationsImpl.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/JobCollectionOperationsImpl.java index 1677eb41c90aa..f9d863fdf5418 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/JobCollectionOperationsImpl.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/JobCollectionOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,10 @@ package com.microsoft.windowsazure.management.scheduler; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.scheduler.models.JobCollectionCheckNameAvailabilityResponse; import com.microsoft.windowsazure.management.scheduler.models.JobCollectionCreateParameters; import com.microsoft.windowsazure.management.scheduler.models.JobCollectionCreateResponse; @@ -36,13 +41,13 @@ import com.microsoft.windowsazure.management.scheduler.models.JobCollectionUpdateResponse; import com.microsoft.windowsazure.management.scheduler.models.SchedulerOperationStatus; import com.microsoft.windowsazure.management.scheduler.models.SchedulerOperationStatusResponse; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.utils.pipeline.CustomHttpDelete; +import com.microsoft.windowsazure.tracing.ClientRequestTrackingHandler; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; import java.io.UnsupportedEncodingException; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; @@ -139,6 +144,17 @@ public JobCollectionCreateResponse beginCreating(String cloudServiceName, String } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("cloudServiceName", cloudServiceName); + tracingParameters.put("jobCollectionName", jobCollectionName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginCreatingAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/cloudservices/" + cloudServiceName + "/resources/" + "scheduler" + "/" + "JobCollections" + "/" + jobCollectionName; @@ -166,13 +182,6 @@ public JobCollectionCreateResponse beginCreating(String cloudServiceName, String resourceElement.appendChild(schemaVersionElement); } - if (parameters.getLabel() != null) - { - Element labelElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "Label"); - labelElement.appendChild(requestDoc.createTextNode(new String(Base64.encodeBase64(parameters.getLabel().getBytes())))); - resourceElement.appendChild(labelElement); - } - if (parameters.getIntrinsicSettings() != null) { Element intrinsicSettingsElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "IntrinsicSettings"); @@ -217,6 +226,13 @@ public JobCollectionCreateResponse beginCreating(String cloudServiceName, String } } + if (parameters.getLabel() != null) + { + Element labelElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "Label"); + labelElement.appendChild(requestDoc.createTextNode(new String(Base64.encodeBase64(parameters.getLabel().getBytes())))); + resourceElement.appendChild(labelElement); + } + DOMSource domSource = new DOMSource(requestDoc); StringWriter stringWriter = new StringWriter(); StreamResult streamResult = new StreamResult(stringWriter); @@ -230,11 +246,23 @@ public JobCollectionCreateResponse beginCreating(String cloudServiceName, String // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -251,11 +279,15 @@ public JobCollectionCreateResponse beginCreating(String cloudServiceName, String result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** - * Deletes a job collection + * Deletes a job collection. * * @param cloudServiceName The name of the cloud service. * @param jobCollectionName The name of the job collection to delete. @@ -275,7 +307,7 @@ public OperationResponse call() throws Exception } /** - * Deletes a job collection + * Deletes a job collection. * * @param cloudServiceName The name of the cloud service. * @param jobCollectionName The name of the job collection to delete. @@ -296,6 +328,16 @@ public OperationResponse beginDeleting(String cloudServiceName, String jobCollec } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("cloudServiceName", cloudServiceName); + tracingParameters.put("jobCollectionName", jobCollectionName); + CloudTracing.enter(invocationId, this, "beginDeletingAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/cloudservices/" + cloudServiceName + "/resources/" + "scheduler" + "/" + "JobCollections" + "/" + jobCollectionName; @@ -308,11 +350,23 @@ public OperationResponse beginDeleting(String cloudServiceName, String jobCollec // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -325,6 +379,10 @@ public OperationResponse beginDeleting(String cloudServiceName, String jobCollec result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -386,6 +444,17 @@ public JobCollectionUpdateResponse beginUpdating(String cloudServiceName, String } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("cloudServiceName", cloudServiceName); + tracingParameters.put("jobCollectionName", jobCollectionName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginUpdatingAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/cloudservices/" + cloudServiceName + "/resources/" + "scheduler" + "/" + "JobCollections" + "/" + jobCollectionName; @@ -414,12 +483,8 @@ public JobCollectionUpdateResponse beginUpdating(String cloudServiceName, String resourceElement.appendChild(schemaVersionElement); } - if (parameters.getLabel() != null) - { - Element labelElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "Label"); - labelElement.appendChild(requestDoc.createTextNode(new String(Base64.encodeBase64(parameters.getLabel().getBytes())))); - resourceElement.appendChild(labelElement); - } + Element eTagElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "ETag"); + resourceElement.appendChild(eTagElement); if (parameters.getIntrinsicSettings() != null) { @@ -465,6 +530,13 @@ public JobCollectionUpdateResponse beginUpdating(String cloudServiceName, String } } + if (parameters.getLabel() != null) + { + Element labelElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "Label"); + labelElement.appendChild(requestDoc.createTextNode(new String(Base64.encodeBase64(parameters.getLabel().getBytes())))); + resourceElement.appendChild(labelElement); + } + DOMSource domSource = new DOMSource(requestDoc); StringWriter stringWriter = new StringWriter(); StreamResult streamResult = new StreamResult(stringWriter); @@ -478,11 +550,23 @@ public JobCollectionUpdateResponse beginUpdating(String cloudServiceName, String // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -499,6 +583,10 @@ public JobCollectionUpdateResponse beginUpdating(String cloudServiceName, String result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -552,6 +640,16 @@ public JobCollectionCheckNameAvailabilityResponse checkNameAvailability(String c } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("cloudServiceName", cloudServiceName); + tracingParameters.put("jobCollectionName", jobCollectionName); + CloudTracing.enter(invocationId, this, "checkNameAvailabilityAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/cloudservices/" + cloudServiceName + "/resources/" + "scheduler" + "/" + "JobCollections" + "/?op=checknameavailability&resourceName=" + jobCollectionName; @@ -564,11 +662,23 @@ public JobCollectionCheckNameAvailabilityResponse checkNameAvailability(String c // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -601,6 +711,10 @@ public JobCollectionCheckNameAvailabilityResponse checkNameAvailability(String c result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -653,34 +767,68 @@ public SchedulerOperationStatusResponse call() throws Exception * failure. */ @Override - public SchedulerOperationStatusResponse create(String cloudServiceName, String jobCollectionName, JobCollectionCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public SchedulerOperationStatusResponse create(String cloudServiceName, String jobCollectionName, JobCollectionCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { SchedulerManagementClient client2 = this.getClient(); - - JobCollectionCreateResponse response = client2.getJobCollections().beginCreatingAsync(cloudServiceName, jobCollectionName, parameters).get(); - SchedulerOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 15; - while ((result.getStatus() != SchedulerOperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 10; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("cloudServiceName", cloudServiceName); + tracingParameters.put("jobCollectionName", jobCollectionName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); } - - if (result.getStatus() != SchedulerOperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + JobCollectionCreateResponse response = client2.getJobCollectionsOperations().beginCreatingAsync(cloudServiceName, jobCollectionName, parameters).get(); + SchedulerOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 15; + while ((result.getStatus() != SchedulerOperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 10; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != SchedulerOperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + result.setETag(response.getETag()); + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - result.setETag(response.getETag()); - return result; } /** - * Deletes a job collection + * Deletes a job collection. * * @param cloudServiceName The name of the cloud service. * @param jobCollectionName The name of the job collection to delete. @@ -707,7 +855,7 @@ public SchedulerOperationStatusResponse call() throws Exception } /** - * Deletes a job collection + * Deletes a job collection. * * @param cloudServiceName The name of the cloud service. * @param jobCollectionName The name of the job collection to delete. @@ -722,29 +870,62 @@ public SchedulerOperationStatusResponse call() throws Exception * failure. */ @Override - public SchedulerOperationStatusResponse delete(String cloudServiceName, String jobCollectionName) throws InterruptedException, ExecutionException, ServiceException + public SchedulerOperationStatusResponse delete(String cloudServiceName, String jobCollectionName) throws InterruptedException, ExecutionException, ServiceException, IOException { SchedulerManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getJobCollections().beginDeletingAsync(cloudServiceName, jobCollectionName).get(); - SchedulerOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 15; - while ((result.getStatus() != SchedulerOperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 10; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("cloudServiceName", cloudServiceName); + tracingParameters.put("jobCollectionName", jobCollectionName); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); } - - if (result.getStatus() != SchedulerOperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getJobCollectionsOperations().beginDeletingAsync(cloudServiceName, jobCollectionName).get(); + SchedulerOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 15; + while ((result.getStatus() != SchedulerOperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 10; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != SchedulerOperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -787,6 +968,16 @@ public JobCollectionGetResponse get(String cloudServiceName, String jobCollectio } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("cloudServiceName", cloudServiceName); + tracingParameters.put("jobCollectionName", jobCollectionName); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/cloudservices/" + cloudServiceName + "/resources/" + "scheduler" + "/~/" + "JobCollections" + "/" + jobCollectionName; @@ -799,11 +990,23 @@ public JobCollectionGetResponse get(String cloudServiceName, String jobCollectio // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -952,39 +1155,22 @@ public JobCollectionGetResponse get(String cloudServiceName, String jobCollectio result.setLabel(labelInstance); } - NodeList elements17 = resourceElement.getElementsByTagName("CloudServiceSettings"); - Element cloudServiceSettingsElement = elements17.getLength() > 0 ? ((Element)elements17.item(0)) : null; - if (cloudServiceSettingsElement != null) - { - JobCollectionGetResponse.CloudServiceSettingInfo cloudServiceSettingsInstance = new JobCollectionGetResponse.CloudServiceSettingInfo(); - result.setCloudServiceSettings(cloudServiceSettingsInstance); - - NodeList elements18 = cloudServiceSettingsElement.getElementsByTagName("GeoRegion"); - Element geoRegionElement = elements18.getLength() > 0 ? ((Element)elements18.item(0)) : null; - if (geoRegionElement != null) - { - String geoRegionInstance; - geoRegionInstance = geoRegionElement.getTextContent(); - cloudServiceSettingsInstance.setGeoRegion(geoRegionInstance); - } - } - - NodeList elements19 = resourceElement.getElementsByTagName("OperationStatus"); - Element operationStatusElement = elements19.getLength() > 0 ? ((Element)elements19.item(0)) : null; + NodeList elements17 = resourceElement.getElementsByTagName("OperationStatus"); + Element operationStatusElement = elements17.getLength() > 0 ? ((Element)elements17.item(0)) : null; if (operationStatusElement != null) { JobCollectionGetResponse.OperationStatus operationStatusInstance = new JobCollectionGetResponse.OperationStatus(); result.setLastOperationStatus(operationStatusInstance); - NodeList elements20 = operationStatusElement.getElementsByTagName("Error"); - Element errorElement = elements20.getLength() > 0 ? ((Element)elements20.item(0)) : null; + NodeList elements18 = operationStatusElement.getElementsByTagName("Error"); + Element errorElement = elements18.getLength() > 0 ? ((Element)elements18.item(0)) : null; if (errorElement != null) { JobCollectionGetResponse.OperationStatusResponseDetails errorInstance = new JobCollectionGetResponse.OperationStatusResponseDetails(); operationStatusInstance.setResponseDetails(errorInstance); - NodeList elements21 = errorElement.getElementsByTagName("HttpCode"); - Element httpCodeElement = elements21.getLength() > 0 ? ((Element)elements21.item(0)) : null; + NodeList elements19 = errorElement.getElementsByTagName("HttpCode"); + Element httpCodeElement = elements19.getLength() > 0 ? ((Element)elements19.item(0)) : null; if (httpCodeElement != null) { Integer httpCodeInstance; @@ -992,8 +1178,8 @@ public JobCollectionGetResponse get(String cloudServiceName, String jobCollectio errorInstance.setStatusCode(httpCodeInstance); } - NodeList elements22 = errorElement.getElementsByTagName("Message"); - Element messageElement = elements22.getLength() > 0 ? ((Element)elements22.item(0)) : null; + NodeList elements20 = errorElement.getElementsByTagName("Message"); + Element messageElement = elements20.getLength() > 0 ? ((Element)elements20.item(0)) : null; if (messageElement != null) { String messageInstance; @@ -1002,8 +1188,8 @@ public JobCollectionGetResponse get(String cloudServiceName, String jobCollectio } } - NodeList elements23 = operationStatusElement.getElementsByTagName("Result"); - Element resultElement = elements23.getLength() > 0 ? ((Element)elements23.item(0)) : null; + NodeList elements21 = operationStatusElement.getElementsByTagName("Result"); + Element resultElement = elements21.getLength() > 0 ? ((Element)elements21.item(0)) : null; if (resultElement != null) { SchedulerOperationStatus resultInstance; @@ -1019,6 +1205,10 @@ public JobCollectionGetResponse get(String cloudServiceName, String jobCollectio result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1071,29 +1261,63 @@ public SchedulerOperationStatusResponse call() throws Exception * failure. */ @Override - public SchedulerOperationStatusResponse update(String cloudServiceName, String jobCollectionName, JobCollectionUpdateParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public SchedulerOperationStatusResponse update(String cloudServiceName, String jobCollectionName, JobCollectionUpdateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { SchedulerManagementClient client2 = this.getClient(); - - JobCollectionUpdateResponse response = client2.getJobCollections().beginUpdatingAsync(cloudServiceName, jobCollectionName, parameters).get(); - SchedulerOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 15; - while ((result.getStatus() != SchedulerOperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 10; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("cloudServiceName", cloudServiceName); + tracingParameters.put("jobCollectionName", jobCollectionName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateAsync", tracingParameters); } - - if (result.getStatus() != SchedulerOperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + JobCollectionUpdateResponse response = client2.getJobCollectionsOperations().beginUpdatingAsync(cloudServiceName, jobCollectionName, parameters).get(); + SchedulerOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 15; + while ((result.getStatus() != SchedulerOperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 10; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != SchedulerOperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + result.setETag(response.getETag()); + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - result.setETag(response.getETag()); - return result; } } diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/SchedulerManagementClient.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/SchedulerManagementClient.java index 7011157e5e343..eaee71024b74c 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/SchedulerManagementClient.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/SchedulerManagementClient.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,24 +23,25 @@ package com.microsoft.windowsazure.management.scheduler; -import com.microsoft.windowsazure.management.OperationResponse; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.core.FilterableService; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.scheduler.models.ResourceProviderGetPropertiesResponse; import com.microsoft.windowsazure.management.scheduler.models.SchedulerOperationStatusResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.net.URI; import java.util.concurrent.Future; import javax.xml.parsers.ParserConfigurationException; import org.xml.sax.SAXException; -public interface SchedulerManagementClient +public interface SchedulerManagementClient extends FilterableService { URI getBaseUri(); SubscriptionCloudCredentials getCredentials(); - JobCollectionOperations getJobCollections(); + JobCollectionOperations getJobCollectionsOperations(); /** * The Get Operation Status operation returns the status of thespecified diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/SchedulerManagementClientImpl.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/SchedulerManagementClientImpl.java index 139097d91d483..b03e8785c00b8 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/SchedulerManagementClientImpl.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/SchedulerManagementClientImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,18 +23,21 @@ package com.microsoft.windowsazure.management.scheduler; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceClient; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.ManagementConfiguration; -import com.microsoft.windowsazure.management.OperationResponse; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; import com.microsoft.windowsazure.management.scheduler.models.ResourceProviderGetPropertiesResponse; import com.microsoft.windowsazure.management.scheduler.models.SchedulerOperationStatus; import com.microsoft.windowsazure.management.scheduler.models.SchedulerOperationStatusResponse; -import com.microsoft.windowsazure.services.core.ServiceClient; -import com.microsoft.windowsazure.services.core.ServiceException; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.net.URI; +import java.util.HashMap; import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import javax.inject.Inject; import javax.inject.Named; @@ -42,12 +47,13 @@ import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPut; +import org.apache.http.impl.client.HttpClientBuilder; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; -public class SchedulerManagementClientImpl extends ServiceClient implements SchedulerManagementClient +public class SchedulerManagementClientImpl extends ServiceClient implements SchedulerManagementClient { private URI baseUri; @@ -59,25 +65,29 @@ public class SchedulerManagementClientImpl extends ServiceClient tracingParameters = new HashMap(); + tracingParameters.put("requestId", requestId); + CloudTracing.enter(invocationId, this, "getOperationStatusAsync", tracingParameters); + } // Construct URL String url = this.getBaseUri() + this.getCredentials().getSubscriptionId() + "/operations/" + requestId; @@ -186,11 +214,23 @@ public SchedulerOperationStatusResponse getOperationStatus(String requestId) thr // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -267,6 +307,10 @@ public SchedulerOperationStatusResponse getOperationStatus(String requestId) thr result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -300,6 +344,14 @@ public ResourceProviderGetPropertiesResponse getResourceProviderProperties() thr // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "getResourceProviderPropertiesAsync", tracingParameters); + } // Construct URL String url = this.getBaseUri() + this.getCredentials().getSubscriptionId() + "/resourceproviders/" + "scheduler" + "/Properties?resourceType=" + "JobCollections"; @@ -312,11 +364,23 @@ public ResourceProviderGetPropertiesResponse getResourceProviderProperties() thr // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -350,6 +414,10 @@ public ResourceProviderGetPropertiesResponse getResourceProviderProperties() thr result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -383,6 +451,14 @@ public OperationResponse registerResourceProvider() throws IOException, ServiceE // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "registerResourceProviderAsync", tracingParameters); + } // Construct URL String url = this.getBaseUri() + this.getCredentials().getSubscriptionId() + "/services?service=" + "scheduler" + "." + "JobCollections" + "&action=register"; @@ -395,11 +471,23 @@ public OperationResponse registerResourceProvider() throws IOException, ServiceE // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -412,6 +500,10 @@ public OperationResponse registerResourceProvider() throws IOException, ServiceE result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -445,6 +537,14 @@ public OperationResponse unregisterResourceProvider() throws IOException, Servic // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "unregisterResourceProviderAsync", tracingParameters); + } // Construct URL String url = this.getBaseUri() + this.getCredentials().getSubscriptionId() + "/services?service=" + "scheduler" + "." + "JobCollections" + "&action=unregister"; @@ -457,11 +557,23 @@ public OperationResponse unregisterResourceProvider() throws IOException, Servic // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -474,6 +586,10 @@ public OperationResponse unregisterResourceProvider() throws IOException, Servic result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/SchedulerManagementService.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/SchedulerManagementService.java index 8261d33139a05..f664a535e9060 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/SchedulerManagementService.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/SchedulerManagementService.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.scheduler; -import com.microsoft.windowsazure.services.core.Configuration; +import com.microsoft.windowsazure.Configuration; /** * diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionCheckNameAvailabilityResponse.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionCheckNameAvailabilityResponse.java index 2bef3b441ec43..e73f92fb502e2 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionCheckNameAvailabilityResponse.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionCheckNameAvailabilityResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.scheduler.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Check Name Availability operation response. diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionCreateParameters.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionCreateParameters.java index 3cfd38daddb9f..082342d24b449 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionCreateParameters.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionCreateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionCreateResponse.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionCreateResponse.java index 85deb45af1e17..77fbfd4696b67 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionCreateResponse.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionCreateResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.scheduler.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Create Job Collection operation response. diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionGetResponse.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionGetResponse.java index ef784c3d946fe..2d241823376dc 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionGetResponse.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,25 +23,13 @@ package com.microsoft.windowsazure.management.scheduler.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Get Job Collection operation response. */ public class JobCollectionGetResponse extends OperationResponse { - private JobCollectionGetResponse.CloudServiceSettingInfo cloudServiceSettings; - - /** - * Settings for the Job Collection's containing Cloud Service. - */ - public JobCollectionGetResponse.CloudServiceSettingInfo getCloudServiceSettings() { return this.cloudServiceSettings; } - - /** - * Settings for the Job Collection's containing Cloud Service. - */ - public void setCloudServiceSettings(JobCollectionGetResponse.CloudServiceSettingInfo cloudServiceSettings) { this.cloudServiceSettings = cloudServiceSettings; } - private String eTag; /** @@ -160,32 +150,6 @@ public JobCollectionGetResponse() { } - /** - * Settings for the Job Collection's containing Cloud Service. - */ - public static class CloudServiceSettingInfo - { - private String geoRegion; - - /** - * GeoRegion of the cloud service. - */ - public String getGeoRegion() { return this.geoRegion; } - - /** - * GeoRegion of the cloud service. - */ - public void setGeoRegion(String geoRegion) { this.geoRegion = geoRegion; } - - /** - * Initializes a new instance of the CloudServiceSettingInfo class. - * - */ - public CloudServiceSettingInfo() - { - } - } - /** * Result of a previous operation. */ diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionIntrinsicSettings.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionIntrinsicSettings.java index 22a5e05b3c13e..d0f374768a10f 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionIntrinsicSettings.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionIntrinsicSettings.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionMaxRecurrence.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionMaxRecurrence.java index 45c929f94a22c..9841b7c9676b7 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionMaxRecurrence.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionMaxRecurrence.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionPlan.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionPlan.java index bd20787213f05..6b37d109f387e 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionPlan.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionPlan.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionQuota.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionQuota.java index 638bd55e354c4..34ba04db865d8 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionQuota.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionQuota.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionRecurrenceFrequency.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionRecurrenceFrequency.java index ff1554766986c..50e6031bc28e5 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionRecurrenceFrequency.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionRecurrenceFrequency.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionState.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionState.java index 62846c26ea589..49edf2cec28ae 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionState.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionState.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionUpdateParameters.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionUpdateParameters.java index eb1804ad4ab57..a0b4902716552 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionUpdateParameters.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionUpdateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionUpdateResponse.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionUpdateResponse.java index 209f6e7c40628..b818967544fed 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionUpdateResponse.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/JobCollectionUpdateResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.scheduler.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Update Job Collection operation response. diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/ResourceProviderGetPropertiesResponse.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/ResourceProviderGetPropertiesResponse.java index d12df6553e4a1..2ce65a09ab251 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/ResourceProviderGetPropertiesResponse.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/ResourceProviderGetPropertiesResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.scheduler.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.HashMap; /** diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/SchedulerOperationStatus.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/SchedulerOperationStatus.java index f1f7cd7864efc..e474191a0269b 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/SchedulerOperationStatus.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/SchedulerOperationStatus.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/SchedulerOperationStatusResponse.java b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/SchedulerOperationStatusResponse.java index 0930c391f60ea..7e02d945e1df0 100644 --- a/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/SchedulerOperationStatusResponse.java +++ b/management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/models/SchedulerOperationStatusResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.scheduler.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The response body contains the status of the specified asynchronous diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/Exports.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/Exports.java index c47fab899dced..1c8528156fe93 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/Exports.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/Exports.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.servicebus; -import com.microsoft.windowsazure.services.core.Builder; +import com.microsoft.windowsazure.core.Builder; /** * The Class Exports. diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/NamespaceOperations.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/NamespaceOperations.java index acf3f621d621f..ce6b810dc7398 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/NamespaceOperations.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/NamespaceOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,8 @@ package com.microsoft.windowsazure.management.servicebus; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.servicebus.models.CheckNamespaceAvailabilityResponse; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusAuthorizationRuleResponse; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusAuthorizationRulesResponse; @@ -29,7 +32,6 @@ import com.microsoft.windowsazure.management.servicebus.models.ServiceBusNamespaceResponse; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusNamespacesResponse; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusSharedAccessAuthorizationRule; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; @@ -168,7 +170,7 @@ public interface NamespaceOperations /** * The get authorization rule operation gets an authorization rule for a - * namespace by name + * namespace by name. * * @param namespaceName The namespace to get the authorization rule for. * @param entityName The entity name to get the authorization rule for. @@ -178,7 +180,7 @@ public interface NamespaceOperations /** * The get authorization rule operation gets an authorization rule for a - * namespace by name + * namespace by name. * * @param namespaceName The namespace to get the authorization rule for. * @param entityName The entity name to get the authorization rule for. @@ -213,7 +215,7 @@ public interface NamespaceOperations * http://msdn.microsoft.com/en-us/library/windowsazure/dn140232.asp for * more information) * - * @return The response to the request for a listing of namespaces + * @return The response to the request for a listing of namespaces. */ ServiceBusNamespacesResponse list() throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException, URISyntaxException; @@ -222,13 +224,13 @@ public interface NamespaceOperations * http://msdn.microsoft.com/en-us/library/windowsazure/dn140232.asp for * more information) * - * @return The response to the request for a listing of namespaces + * @return The response to the request for a listing of namespaces. */ Future listAsync(); /** * The get authorization rules operation gets the authorization rules for a - * namespace + * namespace. * * @param namespaceName The namespace to get the authorization rule for. * @return A response to a request for a list of authorization rules. @@ -237,7 +239,7 @@ public interface NamespaceOperations /** * The get authorization rules operation gets the authorization rules for a - * namespace + * namespace. * * @param namespaceName The namespace to get the authorization rule for. * @return A response to a request for a list of authorization rules. diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/NamespaceOperationsImpl.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/NamespaceOperationsImpl.java index 82c0eca5b4bee..4d4ad53ed0cb7 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/NamespaceOperationsImpl.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/NamespaceOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,10 @@ package com.microsoft.windowsazure.management.servicebus; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.servicebus.models.AccessRight; import com.microsoft.windowsazure.management.servicebus.models.CheckNamespaceAvailabilityResponse; import com.microsoft.windowsazure.management.servicebus.models.NamespaceDescription; @@ -32,9 +37,7 @@ import com.microsoft.windowsazure.management.servicebus.models.ServiceBusNamespaceResponse; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusNamespacesResponse; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusSharedAccessAuthorizationRule; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.utils.pipeline.CustomHttpDelete; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -44,6 +47,7 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.HashMap; import java.util.TimeZone; import java.util.concurrent.Callable; import java.util.concurrent.Future; @@ -128,6 +132,15 @@ public CheckNamespaceAvailabilityResponse checkAvailability(String namespaceName // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + CloudTracing.enter(invocationId, this, "checkAvailabilityAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/ServiceBus/CheckNamespaceAvailability?namespace=" + namespaceName; @@ -142,11 +155,23 @@ public CheckNamespaceAvailabilityResponse checkAvailability(String namespaceName // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -198,6 +223,10 @@ public CheckNamespaceAvailabilityResponse checkAvailability(String namespaceName result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -235,6 +264,16 @@ public ServiceBusNamespaceResponse create(String namespaceName, String region) t // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + tracingParameters.put("region", region); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName; @@ -285,11 +324,23 @@ public ServiceBusNamespaceResponse create(String namespaceName, String region) t // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -401,6 +452,10 @@ public ServiceBusNamespaceResponse create(String namespaceName, String region) t result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -442,6 +497,16 @@ public ServiceBusAuthorizationRuleResponse createAuthorizationRule(String namesp } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + tracingParameters.put("rule", rule); + CloudTracing.enter(invocationId, this, "createAuthorizationRuleAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/AuthorizationRules"; @@ -541,11 +606,23 @@ public ServiceBusAuthorizationRuleResponse createAuthorizationRule(String namesp // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 201) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -671,6 +748,10 @@ public ServiceBusAuthorizationRuleResponse createAuthorizationRule(String namesp result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -712,6 +793,15 @@ public OperationResponse delete(String namespaceName) throws IOException, Servic // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName; @@ -726,11 +816,23 @@ public OperationResponse delete(String namespaceName) throws IOException, Servic // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -743,6 +845,10 @@ public OperationResponse delete(String namespaceName) throws IOException, Servic result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -786,6 +892,16 @@ public OperationResponse deleteAuthorizationRule(String namespaceName, String ru } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + tracingParameters.put("ruleName", ruleName); + CloudTracing.enter(invocationId, this, "deleteAuthorizationRuleAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/AuthorizationRules/" + ruleName; @@ -798,11 +914,23 @@ public OperationResponse deleteAuthorizationRule(String namespaceName, String ru // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 204) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -815,6 +943,10 @@ public OperationResponse deleteAuthorizationRule(String namespaceName, String ru result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -850,6 +982,15 @@ public ServiceBusNamespaceResponse get(String namespaceName) throws IOException, // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName; @@ -864,11 +1005,23 @@ public ServiceBusNamespaceResponse get(String namespaceName) throws IOException, // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -980,12 +1133,16 @@ public ServiceBusNamespaceResponse get(String namespaceName) throws IOException, result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** * The get authorization rule operation gets an authorization rule for a - * namespace by name + * namespace by name. * * @param namespaceName The namespace to get the authorization rule for. * @param entityName The entity name to get the authorization rule for. @@ -1005,7 +1162,7 @@ public ServiceBusAuthorizationRuleResponse call() throws Exception /** * The get authorization rule operation gets an authorization rule for a - * namespace by name + * namespace by name. * * @param namespaceName The namespace to get the authorization rule for. * @param entityName The entity name to get the authorization rule for. @@ -1025,6 +1182,16 @@ public ServiceBusAuthorizationRuleResponse getAuthorizationRule(String namespace } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + tracingParameters.put("entityName", entityName); + CloudTracing.enter(invocationId, this, "getAuthorizationRuleAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/AuthorizationRules/" + entityName; @@ -1039,11 +1206,23 @@ public ServiceBusAuthorizationRuleResponse getAuthorizationRule(String namespace // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1169,6 +1348,10 @@ public ServiceBusAuthorizationRuleResponse getAuthorizationRule(String namespace result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1208,6 +1391,15 @@ public ServiceBusNamespaceDescriptionResponse getNamespaceDescription(String nam // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + CloudTracing.enter(invocationId, this, "getNamespaceDescriptionAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/ConnectionDetails"; @@ -1222,11 +1414,23 @@ public ServiceBusNamespaceDescriptionResponse getNamespaceDescription(String nam // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1317,6 +1521,10 @@ public ServiceBusNamespaceDescriptionResponse getNamespaceDescription(String nam result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1325,7 +1533,7 @@ public ServiceBusNamespaceDescriptionResponse getNamespaceDescription(String nam * http://msdn.microsoft.com/en-us/library/windowsazure/dn140232.asp for * more information) * - * @return The response to the request for a listing of namespaces + * @return The response to the request for a listing of namespaces. */ @Override public Future listAsync() @@ -1344,7 +1552,7 @@ public ServiceBusNamespacesResponse call() throws Exception * http://msdn.microsoft.com/en-us/library/windowsazure/dn140232.asp for * more information) * - * @return The response to the request for a listing of namespaces + * @return The response to the request for a listing of namespaces. */ @Override public ServiceBusNamespacesResponse list() throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException, URISyntaxException @@ -1352,6 +1560,14 @@ public ServiceBusNamespacesResponse list() throws IOException, ServiceException, // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/"; @@ -1366,11 +1582,23 @@ public ServiceBusNamespacesResponse list() throws IOException, ServiceException, // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1489,12 +1717,16 @@ public ServiceBusNamespacesResponse list() throws IOException, ServiceException, result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** * The get authorization rules operation gets the authorization rules for a - * namespace + * namespace. * * @param namespaceName The namespace to get the authorization rule for. * @return A response to a request for a list of authorization rules. @@ -1513,7 +1745,7 @@ public ServiceBusAuthorizationRulesResponse call() throws Exception /** * The get authorization rules operation gets the authorization rules for a - * namespace + * namespace. * * @param namespaceName The namespace to get the authorization rule for. * @return A response to a request for a list of authorization rules. @@ -1528,6 +1760,15 @@ public ServiceBusAuthorizationRulesResponse listAuthorizationRules(String namesp } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + CloudTracing.enter(invocationId, this, "listAuthorizationRulesAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/AuthorizationRules"; @@ -1542,11 +1783,23 @@ public ServiceBusAuthorizationRulesResponse listAuthorizationRules(String namesp // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1679,6 +1932,10 @@ public ServiceBusAuthorizationRulesResponse listAuthorizationRules(String namesp result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1712,6 +1969,16 @@ public ServiceBusAuthorizationRuleResponse updateAuthorizationRule(String namesp // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + tracingParameters.put("rule", rule); + CloudTracing.enter(invocationId, this, "updateAuthorizationRuleAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/AuthorizationRules/" + rule.getKeyName(); @@ -1815,11 +2082,23 @@ public ServiceBusAuthorizationRuleResponse updateAuthorizationRule(String namesp // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 201) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1945,6 +2224,10 @@ public ServiceBusAuthorizationRuleResponse updateAuthorizationRule(String namesp result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/NotificationHubOperations.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/NotificationHubOperations.java index dbeb84afe3aef..ff645058289e5 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/NotificationHubOperations.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/NotificationHubOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,10 +23,10 @@ package com.microsoft.windowsazure.management.servicebus; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusConnectionDetailsResponse; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusNotificationHubResponse; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusNotificationHubsResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.net.URISyntaxException; import java.text.ParseException; diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/NotificationHubOperationsImpl.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/NotificationHubOperationsImpl.java index 2935c3b504ff9..286bc06ea4f01 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/NotificationHubOperationsImpl.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/NotificationHubOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,6 +23,8 @@ package com.microsoft.windowsazure.management.servicebus; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.servicebus.models.AccessRight; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusConnectionDetail; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusConnectionDetailsResponse; @@ -28,14 +32,14 @@ import com.microsoft.windowsazure.management.servicebus.models.ServiceBusNotificationHubResponse; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusNotificationHubsResponse; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusSharedAccessAuthorizationRule; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.net.URISyntaxException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.Future; import javax.xml.parsers.DocumentBuilder; @@ -102,6 +106,16 @@ public ServiceBusNotificationHubResponse get(String namespaceName, String notifi // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + tracingParameters.put("notificationHubName", notificationHubName); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/NotificationHubs/" + notificationHubName; @@ -114,11 +128,23 @@ public ServiceBusNotificationHubResponse get(String namespaceName, String notifi // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -262,6 +288,10 @@ public ServiceBusNotificationHubResponse get(String namespaceName, String notifi result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -293,6 +323,16 @@ public ServiceBusConnectionDetailsResponse getConnectionDetails(String namespace // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + tracingParameters.put("notificationHubName", notificationHubName); + CloudTracing.enter(invocationId, this, "getConnectionDetailsAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/NotificationHubs/" + notificationHubName + "/ConnectionDetails"; @@ -305,11 +345,23 @@ public ServiceBusConnectionDetailsResponse getConnectionDetails(String namespace // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -391,6 +443,10 @@ public ServiceBusConnectionDetailsResponse getConnectionDetails(String namespace result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -424,6 +480,15 @@ public ServiceBusNotificationHubsResponse list(String namespaceName) throws IOEx // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/NotificationHubs"; @@ -436,11 +501,23 @@ public ServiceBusNotificationHubsResponse list(String namespaceName) throws IOEx // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -594,6 +671,10 @@ public ServiceBusNotificationHubsResponse list(String namespaceName) throws IOEx result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/QueueOperations.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/QueueOperations.java index bcae1267368b8..caba5c35f6a77 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/QueueOperations.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/QueueOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,11 +23,11 @@ package com.microsoft.windowsazure.management.servicebus; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusConnectionDetailsResponse; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusQueue; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusQueueResponse; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusQueuesResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/QueueOperationsImpl.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/QueueOperationsImpl.java index c2e3dfd17b935..fcad2b68cbcf7 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/QueueOperationsImpl.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/QueueOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,6 +23,8 @@ package com.microsoft.windowsazure.management.servicebus; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.servicebus.models.AccessRight; import com.microsoft.windowsazure.management.servicebus.models.CountDetails; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusConnectionDetail; @@ -29,8 +33,7 @@ import com.microsoft.windowsazure.management.servicebus.models.ServiceBusQueueResponse; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusQueuesResponse; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusSharedAccessAuthorizationRule; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -39,6 +42,7 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.HashMap; import java.util.TimeZone; import java.util.concurrent.Callable; import java.util.concurrent.Future; @@ -130,6 +134,16 @@ public ServiceBusQueueResponse create(String namespaceName, ServiceBusQueue queu } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + tracingParameters.put("queue", queue); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/queues/" + queue.getName() + "/"; @@ -371,11 +385,23 @@ public ServiceBusQueueResponse create(String namespaceName, ServiceBusQueue queu // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 201) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -743,6 +769,10 @@ public ServiceBusQueueResponse create(String namespaceName, ServiceBusQueue queu result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -784,6 +814,16 @@ public ServiceBusQueueResponse get(String namespaceName, String queueName) throw // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + tracingParameters.put("queueName", queueName); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/Queues/" + queueName; @@ -797,11 +837,23 @@ public ServiceBusQueueResponse get(String namespaceName, String queueName) throw // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1169,6 +1221,10 @@ public ServiceBusQueueResponse get(String namespaceName, String queueName) throw result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1200,6 +1256,16 @@ public ServiceBusConnectionDetailsResponse getConnectionDetails(String namespace // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + tracingParameters.put("queueName", queueName); + CloudTracing.enter(invocationId, this, "getConnectionDetailsAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/Queues/" + queueName + "/ConnectionDetails"; @@ -1213,11 +1279,23 @@ public ServiceBusConnectionDetailsResponse getConnectionDetails(String namespace // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1299,6 +1377,10 @@ public ServiceBusConnectionDetailsResponse getConnectionDetails(String namespace result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1340,6 +1422,15 @@ public ServiceBusQueuesResponse list(String namespaceName) throws IOException, S // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/Queues"; @@ -1353,11 +1444,23 @@ public ServiceBusQueuesResponse list(String namespaceName) throws IOException, S // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1735,6 +1838,10 @@ public ServiceBusQueuesResponse list(String namespaceName) throws IOException, S result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1772,6 +1879,16 @@ public ServiceBusQueueResponse update(String namespaceName, ServiceBusQueue queu // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + tracingParameters.put("queue", queue); + CloudTracing.enter(invocationId, this, "updateAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/queues/" + queue.getName() + "/"; @@ -2017,11 +2134,23 @@ public ServiceBusQueueResponse update(String namespaceName, ServiceBusQueue queu // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2389,6 +2518,10 @@ public ServiceBusQueueResponse update(String namespaceName, ServiceBusQueue queu result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/RelayOperations.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/RelayOperations.java index bbe01c42d5466..b271179726636 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/RelayOperations.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/RelayOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,8 +23,8 @@ package com.microsoft.windowsazure.management.servicebus; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusConnectionDetailsResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.util.concurrent.Future; import javax.xml.parsers.ParserConfigurationException; diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/RelayOperationsImpl.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/RelayOperationsImpl.java index 0d7f8d588b8ef..8da1278245f6c 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/RelayOperationsImpl.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/RelayOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,13 +23,15 @@ package com.microsoft.windowsazure.management.servicebus; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.servicebus.models.AccessRight; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusConnectionDetail; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusConnectionDetailsResponse; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.Future; import javax.xml.parsers.DocumentBuilder; @@ -92,6 +96,16 @@ public ServiceBusConnectionDetailsResponse getConnectionDetails(String namespace // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + tracingParameters.put("relayName", relayName); + CloudTracing.enter(invocationId, this, "getConnectionDetailsAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/Relays/" + relayName + "/ConnectionDetails"; @@ -105,11 +119,23 @@ public ServiceBusConnectionDetailsResponse getConnectionDetails(String namespace // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -191,6 +217,10 @@ public ServiceBusConnectionDetailsResponse getConnectionDetails(String namespace result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/ServiceBusManagementClient.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/ServiceBusManagementClient.java index c34d39f3759fa..861e167a221d0 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/ServiceBusManagementClient.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/ServiceBusManagementClient.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,10 +23,11 @@ package com.microsoft.windowsazure.management.servicebus; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.core.FilterableService; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusOperationStatusResponse; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusRegionsResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.net.URI; import java.util.concurrent.Future; @@ -37,7 +40,7 @@ * http://msdn.microsoft.com/en-us/library/windowsazure/hh780776.aspx for more * information) */ -public interface ServiceBusManagementClient +public interface ServiceBusManagementClient extends FilterableService { /** * The URI used as the base for all Service Bus requests. @@ -58,31 +61,31 @@ public interface ServiceBusManagementClient * The Service Bus Management API includes operations for managing Service * Bus namespaces. */ - NamespaceOperations getNamespaces(); + NamespaceOperations getNamespacesOperations(); /** * The Service Bus Management API includes operations for managing Service * Bus queues. */ - NotificationHubOperations getNotificationHubs(); + NotificationHubOperations getNotificationHubsOperations(); /** * The Service Bus Management API includes operations for managing Service * Bus queues. */ - QueueOperations getQueues(); + QueueOperations getQueuesOperations(); /** * The Service Bus Management API includes operations for managing Service * Bus relays. */ - RelayOperations getRelays(); + RelayOperations getRelaysOperations(); /** * The Service Bus Management API includes operations for managing Service * Bus topics for a namespace. */ - TopicOperations getTopics(); + TopicOperations getTopicsOperations(); /** * The Get Operation Status operation returns the status of thespecified diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/ServiceBusManagementClientImpl.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/ServiceBusManagementClientImpl.java index 6e7fa822f4958..539144dbfd189 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/ServiceBusManagementClientImpl.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/ServiceBusManagementClientImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,18 +23,21 @@ package com.microsoft.windowsazure.management.servicebus; +import com.microsoft.windowsazure.core.ServiceClient; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.ManagementConfiguration; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; import com.microsoft.windowsazure.management.servicebus.models.OperationStatus; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusLocation; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusOperationStatusResponse; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusRegionsResponse; -import com.microsoft.windowsazure.services.core.ServiceClient; -import com.microsoft.windowsazure.services.core.ServiceException; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.net.URI; +import java.util.HashMap; import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import javax.inject.Inject; import javax.inject.Named; @@ -41,6 +46,7 @@ import javax.xml.parsers.ParserConfigurationException; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.HttpClientBuilder; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -52,7 +58,7 @@ * http://msdn.microsoft.com/en-us/library/windowsazure/hh780776.aspx for more * information) */ -public class ServiceBusManagementClientImpl extends ServiceClient implements ServiceBusManagementClient +public class ServiceBusManagementClientImpl extends ServiceClient implements ServiceBusManagementClient { private URI baseUri; @@ -79,7 +85,7 @@ public class ServiceBusManagementClientImpl extends ServiceClient tracingParameters = new HashMap(); + tracingParameters.put("requestId", requestId); + CloudTracing.enter(invocationId, this, "getOperationStatusAsync", tracingParameters); + } // Construct URL String url = this.getBaseUri() + "/" + this.getCredentials().getSubscriptionId() + "/operations/" + requestId; @@ -255,11 +283,23 @@ public ServiceBusOperationStatusResponse getOperationStatus(String requestId) th // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -336,6 +376,10 @@ public ServiceBusOperationStatusResponse getOperationStatus(String requestId) th result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -373,6 +417,14 @@ public ServiceBusRegionsResponse getServiceBusRegions() throws IOException, Serv // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "getServiceBusRegionsAsync", tracingParameters); + } // Construct URL String url = this.getBaseUri() + "/" + this.getCredentials().getSubscriptionId() + "/services/servicebus/regions"; @@ -387,11 +439,23 @@ public ServiceBusRegionsResponse getServiceBusRegions() throws IOException, Serv // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -453,6 +517,10 @@ public ServiceBusRegionsResponse getServiceBusRegions() throws IOException, Serv result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/ServiceBusManagementService.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/ServiceBusManagementService.java index 396b4e1ae2e37..b61a6013efdb0 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/ServiceBusManagementService.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/ServiceBusManagementService.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.servicebus; -import com.microsoft.windowsazure.services.core.Configuration; +import com.microsoft.windowsazure.Configuration; /** * diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/TopicOperations.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/TopicOperations.java index ac2aa7cdc227d..0a84d89f25574 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/TopicOperations.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/TopicOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,11 +23,11 @@ package com.microsoft.windowsazure.management.servicebus; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusConnectionDetailsResponse; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusTopic; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusTopicResponse; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusTopicsResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/TopicOperationsImpl.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/TopicOperationsImpl.java index 8014cc51a551a..8c1b103ff9929 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/TopicOperationsImpl.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/TopicOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,6 +23,8 @@ package com.microsoft.windowsazure.management.servicebus; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.servicebus.models.AccessRight; import com.microsoft.windowsazure.management.servicebus.models.CountDetails; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusConnectionDetail; @@ -29,8 +33,7 @@ import com.microsoft.windowsazure.management.servicebus.models.ServiceBusTopic; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusTopicResponse; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusTopicsResponse; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -39,6 +42,7 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.HashMap; import java.util.TimeZone; import java.util.concurrent.Callable; import java.util.concurrent.Future; @@ -122,6 +126,16 @@ public ServiceBusTopicResponse create(String namespaceName, ServiceBusTopic topi // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + tracingParameters.put("topic", topic); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/topics/" + topic.getName() + "/"; @@ -351,11 +365,23 @@ public ServiceBusTopicResponse create(String namespaceName, ServiceBusTopic topi // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 201) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -651,6 +677,10 @@ public ServiceBusTopicResponse create(String namespaceName, ServiceBusTopic topi result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -692,6 +722,16 @@ public ServiceBusTopicResponse get(String namespaceName, String topicName) throw // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + tracingParameters.put("topicName", topicName); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/topics/" + topicName; @@ -705,11 +745,23 @@ public ServiceBusTopicResponse get(String namespaceName, String topicName) throw // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1005,6 +1057,10 @@ public ServiceBusTopicResponse get(String namespaceName, String topicName) throw result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1036,6 +1092,16 @@ public ServiceBusConnectionDetailsResponse getConnectionDetails(String namespace // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + tracingParameters.put("topicName", topicName); + CloudTracing.enter(invocationId, this, "getConnectionDetailsAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/Topics/" + topicName + "/ConnectionDetails"; @@ -1049,11 +1115,23 @@ public ServiceBusConnectionDetailsResponse getConnectionDetails(String namespace // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1135,6 +1213,10 @@ public ServiceBusConnectionDetailsResponse getConnectionDetails(String namespace result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1172,6 +1254,15 @@ public ServiceBusTopicsResponse list(String namespaceName) throws IOException, S // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/topics/"; @@ -1185,11 +1276,23 @@ public ServiceBusTopicsResponse list(String namespaceName) throws IOException, S // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1495,6 +1598,10 @@ public ServiceBusTopicsResponse list(String namespaceName) throws IOException, S result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1530,6 +1637,16 @@ public ServiceBusTopicResponse update(String namespaceName, ServiceBusTopic topi // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("namespaceName", namespaceName); + tracingParameters.put("topic", topic); + CloudTracing.enter(invocationId, this, "updateAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/servicebus/namespaces/" + namespaceName + "/topics/" + topic.getName() + "/"; @@ -1760,11 +1877,23 @@ public ServiceBusTopicResponse update(String namespaceName, ServiceBusTopic topi // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2060,6 +2189,10 @@ public ServiceBusTopicResponse update(String namespaceName, ServiceBusTopic topi result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/AccessRight.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/AccessRight.java index cc2a7156e15d4..610a35958d1a4 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/AccessRight.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/AccessRight.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/CheckNamespaceAvailabilityResponse.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/CheckNamespaceAvailabilityResponse.java index 0b3be259f428d..1aeae2f559984 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/CheckNamespaceAvailabilityResponse.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/CheckNamespaceAvailabilityResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.servicebus.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The response to a query for the availability status of a namespace name. diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/CountDetails.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/CountDetails.java index b1c11a0c02fb4..79c0b8bba221f 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/CountDetails.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/CountDetails.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/NamespaceDescription.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/NamespaceDescription.java index d1daf477d5603..061bbe559b157 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/NamespaceDescription.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/NamespaceDescription.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/OperationStatus.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/OperationStatus.java index 87fd769872c2e..4acf7aa1b4620 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/OperationStatus.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/OperationStatus.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusAuthorizationRuleResponse.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusAuthorizationRuleResponse.java index cfb89a925069d..8afca45cd262b 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusAuthorizationRuleResponse.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusAuthorizationRuleResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.servicebus.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * A response to a request for a particular authorization rule. diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusAuthorizationRulesResponse.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusAuthorizationRulesResponse.java index 9718ea3deb980..e05a4e8c9e5b8 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusAuthorizationRulesResponse.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusAuthorizationRulesResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.servicebus.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusConnectionDetail.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusConnectionDetail.java index 451a607a11b16..9602ce0fec66d 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusConnectionDetail.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusConnectionDetail.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusConnectionDetailsResponse.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusConnectionDetailsResponse.java index 451c55efb8b78..511b976ae43c4 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusConnectionDetailsResponse.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusConnectionDetailsResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.servicebus.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusLocation.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusLocation.java index d12d710ec8d7a..9dcbd005b0767 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusLocation.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusLocation.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNamespace.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNamespace.java index 2e4267d0340c9..40af17ba8d063 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNamespace.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNamespace.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNamespaceDescriptionResponse.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNamespaceDescriptionResponse.java index d6b957ebd4e48..1f0349d186db8 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNamespaceDescriptionResponse.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNamespaceDescriptionResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.servicebus.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNamespaceResponse.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNamespaceResponse.java index 7d2f165268b8d..de4a5663ff970 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNamespaceResponse.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNamespaceResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.servicebus.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The response to a request for a particular namespace. diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNamespacesResponse.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNamespacesResponse.java index e0b12cce4c755..6dba3080468c9 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNamespacesResponse.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNamespacesResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,12 +23,12 @@ package com.microsoft.windowsazure.management.servicebus.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; /** -* The response to the request for a listing of namespaces +* The response to the request for a listing of namespaces. */ public class ServiceBusNamespacesResponse extends OperationResponse implements Iterable { diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNotificationHub.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNotificationHub.java index 7632976e78a49..73e1b3ef0165e 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNotificationHub.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNotificationHub.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNotificationHubResponse.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNotificationHubResponse.java index 195f5f73a95a3..c933b3a682d93 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNotificationHubResponse.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNotificationHubResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.servicebus.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * A standard storage response including an HTTP status code and request ID. diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNotificationHubsResponse.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNotificationHubsResponse.java index 027a9f149b8f6..01facde054b9e 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNotificationHubsResponse.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusNotificationHubsResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.servicebus.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusOperationStatusResponse.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusOperationStatusResponse.java index 1af021698a5b6..bb63156d2c419 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusOperationStatusResponse.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusOperationStatusResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.servicebus.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The response body contains the status of the specified asynchronous diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusQueue.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusQueue.java index 0fd503a55a11f..e95571262eca5 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusQueue.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusQueue.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusQueueResponse.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusQueueResponse.java index 5a7255dec7fec..fbef24f1dd4ce 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusQueueResponse.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusQueueResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.servicebus.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * A response to a request for a particular queue. diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusQueuesResponse.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusQueuesResponse.java index c82c70abbc6b1..175f6ad4bfc56 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusQueuesResponse.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusQueuesResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.servicebus.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusRegionsResponse.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusRegionsResponse.java index e64f0730a2c22..707fabc9aaecf 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusRegionsResponse.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusRegionsResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.servicebus.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusSharedAccessAuthorizationRule.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusSharedAccessAuthorizationRule.java index 673d8127a36cc..a5925d47ecb99 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusSharedAccessAuthorizationRule.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusSharedAccessAuthorizationRule.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -32,72 +34,72 @@ public class ServiceBusSharedAccessAuthorizationRule private String claimType; /** - * The type of the claim + * The type of the claim. */ public String getClaimType() { return this.claimType; } /** - * The type of the claim + * The type of the claim. */ public void setClaimType(String claimType) { this.claimType = claimType; } private String claimValue; /** - * The value of the claim + * The value of the claim. */ public String getClaimValue() { return this.claimValue; } /** - * The value of the claim + * The value of the claim. */ public void setClaimValue(String claimValue) { this.claimValue = claimValue; } private Calendar createdTime; /** - * The time at which the authorization rule was created + * The time at which the authorization rule was created. */ public Calendar getCreatedTime() { return this.createdTime; } /** - * The time at which the authorization rule was created + * The time at which the authorization rule was created. */ public void setCreatedTime(Calendar createdTime) { this.createdTime = createdTime; } private String keyName; /** - * The name of the key that was used + * The name of the key that was used. */ public String getKeyName() { return this.keyName; } /** - * The name of the key that was used + * The name of the key that was used. */ public void setKeyName(String keyName) { this.keyName = keyName; } private Calendar modifiedTime; /** - * The most recent time the rule was updated + * The most recent time the rule was updated. */ public Calendar getModifiedTime() { return this.modifiedTime; } /** - * The most recent time the rule was updated + * The most recent time the rule was updated. */ public void setModifiedTime(Calendar modifiedTime) { this.modifiedTime = modifiedTime; } private String primaryKey; /** - * The primary key that was used + * The primary key that was used. */ public String getPrimaryKey() { return this.primaryKey; } /** - * The primary key that was used + * The primary key that was used. */ public void setPrimaryKey(String primaryKey) { this.primaryKey = primaryKey; } @@ -116,24 +118,24 @@ public class ServiceBusSharedAccessAuthorizationRule private ArrayList rights; /** - * The rights associated with the rule + * The rights associated with the rule. */ public ArrayList getRights() { return this.rights; } /** - * The rights associated with the rule + * The rights associated with the rule. */ public void setRights(ArrayList rights) { this.rights = rights; } private String secondaryKey; /** - * The secondary key that was used + * The secondary key that was used. */ public String getSecondaryKey() { return this.secondaryKey; } /** - * The secondary key that was used + * The secondary key that was used. */ public void setSecondaryKey(String secondaryKey) { this.secondaryKey = secondaryKey; } diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusTopic.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusTopic.java index 92e542c0a987a..2607f665d8b31 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusTopic.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusTopic.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusTopicResponse.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusTopicResponse.java index 7152997626597..7a9226c73d638 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusTopicResponse.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusTopicResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.servicebus.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * A response to a request for a particular topic. diff --git a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusTopicsResponse.java b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusTopicsResponse.java index e0feeec75c416..ec7ccaf5bf7b7 100644 --- a/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusTopicsResponse.java +++ b/management-serviceBus/src/main/java/com/microsoft/windowsazure/management/serviceBus/models/ServiceBusTopicsResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.servicebus.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DacOperations.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DacOperations.java index aca5e4bb38675..4dbfa12160c52 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DacOperations.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DacOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,11 +23,11 @@ package com.microsoft.windowsazure.management.sql; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.sql.models.DacExportParameters; import com.microsoft.windowsazure.management.sql.models.DacGetStatusResponse; import com.microsoft.windowsazure.management.sql.models.DacImportExportResponse; import com.microsoft.windowsazure.management.sql.models.DacImportParameters; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; @@ -37,66 +39,68 @@ import org.xml.sax.SAXException; /** -* The SQL DAC Management API includes operations for importing and exporting -* SQL Databases into and out of Windows Azure. +* Includes operations for importing and exporting SQL Databases into and out of +* Windows Azure blob storage. */ public interface DacOperations { /** + * Export DAC into Windows Azure blob storage. * - * @param serverName The name of the server being imported to or exported - * from + * @param serverName The name of the server being exported from. + * @param parameters Export parameters. * @return Response for an DAC Import/Export request. */ - DacImportExportResponse export(String serverName, DacExportParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException; + DacImportExportResponse exportDatabase(String serverName, DacExportParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException; /** + * Export DAC into Windows Azure blob storage. * - * @param serverName The name of the server being imported to or exported - * from + * @param serverName The name of the server being exported from. + * @param parameters Export parameters. * @return Response for an DAC Import/Export request. */ - Future exportAsync(String serverName, DacExportParameters parameters); + Future exportDatabaseAsync(String serverName, DacExportParameters parameters); /** + * Gets the status of the DAC. * - * @param serverName The name of the server being imported to or exported - * from - * @param fullyQualifiedServerName The fully qualified name of the server - * being imported to or exported from - * @param username The server's username - * @param password The server's password - * @param requestId The request ID of the operation being queried - * @return The response structure for the DAC GetStatus operation + * @param serverName The name of the server. + * @param fullyQualifiedServerName The fully qualified name of the server. + * @param username The server's username. + * @param password The server's password. + * @param requestId The request ID of the operation being queried. + * @return The response structure for the DAC GetStatus operation. */ DacGetStatusResponse getStatus(String serverName, String fullyQualifiedServerName, String username, String password, String requestId) throws IOException, ServiceException, ParserConfigurationException, SAXException, URISyntaxException, ParseException; /** + * Gets the status of the DAC. * - * @param serverName The name of the server being imported to or exported - * from - * @param fullyQualifiedServerName The fully qualified name of the server - * being imported to or exported from - * @param username The server's username - * @param password The server's password - * @param requestId The request ID of the operation being queried - * @return The response structure for the DAC GetStatus operation + * @param serverName The name of the server. + * @param fullyQualifiedServerName The fully qualified name of the server. + * @param username The server's username. + * @param password The server's password. + * @param requestId The request ID of the operation being queried. + * @return The response structure for the DAC GetStatus operation. */ Future getStatusAsync(String serverName, String fullyQualifiedServerName, String username, String password, String requestId); /** + * Import DAC from Windows Azure blob storage. * - * @param serverName The name of the server being imported to or exported - * from + * @param serverName The name of the server being imported to. + * @param parameters Import parameters. * @return Response for an DAC Import/Export request. */ - DacImportExportResponse importResource(String serverName, DacImportParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException; + DacImportExportResponse importDatabase(String serverName, DacImportParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException; /** + * Import DAC from Windows Azure blob storage. * - * @param serverName The name of the server being imported to or exported - * from + * @param serverName The name of the server being imported to. + * @param parameters Import parameters. * @return Response for an DAC Import/Export request. */ - Future importResourceAsync(String serverName, DacImportParameters parameters); + Future importDatabaseAsync(String serverName, DacImportParameters parameters); } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DacOperationsImpl.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DacOperationsImpl.java index 81aed85b9f808..d28170754c369 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DacOperationsImpl.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DacOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,12 +23,13 @@ package com.microsoft.windowsazure.management.sql; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.sql.models.DacExportParameters; import com.microsoft.windowsazure.management.sql.models.DacGetStatusResponse; import com.microsoft.windowsazure.management.sql.models.DacImportExportResponse; import com.microsoft.windowsazure.management.sql.models.DacImportParameters; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -36,6 +39,7 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.Future; import javax.xml.parsers.DocumentBuilder; @@ -57,8 +61,8 @@ import org.xml.sax.SAXException; /** -* The SQL DAC Management API includes operations for importing and exporting -* SQL Databases into and out of Windows Azure. +* Includes operations for importing and exporting SQL Databases into and out of +* Windows Azure blob storage. */ public class DacOperationsImpl implements ServiceOperations, DacOperations { @@ -81,31 +85,33 @@ public class DacOperationsImpl implements ServiceOperations exportAsync(final String serverName, final DacExportParameters parameters) + public Future exportDatabaseAsync(final String serverName, final DacExportParameters parameters) { return this.getClient().getExecutorService().submit(new Callable() { @Override public DacImportExportResponse call() throws Exception { - return export(serverName, parameters); + return exportDatabase(serverName, parameters); } }); } /** + * Export DAC into Windows Azure blob storage. * - * @param serverName The name of the server being imported to or exported - * from + * @param serverName The name of the server being exported from. + * @param parameters Export parameters. * @return Response for an DAC Import/Export request. */ @Override - public DacImportExportResponse export(String serverName, DacExportParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException + public DacImportExportResponse exportDatabase(String serverName, DacExportParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException { // Validate if (serverName == null) @@ -147,6 +153,16 @@ public DacImportExportResponse export(String serverName, DacExportParameters par } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "exportDatabaseAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/DacOperations/Export"; @@ -221,11 +237,23 @@ public DacImportExportResponse export(String serverName, DacExportParameters par // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -251,19 +279,22 @@ public DacImportExportResponse export(String serverName, DacExportParameters par result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** + * Gets the status of the DAC. * - * @param serverName The name of the server being imported to or exported - * from - * @param fullyQualifiedServerName The fully qualified name of the server - * being imported to or exported from - * @param username The server's username - * @param password The server's password - * @param requestId The request ID of the operation being queried - * @return The response structure for the DAC GetStatus operation + * @param serverName The name of the server. + * @param fullyQualifiedServerName The fully qualified name of the server. + * @param username The server's username. + * @param password The server's password. + * @param requestId The request ID of the operation being queried. + * @return The response structure for the DAC GetStatus operation. */ @Override public Future getStatusAsync(final String serverName, final String fullyQualifiedServerName, final String username, final String password, final String requestId) @@ -278,15 +309,14 @@ public DacGetStatusResponse call() throws Exception } /** + * Gets the status of the DAC. * - * @param serverName The name of the server being imported to or exported - * from - * @param fullyQualifiedServerName The fully qualified name of the server - * being imported to or exported from - * @param username The server's username - * @param password The server's password - * @param requestId The request ID of the operation being queried - * @return The response structure for the DAC GetStatus operation + * @param serverName The name of the server. + * @param fullyQualifiedServerName The fully qualified name of the server. + * @param username The server's username. + * @param password The server's password. + * @param requestId The request ID of the operation being queried. + * @return The response structure for the DAC GetStatus operation. */ @Override public DacGetStatusResponse getStatus(String serverName, String fullyQualifiedServerName, String username, String password, String requestId) throws IOException, ServiceException, ParserConfigurationException, SAXException, URISyntaxException, ParseException @@ -314,6 +344,19 @@ public DacGetStatusResponse getStatus(String serverName, String fullyQualifiedSe } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + tracingParameters.put("fullyQualifiedServerName", fullyQualifiedServerName); + tracingParameters.put("username", username); + tracingParameters.put("password", password); + tracingParameters.put("requestId", requestId); + CloudTracing.enter(invocationId, this, "getStatusAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/DacOperations/Status?servername=" + fullyQualifiedServerName + "&username=" + username + "&password=" + password + "&reqId=" + requestId; @@ -326,11 +369,23 @@ public DacGetStatusResponse getStatus(String serverName, String fullyQualifiedSe // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -460,35 +515,41 @@ public DacGetStatusResponse getStatus(String serverName, String fullyQualifiedSe result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** + * Import DAC from Windows Azure blob storage. * - * @param serverName The name of the server being imported to or exported - * from + * @param serverName The name of the server being imported to. + * @param parameters Import parameters. * @return Response for an DAC Import/Export request. */ @Override - public Future importResourceAsync(final String serverName, final DacImportParameters parameters) + public Future importDatabaseAsync(final String serverName, final DacImportParameters parameters) { return this.getClient().getExecutorService().submit(new Callable() { @Override public DacImportExportResponse call() throws Exception { - return importResource(serverName, parameters); + return importDatabase(serverName, parameters); } }); } /** + * Import DAC from Windows Azure blob storage. * - * @param serverName The name of the server being imported to or exported - * from + * @param serverName The name of the server being imported to. + * @param parameters Import parameters. * @return Response for an DAC Import/Export request. */ @Override - public DacImportExportResponse importResource(String serverName, DacImportParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException + public DacImportExportResponse importDatabase(String serverName, DacImportParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException { // Validate if (serverName == null) @@ -530,6 +591,16 @@ public DacImportExportResponse importResource(String serverName, DacImportParame } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "importDatabaseAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/DacOperations/Import"; @@ -608,11 +679,23 @@ public DacImportExportResponse importResource(String serverName, DacImportParame // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -638,6 +721,10 @@ public DacImportExportResponse importResource(String serverName, DacImportParame result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseCopyOperations.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseCopyOperations.java new file mode 100644 index 0000000000000..9eae4be860729 --- /dev/null +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseCopyOperations.java @@ -0,0 +1,174 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.management.sql; + +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; +import com.microsoft.windowsazure.management.sql.models.DatabaseCopyCreateParameters; +import com.microsoft.windowsazure.management.sql.models.DatabaseCopyListResponse; +import com.microsoft.windowsazure.management.sql.models.DatabaseCopyResponse; +import com.microsoft.windowsazure.management.sql.models.DatabaseCopyUpdateParameters; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.text.ParseException; +import java.util.concurrent.Future; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import org.xml.sax.SAXException; + +/** +* The SQL Database Management API includes operations for managing SQL Database +* Copies for a subscription. +*/ +public interface DatabaseCopyOperations +{ + /** + * The Create Database Copy operation starts a database copy. + * + * @param serverName The name of the SQL Server where the source database + * resides + * @param databaseName The name of the source database + * @param parameters Additional parameters for the create database copy + * operation + * @return A standard service response including an HTTP status code and + * request ID. + */ + DatabaseCopyResponse create(String serverName, String databaseName, DatabaseCopyCreateParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, ParseException; + + /** + * The Create Database Copy operation starts a database copy. + * + * @param serverName The name of the SQL Server where the source database + * resides + * @param databaseName The name of the source database + * @param parameters Additional parameters for the create database copy + * operation + * @return A standard service response including an HTTP status code and + * request ID. + */ + Future createAsync(String serverName, String databaseName, DatabaseCopyCreateParameters parameters); + + /** + * The Delete Database Copy operation stops a SQL Database copy. + * + * @param serverName The name of the source or destination SQL Server + * instance + * @param databaseName The name of the database + * @param databaseCopyName The unique identifier for the database copy to + * stop + * @return A standard service response including an HTTP status code and + * request ID. + */ + OperationResponse delete(String serverName, String databaseName, String databaseCopyName) throws IOException, ServiceException; + + /** + * The Delete Database Copy operation stops a SQL Database copy. + * + * @param serverName The name of the source or destination SQL Server + * instance + * @param databaseName The name of the database + * @param databaseCopyName The unique identifier for the database copy to + * stop + * @return A standard service response including an HTTP status code and + * request ID. + */ + Future deleteAsync(String serverName, String databaseName, String databaseCopyName); + + /** + * The Get Database Copy operation retrieves information about a SQL Server + * database copy. + * + * @param serverName The name of the source or destination SQL Server + * instance + * @param databaseName The name of the database + * @param databaseCopyName The unique identifier for the database copy to + * retrieve + * @return A standard service response including an HTTP status code and + * request ID. + */ + DatabaseCopyResponse get(String serverName, String databaseName, String databaseCopyName) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException; + + /** + * The Get Database Copy operation retrieves information about a SQL Server + * database copy. + * + * @param serverName The name of the source or destination SQL Server + * instance + * @param databaseName The name of the database + * @param databaseCopyName The unique identifier for the database copy to + * retrieve + * @return A standard service response including an HTTP status code and + * request ID. + */ + Future getAsync(String serverName, String databaseName, String databaseCopyName); + + /** + * + * @param serverName The name of the database server to be queried + * @param databaseName The name of the database to be queried + * @return Response containing the list of database copies for a given + * database. + */ + DatabaseCopyListResponse list(String serverName, String databaseName) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException; + + /** + * + * @param serverName The name of the database server to be queried + * @param databaseName The name of the database to be queried + * @return Response containing the list of database copies for a given + * database. + */ + Future listAsync(String serverName, String databaseName); + + /** + * The Update Database Copy operation updates a SQL Server database copy. + * + * @param serverName The name of the source or destination SQL Server + * instance + * @param databaseName The name of the database + * @param databaseCopyName The unique identifier for the database copy to + * update + * @param parameters Additional parameters for the update database copy + * operation + * @return A standard service response including an HTTP status code and + * request ID. + */ + DatabaseCopyResponse update(String serverName, String databaseName, String databaseCopyName, DatabaseCopyUpdateParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, ParseException; + + /** + * The Update Database Copy operation updates a SQL Server database copy. + * + * @param serverName The name of the source or destination SQL Server + * instance + * @param databaseName The name of the database + * @param databaseCopyName The unique identifier for the database copy to + * update + * @param parameters Additional parameters for the update database copy + * operation + * @return A standard service response including an HTTP status code and + * request ID. + */ + Future updateAsync(String serverName, String databaseName, String databaseCopyName, DatabaseCopyUpdateParameters parameters); +} diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseCopyOperationsImpl.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseCopyOperationsImpl.java new file mode 100644 index 0000000000000..4abf0b052b62c --- /dev/null +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseCopyOperationsImpl.java @@ -0,0 +1,1378 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.management.sql; + +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.exception.ServiceException; +import com.microsoft.windowsazure.management.sql.models.DatabaseCopyCreateParameters; +import com.microsoft.windowsazure.management.sql.models.DatabaseCopyListResponse; +import com.microsoft.windowsazure.management.sql.models.DatabaseCopyResponse; +import com.microsoft.windowsazure.management.sql.models.DatabaseCopyUpdateParameters; +import com.microsoft.windowsazure.tracing.CloudTracing; +import java.io.IOException; +import java.io.InputStream; +import java.io.StringWriter; +import java.io.UnsupportedEncodingException; +import java.text.ParseException; +import java.util.HashMap; +import java.util.concurrent.Callable; +import java.util.concurrent.Future; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; +import org.apache.http.HttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.methods.HttpPut; +import org.apache.http.entity.StringEntity; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NodeList; +import org.xml.sax.SAXException; + +/** +* The SQL Database Management API includes operations for managing SQL Database +* Copies for a subscription. +*/ +public class DatabaseCopyOperationsImpl implements ServiceOperations, DatabaseCopyOperations +{ + /** + * Initializes a new instance of the DatabaseCopyOperationsImpl class. + * + * @param client Reference to the service client. + */ + DatabaseCopyOperationsImpl(SqlManagementClientImpl client) + { + this.client = client; + } + + private SqlManagementClientImpl client; + + /** + * Gets a reference to the + * microsoft.windowsazure.management.sql.SqlManagementClientImpl. + */ + public SqlManagementClientImpl getClient() { return this.client; } + + /** + * The Create Database Copy operation starts a database copy. + * + * @param serverName The name of the SQL Server where the source database + * resides + * @param databaseName The name of the source database + * @param parameters Additional parameters for the create database copy + * operation + * @return A standard service response including an HTTP status code and + * request ID. + */ + @Override + public Future createAsync(final String serverName, final String databaseName, final DatabaseCopyCreateParameters parameters) + { + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public DatabaseCopyResponse call() throws Exception + { + return create(serverName, databaseName, parameters); + } + }); + } + + /** + * The Create Database Copy operation starts a database copy. + * + * @param serverName The name of the SQL Server where the source database + * resides + * @param databaseName The name of the source database + * @param parameters Additional parameters for the create database copy + * operation + * @return A standard service response including an HTTP status code and + * request ID. + */ + @Override + public DatabaseCopyResponse create(String serverName, String databaseName, DatabaseCopyCreateParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, ParseException + { + // Validate + if (serverName == null) + { + throw new NullPointerException("serverName"); + } + if (databaseName == null) + { + throw new NullPointerException("databaseName"); + } + if (parameters == null) + { + throw new NullPointerException("parameters"); + } + if (parameters.getPartnerDatabase() == null) + { + throw new NullPointerException("parameters.PartnerDatabase"); + } + if (parameters.getPartnerServer() == null) + { + throw new NullPointerException("parameters.PartnerServer"); + } + + // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + tracingParameters.put("databaseName", databaseName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); + } + + // Construct URL + String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/databases/" + databaseName + "/databasecopies"; + + // Create HTTP transport objects + HttpPost httpRequest = new HttpPost(url); + + // Set Headers + httpRequest.setHeader("Content-Type", "application/xml"); + httpRequest.setHeader("x-ms-version", "2012-03-01"); + + // Serialize Request + String requestContent = null; + DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); + Document requestDoc = documentBuilder.newDocument(); + + Element serviceResourceElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "ServiceResource"); + requestDoc.appendChild(serviceResourceElement); + + Element partnerServerElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "PartnerServer"); + partnerServerElement.appendChild(requestDoc.createTextNode(parameters.getPartnerServer())); + serviceResourceElement.appendChild(partnerServerElement); + + Element partnerDatabaseElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "PartnerDatabase"); + partnerDatabaseElement.appendChild(requestDoc.createTextNode(parameters.getPartnerDatabase())); + serviceResourceElement.appendChild(partnerDatabaseElement); + + if (parameters.getMaxLagInMinutes() != null) + { + Element maxLagInMinutesElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "MaxLagInMinutes"); + maxLagInMinutesElement.appendChild(requestDoc.createTextNode(Integer.toString(parameters.getMaxLagInMinutes()))); + serviceResourceElement.appendChild(maxLagInMinutesElement); + } + + Element isContinuousElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "IsContinuous"); + isContinuousElement.appendChild(requestDoc.createTextNode(Boolean.toString(parameters.getIsContinuous()).toLowerCase())); + serviceResourceElement.appendChild(isContinuousElement); + + Element isForcedTerminateElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "IsForcedTerminate"); + isForcedTerminateElement.appendChild(requestDoc.createTextNode(Boolean.toString(parameters.getIsForcedTerminate()).toLowerCase())); + serviceResourceElement.appendChild(isForcedTerminateElement); + + DOMSource domSource = new DOMSource(requestDoc); + StringWriter stringWriter = new StringWriter(); + StreamResult streamResult = new StreamResult(stringWriter); + TransformerFactory transformerFactory = TransformerFactory.newInstance(); + Transformer transformer = transformerFactory.newTransformer(); + transformer.transform(domSource, streamResult); + requestContent = stringWriter.toString(); + StringEntity entity = new StringEntity(requestContent); + httpRequest.setEntity(entity); + httpRequest.setHeader("Content-Type", "application/xml"); + + // Send Request + HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } + httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } + int statusCode = httpResponse.getStatusLine().getStatusCode(); + if (statusCode != 201) + { + ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + // Create Result + DatabaseCopyResponse result = null; + // Deserialize Response + InputStream responseContent = httpResponse.getEntity().getContent(); + result = new DatabaseCopyResponse(); + DocumentBuilderFactory documentBuilderFactory2 = DocumentBuilderFactory.newInstance(); + DocumentBuilder documentBuilder2 = documentBuilderFactory2.newDocumentBuilder(); + Document responseDoc = documentBuilder2.parse(responseContent); + + NodeList elements = responseDoc.getElementsByTagName("ServiceResource"); + Element serviceResourceElement2 = elements.getLength() > 0 ? ((Element)elements.item(0)) : null; + if (serviceResourceElement2 != null) + { + NodeList elements2 = serviceResourceElement2.getElementsByTagName("Name"); + Element nameElement = elements2.getLength() > 0 ? ((Element)elements2.item(0)) : null; + if (nameElement != null) + { + String nameInstance; + nameInstance = nameElement.getTextContent(); + result.setName(nameInstance); + } + + NodeList elements3 = serviceResourceElement2.getElementsByTagName("State"); + Element stateElement = elements3.getLength() > 0 ? ((Element)elements3.item(0)) : null; + if (stateElement != null) + { + String stateInstance; + stateInstance = stateElement.getTextContent(); + result.setState(stateInstance); + } + + NodeList elements4 = serviceResourceElement2.getElementsByTagName("SourceServerName"); + Element sourceServerNameElement = elements4.getLength() > 0 ? ((Element)elements4.item(0)) : null; + if (sourceServerNameElement != null) + { + String sourceServerNameInstance; + sourceServerNameInstance = sourceServerNameElement.getTextContent(); + result.setSourceServerName(sourceServerNameInstance); + } + + NodeList elements5 = serviceResourceElement2.getElementsByTagName("SourceDatabaseName"); + Element sourceDatabaseNameElement = elements5.getLength() > 0 ? ((Element)elements5.item(0)) : null; + if (sourceDatabaseNameElement != null) + { + String sourceDatabaseNameInstance; + sourceDatabaseNameInstance = sourceDatabaseNameElement.getTextContent(); + result.setSourceDatabaseName(sourceDatabaseNameInstance); + } + + NodeList elements6 = serviceResourceElement2.getElementsByTagName("DestinationServerName"); + Element destinationServerNameElement = elements6.getLength() > 0 ? ((Element)elements6.item(0)) : null; + if (destinationServerNameElement != null) + { + String destinationServerNameInstance; + destinationServerNameInstance = destinationServerNameElement.getTextContent(); + result.setDestinationServerName(destinationServerNameInstance); + } + + NodeList elements7 = serviceResourceElement2.getElementsByTagName("DestinationDatabaseName"); + Element destinationDatabaseNameElement = elements7.getLength() > 0 ? ((Element)elements7.item(0)) : null; + if (destinationDatabaseNameElement != null) + { + String destinationDatabaseNameInstance; + destinationDatabaseNameInstance = destinationDatabaseNameElement.getTextContent(); + result.setDestinationDatabaseName(destinationDatabaseNameInstance); + } + + NodeList elements8 = serviceResourceElement2.getElementsByTagName("MaxLagInMinutes"); + Element maxLagInMinutesElement2 = elements8.getLength() > 0 ? ((Element)elements8.item(0)) : null; + if (maxLagInMinutesElement2 != null && (maxLagInMinutesElement2.getTextContent() != null && maxLagInMinutesElement2.getTextContent().isEmpty() != true) == false) + { + int maxLagInMinutesInstance; + maxLagInMinutesInstance = Integer.parseInt(maxLagInMinutesElement2.getTextContent()); + result.setMaxLagInMinutes(maxLagInMinutesInstance); + } + + NodeList elements9 = serviceResourceElement2.getElementsByTagName("IsContinuous"); + Element isContinuousElement2 = elements9.getLength() > 0 ? ((Element)elements9.item(0)) : null; + if (isContinuousElement2 != null) + { + boolean isContinuousInstance; + isContinuousInstance = Boolean.parseBoolean(isContinuousElement2.getTextContent()); + result.setIsContinuous(isContinuousInstance); + } + + NodeList elements10 = serviceResourceElement2.getElementsByTagName("ReplicationState"); + Element replicationStateElement = elements10.getLength() > 0 ? ((Element)elements10.item(0)) : null; + if (replicationStateElement != null) + { + byte replicationStateInstance; + replicationStateInstance = Byte.valueOf(replicationStateElement.getTextContent()); + result.setReplicationState(replicationStateInstance); + } + + NodeList elements11 = serviceResourceElement2.getElementsByTagName("ReplicationStateDescription"); + Element replicationStateDescriptionElement = elements11.getLength() > 0 ? ((Element)elements11.item(0)) : null; + if (replicationStateDescriptionElement != null) + { + String replicationStateDescriptionInstance; + replicationStateDescriptionInstance = replicationStateDescriptionElement.getTextContent(); + result.setReplicationStateDescription(replicationStateDescriptionInstance); + } + + NodeList elements12 = serviceResourceElement2.getElementsByTagName("LocalDatabaseId"); + Element localDatabaseIdElement = elements12.getLength() > 0 ? ((Element)elements12.item(0)) : null; + if (localDatabaseIdElement != null) + { + int localDatabaseIdInstance; + localDatabaseIdInstance = Integer.parseInt(localDatabaseIdElement.getTextContent()); + result.setLocalDatabaseId(localDatabaseIdInstance); + } + + NodeList elements13 = serviceResourceElement2.getElementsByTagName("IsLocalDatabaseReplicationTarget"); + Element isLocalDatabaseReplicationTargetElement = elements13.getLength() > 0 ? ((Element)elements13.item(0)) : null; + if (isLocalDatabaseReplicationTargetElement != null) + { + boolean isLocalDatabaseReplicationTargetInstance; + isLocalDatabaseReplicationTargetInstance = Boolean.parseBoolean(isLocalDatabaseReplicationTargetElement.getTextContent()); + result.setIsLocalDatabaseReplicationTarget(isLocalDatabaseReplicationTargetInstance); + } + + NodeList elements14 = serviceResourceElement2.getElementsByTagName("IsInterlinkConnected"); + Element isInterlinkConnectedElement = elements14.getLength() > 0 ? ((Element)elements14.item(0)) : null; + if (isInterlinkConnectedElement != null) + { + boolean isInterlinkConnectedInstance; + isInterlinkConnectedInstance = Boolean.parseBoolean(isInterlinkConnectedElement.getTextContent()); + result.setIsInterlinkConnected(isInterlinkConnectedInstance); + } + + NodeList elements15 = serviceResourceElement2.getElementsByTagName("TextStartDate"); + Element textStartDateElement = elements15.getLength() > 0 ? ((Element)elements15.item(0)) : null; + if (textStartDateElement != null) + { + } + + NodeList elements16 = serviceResourceElement2.getElementsByTagName("TextModifyDate"); + Element textModifyDateElement = elements16.getLength() > 0 ? ((Element)elements16.item(0)) : null; + if (textModifyDateElement != null) + { + } + + NodeList elements17 = serviceResourceElement2.getElementsByTagName("PercentComplete"); + Element percentCompleteElement = elements17.getLength() > 0 ? ((Element)elements17.item(0)) : null; + if (percentCompleteElement != null && (percentCompleteElement.getTextContent() != null && percentCompleteElement.getTextContent().isEmpty() != true) == false) + { + float percentCompleteInstance; + percentCompleteInstance = Float.parseFloat(percentCompleteElement.getTextContent()); + result.setPercentComplete(percentCompleteInstance); + } + + NodeList elements18 = serviceResourceElement2.getElementsByTagName("IsForcedTerminate"); + Element isForcedTerminateElement2 = elements18.getLength() > 0 ? ((Element)elements18.item(0)) : null; + if (isForcedTerminateElement2 != null && (isForcedTerminateElement2.getTextContent() != null && isForcedTerminateElement2.getTextContent().isEmpty() != true) == false) + { + boolean isForcedTerminateInstance; + isForcedTerminateInstance = Boolean.parseBoolean(isForcedTerminateElement2.getTextContent()); + result.setIsForcedTerminate(isForcedTerminateInstance); + } + } + + result.setStatusCode(statusCode); + if (httpResponse.getHeaders("x-ms-request-id").length > 0) + { + result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + return result; + } + + /** + * The Delete Database Copy operation stops a SQL Database copy. + * + * @param serverName The name of the source or destination SQL Server + * instance + * @param databaseName The name of the database + * @param databaseCopyName The unique identifier for the database copy to + * stop + * @return A standard service response including an HTTP status code and + * request ID. + */ + @Override + public Future deleteAsync(final String serverName, final String databaseName, final String databaseCopyName) + { + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public OperationResponse call() throws Exception + { + return delete(serverName, databaseName, databaseCopyName); + } + }); + } + + /** + * The Delete Database Copy operation stops a SQL Database copy. + * + * @param serverName The name of the source or destination SQL Server + * instance + * @param databaseName The name of the database + * @param databaseCopyName The unique identifier for the database copy to + * stop + * @return A standard service response including an HTTP status code and + * request ID. + */ + @Override + public OperationResponse delete(String serverName, String databaseName, String databaseCopyName) throws IOException, ServiceException + { + // Validate + if (serverName == null) + { + throw new NullPointerException("serverName"); + } + if (databaseName == null) + { + throw new NullPointerException("databaseName"); + } + + // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + tracingParameters.put("databaseName", databaseName); + tracingParameters.put("databaseCopyName", databaseCopyName); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); + } + + // Construct URL + String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/databases/" + databaseName + "/databasecopies/" + databaseCopyName; + + // Create HTTP transport objects + CustomHttpDelete httpRequest = new CustomHttpDelete(url); + + // Set Headers + httpRequest.setHeader("Content-Type", "application/xml"); + httpRequest.setHeader("x-ms-version", "2012-03-01"); + + // Send Request + HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } + httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } + int statusCode = httpResponse.getStatusLine().getStatusCode(); + if (statusCode != 200) + { + ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + // Create Result + OperationResponse result = null; + result = new OperationResponse(); + result.setStatusCode(statusCode); + if (httpResponse.getHeaders("x-ms-request-id").length > 0) + { + result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + return result; + } + + /** + * The Get Database Copy operation retrieves information about a SQL Server + * database copy. + * + * @param serverName The name of the source or destination SQL Server + * instance + * @param databaseName The name of the database + * @param databaseCopyName The unique identifier for the database copy to + * retrieve + * @return A standard service response including an HTTP status code and + * request ID. + */ + @Override + public Future getAsync(final String serverName, final String databaseName, final String databaseCopyName) + { + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public DatabaseCopyResponse call() throws Exception + { + return get(serverName, databaseName, databaseCopyName); + } + }); + } + + /** + * The Get Database Copy operation retrieves information about a SQL Server + * database copy. + * + * @param serverName The name of the source or destination SQL Server + * instance + * @param databaseName The name of the database + * @param databaseCopyName The unique identifier for the database copy to + * retrieve + * @return A standard service response including an HTTP status code and + * request ID. + */ + @Override + public DatabaseCopyResponse get(String serverName, String databaseName, String databaseCopyName) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException + { + // Validate + if (serverName == null) + { + throw new NullPointerException("serverName"); + } + if (databaseName == null) + { + throw new NullPointerException("databaseName"); + } + if (databaseCopyName == null) + { + throw new NullPointerException("databaseCopyName"); + } + + // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + tracingParameters.put("databaseName", databaseName); + tracingParameters.put("databaseCopyName", databaseCopyName); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } + + // Construct URL + String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/databases/" + databaseName + "/databasecopies/" + databaseCopyName; + + // Create HTTP transport objects + HttpGet httpRequest = new HttpGet(url); + + // Set Headers + httpRequest.setHeader("x-ms-version", "2012-03-01"); + + // Send Request + HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } + httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } + int statusCode = httpResponse.getStatusLine().getStatusCode(); + if (statusCode != 200) + { + ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + // Create Result + DatabaseCopyResponse result = null; + // Deserialize Response + InputStream responseContent = httpResponse.getEntity().getContent(); + result = new DatabaseCopyResponse(); + DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); + Document responseDoc = documentBuilder.parse(responseContent); + + NodeList elements = responseDoc.getElementsByTagName("ServiceResource"); + Element serviceResourceElement = elements.getLength() > 0 ? ((Element)elements.item(0)) : null; + if (serviceResourceElement != null) + { + NodeList elements2 = serviceResourceElement.getElementsByTagName("Name"); + Element nameElement = elements2.getLength() > 0 ? ((Element)elements2.item(0)) : null; + if (nameElement != null) + { + String nameInstance; + nameInstance = nameElement.getTextContent(); + result.setName(nameInstance); + } + + NodeList elements3 = serviceResourceElement.getElementsByTagName("State"); + Element stateElement = elements3.getLength() > 0 ? ((Element)elements3.item(0)) : null; + if (stateElement != null) + { + String stateInstance; + stateInstance = stateElement.getTextContent(); + result.setState(stateInstance); + } + + NodeList elements4 = serviceResourceElement.getElementsByTagName("SourceServerName"); + Element sourceServerNameElement = elements4.getLength() > 0 ? ((Element)elements4.item(0)) : null; + if (sourceServerNameElement != null) + { + String sourceServerNameInstance; + sourceServerNameInstance = sourceServerNameElement.getTextContent(); + result.setSourceServerName(sourceServerNameInstance); + } + + NodeList elements5 = serviceResourceElement.getElementsByTagName("SourceDatabaseName"); + Element sourceDatabaseNameElement = elements5.getLength() > 0 ? ((Element)elements5.item(0)) : null; + if (sourceDatabaseNameElement != null) + { + String sourceDatabaseNameInstance; + sourceDatabaseNameInstance = sourceDatabaseNameElement.getTextContent(); + result.setSourceDatabaseName(sourceDatabaseNameInstance); + } + + NodeList elements6 = serviceResourceElement.getElementsByTagName("DestinationServerName"); + Element destinationServerNameElement = elements6.getLength() > 0 ? ((Element)elements6.item(0)) : null; + if (destinationServerNameElement != null) + { + String destinationServerNameInstance; + destinationServerNameInstance = destinationServerNameElement.getTextContent(); + result.setDestinationServerName(destinationServerNameInstance); + } + + NodeList elements7 = serviceResourceElement.getElementsByTagName("DestinationDatabaseName"); + Element destinationDatabaseNameElement = elements7.getLength() > 0 ? ((Element)elements7.item(0)) : null; + if (destinationDatabaseNameElement != null) + { + String destinationDatabaseNameInstance; + destinationDatabaseNameInstance = destinationDatabaseNameElement.getTextContent(); + result.setDestinationDatabaseName(destinationDatabaseNameInstance); + } + + NodeList elements8 = serviceResourceElement.getElementsByTagName("MaxLagInMinutes"); + Element maxLagInMinutesElement = elements8.getLength() > 0 ? ((Element)elements8.item(0)) : null; + if (maxLagInMinutesElement != null && (maxLagInMinutesElement.getTextContent() != null && maxLagInMinutesElement.getTextContent().isEmpty() != true) == false) + { + int maxLagInMinutesInstance; + maxLagInMinutesInstance = Integer.parseInt(maxLagInMinutesElement.getTextContent()); + result.setMaxLagInMinutes(maxLagInMinutesInstance); + } + + NodeList elements9 = serviceResourceElement.getElementsByTagName("IsContinuous"); + Element isContinuousElement = elements9.getLength() > 0 ? ((Element)elements9.item(0)) : null; + if (isContinuousElement != null) + { + boolean isContinuousInstance; + isContinuousInstance = Boolean.parseBoolean(isContinuousElement.getTextContent()); + result.setIsContinuous(isContinuousInstance); + } + + NodeList elements10 = serviceResourceElement.getElementsByTagName("ReplicationState"); + Element replicationStateElement = elements10.getLength() > 0 ? ((Element)elements10.item(0)) : null; + if (replicationStateElement != null) + { + byte replicationStateInstance; + replicationStateInstance = Byte.valueOf(replicationStateElement.getTextContent()); + result.setReplicationState(replicationStateInstance); + } + + NodeList elements11 = serviceResourceElement.getElementsByTagName("ReplicationStateDescription"); + Element replicationStateDescriptionElement = elements11.getLength() > 0 ? ((Element)elements11.item(0)) : null; + if (replicationStateDescriptionElement != null) + { + String replicationStateDescriptionInstance; + replicationStateDescriptionInstance = replicationStateDescriptionElement.getTextContent(); + result.setReplicationStateDescription(replicationStateDescriptionInstance); + } + + NodeList elements12 = serviceResourceElement.getElementsByTagName("LocalDatabaseId"); + Element localDatabaseIdElement = elements12.getLength() > 0 ? ((Element)elements12.item(0)) : null; + if (localDatabaseIdElement != null) + { + int localDatabaseIdInstance; + localDatabaseIdInstance = Integer.parseInt(localDatabaseIdElement.getTextContent()); + result.setLocalDatabaseId(localDatabaseIdInstance); + } + + NodeList elements13 = serviceResourceElement.getElementsByTagName("IsLocalDatabaseReplicationTarget"); + Element isLocalDatabaseReplicationTargetElement = elements13.getLength() > 0 ? ((Element)elements13.item(0)) : null; + if (isLocalDatabaseReplicationTargetElement != null) + { + boolean isLocalDatabaseReplicationTargetInstance; + isLocalDatabaseReplicationTargetInstance = Boolean.parseBoolean(isLocalDatabaseReplicationTargetElement.getTextContent()); + result.setIsLocalDatabaseReplicationTarget(isLocalDatabaseReplicationTargetInstance); + } + + NodeList elements14 = serviceResourceElement.getElementsByTagName("IsInterlinkConnected"); + Element isInterlinkConnectedElement = elements14.getLength() > 0 ? ((Element)elements14.item(0)) : null; + if (isInterlinkConnectedElement != null) + { + boolean isInterlinkConnectedInstance; + isInterlinkConnectedInstance = Boolean.parseBoolean(isInterlinkConnectedElement.getTextContent()); + result.setIsInterlinkConnected(isInterlinkConnectedInstance); + } + + NodeList elements15 = serviceResourceElement.getElementsByTagName("TextStartDate"); + Element textStartDateElement = elements15.getLength() > 0 ? ((Element)elements15.item(0)) : null; + if (textStartDateElement != null) + { + } + + NodeList elements16 = serviceResourceElement.getElementsByTagName("TextModifyDate"); + Element textModifyDateElement = elements16.getLength() > 0 ? ((Element)elements16.item(0)) : null; + if (textModifyDateElement != null) + { + } + + NodeList elements17 = serviceResourceElement.getElementsByTagName("PercentComplete"); + Element percentCompleteElement = elements17.getLength() > 0 ? ((Element)elements17.item(0)) : null; + if (percentCompleteElement != null && (percentCompleteElement.getTextContent() != null && percentCompleteElement.getTextContent().isEmpty() != true) == false) + { + float percentCompleteInstance; + percentCompleteInstance = Float.parseFloat(percentCompleteElement.getTextContent()); + result.setPercentComplete(percentCompleteInstance); + } + + NodeList elements18 = serviceResourceElement.getElementsByTagName("IsForcedTerminate"); + Element isForcedTerminateElement = elements18.getLength() > 0 ? ((Element)elements18.item(0)) : null; + if (isForcedTerminateElement != null && (isForcedTerminateElement.getTextContent() != null && isForcedTerminateElement.getTextContent().isEmpty() != true) == false) + { + boolean isForcedTerminateInstance; + isForcedTerminateInstance = Boolean.parseBoolean(isForcedTerminateElement.getTextContent()); + result.setIsForcedTerminate(isForcedTerminateInstance); + } + } + + result.setStatusCode(statusCode); + if (httpResponse.getHeaders("x-ms-request-id").length > 0) + { + result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + return result; + } + + /** + * + * @param serverName The name of the database server to be queried + * @param databaseName The name of the database to be queried + * @return Response containing the list of database copies for a given + * database. + */ + @Override + public Future listAsync(final String serverName, final String databaseName) + { + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public DatabaseCopyListResponse call() throws Exception + { + return list(serverName, databaseName); + } + }); + } + + /** + * + * @param serverName The name of the database server to be queried + * @param databaseName The name of the database to be queried + * @return Response containing the list of database copies for a given + * database. + */ + @Override + public DatabaseCopyListResponse list(String serverName, String databaseName) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException + { + // Validate + if (serverName == null) + { + throw new NullPointerException("serverName"); + } + if (databaseName == null) + { + throw new NullPointerException("databaseName"); + } + + // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + tracingParameters.put("databaseName", databaseName); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } + + // Construct URL + String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/databases/" + databaseName + "/databasecopies"; + + // Create HTTP transport objects + HttpGet httpRequest = new HttpGet(url); + + // Set Headers + httpRequest.setHeader("x-ms-version", "2012-03-01"); + + // Send Request + HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } + httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } + int statusCode = httpResponse.getStatusLine().getStatusCode(); + if (statusCode != 200) + { + ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + // Create Result + DatabaseCopyListResponse result = null; + // Deserialize Response + InputStream responseContent = httpResponse.getEntity().getContent(); + result = new DatabaseCopyListResponse(); + DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); + Document responseDoc = documentBuilder.parse(responseContent); + + NodeList elements = responseDoc.getElementsByTagName("ServiceResources"); + Element serviceResourcesSequenceElement = elements.getLength() > 0 ? ((Element)elements.item(0)) : null; + if (serviceResourcesSequenceElement != null) + { + for (int i1 = 0; i1 < serviceResourcesSequenceElement.getElementsByTagName("ServiceResource").getLength(); i1 = i1 + 1) + { + org.w3c.dom.Element serviceResourcesElement = ((org.w3c.dom.Element)serviceResourcesSequenceElement.getElementsByTagName("ServiceResource").item(i1)); + DatabaseCopyResponse serviceResourceInstance = new DatabaseCopyResponse(); + result.getDatabaseCopies().add(serviceResourceInstance); + + NodeList elements2 = serviceResourcesElement.getElementsByTagName("Name"); + Element nameElement = elements2.getLength() > 0 ? ((Element)elements2.item(0)) : null; + if (nameElement != null) + { + String nameInstance; + nameInstance = nameElement.getTextContent(); + serviceResourceInstance.setName(nameInstance); + } + + NodeList elements3 = serviceResourcesElement.getElementsByTagName("State"); + Element stateElement = elements3.getLength() > 0 ? ((Element)elements3.item(0)) : null; + if (stateElement != null) + { + String stateInstance; + stateInstance = stateElement.getTextContent(); + serviceResourceInstance.setState(stateInstance); + } + + NodeList elements4 = serviceResourcesElement.getElementsByTagName("SourceServerName"); + Element sourceServerNameElement = elements4.getLength() > 0 ? ((Element)elements4.item(0)) : null; + if (sourceServerNameElement != null) + { + String sourceServerNameInstance; + sourceServerNameInstance = sourceServerNameElement.getTextContent(); + serviceResourceInstance.setSourceServerName(sourceServerNameInstance); + } + + NodeList elements5 = serviceResourcesElement.getElementsByTagName("SourceDatabaseName"); + Element sourceDatabaseNameElement = elements5.getLength() > 0 ? ((Element)elements5.item(0)) : null; + if (sourceDatabaseNameElement != null) + { + String sourceDatabaseNameInstance; + sourceDatabaseNameInstance = sourceDatabaseNameElement.getTextContent(); + serviceResourceInstance.setSourceDatabaseName(sourceDatabaseNameInstance); + } + + NodeList elements6 = serviceResourcesElement.getElementsByTagName("DestinationServerName"); + Element destinationServerNameElement = elements6.getLength() > 0 ? ((Element)elements6.item(0)) : null; + if (destinationServerNameElement != null) + { + String destinationServerNameInstance; + destinationServerNameInstance = destinationServerNameElement.getTextContent(); + serviceResourceInstance.setDestinationServerName(destinationServerNameInstance); + } + + NodeList elements7 = serviceResourcesElement.getElementsByTagName("DestinationDatabaseName"); + Element destinationDatabaseNameElement = elements7.getLength() > 0 ? ((Element)elements7.item(0)) : null; + if (destinationDatabaseNameElement != null) + { + String destinationDatabaseNameInstance; + destinationDatabaseNameInstance = destinationDatabaseNameElement.getTextContent(); + serviceResourceInstance.setDestinationDatabaseName(destinationDatabaseNameInstance); + } + + NodeList elements8 = serviceResourcesElement.getElementsByTagName("MaxLagInMinutes"); + Element maxLagInMinutesElement = elements8.getLength() > 0 ? ((Element)elements8.item(0)) : null; + if (maxLagInMinutesElement != null && (maxLagInMinutesElement.getTextContent() != null && maxLagInMinutesElement.getTextContent().isEmpty() != true) == false) + { + int maxLagInMinutesInstance; + maxLagInMinutesInstance = Integer.parseInt(maxLagInMinutesElement.getTextContent()); + serviceResourceInstance.setMaxLagInMinutes(maxLagInMinutesInstance); + } + + NodeList elements9 = serviceResourcesElement.getElementsByTagName("IsContinuous"); + Element isContinuousElement = elements9.getLength() > 0 ? ((Element)elements9.item(0)) : null; + if (isContinuousElement != null) + { + boolean isContinuousInstance; + isContinuousInstance = Boolean.parseBoolean(isContinuousElement.getTextContent()); + serviceResourceInstance.setIsContinuous(isContinuousInstance); + } + + NodeList elements10 = serviceResourcesElement.getElementsByTagName("ReplicationState"); + Element replicationStateElement = elements10.getLength() > 0 ? ((Element)elements10.item(0)) : null; + if (replicationStateElement != null) + { + byte replicationStateInstance; + replicationStateInstance = Byte.valueOf(replicationStateElement.getTextContent()); + serviceResourceInstance.setReplicationState(replicationStateInstance); + } + + NodeList elements11 = serviceResourcesElement.getElementsByTagName("ReplicationStateDescription"); + Element replicationStateDescriptionElement = elements11.getLength() > 0 ? ((Element)elements11.item(0)) : null; + if (replicationStateDescriptionElement != null) + { + String replicationStateDescriptionInstance; + replicationStateDescriptionInstance = replicationStateDescriptionElement.getTextContent(); + serviceResourceInstance.setReplicationStateDescription(replicationStateDescriptionInstance); + } + + NodeList elements12 = serviceResourcesElement.getElementsByTagName("LocalDatabaseId"); + Element localDatabaseIdElement = elements12.getLength() > 0 ? ((Element)elements12.item(0)) : null; + if (localDatabaseIdElement != null) + { + int localDatabaseIdInstance; + localDatabaseIdInstance = Integer.parseInt(localDatabaseIdElement.getTextContent()); + serviceResourceInstance.setLocalDatabaseId(localDatabaseIdInstance); + } + + NodeList elements13 = serviceResourcesElement.getElementsByTagName("IsLocalDatabaseReplicationTarget"); + Element isLocalDatabaseReplicationTargetElement = elements13.getLength() > 0 ? ((Element)elements13.item(0)) : null; + if (isLocalDatabaseReplicationTargetElement != null) + { + boolean isLocalDatabaseReplicationTargetInstance; + isLocalDatabaseReplicationTargetInstance = Boolean.parseBoolean(isLocalDatabaseReplicationTargetElement.getTextContent()); + serviceResourceInstance.setIsLocalDatabaseReplicationTarget(isLocalDatabaseReplicationTargetInstance); + } + + NodeList elements14 = serviceResourcesElement.getElementsByTagName("IsInterlinkConnected"); + Element isInterlinkConnectedElement = elements14.getLength() > 0 ? ((Element)elements14.item(0)) : null; + if (isInterlinkConnectedElement != null) + { + boolean isInterlinkConnectedInstance; + isInterlinkConnectedInstance = Boolean.parseBoolean(isInterlinkConnectedElement.getTextContent()); + serviceResourceInstance.setIsInterlinkConnected(isInterlinkConnectedInstance); + } + + NodeList elements15 = serviceResourcesElement.getElementsByTagName("TextStartDate"); + Element textStartDateElement = elements15.getLength() > 0 ? ((Element)elements15.item(0)) : null; + if (textStartDateElement != null) + { + } + + NodeList elements16 = serviceResourcesElement.getElementsByTagName("TextModifyDate"); + Element textModifyDateElement = elements16.getLength() > 0 ? ((Element)elements16.item(0)) : null; + if (textModifyDateElement != null) + { + } + + NodeList elements17 = serviceResourcesElement.getElementsByTagName("PercentComplete"); + Element percentCompleteElement = elements17.getLength() > 0 ? ((Element)elements17.item(0)) : null; + if (percentCompleteElement != null && (percentCompleteElement.getTextContent() != null && percentCompleteElement.getTextContent().isEmpty() != true) == false) + { + float percentCompleteInstance; + percentCompleteInstance = Float.parseFloat(percentCompleteElement.getTextContent()); + serviceResourceInstance.setPercentComplete(percentCompleteInstance); + } + + NodeList elements18 = serviceResourcesElement.getElementsByTagName("IsForcedTerminate"); + Element isForcedTerminateElement = elements18.getLength() > 0 ? ((Element)elements18.item(0)) : null; + if (isForcedTerminateElement != null && (isForcedTerminateElement.getTextContent() != null && isForcedTerminateElement.getTextContent().isEmpty() != true) == false) + { + boolean isForcedTerminateInstance; + isForcedTerminateInstance = Boolean.parseBoolean(isForcedTerminateElement.getTextContent()); + serviceResourceInstance.setIsForcedTerminate(isForcedTerminateInstance); + } + } + } + + result.setStatusCode(statusCode); + if (httpResponse.getHeaders("x-ms-request-id").length > 0) + { + result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + return result; + } + + /** + * The Update Database Copy operation updates a SQL Server database copy. + * + * @param serverName The name of the source or destination SQL Server + * instance + * @param databaseName The name of the database + * @param databaseCopyName The unique identifier for the database copy to + * update + * @param parameters Additional parameters for the update database copy + * operation + * @return A standard service response including an HTTP status code and + * request ID. + */ + @Override + public Future updateAsync(final String serverName, final String databaseName, final String databaseCopyName, final DatabaseCopyUpdateParameters parameters) + { + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public DatabaseCopyResponse call() throws Exception + { + return update(serverName, databaseName, databaseCopyName, parameters); + } + }); + } + + /** + * The Update Database Copy operation updates a SQL Server database copy. + * + * @param serverName The name of the source or destination SQL Server + * instance + * @param databaseName The name of the database + * @param databaseCopyName The unique identifier for the database copy to + * update + * @param parameters Additional parameters for the update database copy + * operation + * @return A standard service response including an HTTP status code and + * request ID. + */ + @Override + public DatabaseCopyResponse update(String serverName, String databaseName, String databaseCopyName, DatabaseCopyUpdateParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, ParseException + { + // Validate + if (serverName == null) + { + throw new NullPointerException("serverName"); + } + if (databaseName == null) + { + throw new NullPointerException("databaseName"); + } + if (parameters == null) + { + throw new NullPointerException("parameters"); + } + + // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + tracingParameters.put("databaseName", databaseName); + tracingParameters.put("databaseCopyName", databaseCopyName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateAsync", tracingParameters); + } + + // Construct URL + String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/databases/" + databaseName + "/databasecopies/" + databaseCopyName; + + // Create HTTP transport objects + HttpPut httpRequest = new HttpPut(url); + + // Set Headers + httpRequest.setHeader("Content-Type", "application/xml"); + httpRequest.setHeader("x-ms-version", "2012-03-01"); + + // Serialize Request + String requestContent = null; + DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); + Document requestDoc = documentBuilder.newDocument(); + + Element serviceResourceElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "ServiceResource"); + requestDoc.appendChild(serviceResourceElement); + + if (parameters.getPartnerServer() != null) + { + Element partnerServerElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "PartnerServer"); + partnerServerElement.appendChild(requestDoc.createTextNode(parameters.getPartnerServer())); + serviceResourceElement.appendChild(partnerServerElement); + } + + if (parameters.getPartnerDatabase() != null) + { + Element partnerDatabaseElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "PartnerDatabase"); + partnerDatabaseElement.appendChild(requestDoc.createTextNode(parameters.getPartnerDatabase())); + serviceResourceElement.appendChild(partnerDatabaseElement); + } + + if (parameters.getMaxLagInMinutes() != null) + { + Element maxLagInMinutesElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "MaxLagInMinutes"); + maxLagInMinutesElement.appendChild(requestDoc.createTextNode(Integer.toString(parameters.getMaxLagInMinutes()))); + serviceResourceElement.appendChild(maxLagInMinutesElement); + } + + if (parameters.getIsContinuous() != null) + { + Element isContinuousElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "IsContinuous"); + isContinuousElement.appendChild(requestDoc.createTextNode(Boolean.toString(parameters.getIsContinuous()).toLowerCase())); + serviceResourceElement.appendChild(isContinuousElement); + } + + if (parameters.getIsForcedTerminate() != null) + { + Element isForcedTerminateElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "IsForcedTerminate"); + isForcedTerminateElement.appendChild(requestDoc.createTextNode(Boolean.toString(parameters.getIsForcedTerminate()).toLowerCase())); + serviceResourceElement.appendChild(isForcedTerminateElement); + } + + DOMSource domSource = new DOMSource(requestDoc); + StringWriter stringWriter = new StringWriter(); + StreamResult streamResult = new StreamResult(stringWriter); + TransformerFactory transformerFactory = TransformerFactory.newInstance(); + Transformer transformer = transformerFactory.newTransformer(); + transformer.transform(domSource, streamResult); + requestContent = stringWriter.toString(); + StringEntity entity = new StringEntity(requestContent); + httpRequest.setEntity(entity); + httpRequest.setHeader("Content-Type", "application/xml"); + + // Send Request + HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } + httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } + int statusCode = httpResponse.getStatusLine().getStatusCode(); + if (statusCode != 200) + { + ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + // Create Result + DatabaseCopyResponse result = null; + // Deserialize Response + InputStream responseContent = httpResponse.getEntity().getContent(); + result = new DatabaseCopyResponse(); + DocumentBuilderFactory documentBuilderFactory2 = DocumentBuilderFactory.newInstance(); + DocumentBuilder documentBuilder2 = documentBuilderFactory2.newDocumentBuilder(); + Document responseDoc = documentBuilder2.parse(responseContent); + + NodeList elements = responseDoc.getElementsByTagName("ServiceResource"); + Element serviceResourceElement2 = elements.getLength() > 0 ? ((Element)elements.item(0)) : null; + if (serviceResourceElement2 != null) + { + NodeList elements2 = serviceResourceElement2.getElementsByTagName("Name"); + Element nameElement = elements2.getLength() > 0 ? ((Element)elements2.item(0)) : null; + if (nameElement != null) + { + String nameInstance; + nameInstance = nameElement.getTextContent(); + result.setName(nameInstance); + } + + NodeList elements3 = serviceResourceElement2.getElementsByTagName("State"); + Element stateElement = elements3.getLength() > 0 ? ((Element)elements3.item(0)) : null; + if (stateElement != null) + { + String stateInstance; + stateInstance = stateElement.getTextContent(); + result.setState(stateInstance); + } + + NodeList elements4 = serviceResourceElement2.getElementsByTagName("SourceServerName"); + Element sourceServerNameElement = elements4.getLength() > 0 ? ((Element)elements4.item(0)) : null; + if (sourceServerNameElement != null) + { + String sourceServerNameInstance; + sourceServerNameInstance = sourceServerNameElement.getTextContent(); + result.setSourceServerName(sourceServerNameInstance); + } + + NodeList elements5 = serviceResourceElement2.getElementsByTagName("SourceDatabaseName"); + Element sourceDatabaseNameElement = elements5.getLength() > 0 ? ((Element)elements5.item(0)) : null; + if (sourceDatabaseNameElement != null) + { + String sourceDatabaseNameInstance; + sourceDatabaseNameInstance = sourceDatabaseNameElement.getTextContent(); + result.setSourceDatabaseName(sourceDatabaseNameInstance); + } + + NodeList elements6 = serviceResourceElement2.getElementsByTagName("DestinationServerName"); + Element destinationServerNameElement = elements6.getLength() > 0 ? ((Element)elements6.item(0)) : null; + if (destinationServerNameElement != null) + { + String destinationServerNameInstance; + destinationServerNameInstance = destinationServerNameElement.getTextContent(); + result.setDestinationServerName(destinationServerNameInstance); + } + + NodeList elements7 = serviceResourceElement2.getElementsByTagName("DestinationDatabaseName"); + Element destinationDatabaseNameElement = elements7.getLength() > 0 ? ((Element)elements7.item(0)) : null; + if (destinationDatabaseNameElement != null) + { + String destinationDatabaseNameInstance; + destinationDatabaseNameInstance = destinationDatabaseNameElement.getTextContent(); + result.setDestinationDatabaseName(destinationDatabaseNameInstance); + } + + NodeList elements8 = serviceResourceElement2.getElementsByTagName("MaxLagInMinutes"); + Element maxLagInMinutesElement2 = elements8.getLength() > 0 ? ((Element)elements8.item(0)) : null; + if (maxLagInMinutesElement2 != null && (maxLagInMinutesElement2.getTextContent() != null && maxLagInMinutesElement2.getTextContent().isEmpty() != true) == false) + { + int maxLagInMinutesInstance; + maxLagInMinutesInstance = Integer.parseInt(maxLagInMinutesElement2.getTextContent()); + result.setMaxLagInMinutes(maxLagInMinutesInstance); + } + + NodeList elements9 = serviceResourceElement2.getElementsByTagName("IsContinuous"); + Element isContinuousElement2 = elements9.getLength() > 0 ? ((Element)elements9.item(0)) : null; + if (isContinuousElement2 != null) + { + boolean isContinuousInstance; + isContinuousInstance = Boolean.parseBoolean(isContinuousElement2.getTextContent()); + result.setIsContinuous(isContinuousInstance); + } + + NodeList elements10 = serviceResourceElement2.getElementsByTagName("ReplicationState"); + Element replicationStateElement = elements10.getLength() > 0 ? ((Element)elements10.item(0)) : null; + if (replicationStateElement != null) + { + byte replicationStateInstance; + replicationStateInstance = Byte.valueOf(replicationStateElement.getTextContent()); + result.setReplicationState(replicationStateInstance); + } + + NodeList elements11 = serviceResourceElement2.getElementsByTagName("ReplicationStateDescription"); + Element replicationStateDescriptionElement = elements11.getLength() > 0 ? ((Element)elements11.item(0)) : null; + if (replicationStateDescriptionElement != null) + { + String replicationStateDescriptionInstance; + replicationStateDescriptionInstance = replicationStateDescriptionElement.getTextContent(); + result.setReplicationStateDescription(replicationStateDescriptionInstance); + } + + NodeList elements12 = serviceResourceElement2.getElementsByTagName("LocalDatabaseId"); + Element localDatabaseIdElement = elements12.getLength() > 0 ? ((Element)elements12.item(0)) : null; + if (localDatabaseIdElement != null) + { + int localDatabaseIdInstance; + localDatabaseIdInstance = Integer.parseInt(localDatabaseIdElement.getTextContent()); + result.setLocalDatabaseId(localDatabaseIdInstance); + } + + NodeList elements13 = serviceResourceElement2.getElementsByTagName("IsLocalDatabaseReplicationTarget"); + Element isLocalDatabaseReplicationTargetElement = elements13.getLength() > 0 ? ((Element)elements13.item(0)) : null; + if (isLocalDatabaseReplicationTargetElement != null) + { + boolean isLocalDatabaseReplicationTargetInstance; + isLocalDatabaseReplicationTargetInstance = Boolean.parseBoolean(isLocalDatabaseReplicationTargetElement.getTextContent()); + result.setIsLocalDatabaseReplicationTarget(isLocalDatabaseReplicationTargetInstance); + } + + NodeList elements14 = serviceResourceElement2.getElementsByTagName("IsInterlinkConnected"); + Element isInterlinkConnectedElement = elements14.getLength() > 0 ? ((Element)elements14.item(0)) : null; + if (isInterlinkConnectedElement != null) + { + boolean isInterlinkConnectedInstance; + isInterlinkConnectedInstance = Boolean.parseBoolean(isInterlinkConnectedElement.getTextContent()); + result.setIsInterlinkConnected(isInterlinkConnectedInstance); + } + + NodeList elements15 = serviceResourceElement2.getElementsByTagName("TextStartDate"); + Element textStartDateElement = elements15.getLength() > 0 ? ((Element)elements15.item(0)) : null; + if (textStartDateElement != null) + { + } + + NodeList elements16 = serviceResourceElement2.getElementsByTagName("TextModifyDate"); + Element textModifyDateElement = elements16.getLength() > 0 ? ((Element)elements16.item(0)) : null; + if (textModifyDateElement != null) + { + } + + NodeList elements17 = serviceResourceElement2.getElementsByTagName("PercentComplete"); + Element percentCompleteElement = elements17.getLength() > 0 ? ((Element)elements17.item(0)) : null; + if (percentCompleteElement != null && (percentCompleteElement.getTextContent() != null && percentCompleteElement.getTextContent().isEmpty() != true) == false) + { + float percentCompleteInstance; + percentCompleteInstance = Float.parseFloat(percentCompleteElement.getTextContent()); + result.setPercentComplete(percentCompleteInstance); + } + + NodeList elements18 = serviceResourceElement2.getElementsByTagName("IsForcedTerminate"); + Element isForcedTerminateElement2 = elements18.getLength() > 0 ? ((Element)elements18.item(0)) : null; + if (isForcedTerminateElement2 != null && (isForcedTerminateElement2.getTextContent() != null && isForcedTerminateElement2.getTextContent().isEmpty() != true) == false) + { + boolean isForcedTerminateInstance; + isForcedTerminateInstance = Boolean.parseBoolean(isForcedTerminateElement2.getTextContent()); + result.setIsForcedTerminate(isForcedTerminateInstance); + } + } + + result.setStatusCode(statusCode); + if (httpResponse.getHeaders("x-ms-request-id").length > 0) + { + result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + return result; + } +} diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseOperationOperations.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseOperationOperations.java index abd1baaf20248..6830a8bee8450 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseOperationOperations.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseOperationOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,9 +23,9 @@ package com.microsoft.windowsazure.management.sql; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.sql.models.DatabaseOperationGetResponse; import com.microsoft.windowsazure.management.sql.models.DatabaseOperationListResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.text.ParseException; import java.util.concurrent.Future; @@ -37,8 +39,7 @@ public interface DatabaseOperationOperations { /** - * The 'Get Database Operation' retrieves information about one operation on - * a given operation Guid. + * Returns information about one operation on a given operation Guid. * * @param serverName The name of the SQL Server on which the operation was * executed. @@ -50,8 +51,7 @@ public interface DatabaseOperationOperations DatabaseOperationGetResponse get(String serverName, String operationGuid) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException; /** - * The 'Get Database Operation' retrieves information about one operation on - * a given operation Guid. + * Returns information about one operation on a given operation Guid. * * @param serverName The name of the SQL Server on which the operation was * executed. @@ -63,6 +63,7 @@ public interface DatabaseOperationOperations Future getAsync(String serverName, String operationGuid); /** + * Returns the list database operations for a given server and database. * * @param serverName The name of the SQL Server to be queried. * @param databaseName The name of the Database to be queried. @@ -72,6 +73,7 @@ public interface DatabaseOperationOperations DatabaseOperationListResponse listByDatabase(String serverName, String databaseName) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException; /** + * Returns the list database operations for a given server and database. * * @param serverName The name of the SQL Server to be queried. * @param databaseName The name of the Database to be queried. @@ -81,6 +83,7 @@ public interface DatabaseOperationOperations Future listByDatabaseAsync(String serverName, String databaseName); /** + * Returns the list database operations for a given server. * * @param serverName The name of the SQL Server to be queried. * @return Response containing the list of database operations for a given @@ -89,6 +92,7 @@ public interface DatabaseOperationOperations DatabaseOperationListResponse listByServer(String serverName) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException; /** + * Returns the list database operations for a given server. * * @param serverName The name of the SQL Server to be queried. * @return Response containing the list of database operations for a given diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseOperationOperationsImpl.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseOperationOperationsImpl.java index 59d919c3e2751..72b0a82df9150 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseOperationOperationsImpl.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseOperationOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,15 +23,17 @@ package com.microsoft.windowsazure.management.sql; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.sql.models.DatabaseOperationGetResponse; import com.microsoft.windowsazure.management.sql.models.DatabaseOperationListResponse; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.Future; import javax.xml.parsers.DocumentBuilder; @@ -67,8 +71,7 @@ public class DatabaseOperationOperationsImpl implements ServiceOperations tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + tracingParameters.put("operationGuid", operationGuid); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/databaseoperations/" + operationGuid; @@ -126,11 +138,23 @@ public DatabaseOperationGetResponse get(String serverName, String operationGuid) // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -304,10 +328,15 @@ public DatabaseOperationGetResponse get(String serverName, String operationGuid) result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** + * Returns the list database operations for a given server and database. * * @param serverName The name of the SQL Server to be queried. * @param databaseName The name of the Database to be queried. @@ -327,6 +356,7 @@ public DatabaseOperationListResponse call() throws Exception } /** + * Returns the list database operations for a given server and database. * * @param serverName The name of the SQL Server to be queried. * @param databaseName The name of the Database to be queried. @@ -347,6 +377,16 @@ public DatabaseOperationListResponse listByDatabase(String serverName, String da } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + tracingParameters.put("databaseName", databaseName); + CloudTracing.enter(invocationId, this, "listByDatabaseAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/databaseoperations?databaseName=" + databaseName; @@ -359,11 +399,23 @@ public DatabaseOperationListResponse listByDatabase(String serverName, String da // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -544,10 +596,15 @@ public DatabaseOperationListResponse listByDatabase(String serverName, String da result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** + * Returns the list database operations for a given server. * * @param serverName The name of the SQL Server to be queried. * @return Response containing the list of database operations for a given @@ -566,6 +623,7 @@ public DatabaseOperationListResponse call() throws Exception } /** + * Returns the list database operations for a given server. * * @param serverName The name of the SQL Server to be queried. * @return Response containing the list of database operations for a given @@ -581,6 +639,15 @@ public DatabaseOperationListResponse listByServer(String serverName) throws IOEx } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + CloudTracing.enter(invocationId, this, "listByServerAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/databaseoperations?contentview=generic"; @@ -593,11 +660,23 @@ public DatabaseOperationListResponse listByServer(String serverName) throws IOEx // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -778,6 +857,10 @@ public DatabaseOperationListResponse listByServer(String serverName) throws IOEx result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseOperations.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseOperations.java index c1e932b099625..e6cfb07448afd 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseOperations.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,14 +23,14 @@ package com.microsoft.windowsazure.management.sql; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.sql.models.DatabaseCreateParameters; import com.microsoft.windowsazure.management.sql.models.DatabaseCreateResponse; import com.microsoft.windowsazure.management.sql.models.DatabaseGetResponse; import com.microsoft.windowsazure.management.sql.models.DatabaseListResponse; import com.microsoft.windowsazure.management.sql.models.DatabaseUpdateParameters; import com.microsoft.windowsazure.management.sql.models.DatabaseUpdateResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.text.ParseException; @@ -45,32 +47,29 @@ public interface DatabaseOperations { /** - * The Create Database operation creates a database in a SQL Server database - * server. + * Creates a database in a SQL Server database server. * * @param serverName The name of the SQL Server where the database will be - * created - * @param parameters The parameters for the create database operation + * created. + * @param parameters The parameters for the create database operation. * @return A standard service response including an HTTP status code and * request ID. */ DatabaseCreateResponse create(String serverName, DatabaseCreateParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, ParseException; /** - * The Create Database operation creates a database in a SQL Server database - * server. + * Creates a database in a SQL Server database server. * * @param serverName The name of the SQL Server where the database will be - * created - * @param parameters The parameters for the create database operation + * created. + * @param parameters The parameters for the create database operation. * @return A standard service response including an HTTP status code and * request ID. */ Future createAsync(String serverName, DatabaseCreateParameters parameters); /** - * The Drop Server operation drops a SQL Database server from a - * subscription. (see + * Drops a SQL Database server from a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715285.aspx for * more information) * @@ -82,8 +81,7 @@ public interface DatabaseOperations OperationResponse delete(String serverName, String databaseName) throws IOException, ServiceException; /** - * The Drop Server operation drops a SQL Database server from a - * subscription. (see + * Drops a SQL Database server from a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715285.aspx for * more information) * @@ -95,8 +93,7 @@ public interface DatabaseOperations Future deleteAsync(String serverName, String databaseName); /** - * The Get Database operation retrieves information about a SQL Server - * database. + * Returns information about a SQL Server database. * * @param serverName The name of the SQL Server on which the database is * housed. @@ -107,8 +104,7 @@ public interface DatabaseOperations DatabaseGetResponse get(String serverName, String databaseName) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException; /** - * The Get Database operation retrieves information about a SQL Server - * database. + * Returns information about a SQL Server database. * * @param serverName The name of the SQL Server on which the database is * housed. @@ -119,6 +115,7 @@ public interface DatabaseOperations Future getAsync(String serverName, String databaseName); /** + * Returns the list SQL Server databases. * * @param serverName The name of the database server to be queried. * @return Response containing the list of databases for a given server. @@ -126,6 +123,7 @@ public interface DatabaseOperations DatabaseListResponse list(String serverName) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException; /** + * Returns the list SQL Server databases. * * @param serverName The name of the database server to be queried. * @return Response containing the list of databases for a given server. @@ -133,8 +131,7 @@ public interface DatabaseOperations Future listAsync(String serverName); /** - * The Get Database operation retrieves information about a SQL Server - * database. + * Updates SQL Server database information. * * @param serverName The name of the SQL Server where the database is housed. * @param databaseName The name of the SQL Server database to be obtained. @@ -145,8 +142,7 @@ public interface DatabaseOperations DatabaseUpdateResponse update(String serverName, String databaseName, DatabaseUpdateParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, ParseException; /** - * The Get Database operation retrieves information about a SQL Server - * database. + * Updates SQL Server database information. * * @param serverName The name of the SQL Server where the database is housed. * @param databaseName The name of the SQL Server database to be obtained. diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseOperationsImpl.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseOperationsImpl.java index f8eef552e6ba0..ad4e787afe31d 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseOperationsImpl.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/DatabaseOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,16 +23,17 @@ package com.microsoft.windowsazure.management.sql; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.sql.models.DatabaseCreateParameters; import com.microsoft.windowsazure.management.sql.models.DatabaseCreateResponse; import com.microsoft.windowsazure.management.sql.models.DatabaseGetResponse; import com.microsoft.windowsazure.management.sql.models.DatabaseListResponse; import com.microsoft.windowsazure.management.sql.models.DatabaseUpdateParameters; import com.microsoft.windowsazure.management.sql.models.DatabaseUpdateResponse; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.utils.pipeline.CustomHttpDelete; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -38,6 +41,7 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.Future; import javax.xml.parsers.DocumentBuilder; @@ -84,12 +88,11 @@ public class DatabaseOperationsImpl implements ServiceOperations tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/databases"; @@ -197,11 +209,23 @@ public DatabaseCreateResponse create(String serverName, DatabaseCreateParameters // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 201) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -381,12 +405,15 @@ public DatabaseCreateResponse create(String serverName, DatabaseCreateParameters result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** - * The Drop Server operation drops a SQL Database server from a - * subscription. (see + * Drops a SQL Database server from a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715285.aspx for * more information) * @@ -408,8 +435,7 @@ public OperationResponse call() throws Exception } /** - * The Drop Server operation drops a SQL Database server from a - * subscription. (see + * Drops a SQL Database server from a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715285.aspx for * more information) * @@ -432,6 +458,16 @@ public OperationResponse delete(String serverName, String databaseName) throws I } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + tracingParameters.put("databaseName", databaseName); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/databases/" + databaseName; @@ -444,11 +480,23 @@ public OperationResponse delete(String serverName, String databaseName) throws I // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -461,12 +509,15 @@ public OperationResponse delete(String serverName, String databaseName) throws I result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** - * The Get Database operation retrieves information about a SQL Server - * database. + * Returns information about a SQL Server database. * * @param serverName The name of the SQL Server on which the database is * housed. @@ -487,8 +538,7 @@ public DatabaseGetResponse call() throws Exception } /** - * The Get Database operation retrieves information about a SQL Server - * database. + * Returns information about a SQL Server database. * * @param serverName The name of the SQL Server on which the database is * housed. @@ -510,6 +560,16 @@ public DatabaseGetResponse get(String serverName, String databaseName) throws IO } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + tracingParameters.put("databaseName", databaseName); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/databases/" + databaseName; @@ -522,11 +582,23 @@ public DatabaseGetResponse get(String serverName, String databaseName) throws IO // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -706,10 +778,15 @@ public DatabaseGetResponse get(String serverName, String databaseName) throws IO result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** + * Returns the list SQL Server databases. * * @param serverName The name of the database server to be queried. * @return Response containing the list of databases for a given server. @@ -727,6 +804,7 @@ public DatabaseListResponse call() throws Exception } /** + * Returns the list SQL Server databases. * * @param serverName The name of the database server to be queried. * @return Response containing the list of databases for a given server. @@ -741,6 +819,15 @@ public DatabaseListResponse list(String serverName) throws IOException, ServiceE } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/databases?contentview=generic"; @@ -753,11 +840,23 @@ public DatabaseListResponse list(String serverName) throws IOException, ServiceE // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -944,12 +1043,15 @@ public DatabaseListResponse list(String serverName) throws IOException, ServiceE result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** - * The Get Database operation retrieves information about a SQL Server - * database. + * Updates SQL Server database information. * * @param serverName The name of the SQL Server where the database is housed. * @param databaseName The name of the SQL Server database to be obtained. @@ -970,8 +1072,7 @@ public DatabaseUpdateResponse call() throws Exception } /** - * The Get Database operation retrieves information about a SQL Server - * database. + * Updates SQL Server database information. * * @param serverName The name of the SQL Server where the database is housed. * @param databaseName The name of the SQL Server database to be obtained. @@ -1005,6 +1106,17 @@ public DatabaseUpdateResponse update(String serverName, String databaseName, Dat } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + tracingParameters.put("databaseName", databaseName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/databases/" + databaseName; @@ -1068,11 +1180,23 @@ public DatabaseUpdateResponse update(String serverName, String databaseName, Dat // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1252,6 +1376,10 @@ public DatabaseUpdateResponse update(String serverName, String databaseName, Dat result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/Exports.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/Exports.java index 599683f332832..5fa48295c6b31 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/Exports.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/Exports.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.sql; -import com.microsoft.windowsazure.services.core.Builder; +import com.microsoft.windowsazure.core.Builder; /** * The Class Exports. diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/FirewallRuleOperations.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/FirewallRuleOperations.java index c4abfad6c5774..99a811a9c2abf 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/FirewallRuleOperations.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/FirewallRuleOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,13 +23,13 @@ package com.microsoft.windowsazure.management.sql; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.sql.models.FirewallRuleCreateParameters; import com.microsoft.windowsazure.management.sql.models.FirewallRuleCreateResponse; import com.microsoft.windowsazure.management.sql.models.FirewallRuleListResponse; import com.microsoft.windowsazure.management.sql.models.FirewallRuleUpdateParameters; import com.microsoft.windowsazure.management.sql.models.FirewallRuleUpdateResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.text.ParseException; @@ -49,116 +51,110 @@ public interface FirewallRuleOperations { /** - * The Set Server Firewall Rule operation updates an existing server-level - * firewall rule or adds a new server-level firewall rule for a SQL - * Database server that belongs to a subscription. (see + * Adds a new server-level firewall rule for a SQL Database server that + * belongs to a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715280.aspx for * more information) * * @param serverName The name of the SQL database server to which this rule * will be applied. - * @param parameters Parameters for the Create Firewall Rule operation + * @param parameters Parameters for the Create Firewall Rule operation. * @return A standard service response including an HTTP status code and * request ID. */ FirewallRuleCreateResponse create(String serverName, FirewallRuleCreateParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, ParseException; /** - * The Set Server Firewall Rule operation updates an existing server-level - * firewall rule or adds a new server-level firewall rule for a SQL - * Database server that belongs to a subscription. (see + * Adds a new server-level firewall rule for a SQL Database server that + * belongs to a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715280.aspx for * more information) * * @param serverName The name of the SQL database server to which this rule * will be applied. - * @param parameters Parameters for the Create Firewall Rule operation + * @param parameters Parameters for the Create Firewall Rule operation. * @return A standard service response including an HTTP status code and * request ID. */ Future createAsync(String serverName, FirewallRuleCreateParameters parameters); /** - * The Delete Server Firewall Rule operation deletes a server-level firewall - * rule from a SQL Database server that belongs to a subscription. (see + * Deletes a server-level firewall rule from a SQL Database server that + * belongs to a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715277.aspx for * more information) * * @param serverName The name of the server that will be have new firewall - * rule applied to it - * @param ruleName The name of the new firewall rule + * rule applied to it. + * @param ruleName The name of the new firewall rule. * @return A standard service response including an HTTP status code and * request ID. */ OperationResponse delete(String serverName, String ruleName) throws IOException, ServiceException; /** - * The Delete Server Firewall Rule operation deletes a server-level firewall - * rule from a SQL Database server that belongs to a subscription. (see + * Deletes a server-level firewall rule from a SQL Database server that + * belongs to a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715277.aspx for * more information) * * @param serverName The name of the server that will be have new firewall - * rule applied to it - * @param ruleName The name of the new firewall rule + * rule applied to it. + * @param ruleName The name of the new firewall rule. * @return A standard service response including an HTTP status code and * request ID. */ Future deleteAsync(String serverName, String ruleName); /** - * The Get Server Firewall Rules operation retrieves a list of all the - * server-level firewall rules for a SQL Database server that belongs to a - * subscription. (see + * Returns a list of all the server-level firewall rules for a SQL Database + * server that belongs to a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715278.aspx for * more information) * - * @param serverName The name of the server for which the call is being made + * @param serverName The name of the server for which the call is being made. * @return A standard service response including an HTTP status code and * request ID. */ FirewallRuleListResponse list(String serverName) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException; /** - * The Get Server Firewall Rules operation retrieves a list of all the - * server-level firewall rules for a SQL Database server that belongs to a - * subscription. (see + * Returns a list of all the server-level firewall rules for a SQL Database + * server that belongs to a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715278.aspx for * more information) * - * @param serverName The name of the server for which the call is being made + * @param serverName The name of the server for which the call is being made. * @return A standard service response including an HTTP status code and * request ID. */ Future listAsync(String serverName); /** - * The Set Server Firewall Rule operation updates an existing server-level - * firewall rule or adds a new server-level firewall rule for a SQL - * Database server that belongs to a subscription. (see + * Updates an existing server-level firewall rule for a SQL Database server + * that belongs to a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715280.aspx for * more information) * * @param serverName The name of the SQL database server to which this rule * will be applied. * @param ruleName The name of the firewall rule to be updated. - * @param parameters Parameters for the Update Firewall Rule operation + * @param parameters Parameters for the Update Firewall Rule operation. * @return A standard service response including an HTTP status code and * request ID. */ FirewallRuleUpdateResponse update(String serverName, String ruleName, FirewallRuleUpdateParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, ParseException; /** - * The Set Server Firewall Rule operation updates an existing server-level - * firewall rule or adds a new server-level firewall rule for a SQL - * Database server that belongs to a subscription. (see + * Updates an existing server-level firewall rule for a SQL Database server + * that belongs to a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715280.aspx for * more information) * * @param serverName The name of the SQL database server to which this rule * will be applied. * @param ruleName The name of the firewall rule to be updated. - * @param parameters Parameters for the Update Firewall Rule operation + * @param parameters Parameters for the Update Firewall Rule operation. * @return A standard service response including an HTTP status code and * request ID. */ diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/FirewallRuleOperationsImpl.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/FirewallRuleOperationsImpl.java index afca3636e7121..a0209ca776020 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/FirewallRuleOperationsImpl.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/FirewallRuleOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,21 +23,23 @@ package com.microsoft.windowsazure.management.sql; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.sql.models.FirewallRuleCreateParameters; import com.microsoft.windowsazure.management.sql.models.FirewallRuleCreateResponse; import com.microsoft.windowsazure.management.sql.models.FirewallRuleListResponse; import com.microsoft.windowsazure.management.sql.models.FirewallRuleUpdateParameters; import com.microsoft.windowsazure.management.sql.models.FirewallRuleUpdateResponse; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.utils.pipeline.CustomHttpDelete; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; import java.io.UnsupportedEncodingException; import java.net.InetAddress; import java.text.ParseException; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.Future; import javax.xml.parsers.DocumentBuilder; @@ -87,15 +91,14 @@ public class FirewallRuleOperationsImpl implements ServiceOperations tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/firewallrules"; @@ -195,11 +207,23 @@ public FirewallRuleCreateResponse create(String serverName, FirewallRuleCreatePa // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 201) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -268,18 +292,22 @@ public FirewallRuleCreateResponse create(String serverName, FirewallRuleCreatePa result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** - * The Delete Server Firewall Rule operation deletes a server-level firewall - * rule from a SQL Database server that belongs to a subscription. (see + * Deletes a server-level firewall rule from a SQL Database server that + * belongs to a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715277.aspx for * more information) * * @param serverName The name of the server that will be have new firewall - * rule applied to it - * @param ruleName The name of the new firewall rule + * rule applied to it. + * @param ruleName The name of the new firewall rule. * @return A standard service response including an HTTP status code and * request ID. */ @@ -296,14 +324,14 @@ public OperationResponse call() throws Exception } /** - * The Delete Server Firewall Rule operation deletes a server-level firewall - * rule from a SQL Database server that belongs to a subscription. (see + * Deletes a server-level firewall rule from a SQL Database server that + * belongs to a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715277.aspx for * more information) * * @param serverName The name of the server that will be have new firewall - * rule applied to it - * @param ruleName The name of the new firewall rule + * rule applied to it. + * @param ruleName The name of the new firewall rule. * @return A standard service response including an HTTP status code and * request ID. */ @@ -321,6 +349,16 @@ public OperationResponse delete(String serverName, String ruleName) throws IOExc } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + tracingParameters.put("ruleName", ruleName); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/firewallrules/" + ruleName; @@ -333,11 +371,23 @@ public OperationResponse delete(String serverName, String ruleName) throws IOExc // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -350,17 +400,20 @@ public OperationResponse delete(String serverName, String ruleName) throws IOExc result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** - * The Get Server Firewall Rules operation retrieves a list of all the - * server-level firewall rules for a SQL Database server that belongs to a - * subscription. (see + * Returns a list of all the server-level firewall rules for a SQL Database + * server that belongs to a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715278.aspx for * more information) * - * @param serverName The name of the server for which the call is being made + * @param serverName The name of the server for which the call is being made. * @return A standard service response including an HTTP status code and * request ID. */ @@ -377,13 +430,12 @@ public FirewallRuleListResponse call() throws Exception } /** - * The Get Server Firewall Rules operation retrieves a list of all the - * server-level firewall rules for a SQL Database server that belongs to a - * subscription. (see + * Returns a list of all the server-level firewall rules for a SQL Database + * server that belongs to a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715278.aspx for * more information) * - * @param serverName The name of the server for which the call is being made + * @param serverName The name of the server for which the call is being made. * @return A standard service response including an HTTP status code and * request ID. */ @@ -397,6 +449,15 @@ public FirewallRuleListResponse list(String serverName) throws IOException, Serv } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/firewallrules"; @@ -409,11 +470,23 @@ public FirewallRuleListResponse list(String serverName) throws IOException, Serv // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -480,20 +553,23 @@ public FirewallRuleListResponse list(String serverName) throws IOException, Serv result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** - * The Set Server Firewall Rule operation updates an existing server-level - * firewall rule or adds a new server-level firewall rule for a SQL - * Database server that belongs to a subscription. (see + * Updates an existing server-level firewall rule for a SQL Database server + * that belongs to a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715280.aspx for * more information) * * @param serverName The name of the SQL database server to which this rule * will be applied. * @param ruleName The name of the firewall rule to be updated. - * @param parameters Parameters for the Update Firewall Rule operation + * @param parameters Parameters for the Update Firewall Rule operation. * @return A standard service response including an HTTP status code and * request ID. */ @@ -510,16 +586,15 @@ public FirewallRuleUpdateResponse call() throws Exception } /** - * The Set Server Firewall Rule operation updates an existing server-level - * firewall rule or adds a new server-level firewall rule for a SQL - * Database server that belongs to a subscription. (see + * Updates an existing server-level firewall rule for a SQL Database server + * that belongs to a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715280.aspx for * more information) * * @param serverName The name of the SQL database server to which this rule * will be applied. * @param ruleName The name of the firewall rule to be updated. - * @param parameters Parameters for the Update Firewall Rule operation + * @param parameters Parameters for the Update Firewall Rule operation. * @return A standard service response including an HTTP status code and * request ID. */ @@ -553,6 +628,17 @@ public FirewallRuleUpdateResponse update(String serverName, String ruleName, Fir } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + tracingParameters.put("ruleName", ruleName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/firewallrules/" + ruleName; @@ -598,11 +684,23 @@ public FirewallRuleUpdateResponse update(String serverName, String ruleName, Fir // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -671,6 +769,10 @@ public FirewallRuleUpdateResponse update(String serverName, String ruleName, Fir result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/ServerOperations.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/ServerOperations.java index 8329af4fe02b9..af663bf655cc2 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/ServerOperations.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/ServerOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,12 +23,12 @@ package com.microsoft.windowsazure.management.sql; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.sql.models.ServerChangeAdministratorPasswordParameters; import com.microsoft.windowsazure.management.sql.models.ServerCreateParameters; import com.microsoft.windowsazure.management.sql.models.ServerCreateResponse; import com.microsoft.windowsazure.management.sql.models.ServerListResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.text.ParseException; @@ -45,98 +47,92 @@ public interface ServerOperations { /** - * The Set Server Administrator Password operation sets the administrative - * password of a SQL Database server for a subscription. (see + * Sets the administrative password of a SQL Database server for a + * subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715272.aspx for * more information) * * @param serverName The server that will have the change made to the - * administrative user + * administrative user. * @param parameters Parameters for the Manage Administrator Password - * operation + * operation. * @return A standard service response including an HTTP status code and * request ID. */ OperationResponse changeAdministratorPassword(String serverName, ServerChangeAdministratorPasswordParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException; /** - * The Set Server Administrator Password operation sets the administrative - * password of a SQL Database server for a subscription. (see + * Sets the administrative password of a SQL Database server for a + * subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715272.aspx for * more information) * * @param serverName The server that will have the change made to the - * administrative user + * administrative user. * @param parameters Parameters for the Manage Administrator Password - * operation + * operation. * @return A standard service response including an HTTP status code and * request ID. */ Future changeAdministratorPasswordAsync(String serverName, ServerChangeAdministratorPasswordParameters parameters); /** - * The Create Server operation adds a new SQL Database server to a - * subscription. (see + * Adds a new SQL Database server to a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715274.aspx for * more information) * * @param parameters Parameters supplied to the Create Server operation. - * @return The response returned from the Create Server operation + * @return The response returned from the Create Server operation. */ ServerCreateResponse create(ServerCreateParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, ParseException; /** - * The Create Server operation adds a new SQL Database server to a - * subscription. (see + * Adds a new SQL Database server to a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715274.aspx for * more information) * * @param parameters Parameters supplied to the Create Server operation. - * @return The response returned from the Create Server operation + * @return The response returned from the Create Server operation. */ Future createAsync(ServerCreateParameters parameters); /** - * The Drop Server operation drops a SQL Database server from a - * subscription. (see + * Drops a SQL Database server from a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715285.aspx for * more information) * - * @param serverName The name of the server to be deleted + * @param serverName The name of the server to be deleted. * @return A standard service response including an HTTP status code and * request ID. */ OperationResponse delete(String serverName) throws IOException, ServiceException; /** - * The Drop Server operation drops a SQL Database server from a - * subscription. (see + * Drops a SQL Database server from a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715285.aspx for * more information) * - * @param serverName The name of the server to be deleted + * @param serverName The name of the server to be deleted. * @return A standard service response including an HTTP status code and * request ID. */ Future deleteAsync(String serverName); /** - * The Get Servers operation enumerates SQL Database servers that are - * provisioned for a subscription. (see - * http://msdn.microsoft.com/en-us/library/windowsazure/gg715269.aspx for - * more information) + * Returns all SQL Database servers that are provisioned for a subscription. + * (see http://msdn.microsoft.com/en-us/library/windowsazure/gg715269.aspx + * for more information) * - * @return The response structure for the Server List operation + * @return The response structure for the Server List operation. */ ServerListResponse list() throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException; /** - * The Get Servers operation enumerates SQL Database servers that are - * provisioned for a subscription. (see - * http://msdn.microsoft.com/en-us/library/windowsazure/gg715269.aspx for - * more information) + * Returns all SQL Database servers that are provisioned for a subscription. + * (see http://msdn.microsoft.com/en-us/library/windowsazure/gg715269.aspx + * for more information) * - * @return The response structure for the Server List operation + * @return The response structure for the Server List operation. */ Future listAsync(); } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/ServerOperationsImpl.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/ServerOperationsImpl.java index 0d7624c444cc7..8bb940b2660fd 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/ServerOperationsImpl.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/ServerOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,19 +23,21 @@ package com.microsoft.windowsazure.management.sql; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.sql.models.ServerChangeAdministratorPasswordParameters; import com.microsoft.windowsazure.management.sql.models.ServerCreateParameters; import com.microsoft.windowsazure.management.sql.models.ServerCreateResponse; import com.microsoft.windowsazure.management.sql.models.ServerListResponse; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.utils.pipeline.CustomHttpDelete; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; import java.io.UnsupportedEncodingException; import java.text.ParseException; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.Future; import javax.xml.parsers.DocumentBuilder; @@ -81,15 +85,15 @@ public class ServerOperationsImpl implements ServiceOperations tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "changeAdministratorPasswordAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "?op=ResetPassword"; @@ -171,11 +185,23 @@ public OperationResponse changeAdministratorPassword(String serverName, ServerCh // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -188,17 +214,20 @@ public OperationResponse changeAdministratorPassword(String serverName, ServerCh result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** - * The Create Server operation adds a new SQL Database server to a - * subscription. (see + * Adds a new SQL Database server to a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715274.aspx for * more information) * * @param parameters Parameters supplied to the Create Server operation. - * @return The response returned from the Create Server operation + * @return The response returned from the Create Server operation. */ @Override public Future createAsync(final ServerCreateParameters parameters) @@ -213,13 +242,12 @@ public ServerCreateResponse call() throws Exception } /** - * The Create Server operation adds a new SQL Database server to a - * subscription. (see + * Adds a new SQL Database server to a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715274.aspx for * more information) * * @param parameters Parameters supplied to the Create Server operation. - * @return The response returned from the Create Server operation + * @return The response returned from the Create Server operation. */ @Override public ServerCreateResponse create(ServerCreateParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException, ParseException @@ -243,6 +271,15 @@ public ServerCreateResponse create(ServerCreateParameters parameters) throws Par } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers"; @@ -288,11 +325,23 @@ public ServerCreateResponse create(ServerCreateParameters parameters) throws Par // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 201) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -318,16 +367,19 @@ public ServerCreateResponse create(ServerCreateParameters parameters) throws Par result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** - * The Drop Server operation drops a SQL Database server from a - * subscription. (see + * Drops a SQL Database server from a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715285.aspx for * more information) * - * @param serverName The name of the server to be deleted + * @param serverName The name of the server to be deleted. * @return A standard service response including an HTTP status code and * request ID. */ @@ -344,12 +396,11 @@ public OperationResponse call() throws Exception } /** - * The Drop Server operation drops a SQL Database server from a - * subscription. (see + * Drops a SQL Database server from a subscription. (see * http://msdn.microsoft.com/en-us/library/windowsazure/gg715285.aspx for * more information) * - * @param serverName The name of the server to be deleted + * @param serverName The name of the server to be deleted. * @return A standard service response including an HTTP status code and * request ID. */ @@ -363,6 +414,15 @@ public OperationResponse delete(String serverName) throws IOException, ServiceEx } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName; @@ -375,11 +435,23 @@ public OperationResponse delete(String serverName) throws IOException, ServiceEx // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -392,16 +464,19 @@ public OperationResponse delete(String serverName) throws IOException, ServiceEx result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** - * The Get Servers operation enumerates SQL Database servers that are - * provisioned for a subscription. (see - * http://msdn.microsoft.com/en-us/library/windowsazure/gg715269.aspx for - * more information) + * Returns all SQL Database servers that are provisioned for a subscription. + * (see http://msdn.microsoft.com/en-us/library/windowsazure/gg715269.aspx + * for more information) * - * @return The response structure for the Server List operation + * @return The response structure for the Server List operation. */ @Override public Future listAsync() @@ -416,12 +491,11 @@ public ServerListResponse call() throws Exception } /** - * The Get Servers operation enumerates SQL Database servers that are - * provisioned for a subscription. (see - * http://msdn.microsoft.com/en-us/library/windowsazure/gg715269.aspx for - * more information) + * Returns all SQL Database servers that are provisioned for a subscription. + * (see http://msdn.microsoft.com/en-us/library/windowsazure/gg715269.aspx + * for more information) * - * @return The response structure for the Server List operation + * @return The response structure for the Server List operation. */ @Override public ServerListResponse list() throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException @@ -429,6 +503,14 @@ public ServerListResponse list() throws IOException, ServiceException, ParserCon // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers"; @@ -441,11 +523,23 @@ public ServerListResponse list() throws IOException, ServiceException, ParserCon // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -518,6 +612,10 @@ public ServerListResponse list() throws IOException, ServiceException, ParserCon result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/ServiceObjectiveOperations.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/ServiceObjectiveOperations.java index fb2142b01df3f..1ed8fc7cae9c5 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/ServiceObjectiveOperations.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/ServiceObjectiveOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,9 +23,9 @@ package com.microsoft.windowsazure.management.sql; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.sql.models.ServiceObjectiveGetResponse; import com.microsoft.windowsazure.management.sql.models.ServiceObjectiveListResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.text.ParseException; import java.util.concurrent.Future; @@ -37,8 +39,7 @@ public interface ServiceObjectiveOperations { /** - * The Get Service Objective operation retrieves information about a certain - * Service Objective on a given Id. + * Returns information about a certain Service Objective on a given Id. * * @param serverName The name of the SQL Server to be queried. * @param serviceObjectiveId The Id of the Service Objective to be obtained. @@ -48,8 +49,7 @@ public interface ServiceObjectiveOperations ServiceObjectiveGetResponse get(String serverName, String serviceObjectiveId) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException; /** - * The Get Service Objective operation retrieves information about a certain - * Service Objective on a given Id. + * Returns information about a certain Service Objective on a given Id. * * @param serverName The name of the SQL Server to be queried. * @param serviceObjectiveId The Id of the Service Objective to be obtained. @@ -59,6 +59,7 @@ public interface ServiceObjectiveOperations Future getAsync(String serverName, String serviceObjectiveId); /** + * Returns information about all Service Objectives on a database server. * * @param serverName The name of the database server to be queried. * @return Response containing the list of service objective for a given @@ -67,6 +68,7 @@ public interface ServiceObjectiveOperations ServiceObjectiveListResponse list(String serverName) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException; /** + * Returns information about all Service Objectives on a database server. * * @param serverName The name of the database server to be queried. * @return Response containing the list of service objective for a given diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/ServiceObjectiveOperationsImpl.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/ServiceObjectiveOperationsImpl.java index 1a20b00f08db8..c1a9843ba4d76 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/ServiceObjectiveOperationsImpl.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/ServiceObjectiveOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,13 +23,15 @@ package com.microsoft.windowsazure.management.sql; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.sql.models.ServiceObjectiveGetResponse; import com.microsoft.windowsazure.management.sql.models.ServiceObjectiveListResponse; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.text.ParseException; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.Future; import javax.xml.parsers.DocumentBuilder; @@ -65,8 +69,7 @@ public class ServiceObjectiveOperationsImpl implements ServiceOperations tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + tracingParameters.put("serviceObjectiveId", serviceObjectiveId); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/serviceobjectives/" + serviceObjectiveId; @@ -120,11 +132,23 @@ public ServiceObjectiveGetResponse get(String serverName, String serviceObjectiv // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -331,10 +355,15 @@ public ServiceObjectiveGetResponse get(String serverName, String serviceObjectiv result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** + * Returns information about all Service Objectives on a database server. * * @param serverName The name of the database server to be queried. * @return Response containing the list of service objective for a given @@ -353,6 +382,7 @@ public ServiceObjectiveListResponse call() throws Exception } /** + * Returns information about all Service Objectives on a database server. * * @param serverName The name of the database server to be queried. * @return Response containing the list of service objective for a given @@ -368,6 +398,15 @@ public ServiceObjectiveListResponse list(String serverName) throws IOException, } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serverName", serverName); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/services/sqlservers/servers/" + serverName + "/serviceobjectives"; @@ -380,11 +419,23 @@ public ServiceObjectiveListResponse list(String serverName) throws IOException, // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -598,6 +649,10 @@ public ServiceObjectiveListResponse list(String serverName) throws IOException, result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/SqlManagementClient.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/SqlManagementClient.java index 5ed96f76cf792..302c580b3cf39 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/SqlManagementClient.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/SqlManagementClient.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,8 @@ package com.microsoft.windowsazure.management.sql; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.core.FilterableService; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; import java.net.URI; /** @@ -30,7 +33,7 @@ * http://msdn.microsoft.com/en-us/library/windowsazure/gg715283.aspx for more * information) */ -public interface SqlManagementClient +public interface SqlManagementClient extends FilterableService { /** * The URI used as the base for all SQL requests. @@ -48,22 +51,28 @@ public interface SqlManagementClient SubscriptionCloudCredentials getCredentials(); /** - * The SQL DAC Management API includes operations for importing and - * exporting SQL Databases into and out of Windows Azure. + * Includes operations for importing and exporting SQL Databases into and + * out of Windows Azure blob storage. + */ + DacOperations getDacOperations(); + + /** + * The SQL Database Management API includes operations for managing SQL + * Database Copies for a subscription. */ - DacOperations getDacs(); + DatabaseCopyOperations getDatabaseCopiesOperations(); /** * The SQL Database Management API includes operations for get/stop SQL * Databases' operations for a subscription. */ - DatabaseOperationOperations getDatabaseOperations(); + DatabaseOperationOperations getDatabaseOperationsOperations(); /** * The SQL Database Management API includes operations for managing SQL * Databases for a subscription. */ - DatabaseOperations getDatabases(); + DatabaseOperations getDatabasesOperations(); /** * The Windows Azure SQL Database Management API includes operations for @@ -75,7 +84,7 @@ public interface SqlManagementClient * http://msdn.microsoft.com/en-us/library/windowsazure/gg715276.aspx for * more information) */ - FirewallRuleOperations getFirewallRules(); + FirewallRuleOperations getFirewallRulesOperations(); /** * The SQL Database Management API includes operations for managing SQL @@ -83,11 +92,11 @@ public interface SqlManagementClient * http://msdn.microsoft.com/en-us/library/windowsazure/gg715271.aspx for * more information) */ - ServerOperations getServers(); + ServerOperations getServersOperations(); /** * The SQL Database Management API includes operations for getting Service * Objective for a subscription. */ - ServiceObjectiveOperations getServiceObjectives(); + ServiceObjectiveOperations getServiceObjectivesOperations(); } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/SqlManagementClientImpl.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/SqlManagementClientImpl.java index 1e235e1e1e28d..381c090972820 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/SqlManagementClientImpl.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/SqlManagementClientImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,12 +23,14 @@ package com.microsoft.windowsazure.management.sql; +import com.microsoft.windowsazure.core.ServiceClient; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; import com.microsoft.windowsazure.management.ManagementConfiguration; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; -import com.microsoft.windowsazure.services.core.ServiceClient; import java.net.URI; +import java.util.concurrent.ExecutorService; import javax.inject.Inject; import javax.inject.Named; +import org.apache.http.impl.client.HttpClientBuilder; /** * The SQL Database Management API is a REST API for managing SQL Database @@ -34,7 +38,7 @@ * http://msdn.microsoft.com/en-us/library/windowsazure/gg715283.aspx for more * information) */ -public class SqlManagementClientImpl extends ServiceClient implements SqlManagementClient +public class SqlManagementClientImpl extends ServiceClient implements SqlManagementClient { private URI baseUri; @@ -55,13 +59,21 @@ public class SqlManagementClientImpl extends ServiceClient { private ArrayList statusInfoList; /** - * The list of statuses relevant to this import/export request. + * Gets or sets the list of statuses relevant to this import/export request. */ public ArrayList getStatusInfoList() { return this.statusInfoList; } /** - * The list of statuses relevant to this import/export request. + * Gets or sets the list of statuses relevant to this import/export request. */ public void setStatusInfoList(ArrayList statusInfoList) { this.statusInfoList = statusInfoList; } @@ -63,123 +65,127 @@ public Iterator iterator() } /** - * Status of a DAC import + * Status of a DAC import. */ public static class StatusInfo { private URI blobUri; /** - * The URI of the DAC file stored in Windows Azure Blob Storage to be - * imported. + * Gets or sets the URI of the DAC file stored in Windows Azure Blob + * Storage to be imported. */ public URI getBlobUri() { return this.blobUri; } /** - * The URI of the DAC file stored in Windows Azure Blob Storage to be - * imported. + * Gets or sets the URI of the DAC file stored in Windows Azure Blob + * Storage to be imported. */ public void setBlobUri(URI blobUri) { this.blobUri = blobUri; } private String databaseName; /** - * The name of the database into which this DAC will be imported. + * Gets or sets the name of the database into which this DAC will be + * imported. */ public String getDatabaseName() { return this.databaseName; } /** - * The name of the database into which this DAC will be imported. + * Gets or sets the name of the database into which this DAC will be + * imported. */ public void setDatabaseName(String databaseName) { this.databaseName = databaseName; } private String errorMessage; /** - * The error message of the request if the request failed in some way. + * Gets or sets the error message of the request if the request failed + * in some way. */ public String getErrorMessage() { return this.errorMessage; } /** - * The error message of the request if the request failed in some way. + * Gets or sets the error message of the request if the request failed + * in some way. */ public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } private Calendar lastModifiedTime; /** - * The last time the status changed. + * Gets or sets the last time the status changed. */ public Calendar getLastModifiedTime() { return this.lastModifiedTime; } /** - * The last time the status changed. + * Gets or sets the last time the status changed. */ public void setLastModifiedTime(Calendar lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; } private Calendar queuedTime; /** - * The time at which the import/export request was queued and the - * process initiated. + * Gets or sets the time at which the import/export request was queued + * and the process initiated. */ public Calendar getQueuedTime() { return this.queuedTime; } /** - * The time at which the import/export request was queued and the - * process initiated. + * Gets or sets the time at which the import/export request was queued + * and the process initiated. */ public void setQueuedTime(Calendar queuedTime) { this.queuedTime = queuedTime; } private String requestId; /** - * The request ID of this import/export request, so that it can be - * tracked with future calls to GetStatus. + * Gets or sets the request ID of this import/export request, so that it + * can be tracked with future calls to GetStatus. */ public String getRequestId() { return this.requestId; } /** - * The request ID of this import/export request, so that it can be - * tracked with future calls to GetStatus. + * Gets or sets the request ID of this import/export request, so that it + * can be tracked with future calls to GetStatus. */ public void setRequestId(String requestId) { this.requestId = requestId; } private String requestType; /** - * The type (Import/Export) of this request. + * Gets or sets the type (Import/Export) of this request. */ public String getRequestType() { return this.requestType; } /** - * The type (Import/Export) of this request. + * Gets or sets the type (Import/Export) of this request. */ public void setRequestType(String requestType) { this.requestType = requestType; } private String serverName; /** - * The name of the SQL database server into which this DAC will be - * imported or from which it will be exported. + * Gets or sets the name of the SQL database server into which this DAC + * will be imported or from which it will be exported. */ public String getServerName() { return this.serverName; } /** - * The name of the SQL database server into which this DAC will be - * imported or from which it will be exported. + * Gets or sets the name of the SQL database server into which this DAC + * will be imported or from which it will be exported. */ public void setServerName(String serverName) { this.serverName = serverName; } private String status; /** - * The status of the import/export request. + * Gets or sets the status of the import/export request. */ public String getStatus() { return this.status; } /** - * The status of the import/export request. + * Gets or sets the status of the import/export request. */ public void setStatus(String status) { this.status = status; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DacImportExportResponse.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DacImportExportResponse.java index 6a4ab27949a41..e194e9b89a886 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DacImportExportResponse.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DacImportExportResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.sql.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * Response for an DAC Import/Export request. @@ -31,12 +33,12 @@ public class DacImportExportResponse extends OperationResponse private String guid; /** - * The operation's identifier. + * Gets or sets the operation's identifier. */ public String getGuid() { return this.guid; } /** - * The operation's identifier. + * Gets or sets the operation's identifier. */ public void setGuid(String guid) { this.guid = guid; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DacImportParameters.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DacImportParameters.java index d1684ffe8e818..b81a7b26cc2f1 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DacImportParameters.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DacImportParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -31,36 +33,36 @@ public class DacImportParameters private DacImportParameters.BlobCredentialsParameter blobCredentials; /** - * Credentials for getting the DAC. + * Gets or sets credentials for getting the DAC. */ public DacImportParameters.BlobCredentialsParameter getBlobCredentials() { return this.blobCredentials; } /** - * Credentials for getting the DAC. + * Gets or sets credentials for getting the DAC. */ public void setBlobCredentials(DacImportParameters.BlobCredentialsParameter blobCredentials) { this.blobCredentials = blobCredentials; } private DacImportParameters.ConnectionInfoParameter connectionInfo; /** - * Connection information for the SQL Server Database. + * Gets or sets connection information for the SQL Server Database. */ public DacImportParameters.ConnectionInfoParameter getConnectionInfo() { return this.connectionInfo; } /** - * Connection information for the SQL Server Database. + * Gets or sets connection information for the SQL Server Database. */ public void setConnectionInfo(DacImportParameters.ConnectionInfoParameter connectionInfo) { this.connectionInfo = connectionInfo; } private int databaseSizeInGB; /** - * The size of this database. + * Gets or sets the size of this database. */ public int getDatabaseSizeInGB() { return this.databaseSizeInGB; } /** - * The size of this database. + * Gets or sets the size of this database. */ public void setDatabaseSizeInGB(int databaseSizeInGB) { this.databaseSizeInGB = databaseSizeInGB; } @@ -73,26 +75,34 @@ public DacImportParameters() } /** - * Credentials for getting the DAC + * Credentials for getting the DAC. */ public static class BlobCredentialsParameter { private String storageAccessKey; /** - * The key for the Windows Azure Storage account. + * Gets or sets the key for the Windows Azure Storage account. */ public String getStorageAccessKey() { return this.storageAccessKey; } /** - * The key for the Windows Azure Storage account. + * Gets or sets the key for the Windows Azure Storage account. */ public void setStorageAccessKey(String storageAccessKey) { this.storageAccessKey = storageAccessKey; } private URI uri; + /** + * Gets or sets the URI of the DAC file stored in Windows Azure Blob + * Storage. + */ public URI getUri() { return this.uri; } + /** + * Gets or sets the URI of the DAC file stored in Windows Azure Blob + * Storage. + */ public void setUri(URI uri) { this.uri = uri; } /** @@ -112,48 +122,48 @@ public static class ConnectionInfoParameter private String databaseName; /** - * The name of the database. + * Gets or sets the name of the database. */ public String getDatabaseName() { return this.databaseName; } /** - * The name of the database. + * Gets or sets the name of the database. */ public void setDatabaseName(String databaseName) { this.databaseName = databaseName; } private String password; /** - * The password for the database user. + * Gets or sets the password for the database user. */ public String getPassword() { return this.password; } /** - * The password for the database user. + * Gets or sets the password for the database user. */ public void setPassword(String password) { this.password = password; } private String serverName; /** - * The SQL server name. + * Gets or sets the SQL server name. */ public String getServerName() { return this.serverName; } /** - * The SQL server name. + * Gets or sets the SQL server name. */ public void setServerName(String serverName) { this.serverName = serverName; } private String userName; /** - * The username of the database user. + * Gets or sets the username of the database user. */ public String getUserName() { return this.userName; } /** - * The username of the database user. + * Gets or sets the username of the database user. */ public void setUserName(String userName) { this.userName = userName; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCopyCreateParameters.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCopyCreateParameters.java new file mode 100644 index 0000000000000..266a143f2c8d8 --- /dev/null +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCopyCreateParameters.java @@ -0,0 +1,100 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.management.sql.models; + +/** +* Parameters supplied to the Create Database Copy operation. +*/ +public class DatabaseCopyCreateParameters +{ + private boolean isContinuous; + + /** + * Whether the copy should be continuous. + */ + public boolean getIsContinuous() { return this.isContinuous; } + + /** + * Whether the copy should be continuous. + */ + public void setIsContinuous(boolean isContinuous) { this.isContinuous = isContinuous; } + + private boolean isForcedTerminate; + + /** + * Whether a Delete Database Operation will cause a forced or friendly + * termination. + */ + public boolean getIsForcedTerminate() { return this.isForcedTerminate; } + + /** + * Whether a Delete Database Operation will cause a forced or friendly + * termination. + */ + public void setIsForcedTerminate(boolean isForcedTerminate) { this.isForcedTerminate = isForcedTerminate; } + + private Integer maxLagInMinutes; + + /** + * The RPO for the continous copy operation. + */ + public Integer getMaxLagInMinutes() { return this.maxLagInMinutes; } + + /** + * The RPO for the continous copy operation. + */ + public void setMaxLagInMinutes(Integer maxLagInMinutes) { this.maxLagInMinutes = maxLagInMinutes; } + + private String partnerDatabase; + + /** + * The name of the destination database for the copy. + */ + public String getPartnerDatabase() { return this.partnerDatabase; } + + /** + * The name of the destination database for the copy. + */ + public void setPartnerDatabase(String partnerDatabase) { this.partnerDatabase = partnerDatabase; } + + private String partnerServer; + + /** + * The name of the destination server for the copy. + */ + public String getPartnerServer() { return this.partnerServer; } + + /** + * The name of the destination server for the copy. + */ + public void setPartnerServer(String partnerServer) { this.partnerServer = partnerServer; } + + /** + * Initializes a new instance of the DatabaseCopyCreateParameters class. + * + */ + public DatabaseCopyCreateParameters() + { + } +} diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCopyListResponse.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCopyListResponse.java new file mode 100644 index 0000000000000..56ae124d55053 --- /dev/null +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCopyListResponse.java @@ -0,0 +1,64 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.management.sql.models; + +import com.microsoft.windowsazure.core.OperationResponse; +import java.util.ArrayList; +import java.util.Iterator; + +/** +* Response containing the list of database copies for a given database. +*/ +public class DatabaseCopyListResponse extends OperationResponse implements Iterable +{ + private ArrayList databaseCopies; + + /** + * The matching SQL Server database copies. + */ + public ArrayList getDatabaseCopies() { return this.databaseCopies; } + + /** + * The matching SQL Server database copies. + */ + public void setDatabaseCopies(ArrayList databaseCopies) { this.databaseCopies = databaseCopies; } + + /** + * Initializes a new instance of the DatabaseCopyListResponse class. + * + */ + public DatabaseCopyListResponse() + { + this.databaseCopies = new ArrayList(); + } + + /** + * Gets the sequence of DatabaseCopies. + * + */ + public Iterator iterator() + { + return this.getDatabaseCopies().iterator(); + } +} diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCopyResponse.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCopyResponse.java new file mode 100644 index 0000000000000..83403d00c74f7 --- /dev/null +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCopyResponse.java @@ -0,0 +1,244 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.management.sql.models; + +import com.microsoft.windowsazure.core.OperationResponse; + +/** +* A standard service response including an HTTP status code and request ID. +*/ +public class DatabaseCopyResponse extends OperationResponse +{ + private String destinationDatabaseName; + + /** + * The name of the destination database. + */ + public String getDestinationDatabaseName() { return this.destinationDatabaseName; } + + /** + * The name of the destination database. + */ + public void setDestinationDatabaseName(String destinationDatabaseName) { this.destinationDatabaseName = destinationDatabaseName; } + + private String destinationServerName; + + /** + * The name of the destination server. + */ + public String getDestinationServerName() { return this.destinationServerName; } + + /** + * The name of the destination server. + */ + public void setDestinationServerName(String destinationServerName) { this.destinationServerName = destinationServerName; } + + private boolean isContinuous; + + /** + * Whether the copy is continous. + */ + public boolean getIsContinuous() { return this.isContinuous; } + + /** + * Whether the copy is continous. + */ + public void setIsContinuous(boolean isContinuous) { this.isContinuous = isContinuous; } + + private Boolean isForcedTerminate; + + /** + * Whether database copy termination will be forced. + */ + public Boolean getIsForcedTerminate() { return this.isForcedTerminate; } + + /** + * Whether database copy termination will be forced. + */ + public void setIsForcedTerminate(Boolean isForcedTerminate) { this.isForcedTerminate = isForcedTerminate; } + + private boolean isInterlinkConnected; + + /** + * Whether the database copy is interlink connected. + */ + public boolean getIsInterlinkConnected() { return this.isInterlinkConnected; } + + /** + * Whether the database copy is interlink connected. + */ + public void setIsInterlinkConnected(boolean isInterlinkConnected) { this.isInterlinkConnected = isInterlinkConnected; } + + private boolean isLocalDatabaseReplicationTarget; + + /** + * Whether the local database is a replication target. + */ + public boolean getIsLocalDatabaseReplicationTarget() { return this.isLocalDatabaseReplicationTarget; } + + /** + * Whether the local database is a replication target. + */ + public void setIsLocalDatabaseReplicationTarget(boolean isLocalDatabaseReplicationTarget) { this.isLocalDatabaseReplicationTarget = isLocalDatabaseReplicationTarget; } + + private int localDatabaseId; + + /** + * The ID of the local database. + */ + public int getLocalDatabaseId() { return this.localDatabaseId; } + + /** + * The ID of the local database. + */ + public void setLocalDatabaseId(int localDatabaseId) { this.localDatabaseId = localDatabaseId; } + + private Integer maxLagInMinutes; + + /** + * The RPO for the copy. + */ + public Integer getMaxLagInMinutes() { return this.maxLagInMinutes; } + + /** + * The RPO for the copy. + */ + public void setMaxLagInMinutes(Integer maxLagInMinutes) { this.maxLagInMinutes = maxLagInMinutes; } + + private String name; + + /** + * A unique identifier for the database copy. + */ + public String getName() { return this.name; } + + /** + * A unique identifier for the database copy. + */ + public void setName(String name) { this.name = name; } + + private Float percentComplete; + + /** + * Progress towards copy completion. + */ + public Float getPercentComplete() { return this.percentComplete; } + + /** + * Progress towards copy completion. + */ + public void setPercentComplete(Float percentComplete) { this.percentComplete = percentComplete; } + + private byte replicationState; + + /** + * A value indicating the replication state for the database. + */ + public byte getReplicationState() { return this.replicationState; } + + /** + * A value indicating the replication state for the database. + */ + public void setReplicationState(byte replicationState) { this.replicationState = replicationState; } + + private String replicationStateDescription; + + /** + * A description of the replication state for the database. + */ + public String getReplicationStateDescription() { return this.replicationStateDescription; } + + /** + * A description of the replication state for the database. + */ + public void setReplicationStateDescription(String replicationStateDescription) { this.replicationStateDescription = replicationStateDescription; } + + private String sourceDatabaseName; + + /** + * The name of the source database. + */ + public String getSourceDatabaseName() { return this.sourceDatabaseName; } + + /** + * The name of the source database. + */ + public void setSourceDatabaseName(String sourceDatabaseName) { this.sourceDatabaseName = sourceDatabaseName; } + + private String sourceServerName; + + /** + * The name of the source server. + */ + public String getSourceServerName() { return this.sourceServerName; } + + /** + * The name of the source server. + */ + public void setSourceServerName(String sourceServerName) { this.sourceServerName = sourceServerName; } + + private String state; + + /** + * The state of the database copy. + */ + public String getState() { return this.state; } + + /** + * The state of the database copy. + */ + public void setState(String state) { this.state = state; } + + private String textModifyDate; + + /** + * The UTC date when the database copy became transactionally consistent. + */ + public String getTextModifyDate() { return this.textModifyDate; } + + /** + * The UTC date when the database copy became transactionally consistent. + */ + public void setTextModifyDate(String textModifyDate) { this.textModifyDate = textModifyDate; } + + private String textStartDate; + + /** + * The UTC date when the database copy was initiated. + */ + public String getTextStartDate() { return this.textStartDate; } + + /** + * The UTC date when the database copy was initiated. + */ + public void setTextStartDate(String textStartDate) { this.textStartDate = textStartDate; } + + /** + * Initializes a new instance of the DatabaseCopyResponse class. + * + */ + public DatabaseCopyResponse() + { + } +} diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCopyUpdateParameters.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCopyUpdateParameters.java new file mode 100644 index 0000000000000..1f5a753557aa0 --- /dev/null +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCopyUpdateParameters.java @@ -0,0 +1,100 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.management.sql.models; + +/** +* Parameters supplied to the Update Database Copy operation. +*/ +public class DatabaseCopyUpdateParameters +{ + private Boolean isContinuous; + + /** + * Whether the copy should be continuous. + */ + public Boolean getIsContinuous() { return this.isContinuous; } + + /** + * Whether the copy should be continuous. + */ + public void setIsContinuous(Boolean isContinuous) { this.isContinuous = isContinuous; } + + private Boolean isForcedTerminate; + + /** + * Whether a Delete Database Operation will cause a forced or friendly + * termination. + */ + public Boolean getIsForcedTerminate() { return this.isForcedTerminate; } + + /** + * Whether a Delete Database Operation will cause a forced or friendly + * termination. + */ + public void setIsForcedTerminate(Boolean isForcedTerminate) { this.isForcedTerminate = isForcedTerminate; } + + private Integer maxLagInMinutes; + + /** + * The RPO for the continous copy operation. + */ + public Integer getMaxLagInMinutes() { return this.maxLagInMinutes; } + + /** + * The RPO for the continous copy operation. + */ + public void setMaxLagInMinutes(Integer maxLagInMinutes) { this.maxLagInMinutes = maxLagInMinutes; } + + private String partnerDatabase; + + /** + * The name of the partner database for the copy. + */ + public String getPartnerDatabase() { return this.partnerDatabase; } + + /** + * The name of the partner database for the copy. + */ + public void setPartnerDatabase(String partnerDatabase) { this.partnerDatabase = partnerDatabase; } + + private String partnerServer; + + /** + * The name of the partner server for the copy. + */ + public String getPartnerServer() { return this.partnerServer; } + + /** + * The name of the partner server for the copy. + */ + public void setPartnerServer(String partnerServer) { this.partnerServer = partnerServer; } + + /** + * Initializes a new instance of the DatabaseCopyUpdateParameters class. + * + */ + public DatabaseCopyUpdateParameters() + { + } +} diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCreateParameters.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCreateParameters.java index 137c8ea43b3ac..c05061d6cbb84 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCreateParameters.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCreateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -29,60 +31,60 @@ public class DatabaseCreateParameters private String collationName; /** - * The collation name for the new database. + * Gets or sets the collation name for the new database. */ public String getCollationName() { return this.collationName; } /** - * The collation name for the new database. + * Gets or sets the collation name for the new database. */ public void setCollationName(String collationName) { this.collationName = collationName; } private String edition; /** - * The edition for the new database. + * Gets or sets the edition for the new database. */ public String getEdition() { return this.edition; } /** - * The edition for the new database. + * Gets or sets the edition for the new database. */ public void setEdition(String edition) { this.edition = edition; } private long maximumDatabaseSizeInGB; /** - * Maximum size of this database, in Gigabytes. + * Gets or sets the maximum size of this database, in Gigabytes. */ public long getMaximumDatabaseSizeInGB() { return this.maximumDatabaseSizeInGB; } /** - * Maximum size of this database, in Gigabytes. + * Gets or sets the maximum size of this database, in Gigabytes. */ public void setMaximumDatabaseSizeInGB(long maximumDatabaseSizeInGB) { this.maximumDatabaseSizeInGB = maximumDatabaseSizeInGB; } private String name; /** - * The name for the new database. + * Gets or sets the name for the new database. */ public String getName() { return this.name; } /** - * The name for the new database. + * Gets or sets the name for the new database. */ public void setName(String name) { this.name = name; } private String serviceObjectiveId; /** - * The id of this service objective. + * Gets or sets the id of this service objective. */ public String getServiceObjectiveId() { return this.serviceObjectiveId; } /** - * The id of this service objective. + * Gets or sets the id of this service objective. */ public void setServiceObjectiveId(String serviceObjectiveId) { this.serviceObjectiveId = serviceObjectiveId; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCreateResponse.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCreateResponse.java index 732d9c71653c3..4c30d67e67e0c 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCreateResponse.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseCreateResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.sql.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.Calendar; /** @@ -32,204 +34,204 @@ public class DatabaseCreateResponse extends OperationResponse private String collationName; /** - * This database resource's collation name. + * Gets or sets the database resource's collation name. */ public String getCollationName() { return this.collationName; } /** - * This database resource's collation name. + * Gets or sets the database resource's collation name. */ public void setCollationName(String collationName) { this.collationName = collationName; } private Calendar creationDate; /** - * The date this database was created. + * Gets or sets the date this database was created. */ public Calendar getCreationDate() { return this.creationDate; } /** - * The date this database was created. + * Gets or sets the date this database was created. */ public void setCreationDate(Calendar creationDate) { this.creationDate = creationDate; } private String edition; /** - * This database resource's edition. + * Gets or sets the database resource's edition. */ public String getEdition() { return this.edition; } /** - * This database resource's edition. + * Gets or sets the database resource's edition. */ public void setEdition(String edition) { this.edition = edition; } private int id; /** - * The id of the database. + * Gets or sets the id of the database. */ public int getId() { return this.id; } /** - * The id of the database. + * Gets or sets the id of the database. */ public void setId(int id) { this.id = id; } private boolean isFederationRoot; /** - * Determines if this database is a federation root. + * Gets or sets a value indicating whether the database is a federation root. */ public boolean getIsFederationRoot() { return this.isFederationRoot; } /** - * Determines if this database is a federation root. + * Gets or sets a value indicating whether the database is a federation root. */ public void setIsFederationRoot(boolean isFederationRoot) { this.isFederationRoot = isFederationRoot; } private boolean isSystemObject; /** - * Determines if this database a system object. + * Gets or sets a value indicating whether the database is a system object. */ public boolean getIsSystemObject() { return this.isSystemObject; } /** - * Determines if this database a system object. + * Gets or sets a value indicating whether the database is a system object. */ public void setIsSystemObject(boolean isSystemObject) { this.isSystemObject = isSystemObject; } private long maximumDatabaseSizeInGB; /** - * Maximum size of this database, in Gigabytes. + * Gets or sets the maximum size of this database, in Gigabytes. */ public long getMaximumDatabaseSizeInGB() { return this.maximumDatabaseSizeInGB; } /** - * Maximum size of this database, in Gigabytes. + * Gets or sets the maximum size of this database, in Gigabytes. */ public void setMaximumDatabaseSizeInGB(long maximumDatabaseSizeInGB) { this.maximumDatabaseSizeInGB = maximumDatabaseSizeInGB; } private String name; /** - * The name of the database. + * Gets or sets the name of the database. */ public String getName() { return this.name; } /** - * The name of the database. + * Gets or sets the name of the database. */ public void setName(String name) { this.name = name; } private String serviceObjectiveAssignmentErrorCode; /** - * The error code for this sevice objective. + * Gets or sets the error code for this service objective. */ public String getServiceObjectiveAssignmentErrorCode() { return this.serviceObjectiveAssignmentErrorCode; } /** - * The error code for this sevice objective. + * Gets or sets the error code for this service objective. */ public void setServiceObjectiveAssignmentErrorCode(String serviceObjectiveAssignmentErrorCode) { this.serviceObjectiveAssignmentErrorCode = serviceObjectiveAssignmentErrorCode; } private String serviceObjectiveAssignmentErrorDescription; /** - * The error description, if any. + * Gets or sets the error description, if any. */ public String getServiceObjectiveAssignmentErrorDescription() { return this.serviceObjectiveAssignmentErrorDescription; } /** - * The error description, if any. + * Gets or sets the error description, if any. */ public void setServiceObjectiveAssignmentErrorDescription(String serviceObjectiveAssignmentErrorDescription) { this.serviceObjectiveAssignmentErrorDescription = serviceObjectiveAssignmentErrorDescription; } private String serviceObjectiveAssignmentState; /** - * The state of the current assignment. + * Gets or sets the state of the current assignment. */ public String getServiceObjectiveAssignmentState() { return this.serviceObjectiveAssignmentState; } /** - * The state of the current assignment. + * Gets or sets the state of the current assignment. */ public void setServiceObjectiveAssignmentState(String serviceObjectiveAssignmentState) { this.serviceObjectiveAssignmentState = serviceObjectiveAssignmentState; } private String serviceObjectiveAssignmentStateDescription; /** - * The state description. + * Gets or sets the state description. */ public String getServiceObjectiveAssignmentStateDescription() { return this.serviceObjectiveAssignmentStateDescription; } /** - * The state description. + * Gets or sets the state description. */ public void setServiceObjectiveAssignmentStateDescription(String serviceObjectiveAssignmentStateDescription) { this.serviceObjectiveAssignmentStateDescription = serviceObjectiveAssignmentStateDescription; } private String serviceObjectiveAssignmentSuccessDate; /** - * The date the service's assignment succeeded. + * Gets or sets the date the service's assignment succeeded. */ public String getServiceObjectiveAssignmentSuccessDate() { return this.serviceObjectiveAssignmentSuccessDate; } /** - * The date the service's assignment succeeded. + * Gets or sets the date the service's assignment succeeded. */ public void setServiceObjectiveAssignmentSuccessDate(String serviceObjectiveAssignmentSuccessDate) { this.serviceObjectiveAssignmentSuccessDate = serviceObjectiveAssignmentSuccessDate; } private String serviceObjectiveId; /** - * The id of this service objective. + * Gets or sets the id of this service objective. */ public String getServiceObjectiveId() { return this.serviceObjectiveId; } /** - * The id of this service objective. + * Gets or sets the id of this service objective. */ public void setServiceObjectiveId(String serviceObjectiveId) { this.serviceObjectiveId = serviceObjectiveId; } private String sizeMB; /** - * The size of this database in megabytes (MB). + * Gets or sets the size of this database in megabytes (MB). */ public String getSizeMB() { return this.sizeMB; } /** - * The size of this database in megabytes (MB). + * Gets or sets the size of this database in megabytes (MB). */ public void setSizeMB(String sizeMB) { this.sizeMB = sizeMB; } private String state; /** - * The state of the database. + * Gets or sets the state of the database. */ public String getState() { return this.state; } /** - * The state of the database. + * Gets or sets the state of the database. */ public void setState(String state) { this.state = state; } private String type; /** - * The type of resource. + * Gets or sets the type of resource. */ public String getType() { return this.type; } /** - * The type of resource. + * Gets or sets the type of resource. */ public void setType(String type) { this.type = type; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseEditions.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseEditions.java index 25109c9ad7adf..17c39e6842e38 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseEditions.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseEditions.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -22,7 +24,7 @@ package com.microsoft.windowsazure.management.sql.models; /** -* Specifies the edition of the SQL database +* Specifies the edition of the SQL database. */ public class DatabaseEditions { diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseGetResponse.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseGetResponse.java index 9553fb5ac1853..3bc83cba6c7be 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseGetResponse.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.sql.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.Calendar; /** @@ -32,204 +34,204 @@ public class DatabaseGetResponse extends OperationResponse private String collationName; /** - * This database resource's collation name. + * Gets or sets the database resource's collation name. */ public String getCollationName() { return this.collationName; } /** - * This database resource's collation name. + * Gets or sets the database resource's collation name. */ public void setCollationName(String collationName) { this.collationName = collationName; } private Calendar creationDate; /** - * The date this database was created. + * Gets or sets the date this database was created. */ public Calendar getCreationDate() { return this.creationDate; } /** - * The date this database was created. + * Gets or sets the date this database was created. */ public void setCreationDate(Calendar creationDate) { this.creationDate = creationDate; } private String edition; /** - * This database resource's edition. + * Gets or sets the database resource's edition. */ public String getEdition() { return this.edition; } /** - * This database resource's edition. + * Gets or sets the database resource's edition. */ public void setEdition(String edition) { this.edition = edition; } private int id; /** - * The id of the database. + * Gets or sets the id of the database. */ public int getId() { return this.id; } /** - * The id of the database. + * Gets or sets the id of the database. */ public void setId(int id) { this.id = id; } private boolean isFederationRoot; /** - * Determines if this database is a federation root. + * Gets or sets a value indicating whether the database is a federation root. */ public boolean getIsFederationRoot() { return this.isFederationRoot; } /** - * Determines if this database is a federation root. + * Gets or sets a value indicating whether the database is a federation root. */ public void setIsFederationRoot(boolean isFederationRoot) { this.isFederationRoot = isFederationRoot; } private boolean isSystemObject; /** - * Determines if this database a system object. + * Gets or sets a value indicating whether the database is a system object. */ public boolean getIsSystemObject() { return this.isSystemObject; } /** - * Determines if this database a system object. + * Gets or sets a value indicating whether the database is a system object. */ public void setIsSystemObject(boolean isSystemObject) { this.isSystemObject = isSystemObject; } private long maximumDatabaseSizeInGB; /** - * Maximum size of this database, in Gigabytes. + * Gets or sets the maximum size of this database, in Gigabytes. */ public long getMaximumDatabaseSizeInGB() { return this.maximumDatabaseSizeInGB; } /** - * Maximum size of this database, in Gigabytes. + * Gets or sets the maximum size of this database, in Gigabytes. */ public void setMaximumDatabaseSizeInGB(long maximumDatabaseSizeInGB) { this.maximumDatabaseSizeInGB = maximumDatabaseSizeInGB; } private String name; /** - * The name of the database. + * Gets or sets the name of the database. */ public String getName() { return this.name; } /** - * The name of the database. + * Gets or sets the name of the database. */ public void setName(String name) { this.name = name; } private String serviceObjectiveAssignmentErrorCode; /** - * The error code for this sevice objective. + * Gets or sets the error code for this service objective. */ public String getServiceObjectiveAssignmentErrorCode() { return this.serviceObjectiveAssignmentErrorCode; } /** - * The error code for this sevice objective. + * Gets or sets the error code for this service objective. */ public void setServiceObjectiveAssignmentErrorCode(String serviceObjectiveAssignmentErrorCode) { this.serviceObjectiveAssignmentErrorCode = serviceObjectiveAssignmentErrorCode; } private String serviceObjectiveAssignmentErrorDescription; /** - * The error description, if any. + * Gets or sets the error description, if any. */ public String getServiceObjectiveAssignmentErrorDescription() { return this.serviceObjectiveAssignmentErrorDescription; } /** - * The error description, if any. + * Gets or sets the error description, if any. */ public void setServiceObjectiveAssignmentErrorDescription(String serviceObjectiveAssignmentErrorDescription) { this.serviceObjectiveAssignmentErrorDescription = serviceObjectiveAssignmentErrorDescription; } private String serviceObjectiveAssignmentState; /** - * The state of the current assignment. + * Gets or sets the state of the current assignment. */ public String getServiceObjectiveAssignmentState() { return this.serviceObjectiveAssignmentState; } /** - * The state of the current assignment. + * Gets or sets the state of the current assignment. */ public void setServiceObjectiveAssignmentState(String serviceObjectiveAssignmentState) { this.serviceObjectiveAssignmentState = serviceObjectiveAssignmentState; } private String serviceObjectiveAssignmentStateDescription; /** - * The state description. + * Gets or sets the state description. */ public String getServiceObjectiveAssignmentStateDescription() { return this.serviceObjectiveAssignmentStateDescription; } /** - * The state description. + * Gets or sets the state description. */ public void setServiceObjectiveAssignmentStateDescription(String serviceObjectiveAssignmentStateDescription) { this.serviceObjectiveAssignmentStateDescription = serviceObjectiveAssignmentStateDescription; } private String serviceObjectiveAssignmentSuccessDate; /** - * The date the service's assignment succeeded. + * Gets or sets the date the service's assignment succeeded. */ public String getServiceObjectiveAssignmentSuccessDate() { return this.serviceObjectiveAssignmentSuccessDate; } /** - * The date the service's assignment succeeded. + * Gets or sets the date the service's assignment succeeded. */ public void setServiceObjectiveAssignmentSuccessDate(String serviceObjectiveAssignmentSuccessDate) { this.serviceObjectiveAssignmentSuccessDate = serviceObjectiveAssignmentSuccessDate; } private String serviceObjectiveId; /** - * The id of this service objective. + * Gets or sets the id of this service objective. */ public String getServiceObjectiveId() { return this.serviceObjectiveId; } /** - * The id of this service objective. + * Gets or sets the id of this service objective. */ public void setServiceObjectiveId(String serviceObjectiveId) { this.serviceObjectiveId = serviceObjectiveId; } private String sizeMB; /** - * The size of this database in megabytes (MB). + * Gets or sets the size of this database in megabytes (MB). */ public String getSizeMB() { return this.sizeMB; } /** - * The size of this database in megabytes (MB). + * Gets or sets the size of this database in megabytes (MB). */ public void setSizeMB(String sizeMB) { this.sizeMB = sizeMB; } private String state; /** - * The state of the database. + * Gets or sets the state of the database. */ public String getState() { return this.state; } /** - * The state of the database. + * Gets or sets the state of the database. */ public void setState(String state) { this.state = state; } private String type; /** - * The type of resource. + * Gets or sets the type of resource. */ public String getType() { return this.type; } /** - * The type of resource. + * Gets or sets the type of resource. */ public void setType(String type) { this.type = type; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseListResponse.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseListResponse.java index 8e44c5aafaeef..bb559659b6567 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseListResponse.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.sql.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Calendar; import java.util.Iterator; @@ -34,12 +36,12 @@ public class DatabaseListResponse extends OperationResponse implements Iterable< private ArrayList databases; /** - * The SQL Server databases that are housed in a server. + * Gets or sets the SQL Server databases that are housed in a server. */ public ArrayList getDatabases() { return this.databases; } /** - * The SQL Server databases that are housed in a server. + * Gets or sets the SQL Server databases that are housed in a server. */ public void setDatabases(ArrayList databases) { this.databases = databases; } @@ -61,209 +63,216 @@ public Iterator iterator() return this.getDatabases().iterator(); } + /** + * SQL Server database. + */ public static class Database { private String collationName; /** - * This database resource's collation name. + * Gets or sets the database resource's collation name. */ public String getCollationName() { return this.collationName; } /** - * This database resource's collation name. + * Gets or sets the database resource's collation name. */ public void setCollationName(String collationName) { this.collationName = collationName; } private Calendar creationDate; /** - * The date this database was created. + * Gets or sets the date this database was created. */ public Calendar getCreationDate() { return this.creationDate; } /** - * The date this database was created. + * Gets or sets the date this database was created. */ public void setCreationDate(Calendar creationDate) { this.creationDate = creationDate; } private String edition; /** - * This database resource's edition. + * Gets or sets the database resource's edition. */ public String getEdition() { return this.edition; } /** - * This database resource's edition. + * Gets or sets the database resource's edition. */ public void setEdition(String edition) { this.edition = edition; } private int id; /** - * The id of the database. + * Gets or sets the id of the database. */ public int getId() { return this.id; } /** - * The id of the database. + * Gets or sets the id of the database. */ public void setId(int id) { this.id = id; } private boolean isFederationRoot; /** - * Determines if this database is a federation root. + * Gets or sets a value indicating whether the database is a federation + * root. */ public boolean getIsFederationRoot() { return this.isFederationRoot; } /** - * Determines if this database is a federation root. + * Gets or sets a value indicating whether the database is a federation + * root. */ public void setIsFederationRoot(boolean isFederationRoot) { this.isFederationRoot = isFederationRoot; } private boolean isSystemObject; /** - * Determines if this database a system object. + * Gets or sets a value indicating whether the database is a system + * object. */ public boolean getIsSystemObject() { return this.isSystemObject; } /** - * Determines if this database a system object. + * Gets or sets a value indicating whether the database is a system + * object. */ public void setIsSystemObject(boolean isSystemObject) { this.isSystemObject = isSystemObject; } private long maximumDatabaseSizeInGB; /** - * Maximum size of this database, in Gigabytes. + * Gets or sets the maximum size of this database, in Gigabytes. */ public long getMaximumDatabaseSizeInGB() { return this.maximumDatabaseSizeInGB; } /** - * Maximum size of this database, in Gigabytes. + * Gets or sets the maximum size of this database, in Gigabytes. */ public void setMaximumDatabaseSizeInGB(long maximumDatabaseSizeInGB) { this.maximumDatabaseSizeInGB = maximumDatabaseSizeInGB; } private String name; /** - * The name of the database. + * Gets or sets the name of the database. */ public String getName() { return this.name; } /** - * The name of the database. + * Gets or sets the name of the database. */ public void setName(String name) { this.name = name; } private String serviceObjectiveAssignmentErrorCode; /** - * The error code for this sevice objective. + * Gets or sets the error code for this service objective. */ public String getServiceObjectiveAssignmentErrorCode() { return this.serviceObjectiveAssignmentErrorCode; } /** - * The error code for this sevice objective. + * Gets or sets the error code for this service objective. */ public void setServiceObjectiveAssignmentErrorCode(String serviceObjectiveAssignmentErrorCode) { this.serviceObjectiveAssignmentErrorCode = serviceObjectiveAssignmentErrorCode; } private String serviceObjectiveAssignmentErrorDescription; /** - * The error description, if any. + * Gets or sets the error description, if any. */ public String getServiceObjectiveAssignmentErrorDescription() { return this.serviceObjectiveAssignmentErrorDescription; } /** - * The error description, if any. + * Gets or sets the error description, if any. */ public void setServiceObjectiveAssignmentErrorDescription(String serviceObjectiveAssignmentErrorDescription) { this.serviceObjectiveAssignmentErrorDescription = serviceObjectiveAssignmentErrorDescription; } private String serviceObjectiveAssignmentState; /** - * The state of the current assignment. + * Gets or sets the state of the current assignment. */ public String getServiceObjectiveAssignmentState() { return this.serviceObjectiveAssignmentState; } /** - * The state of the current assignment. + * Gets or sets the state of the current assignment. */ public void setServiceObjectiveAssignmentState(String serviceObjectiveAssignmentState) { this.serviceObjectiveAssignmentState = serviceObjectiveAssignmentState; } private String serviceObjectiveAssignmentStateDescription; /** - * The state description. + * Gets or sets the state description. */ public String getServiceObjectiveAssignmentStateDescription() { return this.serviceObjectiveAssignmentStateDescription; } /** - * The state description. + * Gets or sets the state description. */ public void setServiceObjectiveAssignmentStateDescription(String serviceObjectiveAssignmentStateDescription) { this.serviceObjectiveAssignmentStateDescription = serviceObjectiveAssignmentStateDescription; } private String serviceObjectiveAssignmentSuccessDate; /** - * The date the service's assignment succeeded. + * Gets or sets the date the service's assignment succeeded. */ public String getServiceObjectiveAssignmentSuccessDate() { return this.serviceObjectiveAssignmentSuccessDate; } /** - * The date the service's assignment succeeded. + * Gets or sets the date the service's assignment succeeded. */ public void setServiceObjectiveAssignmentSuccessDate(String serviceObjectiveAssignmentSuccessDate) { this.serviceObjectiveAssignmentSuccessDate = serviceObjectiveAssignmentSuccessDate; } private String serviceObjectiveId; /** - * The id of this service objective. + * Gets or sets the id of this service objective. */ public String getServiceObjectiveId() { return this.serviceObjectiveId; } /** - * The id of this service objective. + * Gets or sets the id of this service objective. */ public void setServiceObjectiveId(String serviceObjectiveId) { this.serviceObjectiveId = serviceObjectiveId; } private String sizeMB; /** - * The size of this database in megabytes (MB). + * Gets or sets the size of this database in megabytes (MB). */ public String getSizeMB() { return this.sizeMB; } /** - * The size of this database in megabytes (MB). + * Gets or sets the size of this database in megabytes (MB). */ public void setSizeMB(String sizeMB) { this.sizeMB = sizeMB; } private String state; /** - * The state of the database. + * Gets or sets the state of the database. */ public String getState() { return this.state; } /** - * The state of the database. + * Gets or sets the state of the database. */ public void setState(String state) { this.state = state; } private String type; /** - * The type of resource. + * Gets or sets the type of resource. */ public String getType() { return this.type; } /** - * The type of resource. + * Gets or sets the type of resource. */ public void setType(String type) { this.type = type; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseOperationGetResponse.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseOperationGetResponse.java index f41ddf76d1a98..f69c4c2522a65 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseOperationGetResponse.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseOperationGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.sql.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.Calendar; /** @@ -32,192 +34,204 @@ public class DatabaseOperationGetResponse extends OperationResponse private String databaseName; /** - * Name of the SQL Database on which the operation is performed. + * Gets or sets the name of the SQL Database on which the operation is + * performed. */ public String getDatabaseName() { return this.databaseName; } /** - * Name of the SQL Database on which the operation is performed. + * Gets or sets the name of the SQL Database on which the operation is + * performed. */ public void setDatabaseName(String databaseName) { this.databaseName = databaseName; } private String error; /** - * Description of the error that occurred during a failed operation. + * Gets or sets the description of the error that occurred during a failed + * operation. */ public String getError() { return this.error; } /** - * Description of the error that occurred during a failed operation. + * Gets or sets the description of the error that occurred during a failed + * operation. */ public void setError(String error) { this.error = error; } private int errorCode; /** - * Code indicating the error that occurred during a failed operation. + * Gets or sets the code indicating the error that occurred during a failed + * operation. */ public int getErrorCode() { return this.errorCode; } /** - * Code indicating the error that occurred during a failed operation. + * Gets or sets the code indicating the error that occurred during a failed + * operation. */ public void setErrorCode(int errorCode) { this.errorCode = errorCode; } private int errorSeverity; /** - * Severity level of the error that occurred during a failed operation. + * Gets or sets the severity level of the error that occurred during a + * failed operation. */ public int getErrorSeverity() { return this.errorSeverity; } /** - * Severity level of the error that occurred during a failed operation. + * Gets or sets the severity level of the error that occurred during a + * failed operation. */ public void setErrorSeverity(int errorSeverity) { this.errorSeverity = errorSeverity; } private int errorState; /** - * Error State. + * Gets or sets the error state. */ public int getErrorState() { return this.errorState; } /** - * Error State. + * Gets or sets the error state. */ public void setErrorState(int errorState) { this.errorState = errorState; } private String id; /** - * Unique identifier of the operation.. + * Gets or sets unique identifier of the operation. */ public String getId() { return this.id; } /** - * Unique identifier of the operation.. + * Gets or sets unique identifier of the operation. */ public void setId(String id) { this.id = id; } private Calendar lastModifyTime; /** - * Timestamp when the record was last modified for a long running operation. + * Gets or sets the timestamp when the record was last modified for a long + * running operation. */ public Calendar getLastModifyTime() { return this.lastModifyTime; } /** - * Timestamp when the record was last modified for a long running operation. + * Gets or sets the timestamp when the record was last modified for a long + * running operation. */ public void setLastModifyTime(Calendar lastModifyTime) { this.lastModifyTime = lastModifyTime; } private String name; /** - * The name of the operation. + * Gets or sets the name of the operation. */ public String getName() { return this.name; } /** - * The name of the operation. + * Gets or sets the name of the operation. */ public void setName(String name) { this.name = name; } private String parentLink; /** - * The ParentLink of the operation. + * Gets or sets the ParentLink of the operation. */ public String getParentLink() { return this.parentLink; } /** - * The ParentLink of the operation. + * Gets or sets the ParentLink of the operation. */ public void setParentLink(String parentLink) { this.parentLink = parentLink; } private int percentComplete; /** - * Percentage of operation that has completed. + * Gets or sets the percentage of operation that has completed. */ public int getPercentComplete() { return this.percentComplete; } /** - * Percentage of operation that has completed. + * Gets or sets the percentage of operation that has completed. */ public void setPercentComplete(int percentComplete) { this.percentComplete = percentComplete; } private String selfLink; /** - * The SelfLink of the operation. + * Gets or sets the SelfLink of the operation. */ public String getSelfLink() { return this.selfLink; } /** - * The SelfLink of the operation. + * Gets or sets the SelfLink of the operation. */ public void setSelfLink(String selfLink) { this.selfLink = selfLink; } private String sessionActivityId; /** - * Session scoped ID of the operation. + * Gets or sets session scoped ID of the operation. */ public String getSessionActivityId() { return this.sessionActivityId; } /** - * Session scoped ID of the operation. + * Gets or sets session scoped ID of the operation. */ public void setSessionActivityId(String sessionActivityId) { this.sessionActivityId = sessionActivityId; } private Calendar startTime; /** - * Timestamp when the operation started. + * Gets or sets the timestamp when the operation started. */ public Calendar getStartTime() { return this.startTime; } /** - * Timestamp when the operation started. + * Gets or sets the timestamp when the operation started. */ public void setStartTime(Calendar startTime) { this.startTime = startTime; } private String state; /** - * The state of the operation. + * Gets or sets the state of the operation. */ public String getState() { return this.state; } /** - * The state of the operation. + * Gets or sets the state of the operation. */ public void setState(String state) { this.state = state; } private int stateId; /** - * Current State of the long running operation in numeric format. + * Gets or sets the current state of the long running operation in numeric + * format. */ public int getStateId() { return this.stateId; } /** - * Current State of the long running operation in numeric format. + * Gets or sets the current state of the long running operation in numeric + * format. */ public void setStateId(int stateId) { this.stateId = stateId; } private String type; /** - * The type of resource. + * Gets or sets the type of resource. */ public String getType() { return this.type; } /** - * The type of resource. + * Gets or sets the type of resource. */ public void setType(String type) { this.type = type; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseOperationListResponse.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseOperationListResponse.java index 344282f6ce5c8..2a19423ab2860 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseOperationListResponse.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseOperationListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.sql.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Calendar; import java.util.Iterator; @@ -35,12 +37,12 @@ public class DatabaseOperationListResponse extends OperationResponse implements private ArrayList databaseOperations; /** - * The list of database operations' response. + * Gets or sets the list of database operations' response. */ public ArrayList getDatabaseOperations() { return this.databaseOperations; } /** - * The list of database operations' response. + * Gets or sets the list of database operations' response. */ public void setDatabaseOperations(ArrayList databaseOperations) { this.databaseOperations = databaseOperations; } @@ -62,199 +64,212 @@ public Iterator iterator() return this.getDatabaseOperations().iterator(); } + /** + * Database operation. + */ public static class DatabaseOperation { private String databaseName; /** - * Name of the SQL Database on which the operation is performed. + * Gets or sets the name of the SQL Database on which the operation is + * performed. */ public String getDatabaseName() { return this.databaseName; } /** - * Name of the SQL Database on which the operation is performed. + * Gets or sets the name of the SQL Database on which the operation is + * performed. */ public void setDatabaseName(String databaseName) { this.databaseName = databaseName; } private String error; /** - * Description of the error that occurred during a failed operation. + * Gets or sets the description of the error that occurred during a + * failed operation. */ public String getError() { return this.error; } /** - * Description of the error that occurred during a failed operation. + * Gets or sets the description of the error that occurred during a + * failed operation. */ public void setError(String error) { this.error = error; } private int errorCode; /** - * Code indicating the error that occurred during a failed operation. + * Gets or sets the code indicating the error that occurred during a + * failed operation. */ public int getErrorCode() { return this.errorCode; } /** - * Code indicating the error that occurred during a failed operation. + * Gets or sets the code indicating the error that occurred during a + * failed operation. */ public void setErrorCode(int errorCode) { this.errorCode = errorCode; } private int errorSeverity; /** - * Severity level of the error that occurred during a failed operation. + * Gets or sets the severity level of the error that occurred during a + * failed operation. */ public int getErrorSeverity() { return this.errorSeverity; } /** - * Severity level of the error that occurred during a failed operation. + * Gets or sets the severity level of the error that occurred during a + * failed operation. */ public void setErrorSeverity(int errorSeverity) { this.errorSeverity = errorSeverity; } private int errorState; /** - * Error State. + * Gets or sets the error state. */ public int getErrorState() { return this.errorState; } /** - * Error State. + * Gets or sets the error state. */ public void setErrorState(int errorState) { this.errorState = errorState; } private String id; /** - * Unique identifier of the operation.. + * Gets or sets unique identifier of the operation.. */ public String getId() { return this.id; } /** - * Unique identifier of the operation.. + * Gets or sets unique identifier of the operation.. */ public void setId(String id) { this.id = id; } private Calendar lastModifyTime; /** - * Timestamp when the record was last modified for a long running - * operation. + * Gets or sets the timestamp when the record was last modified for a + * long running operation. */ public Calendar getLastModifyTime() { return this.lastModifyTime; } /** - * Timestamp when the record was last modified for a long running - * operation. + * Gets or sets the timestamp when the record was last modified for a + * long running operation. */ public void setLastModifyTime(Calendar lastModifyTime) { this.lastModifyTime = lastModifyTime; } private String name; /** - * The name of the operation. + * Gets or sets the name of the operation. */ public String getName() { return this.name; } /** - * The name of the operation. + * Gets or sets the name of the operation. */ public void setName(String name) { this.name = name; } private String parentLink; /** - * The ParentLink of the operation. + * Gets or sets the ParentLink of the operation. */ public String getParentLink() { return this.parentLink; } /** - * The ParentLink of the operation. + * Gets or sets the ParentLink of the operation. */ public void setParentLink(String parentLink) { this.parentLink = parentLink; } private int percentComplete; /** - * Percentage of operation that has completed. + * Gets or sets the percentage of operation that has completed. */ public int getPercentComplete() { return this.percentComplete; } /** - * Percentage of operation that has completed. + * Gets or sets the percentage of operation that has completed. */ public void setPercentComplete(int percentComplete) { this.percentComplete = percentComplete; } private String selfLink; /** - * The SelfLink of the operation. + * Gets or sets the SelfLink of the operation. */ public String getSelfLink() { return this.selfLink; } /** - * The SelfLink of the operation. + * Gets or sets the SelfLink of the operation. */ public void setSelfLink(String selfLink) { this.selfLink = selfLink; } private String sessionActivityId; /** - * Session scoped ID of the operation. + * Gets or sets session scoped ID of the operation. */ public String getSessionActivityId() { return this.sessionActivityId; } /** - * Session scoped ID of the operation. + * Gets or sets session scoped ID of the operation. */ public void setSessionActivityId(String sessionActivityId) { this.sessionActivityId = sessionActivityId; } private Calendar startTime; /** - * Timestamp when the operation started. + * Gets or sets the timestamp when the operation started. */ public Calendar getStartTime() { return this.startTime; } /** - * Timestamp when the operation started. + * Gets or sets the timestamp when the operation started. */ public void setStartTime(Calendar startTime) { this.startTime = startTime; } private String state; /** - * The state of the operation. + * Gets or sets the state of the operation. */ public String getState() { return this.state; } /** - * The state of the operation. + * Gets or sets the state of the operation. */ public void setState(String state) { this.state = state; } private int stateId; /** - * Current State of the long running operation in numeric format. + * Gets or sets current state of the long running operation in numeric + * format. */ public int getStateId() { return this.stateId; } /** - * Current State of the long running operation in numeric format. + * Gets or sets current state of the long running operation in numeric + * format. */ public void setStateId(int stateId) { this.stateId = stateId; } private String type; /** - * The type of resource. + * Gets or sets the type of resource. */ public String getType() { return this.type; } /** - * The type of resource. + * Gets or sets the type of resource. */ public void setType(String type) { this.type = type; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseUpdateParameters.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseUpdateParameters.java index 9f77a3555b5e5..f7cc8b16bf161 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseUpdateParameters.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseUpdateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -29,72 +31,72 @@ public class DatabaseUpdateParameters private String collationName; /** - * The collation name for the new database. + * Gets or sets the collation name for the new database. */ public String getCollationName() { return this.collationName; } /** - * The collation name for the new database. + * Gets or sets the collation name for the new database. */ public void setCollationName(String collationName) { this.collationName = collationName; } private String edition; /** - * The edition for the new database. + * Gets or sets the edition for the new database. */ public String getEdition() { return this.edition; } /** - * The edition for the new database. + * Gets or sets the edition for the new database. */ public void setEdition(String edition) { this.edition = edition; } private int id; /** - * The id of the database. + * Gets or sets the id of the database. */ public int getId() { return this.id; } /** - * The id of the database. + * Gets or sets the id of the database. */ public void setId(int id) { this.id = id; } private long maximumDatabaseSizeInGB; /** - * Maximum size of this database, in Gigabytes. + * Gets or sets the maximum size of this database, in Gigabytes. */ public long getMaximumDatabaseSizeInGB() { return this.maximumDatabaseSizeInGB; } /** - * Maximum size of this database, in Gigabytes. + * Gets or sets the maximum size of this database, in Gigabytes. */ public void setMaximumDatabaseSizeInGB(long maximumDatabaseSizeInGB) { this.maximumDatabaseSizeInGB = maximumDatabaseSizeInGB; } private String name; /** - * The name of the database. + * Gets or sets the name of the database. */ public String getName() { return this.name; } /** - * The name of the database. + * Gets or sets the name of the database. */ public void setName(String name) { this.name = name; } private String serviceObjectiveId; /** - * The id of this service objective. + * Gets or sets the id of this service objective. */ public String getServiceObjectiveId() { return this.serviceObjectiveId; } /** - * The id of this service objective. + * Gets or sets the id of this service objective. */ public void setServiceObjectiveId(String serviceObjectiveId) { this.serviceObjectiveId = serviceObjectiveId; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseUpdateResponse.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseUpdateResponse.java index 13785616f8392..2c5bf4c305465 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseUpdateResponse.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/DatabaseUpdateResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.sql.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.Calendar; /** @@ -32,204 +34,204 @@ public class DatabaseUpdateResponse extends OperationResponse private String collationName; /** - * This database resource's collation name. + * Gets or sets the database resource's collation name. */ public String getCollationName() { return this.collationName; } /** - * This database resource's collation name. + * Gets or sets the database resource's collation name. */ public void setCollationName(String collationName) { this.collationName = collationName; } private Calendar creationDate; /** - * The date this database was created. + * Gets or sets the date this database was created. */ public Calendar getCreationDate() { return this.creationDate; } /** - * The date this database was created. + * Gets or sets the date this database was created. */ public void setCreationDate(Calendar creationDate) { this.creationDate = creationDate; } private String edition; /** - * This database resource's edition. + * Gets or sets the database resource's edition. */ public String getEdition() { return this.edition; } /** - * This database resource's edition. + * Gets or sets the database resource's edition. */ public void setEdition(String edition) { this.edition = edition; } private int id; /** - * The id of the database. + * Gets or sets the id of the database. */ public int getId() { return this.id; } /** - * The id of the database. + * Gets or sets the id of the database. */ public void setId(int id) { this.id = id; } private boolean isFederationRoot; /** - * Determines if this database is a federation root. + * Gets or sets a value indicating whether the database is a federation root. */ public boolean getIsFederationRoot() { return this.isFederationRoot; } /** - * Determines if this database is a federation root. + * Gets or sets a value indicating whether the database is a federation root. */ public void setIsFederationRoot(boolean isFederationRoot) { this.isFederationRoot = isFederationRoot; } private boolean isSystemObject; /** - * Determines if this database a system object. + * Gets or sets a value indicating whether the database is a system object. */ public boolean getIsSystemObject() { return this.isSystemObject; } /** - * Determines if this database a system object. + * Gets or sets a value indicating whether the database is a system object. */ public void setIsSystemObject(boolean isSystemObject) { this.isSystemObject = isSystemObject; } private long maximumDatabaseSizeInGB; /** - * Maximum size of this database, in Gigabytes. + * Gets or sets the maximum size of this database, in Gigabytes. */ public long getMaximumDatabaseSizeInGB() { return this.maximumDatabaseSizeInGB; } /** - * Maximum size of this database, in Gigabytes. + * Gets or sets the maximum size of this database, in Gigabytes. */ public void setMaximumDatabaseSizeInGB(long maximumDatabaseSizeInGB) { this.maximumDatabaseSizeInGB = maximumDatabaseSizeInGB; } private String name; /** - * The name of the database. + * Gets or sets the name of the database. */ public String getName() { return this.name; } /** - * The name of the database. + * Gets or sets the name of the database. */ public void setName(String name) { this.name = name; } private String serviceObjectiveAssignmentErrorCode; /** - * The error code for this sevice objective. + * Gets or sets the error code for this service objective. */ public String getServiceObjectiveAssignmentErrorCode() { return this.serviceObjectiveAssignmentErrorCode; } /** - * The error code for this sevice objective. + * Gets or sets the error code for this service objective. */ public void setServiceObjectiveAssignmentErrorCode(String serviceObjectiveAssignmentErrorCode) { this.serviceObjectiveAssignmentErrorCode = serviceObjectiveAssignmentErrorCode; } private String serviceObjectiveAssignmentErrorDescription; /** - * The error description, if any. + * Gets or sets the error description, if any. */ public String getServiceObjectiveAssignmentErrorDescription() { return this.serviceObjectiveAssignmentErrorDescription; } /** - * The error description, if any. + * Gets or sets the error description, if any. */ public void setServiceObjectiveAssignmentErrorDescription(String serviceObjectiveAssignmentErrorDescription) { this.serviceObjectiveAssignmentErrorDescription = serviceObjectiveAssignmentErrorDescription; } private String serviceObjectiveAssignmentState; /** - * The state of the current assignment. + * Gets or sets the state of the current assignment. */ public String getServiceObjectiveAssignmentState() { return this.serviceObjectiveAssignmentState; } /** - * The state of the current assignment. + * Gets or sets the state of the current assignment. */ public void setServiceObjectiveAssignmentState(String serviceObjectiveAssignmentState) { this.serviceObjectiveAssignmentState = serviceObjectiveAssignmentState; } private String serviceObjectiveAssignmentStateDescription; /** - * The state description. + * Gets or sets the state description. */ public String getServiceObjectiveAssignmentStateDescription() { return this.serviceObjectiveAssignmentStateDescription; } /** - * The state description. + * Gets or sets the state description. */ public void setServiceObjectiveAssignmentStateDescription(String serviceObjectiveAssignmentStateDescription) { this.serviceObjectiveAssignmentStateDescription = serviceObjectiveAssignmentStateDescription; } private String serviceObjectiveAssignmentSuccessDate; /** - * The date the service's assignment succeeded. + * Gets or sets the date the service's assignment succeeded. */ public String getServiceObjectiveAssignmentSuccessDate() { return this.serviceObjectiveAssignmentSuccessDate; } /** - * The date the service's assignment succeeded. + * Gets or sets the date the service's assignment succeeded. */ public void setServiceObjectiveAssignmentSuccessDate(String serviceObjectiveAssignmentSuccessDate) { this.serviceObjectiveAssignmentSuccessDate = serviceObjectiveAssignmentSuccessDate; } private String serviceObjectiveId; /** - * The id of this service objective. + * Gets or sets the id of this service objective. */ public String getServiceObjectiveId() { return this.serviceObjectiveId; } /** - * The id of this service objective. + * Gets or sets the id of this service objective. */ public void setServiceObjectiveId(String serviceObjectiveId) { this.serviceObjectiveId = serviceObjectiveId; } private String sizeMB; /** - * The size of this database in megabytes (MB). + * Gets or sets the size of this database in megabytes (MB). */ public String getSizeMB() { return this.sizeMB; } /** - * The size of this database in megabytes (MB). + * Gets or sets the size of this database in megabytes (MB). */ public void setSizeMB(String sizeMB) { this.sizeMB = sizeMB; } private String state; /** - * The state of the database. + * Gets or sets the state of the database. */ public String getState() { return this.state; } /** - * The state of the database. + * Gets or sets the state of the database. */ public void setState(String state) { this.state = state; } private String type; /** - * The type of resource. + * Gets or sets the type of resource. */ public String getType() { return this.type; } /** - * The type of resource. + * Gets or sets the type of resource. */ public void setType(String type) { this.type = type; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleCreateParameters.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleCreateParameters.java index da1e9c3b57fa9..fa20bdb19ba4a 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleCreateParameters.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleCreateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -24,43 +26,43 @@ import java.net.InetAddress; /** -* The parameters for the Create Firewall Rule operation +* The parameters for the Create Firewall Rule operation. */ public class FirewallRuleCreateParameters { private InetAddress endIPAddress; /** - * The ending IP address applied to this firewall rule. + * Gets or sets the ending IP address applied to this firewall rule. */ public InetAddress getEndIPAddress() { return this.endIPAddress; } /** - * The ending IP address applied to this firewall rule. + * Gets or sets the ending IP address applied to this firewall rule. */ public void setEndIPAddress(InetAddress endIPAddress) { this.endIPAddress = endIPAddress; } private String name; /** - * The name of this firewall rule. + * Gets or sets the name of this firewall rule. */ public String getName() { return this.name; } /** - * The name of this firewall rule. + * Gets or sets the name of this firewall rule. */ public void setName(String name) { this.name = name; } private InetAddress startIPAddress; /** - * The beginning IP address applied to this firewall rule. + * Gets or sets the beginning IP address applied to this firewall rule. */ public InetAddress getStartIPAddress() { return this.startIPAddress; } /** - * The beginning IP address applied to this firewall rule. + * Gets or sets the beginning IP address applied to this firewall rule. */ public void setStartIPAddress(InetAddress startIPAddress) { this.startIPAddress = startIPAddress; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleCreateResponse.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleCreateResponse.java index 49906b76d8bbd..8ea779c6a5797 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleCreateResponse.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleCreateResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.sql.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.InetAddress; /** @@ -32,60 +34,60 @@ public class FirewallRuleCreateResponse extends OperationResponse private InetAddress endIPAddress; /** - * The ending IP address applied to this rule. + * Gets or sets the ending IP address applied to this rule. */ public InetAddress getEndIPAddress() { return this.endIPAddress; } /** - * The ending IP address applied to this rule. + * Gets or sets the ending IP address applied to this rule. */ public void setEndIPAddress(InetAddress endIPAddress) { this.endIPAddress = endIPAddress; } private String name; /** - * The name of the Firewall Rule. + * Gets or sets the name of the Firewall Rule. */ public String getName() { return this.name; } /** - * The name of the Firewall Rule. + * Gets or sets the name of the Firewall Rule. */ public void setName(String name) { this.name = name; } private InetAddress startIPAddress; /** - * The beginning IP address applied to this rule. + * Gets or sets the beginning IP address applied to this rule. */ public InetAddress getStartIPAddress() { return this.startIPAddress; } /** - * The beginning IP address applied to this rule. + * Gets or sets the beginning IP address applied to this rule. */ public void setStartIPAddress(InetAddress startIPAddress) { this.startIPAddress = startIPAddress; } private String state; /** - * The state of the rule. + * Gets or sets the state of the rule. */ public String getState() { return this.state; } /** - * The state of the rule. + * Gets or sets the state of the rule. */ public void setState(String state) { this.state = state; } private String type; /** - * The type of resource. + * Gets or sets the type of resource. */ public String getType() { return this.type; } /** - * The type of resource. + * Gets or sets the type of resource. */ public void setType(String type) { this.type = type; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleListResponse.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleListResponse.java index c9d5439169596..f631dc5e36fdf 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleListResponse.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.sql.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.InetAddress; import java.util.ArrayList; import java.util.Iterator; @@ -34,12 +36,12 @@ public class FirewallRuleListResponse extends OperationResponse implements Itera private ArrayList firewallRules; /** - * The firewall rules for this SQL Database Server. + * Gets or sets the firewall rules for this SQL Database Server. */ public ArrayList getFirewallRules() { return this.firewallRules; } /** - * The firewall rules for this SQL Database Server. + * Gets or sets the firewall rules for this SQL Database Server. */ public void setFirewallRules(ArrayList firewallRules) { this.firewallRules = firewallRules; } @@ -61,53 +63,56 @@ public Iterator iterator() return this.getFirewallRules().iterator(); } + /** + * Firewall rule. + */ public static class FirewallRule { private InetAddress endIPAddress; /** - * The ending IP address applied to this rule. + * Gets or sets the ending IP address applied to this rule. */ public InetAddress getEndIPAddress() { return this.endIPAddress; } /** - * The ending IP address applied to this rule. + * Gets or sets the ending IP address applied to this rule. */ public void setEndIPAddress(InetAddress endIPAddress) { this.endIPAddress = endIPAddress; } private String name; /** - * The name of the Firewall Rule. + * Gets or sets the name of the Firewall Rule. */ public String getName() { return this.name; } /** - * The name of the Firewall Rule. + * Gets or sets the name of the Firewall Rule. */ public void setName(String name) { this.name = name; } private InetAddress startIPAddress; /** - * The beginning IP address applied to this rule. + * Gets or sets the beginning IP address applied to this rule. */ public InetAddress getStartIPAddress() { return this.startIPAddress; } /** - * The beginning IP address applied to this rule. + * Gets or sets the beginning IP address applied to this rule. */ public void setStartIPAddress(InetAddress startIPAddress) { this.startIPAddress = startIPAddress; } private String type; /** - * The type of resource. + * Gets or sets the type of resource. */ public String getType() { return this.type; } /** - * The type of resource. + * Gets or sets the type of resource. */ public void setType(String type) { this.type = type; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleUpdateParameters.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleUpdateParameters.java index 267398ca31f91..3d649085881b1 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleUpdateParameters.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleUpdateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -24,43 +26,43 @@ import java.net.InetAddress; /** -* The parameters for the Create Firewall Rule operation +* The parameters for the Create Firewall Rule operation. */ public class FirewallRuleUpdateParameters { private InetAddress endIPAddress; /** - * The ending IP address applied to this firewall rule. + * Gets or sets the ending IP address applied to this firewall rule. */ public InetAddress getEndIPAddress() { return this.endIPAddress; } /** - * The ending IP address applied to this firewall rule. + * Gets or sets the ending IP address applied to this firewall rule. */ public void setEndIPAddress(InetAddress endIPAddress) { this.endIPAddress = endIPAddress; } private String name; /** - * The name of this firewall rule. + * Gets or sets the name of this firewall rule. */ public String getName() { return this.name; } /** - * The name of this firewall rule. + * Gets or sets the name of this firewall rule. */ public void setName(String name) { this.name = name; } private InetAddress startIPAddress; /** - * The beginning IP address applied to this firewall rule. + * Gets or sets the beginning IP address applied to this firewall rule. */ public InetAddress getStartIPAddress() { return this.startIPAddress; } /** - * The beginning IP address applied to this firewall rule. + * Gets or sets the beginning IP address applied to this firewall rule. */ public void setStartIPAddress(InetAddress startIPAddress) { this.startIPAddress = startIPAddress; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleUpdateResponse.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleUpdateResponse.java index 355d0e42b6c1c..8929b882c39d2 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleUpdateResponse.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/FirewallRuleUpdateResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.sql.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.InetAddress; /** @@ -32,60 +34,60 @@ public class FirewallRuleUpdateResponse extends OperationResponse private InetAddress endIPAddress; /** - * The ending IP address applied to this rule. + * Gets or sets the ending IP address applied to this rule. */ public InetAddress getEndIPAddress() { return this.endIPAddress; } /** - * The ending IP address applied to this rule. + * Gets or sets the ending IP address applied to this rule. */ public void setEndIPAddress(InetAddress endIPAddress) { this.endIPAddress = endIPAddress; } private String name; /** - * The name of the Firewall Rule. + * Gets or sets the name of the Firewall Rule. */ public String getName() { return this.name; } /** - * The name of the Firewall Rule. + * Gets or sets the name of the Firewall Rule. */ public void setName(String name) { this.name = name; } private InetAddress startIPAddress; /** - * The beginning IP address applied to this rule. + * Gets or sets the beginning IP address applied to this rule. */ public InetAddress getStartIPAddress() { return this.startIPAddress; } /** - * The beginning IP address applied to this rule. + * Gets or sets the beginning IP address applied to this rule. */ public void setStartIPAddress(InetAddress startIPAddress) { this.startIPAddress = startIPAddress; } private String state; /** - * The state of the rule. + * Gets or sets the state of the rule. */ public String getState() { return this.state; } /** - * The state of the rule. + * Gets or sets the state of the rule. */ public void setState(String state) { this.state = state; } private String type; /** - * The type of resource. + * Gets or sets the type of resource. */ public String getType() { return this.type; } /** - * The type of resource. + * Gets or sets the type of resource. */ public void setType(String type) { this.type = type; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServerChangeAdministratorPasswordParameters.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServerChangeAdministratorPasswordParameters.java index 5213955729d97..98b67a30dada0 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServerChangeAdministratorPasswordParameters.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServerChangeAdministratorPasswordParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -29,12 +31,12 @@ public class ServerChangeAdministratorPasswordParameters private String newPassword; /** - * The new password for the administrator + * Gets or sets new password for the administrator. */ public String getNewPassword() { return this.newPassword; } /** - * The new password for the administrator + * Gets or sets new password for the administrator. */ public void setNewPassword(String newPassword) { this.newPassword = newPassword; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServerCreateParameters.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServerCreateParameters.java index 2530f61c0a2b0..b3f2418a54cc6 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServerCreateParameters.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServerCreateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -29,36 +31,36 @@ public class ServerCreateParameters private String administratorPassword; /** - * The administrator password + * Gets or sets the administrator password. */ public String getAdministratorPassword() { return this.administratorPassword; } /** - * The administrator password + * Gets or sets the administrator password. */ public void setAdministratorPassword(String administratorPassword) { this.administratorPassword = administratorPassword; } private String administratorUserName; /** - * The administrator username + * Gets or sets the administrator username. */ public String getAdministratorUserName() { return this.administratorUserName; } /** - * The administrator username + * Gets or sets the administrator username. */ public void setAdministratorUserName(String administratorUserName) { this.administratorUserName = administratorUserName; } private String location; /** - * The region in which this server will be created. + * Gets or sets the region in which this server will be created. */ public String getLocation() { return this.location; } /** - * The region in which this server will be created. + * Gets or sets the region in which this server will be created. */ public void setLocation(String location) { this.location = location; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServerCreateResponse.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServerCreateResponse.java index 6a00525d7ebe3..32d4be10166da 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServerCreateResponse.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServerCreateResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,22 +23,22 @@ package com.microsoft.windowsazure.management.sql.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** -* The response returned from the Create Server operation +* The response returned from the Create Server operation. */ public class ServerCreateResponse extends OperationResponse { private String serverName; /** - * The name of the server that was created + * Gets or sets the name of the server that was created. */ public String getServerName() { return this.serverName; } /** - * The name of the server that was created + * Gets or sets the name of the server that was created. */ public void setServerName(String serverName) { this.serverName = serverName; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServerListResponse.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServerListResponse.java index f746effcf1b13..d22168fe233c7 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServerListResponse.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServerListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,25 +23,25 @@ package com.microsoft.windowsazure.management.sql.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; /** -* The response structure for the Server List operation +* The response structure for the Server List operation. */ public class ServerListResponse extends OperationResponse implements Iterable { private ArrayList servers; /** - * The SQL Servers that are valid for your subscription. + * Gets or sets the SQL Servers that are valid for your subscription. */ public ArrayList getServers() { return this.servers; } /** - * The SQL Servers that are valid for your subscription. + * Gets or sets the SQL Servers that are valid for your subscription. */ public void setServers(ArrayList servers) { this.servers = servers; } @@ -69,52 +71,52 @@ public static class Server private String administratorUserName; /** - * The name of an administrator for this server. + * Gets or sets the name of an administrator for this server. */ public String getAdministratorUserName() { return this.administratorUserName; } /** - * The name of an administrator for this server. + * Gets or sets the name of an administrator for this server. */ public void setAdministratorUserName(String administratorUserName) { this.administratorUserName = administratorUserName; } private HashMap features; /** - * The list of features and the type of database server for an - * individual server. + * Gets or sets the list of features and the type of database server for + * an individual server. */ public HashMap getFeatures() { return this.features; } /** - * The list of features and the type of database server for an - * individual server. + * Gets or sets the list of features and the type of database server for + * an individual server. */ public void setFeatures(HashMap features) { this.features = features; } private String location; /** - * The name of a data center location that is valid for your - * subscription. + * Gets or sets the name of a data center location that is valid for + * your subscription. */ public String getLocation() { return this.location; } /** - * The name of a data center location that is valid for your - * subscription. + * Gets or sets the name of a data center location that is valid for + * your subscription. */ public void setLocation(String location) { this.location = location; } private String name; /** - * The name of a SQL Server running in your subscription. + * Gets or sets the name of a SQL Server running in your subscription. */ public String getName() { return this.name; } /** - * The name of a SQL Server running in your subscription. + * Gets or sets the name of a SQL Server running in your subscription. */ public void setName(String name) { this.name = name; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServiceObjectiveGetResponse.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServiceObjectiveGetResponse.java index 83f08475770dd..7ffbe332d2aa2 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServiceObjectiveGetResponse.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServiceObjectiveGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.sql.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; /** @@ -33,134 +35,136 @@ public class ServiceObjectiveGetResponse extends OperationResponse private String description; /** - * The service objective description. + * Gets or sets the service objective description. */ public String getDescription() { return this.description; } /** - * The service objective description. + * Gets or sets the service objective description. */ public void setDescription(String description) { this.description = description; } private ArrayList dimensionSettings; /** - * The service objective dimension settings. + * Gets or sets the service objective dimension settings. */ public ArrayList getDimensionSettings() { return this.dimensionSettings; } /** - * The service objective dimension settings. + * Gets or sets the service objective dimension settings. */ public void setDimensionSettings(ArrayList dimensionSettings) { this.dimensionSettings = dimensionSettings; } private boolean enabled; /** - * The value indicating whether the service objective is enabled. + * Gets or sets a value indicating whether the service objective is enabled. */ public boolean getEnabled() { return this.enabled; } /** - * The value indicating whether the service objective is enabled. + * Gets or sets a value indicating whether the service objective is enabled. */ public void setEnabled(boolean enabled) { this.enabled = enabled; } private String id; /** - * The service objective id. + * Gets or sets the service objective id. */ public String getId() { return this.id; } /** - * The service objective id. + * Gets or sets the service objective id. */ public void setId(String id) { this.id = id; } private boolean isDefault; /** - * The value indicating whether the service objective is the default - * objective. + * Gets or sets a value indicating whether the service objective is the + * default objective. */ public boolean getIsDefault() { return this.isDefault; } /** - * The value indicating whether the service objective is the default - * objective. + * Gets or sets a value indicating whether the service objective is the + * default objective. */ public void setIsDefault(boolean isDefault) { this.isDefault = isDefault; } private boolean isSystem; /** - * The value indicating whether the service objective is a system objective. + * Gets or sets a value indicating whether the service objective is a system + * objective. */ public boolean getIsSystem() { return this.isSystem; } /** - * The value indicating whether the service objective is a system objective. + * Gets or sets a value indicating whether the service objective is a system + * objective. */ public void setIsSystem(boolean isSystem) { this.isSystem = isSystem; } private String name; /** - * The name of the service objective. + * Gets or sets the name of the service objective. */ public String getName() { return this.name; } /** - * The name of the service objective. + * Gets or sets the name of the service objective. */ public void setName(String name) { this.name = name; } private String parentLink; /** - * The ParentLink of the service objective. + * Gets or sets the ParentLink of the service objective. */ public String getParentLink() { return this.parentLink; } /** - * The ParentLink of the service objective. + * Gets or sets the ParentLink of the service objective. */ public void setParentLink(String parentLink) { this.parentLink = parentLink; } private String selfLink; /** - * The SelfLink of the service objective. + * Gets or sets the SelfLink of the service objective. */ public String getSelfLink() { return this.selfLink; } /** - * The SelfLink of the service objective. + * Gets or sets the SelfLink of the service objective. */ public void setSelfLink(String selfLink) { this.selfLink = selfLink; } private String state; /** - * The state of the service objective. + * Gets or sets the state of the service objective. */ public String getState() { return this.state; } /** - * The state of the service objective. + * Gets or sets the state of the service objective. */ public void setState(String state) { this.state = state; } private String type; /** - * The type of resource. + * Gets or sets the type of resource. */ public String getType() { return this.type; } /** - * The type of resource. + * Gets or sets the type of resource. */ public void setType(String type) { this.type = type; } @@ -173,115 +177,118 @@ public ServiceObjectiveGetResponse() this.dimensionSettings = new ArrayList(); } + /** + * Dimension setting. + */ public static class DimensionSettingResponse { private String description; /** - * The dimension setting description. + * Gets or sets the dimension setting description. */ public String getDescription() { return this.description; } /** - * The dimension setting description. + * Gets or sets the dimension setting description. */ public void setDescription(String description) { this.description = description; } private String id; /** - * The dimension setting id. + * Gets or sets the dimension setting id. */ public String getId() { return this.id; } /** - * The dimension setting id. + * Gets or sets the dimension setting id. */ public void setId(String id) { this.id = id; } private boolean isDefault; /** - * The value indicating whether the dimension setting is the default - * setting. + * Gets or sets a value indicating whether the dimension setting is the + * default setting. */ public boolean getIsDefault() { return this.isDefault; } /** - * The value indicating whether the dimension setting is the default - * setting. + * Gets or sets a value indicating whether the dimension setting is the + * default setting. */ public void setIsDefault(boolean isDefault) { this.isDefault = isDefault; } private String name; /** - * The name of the dimension setting. + * Gets or sets the name of the dimension setting. */ public String getName() { return this.name; } /** - * The name of the dimension setting. + * Gets or sets the name of the dimension setting. */ public void setName(String name) { this.name = name; } private byte ordinal; /** - * The dimension setting ordinal position. + * Gets or sets the dimension setting ordinal position. */ public byte getOrdinal() { return this.ordinal; } /** - * The dimension setting ordinal position. + * Gets or sets the dimension setting ordinal position. */ public void setOrdinal(byte ordinal) { this.ordinal = ordinal; } private String parentLink; /** - * The ParentLink of the dimension setting. + * Gets or sets the ParentLink of the dimension setting. */ public String getParentLink() { return this.parentLink; } /** - * The ParentLink of the dimension setting. + * Gets or sets the ParentLink of the dimension setting. */ public void setParentLink(String parentLink) { this.parentLink = parentLink; } private String selfLink; /** - * The SelfLink of the dimension setting. + * Gets or sets the SelfLink of the dimension setting. */ public String getSelfLink() { return this.selfLink; } /** - * The SelfLink of the dimension setting. + * Gets or sets the SelfLink of the dimension setting. */ public void setSelfLink(String selfLink) { this.selfLink = selfLink; } private String state; /** - * The state of the dimension setting. + * Gets or sets the state of the dimension setting. */ public String getState() { return this.state; } /** - * The state of the dimension setting. + * Gets or sets the state of the dimension setting. */ public void setState(String state) { this.state = state; } private String type; /** - * The type of resource. + * Gets or sets the type of resource. */ public String getType() { return this.type; } /** - * The type of resource. + * Gets or sets the type of resource. */ public void setType(String type) { this.type = type; } diff --git a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServiceObjectiveListResponse.java b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServiceObjectiveListResponse.java index af70f7766382f..fdf030e4a13a0 100644 --- a/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServiceObjectiveListResponse.java +++ b/management-sql/src/main/java/com/microsoft/windowsazure/management/sql/models/ServiceObjectiveListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.sql.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; @@ -33,12 +35,12 @@ public class ServiceObjectiveListResponse extends OperationResponse implements I private ArrayList serviceObjectives; /** - * The list of Service Objectives that are existing in a server. + * Gets or sets the list of Service Objectives that are existing in a server. */ public ArrayList getServiceObjectives() { return this.serviceObjectives; } /** - * The list of Service Objectives that are existing in a server. + * Gets or sets the list of Service Objectives that are existing in a server. */ public void setServiceObjectives(ArrayList serviceObjectives) { this.serviceObjectives = serviceObjectives; } @@ -60,141 +62,146 @@ public Iterator iterator() return this.getServiceObjectives().iterator(); } + /** + * Service objective. + */ public static class ServiceObjective { private String description; /** - * The service objective description. + * Gets or sets the service objective description. */ public String getDescription() { return this.description; } /** - * The service objective description. + * Gets or sets the service objective description. */ public void setDescription(String description) { this.description = description; } private ArrayList dimensionSettings; /** - * The service objective dimension settings. + * Gets or sets the service objective dimension settings. */ public ArrayList getDimensionSettings() { return this.dimensionSettings; } /** - * The service objective dimension settings. + * Gets or sets the service objective dimension settings. */ public void setDimensionSettings(ArrayList dimensionSettings) { this.dimensionSettings = dimensionSettings; } private boolean enabled; /** - * The value indicating whether the service objective is enabled. + * Gets or sets a value indicating whether the service objective is + * enabled. */ public boolean getEnabled() { return this.enabled; } /** - * The value indicating whether the service objective is enabled. + * Gets or sets a value indicating whether the service objective is + * enabled. */ public void setEnabled(boolean enabled) { this.enabled = enabled; } private String id; /** - * The service objective id. + * Gets or sets the service objective id. */ public String getId() { return this.id; } /** - * The service objective id. + * Gets or sets the service objective id. */ public void setId(String id) { this.id = id; } private boolean isDefault; /** - * The value indicating whether the service objective is the default - * objective. + * Gets or sets a value indicating whether the service objective is the + * default objective. */ public boolean getIsDefault() { return this.isDefault; } /** - * The value indicating whether the service objective is the default - * objective. + * Gets or sets a value indicating whether the service objective is the + * default objective. */ public void setIsDefault(boolean isDefault) { this.isDefault = isDefault; } private boolean isSystem; /** - * The value indicating whether the service objective is a system - * objective. + * Gets or sets a value indicating whether the service objective is a + * system objective. */ public boolean getIsSystem() { return this.isSystem; } /** - * The value indicating whether the service objective is a system - * objective. + * Gets or sets a value indicating whether the service objective is a + * system objective. */ public void setIsSystem(boolean isSystem) { this.isSystem = isSystem; } private String name; /** - * The name of the service objective. + * Gets or sets the name of the service objective. */ public String getName() { return this.name; } /** - * The name of the service objective. + * Gets or sets the name of the service objective. */ public void setName(String name) { this.name = name; } private String parentLink; /** - * The ParentLink of the service objective. + * Gets or sets the ParentLink of the service objective. */ public String getParentLink() { return this.parentLink; } /** - * The ParentLink of the service objective. + * Gets or sets the ParentLink of the service objective. */ public void setParentLink(String parentLink) { this.parentLink = parentLink; } private String selfLink; /** - * The SelfLink of the service objective. + * Gets or sets the SelfLink of the service objective. */ public String getSelfLink() { return this.selfLink; } /** - * The SelfLink of the service objective. + * Gets or sets the SelfLink of the service objective. */ public void setSelfLink(String selfLink) { this.selfLink = selfLink; } private String state; /** - * The state of the service objective. + * Gets or sets the state of the service objective. */ public String getState() { return this.state; } /** - * The state of the service objective. + * Gets or sets the state of the service objective. */ public void setState(String state) { this.state = state; } private String type; /** - * The type of resource. + * Gets or sets the type of resource. */ public String getType() { return this.type; } /** - * The type of resource. + * Gets or sets the type of resource. */ public void setType(String type) { this.type = type; } @@ -207,115 +214,118 @@ public ServiceObjective() this.dimensionSettings = new ArrayList(); } + /** + * Dimension setting. + */ public static class DimensionSettingResponse { private String description; /** - * The dimension setting description. + * Gets or sets the dimension setting description. */ public String getDescription() { return this.description; } /** - * The dimension setting description. + * Gets or sets the dimension setting description. */ public void setDescription(String description) { this.description = description; } private String id; /** - * The dimension setting id. + * Gets or sets the dimension setting id. */ public String getId() { return this.id; } /** - * The dimension setting id. + * Gets or sets the dimension setting id. */ public void setId(String id) { this.id = id; } private boolean isDefault; /** - * The value indicating whether the dimension setting is the default - * setting. + * Gets or sets a value indicating whether the dimension setting is + * the default setting. */ public boolean getIsDefault() { return this.isDefault; } /** - * The value indicating whether the dimension setting is the default - * setting. + * Gets or sets a value indicating whether the dimension setting is + * the default setting. */ public void setIsDefault(boolean isDefault) { this.isDefault = isDefault; } private String name; /** - * The name of the dimension setting. + * Gets or sets the name of the dimension setting. */ public String getName() { return this.name; } /** - * The name of the dimension setting. + * Gets or sets the name of the dimension setting. */ public void setName(String name) { this.name = name; } private byte ordinal; /** - * The dimension setting ordinal position. + * Gets or sets the dimension setting ordinal position. */ public byte getOrdinal() { return this.ordinal; } /** - * The dimension setting ordinal position. + * Gets or sets the dimension setting ordinal position. */ public void setOrdinal(byte ordinal) { this.ordinal = ordinal; } private String parentLink; /** - * The ParentLink of the dimension setting. + * Gets or sets the ParentLink of the dimension setting. */ public String getParentLink() { return this.parentLink; } /** - * The ParentLink of the dimension setting. + * Gets or sets the ParentLink of the dimension setting. */ public void setParentLink(String parentLink) { this.parentLink = parentLink; } private String selfLink; /** - * The SelfLink of the dimension setting. + * Gets or sets the SelfLink of the dimension setting. */ public String getSelfLink() { return this.selfLink; } /** - * The SelfLink of the dimension setting. + * Gets or sets the SelfLink of the dimension setting. */ public void setSelfLink(String selfLink) { this.selfLink = selfLink; } private String state; /** - * The state of the dimension setting. + * Gets or sets the state of the dimension setting. */ public String getState() { return this.state; } /** - * The state of the dimension setting. + * Gets or sets the state of the dimension setting. */ public void setState(String state) { this.state = state; } private String type; /** - * The type of resource. + * Gets or sets the type of resource. */ public String getType() { return this.type; } /** - * The type of resource. + * Gets or sets the type of resource. */ public void setType(String type) { this.type = type; } diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/Exports.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/Exports.java index ee27b2e10e396..7ed4fb6f73264 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/Exports.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/Exports.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.storage; -import com.microsoft.windowsazure.services.core.Builder; +import com.microsoft.windowsazure.core.Builder; /** * The Class Exports. diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageAccountOperations.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageAccountOperations.java index 3d12135d5a4d7..9d5bfbfcea010 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageAccountOperations.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageAccountOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,8 @@ package com.microsoft.windowsazure.management.storage; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.storage.models.CheckNameAvailabilityResponse; import com.microsoft.windowsazure.management.storage.models.StorageAccountCreateParameters; import com.microsoft.windowsazure.management.storage.models.StorageAccountGetKeysResponse; @@ -31,7 +34,6 @@ import com.microsoft.windowsazure.management.storage.models.StorageOperationStatusResponse; import com.microsoft.windowsazure.management.storage.models.StorageServiceGetResponse; import com.microsoft.windowsazure.management.storage.models.StorageServiceListResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; @@ -85,7 +87,7 @@ public interface StorageAccountOperations * * @param serviceName The desired storage account name to check for * availability. - * @return The response to a storage account check name availability request + * @return The response to a storage account check name availability request. */ CheckNameAvailabilityResponse checkNameAvailability(String serviceName) throws IOException, ServiceException, ParserConfigurationException, SAXException; @@ -97,7 +99,7 @@ public interface StorageAccountOperations * * @param serviceName The desired storage account name to check for * availability. - * @return The response to a storage account check name availability request + * @return The response to a storage account check name availability request. */ Future checkNameAvailabilityAsync(String serviceName); @@ -119,7 +121,7 @@ public interface StorageAccountOperations * the failed request, and also includes error information regarding the * failure. */ - StorageOperationStatusResponse create(StorageAccountCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + StorageOperationStatusResponse create(StorageAccountCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Create Storage Account operation creates a new storage account in diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageAccountOperationsImpl.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageAccountOperationsImpl.java index e3bd115721b5b..f2630076dff5b 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageAccountOperationsImpl.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageAccountOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,10 @@ package com.microsoft.windowsazure.management.storage; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.storage.models.CheckNameAvailabilityResponse; import com.microsoft.windowsazure.management.storage.models.GeoRegionStatus; import com.microsoft.windowsazure.management.storage.models.OperationStatus; @@ -35,8 +40,8 @@ import com.microsoft.windowsazure.management.storage.models.StorageServiceListResponse; import com.microsoft.windowsazure.management.storage.models.StorageServiceProperties; import com.microsoft.windowsazure.management.storage.models.StorageServiceStatus; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; +import com.microsoft.windowsazure.tracing.ClientRequestTrackingHandler; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -46,7 +51,8 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; -import java.util.Map.Entry; +import java.util.HashMap; +import java.util.Map; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; @@ -61,7 +67,6 @@ import javax.xml.transform.stream.StreamResult; import org.apache.commons.codec.binary.Base64; import org.apache.http.HttpResponse; -import org.apache.http.client.methods.HttpDelete; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPut; @@ -111,11 +116,12 @@ public class StorageAccountOperationsImpl implements ServiceOperations beginCreatingAsync(final StorageAccountCreateParameters parameters) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public OperationResponse call() throws Exception - { - return beginCreating(parameters); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public OperationResponse call() throws Exception + { + return beginCreating(parameters); + } }); } @@ -177,6 +183,15 @@ public OperationResponse beginCreating(StorageAccountCreateParameters parameters } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginCreatingAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/storageservices"; @@ -239,7 +254,7 @@ public OperationResponse beginCreating(StorageAccountCreateParameters parameters if (parameters.getExtendedProperties() != null) { Element extendedPropertiesDictionaryElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "ExtendedProperties"); - for (Entry entry : parameters.getExtendedProperties().entrySet()) + for (Map.Entry entry : parameters.getExtendedProperties().entrySet()) { String extendedPropertiesKey = entry.getKey(); String extendedPropertiesValue = entry.getValue(); @@ -270,11 +285,23 @@ public OperationResponse beginCreating(StorageAccountCreateParameters parameters // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -287,6 +314,10 @@ public OperationResponse beginCreating(StorageAccountCreateParameters parameters result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -298,16 +329,17 @@ public OperationResponse beginCreating(StorageAccountCreateParameters parameters * * @param serviceName The desired storage account name to check for * availability. - * @return The response to a storage account check name availability request + * @return The response to a storage account check name availability request. */ @Override public Future checkNameAvailabilityAsync(final String serviceName) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public CheckNameAvailabilityResponse call() throws Exception - { - return checkNameAvailability(serviceName); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public CheckNameAvailabilityResponse call() throws Exception + { + return checkNameAvailability(serviceName); + } }); } @@ -319,7 +351,7 @@ public CheckNameAvailabilityResponse call() throws Exception * * @param serviceName The desired storage account name to check for * availability. - * @return The response to a storage account check name availability request + * @return The response to a storage account check name availability request. */ @Override public CheckNameAvailabilityResponse checkNameAvailability(String serviceName) throws IOException, ServiceException, ParserConfigurationException, SAXException @@ -331,6 +363,15 @@ public CheckNameAvailabilityResponse checkNameAvailability(String serviceName) t } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + CloudTracing.enter(invocationId, this, "checkNameAvailabilityAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/storageservices/operations/isavailable/" + serviceName; @@ -343,11 +384,23 @@ public CheckNameAvailabilityResponse checkNameAvailability(String serviceName) t // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -398,6 +451,10 @@ public CheckNameAvailabilityResponse checkNameAvailability(String serviceName) t result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -422,11 +479,12 @@ public CheckNameAvailabilityResponse checkNameAvailability(String serviceName) t @Override public Future createAsync(final StorageAccountCreateParameters parameters) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public StorageOperationStatusResponse call() throws Exception - { - return create(parameters); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public StorageOperationStatusResponse call() throws Exception + { + return create(parameters); + } }); } @@ -449,29 +507,61 @@ public StorageOperationStatusResponse call() throws Exception * failure. */ @Override - public StorageOperationStatusResponse create(StorageAccountCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public StorageOperationStatusResponse create(StorageAccountCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { StorageManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getStorageAccounts().beginCreatingAsync(parameters).get(); - StorageOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getStorageAccountsOperations().beginCreatingAsync(parameters).get(); + StorageOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -487,11 +577,12 @@ public StorageOperationStatusResponse create(StorageAccountCreateParameters para @Override public Future deleteAsync(final String serviceName) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public OperationResponse call() throws Exception - { - return delete(serviceName); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public OperationResponse call() throws Exception + { + return delete(serviceName); + } }); } @@ -515,23 +606,44 @@ public OperationResponse delete(String serviceName) throws IOException, ServiceE } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/storageservices/" + serviceName; // Create HTTP transport objects - HttpDelete httpRequest = new HttpDelete(url); + CustomHttpDelete httpRequest = new CustomHttpDelete(url); // Set Headers httpRequest.setHeader("x-ms-version", "2013-03-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -544,6 +656,10 @@ public OperationResponse delete(String serviceName) throws IOException, ServiceE result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -559,11 +675,12 @@ public OperationResponse delete(String serviceName) throws IOException, ServiceE @Override public Future getAsync(final String serviceName) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public StorageServiceGetResponse call() throws Exception - { - return get(serviceName); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public StorageServiceGetResponse call() throws Exception + { + return get(serviceName); + } }); } @@ -586,6 +703,15 @@ public StorageServiceGetResponse get(String serviceName) throws IOException, Ser } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/storageservices/" + serviceName; @@ -598,11 +724,23 @@ public StorageServiceGetResponse get(String serviceName) throws IOException, Ser // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -800,6 +938,10 @@ public StorageServiceGetResponse get(String serviceName) throws IOException, Ser result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -815,11 +957,12 @@ public StorageServiceGetResponse get(String serviceName) throws IOException, Ser @Override public Future getKeysAsync(final String serviceName) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public StorageAccountGetKeysResponse call() throws Exception - { - return getKeys(serviceName); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public StorageAccountGetKeysResponse call() throws Exception + { + return getKeys(serviceName); + } }); } @@ -842,6 +985,15 @@ public StorageAccountGetKeysResponse getKeys(String serviceName) throws IOExcept } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + CloudTracing.enter(invocationId, this, "getKeysAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/storageservices/" + serviceName + "/keys"; @@ -854,11 +1006,23 @@ public StorageAccountGetKeysResponse getKeys(String serviceName) throws IOExcept // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -914,6 +1078,10 @@ public StorageAccountGetKeysResponse getKeys(String serviceName) throws IOExcept result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -928,11 +1096,12 @@ public StorageAccountGetKeysResponse getKeys(String serviceName) throws IOExcept @Override public Future listAsync() { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public StorageServiceListResponse call() throws Exception - { - return list(); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public StorageServiceListResponse call() throws Exception + { + return list(); + } }); } @@ -950,6 +1119,14 @@ public StorageServiceListResponse list() throws IOException, ServiceException, P // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/storageservices"; @@ -962,11 +1139,23 @@ public StorageServiceListResponse list() throws IOException, ServiceException, P // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1160,6 +1349,10 @@ public StorageServiceListResponse list() throws IOException, ServiceException, P result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1175,11 +1368,12 @@ public StorageServiceListResponse list() throws IOException, ServiceException, P @Override public Future regenerateKeysAsync(final StorageAccountRegenerateKeysParameters parameters) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public StorageAccountRegenerateKeysResponse call() throws Exception - { - return regenerateKeys(parameters); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public StorageAccountRegenerateKeysResponse call() throws Exception + { + return regenerateKeys(parameters); + } }); } @@ -1206,6 +1400,15 @@ public StorageAccountRegenerateKeysResponse regenerateKeys(StorageAccountRegener } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "regenerateKeysAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/storageservices/" + parameters.getServiceName() + "/keys?action=regenerate"; @@ -1243,11 +1446,23 @@ public StorageAccountRegenerateKeysResponse regenerateKeys(StorageAccountRegener // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1303,6 +1518,10 @@ public StorageAccountRegenerateKeysResponse regenerateKeys(StorageAccountRegener result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1322,11 +1541,12 @@ public StorageAccountRegenerateKeysResponse regenerateKeys(StorageAccountRegener @Override public Future updateAsync(final String serviceName, final StorageAccountUpdateParameters parameters) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public OperationResponse call() throws Exception - { - return update(serviceName, parameters); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public OperationResponse call() throws Exception + { + return update(serviceName, parameters); + } }); } @@ -1377,6 +1597,16 @@ public OperationResponse update(String serviceName, StorageAccountUpdateParamete } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("serviceName", serviceName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/storageservices/" + serviceName; @@ -1427,7 +1657,7 @@ public OperationResponse update(String serviceName, StorageAccountUpdateParamete if (parameters.getExtendedProperties() != null) { Element extendedPropertiesDictionaryElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "ExtendedProperties"); - for (Entry entry : parameters.getExtendedProperties().entrySet()) + for (Map.Entry entry : parameters.getExtendedProperties().entrySet()) { String extendedPropertiesKey = entry.getKey(); String extendedPropertiesValue = entry.getValue(); @@ -1458,11 +1688,23 @@ public OperationResponse update(String serviceName, StorageAccountUpdateParamete // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1475,6 +1717,10 @@ public OperationResponse update(String serviceName, StorageAccountUpdateParamete result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageManagementClient.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageManagementClient.java index 5304bcb660b72..6f6a89ad45998 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageManagementClient.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageManagementClient.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,9 +23,10 @@ package com.microsoft.windowsazure.management.storage; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.core.FilterableService; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.storage.models.StorageOperationStatusResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.net.URI; import java.util.concurrent.Future; @@ -38,7 +41,7 @@ * http://msdn.microsoft.com/en-us/library/windowsazure/ee460799.aspx for more * information) */ -public interface StorageManagementClient +public interface StorageManagementClient extends FilterableService { /** * The URI used as the base for all Service Management requests. @@ -61,7 +64,7 @@ public interface StorageManagementClient * http://msdn.microsoft.com/en-us/library/windowsazure/ee460790.aspx for * more information) */ - StorageAccountOperations getStorageAccounts(); + StorageAccountOperations getStorageAccountsOperations(); /** * The Get Operation Status operation returns the status of thespecified diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageManagementClientImpl.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageManagementClientImpl.java index d780241600aa2..aa204e8532ad8 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageManagementClientImpl.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageManagementClientImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,16 +23,19 @@ package com.microsoft.windowsazure.management.storage; +import com.microsoft.windowsazure.core.ServiceClient; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.ManagementConfiguration; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; import com.microsoft.windowsazure.management.storage.models.OperationStatus; import com.microsoft.windowsazure.management.storage.models.StorageOperationStatusResponse; -import com.microsoft.windowsazure.services.core.ServiceClient; -import com.microsoft.windowsazure.services.core.ServiceException; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.net.URI; +import java.util.HashMap; import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import javax.inject.Inject; import javax.inject.Named; @@ -39,6 +44,7 @@ import javax.xml.parsers.ParserConfigurationException; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.HttpClientBuilder; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -52,7 +58,7 @@ * http://msdn.microsoft.com/en-us/library/windowsazure/ee460799.aspx for more * information) */ -public class StorageManagementClientImpl extends ServiceClient implements StorageManagementClient +public class StorageManagementClientImpl extends ServiceClient implements StorageManagementClient { private URI baseUri; @@ -81,21 +87,25 @@ public class StorageManagementClientImpl extends ServiceClient getOperationStatusAsync(final String requestId) { - return this.getExecutorService().submit(new Callable() { @Override - public StorageOperationStatusResponse call() throws Exception - { - return getOperationStatus(requestId); - } + return this.getExecutorService().submit(new Callable() { + @Override + public StorageOperationStatusResponse call() throws Exception + { + return getOperationStatus(requestId); + } }); } @@ -209,6 +229,15 @@ public StorageOperationStatusResponse getOperationStatus(String requestId) throw } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("requestId", requestId); + CloudTracing.enter(invocationId, this, "getOperationStatusAsync", tracingParameters); + } // Construct URL String url = this.getBaseUri() + "/" + this.getCredentials().getSubscriptionId() + "/operations/" + requestId; @@ -221,11 +250,23 @@ public StorageOperationStatusResponse getOperationStatus(String requestId) throw // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -302,6 +343,10 @@ public StorageOperationStatusResponse getOperationStatus(String requestId) throw result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageManagementService.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageManagementService.java index e38a60e297845..6f52328561ec3 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageManagementService.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/StorageManagementService.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.storage; -import com.microsoft.windowsazure.services.core.Configuration; +import com.microsoft.windowsazure.Configuration; /** * diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/CheckNameAvailabilityResponse.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/CheckNameAvailabilityResponse.java index 63832557661c7..0d483f0d9105c 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/CheckNameAvailabilityResponse.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/CheckNameAvailabilityResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,10 +23,10 @@ package com.microsoft.windowsazure.management.storage.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** -* The response to a storage account check name availability request +* The response to a storage account check name availability request. */ public class CheckNameAvailabilityResponse extends OperationResponse { diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/GeoRegionNames.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/GeoRegionNames.java index 97c9a19df29b7..be7ca000a1343 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/GeoRegionNames.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/GeoRegionNames.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -22,7 +24,7 @@ package com.microsoft.windowsazure.management.storage.models; /** -* The geographical region in which a storage account exists +* The geographical region in which a storage account exists. */ public class GeoRegionNames { diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/GeoRegionStatus.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/GeoRegionStatus.java index 18be58b845329..be129c2974281 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/GeoRegionStatus.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/GeoRegionStatus.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/OperationStatus.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/OperationStatus.java index dc55411d67714..26b98730a5ca2 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/OperationStatus.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/OperationStatus.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountCreateParameters.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountCreateParameters.java index 93e16ceb5d830..99db9c89a812a 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountCreateParameters.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountCreateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountGetKeysResponse.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountGetKeysResponse.java index 637c21160dcf3..3f0e45a3de1ba 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountGetKeysResponse.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountGetKeysResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.storage.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; /** diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountRegenerateKeysParameters.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountRegenerateKeysParameters.java index eb2a78950ee3f..cf034a418eecd 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountRegenerateKeysParameters.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountRegenerateKeysParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,6 @@ package com.microsoft.windowsazure.management.storage.models; - /** * Parameters supplied to the Regenerate Keys operation. */ diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountRegenerateKeysResponse.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountRegenerateKeysResponse.java index 7d9a372c5c7ce..ea22ea6453948 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountRegenerateKeysResponse.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountRegenerateKeysResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.storage.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; /** diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountUpdateParameters.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountUpdateParameters.java index 1bb529eeea7f6..f4ad3d12ffd6a 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountUpdateParameters.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageAccountUpdateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageKeyType.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageKeyType.java index 4ba6f677363e0..c79f61db8c7e9 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageKeyType.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageKeyType.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageOperationStatusResponse.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageOperationStatusResponse.java index a68ed2d8f6498..b3ab97b00d182 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageOperationStatusResponse.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageOperationStatusResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.storage.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The response body contains the status of the specified asynchronous diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageServiceGetResponse.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageServiceGetResponse.java index d29c56e7af324..9fc952c2254fd 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageServiceGetResponse.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageServiceGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.storage.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; import java.util.ArrayList; import java.util.HashMap; diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageServiceListResponse.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageServiceListResponse.java index dd4a4f9007b88..7e43dbb7fe929 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageServiceListResponse.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageServiceListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.storage.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; import java.util.ArrayList; import java.util.HashMap; diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageServiceProperties.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageServiceProperties.java index 42236b82649d6..3e63da833e95d 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageServiceProperties.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageServiceProperties.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageServiceStatus.java b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageServiceStatus.java index 9068a5ba9ceb8..6f4bb0d6edd78 100644 --- a/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageServiceStatus.java +++ b/management-storage/src/main/java/com/microsoft/windowsazure/management/storage/models/StorageServiceStatus.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-store/src/main/java/com/microsoft/windowsazure/management/store/AddOnOperations.java b/management-store/src/main/java/com/microsoft/windowsazure/management/store/AddOnOperations.java index 54f02dc1a6265..bb7bd753442d3 100644 --- a/management-store/src/main/java/com/microsoft/windowsazure/management/store/AddOnOperations.java +++ b/management-store/src/main/java/com/microsoft/windowsazure/management/store/AddOnOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,10 +23,10 @@ package com.microsoft.windowsazure.management.store; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.store.models.AddOnCreateParameters; import com.microsoft.windowsazure.management.store.models.AddOnOperationStatusResponse; import com.microsoft.windowsazure.management.store.models.AddOnUpdateParameters; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.concurrent.ExecutionException; @@ -148,7 +150,7 @@ public interface AddOnOperations * the failed request, and also includes error information regarding the * failure. */ - AddOnOperationStatusResponse create(String cloudServiceName, String resourceName, String addOnName, AddOnCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + AddOnOperationStatusResponse create(String cloudServiceName, String resourceName, String addOnName, AddOnCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Create Store Item operation creates Windows Azure Store entries in a @@ -192,7 +194,7 @@ public interface AddOnOperations * the failed request, and also includes error information regarding the * failure. */ - AddOnOperationStatusResponse delete(String cloudServiceName, String resourceProviderNamespace, String resourceProviderType, String resourceProviderName) throws InterruptedException, ExecutionException, ServiceException; + AddOnOperationStatusResponse delete(String cloudServiceName, String resourceProviderNamespace, String resourceProviderType, String resourceProviderName) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Delete Store Item operation deletes Windows Azure Storeentries that diff --git a/management-store/src/main/java/com/microsoft/windowsazure/management/store/AddOnOperationsImpl.java b/management-store/src/main/java/com/microsoft/windowsazure/management/store/AddOnOperationsImpl.java index 82de098f01233..4ef25fb048a87 100644 --- a/management-store/src/main/java/com/microsoft/windowsazure/management/store/AddOnOperationsImpl.java +++ b/management-store/src/main/java/com/microsoft/windowsazure/management/store/AddOnOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,15 +23,19 @@ package com.microsoft.windowsazure.management.store; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.store.models.AddOnCreateParameters; import com.microsoft.windowsazure.management.store.models.AddOnOperationStatusResponse; import com.microsoft.windowsazure.management.store.models.AddOnUpdateParameters; import com.microsoft.windowsazure.management.store.models.OperationStatus; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; +import com.microsoft.windowsazure.tracing.ClientRequestTrackingHandler; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.StringWriter; import java.io.UnsupportedEncodingException; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; @@ -43,7 +49,6 @@ import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.apache.http.HttpResponse; -import org.apache.http.client.methods.HttpDelete; import org.apache.http.client.methods.HttpPut; import org.apache.http.entity.StringEntity; import org.w3c.dom.Document; @@ -97,11 +102,12 @@ public class AddOnOperationsImpl implements ServiceOperations beginCreatingAsync(final String cloudServiceName, final String resourceName, final String addOnName, final AddOnCreateParameters parameters) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public AddOnOperationStatusResponse call() throws Exception - { - return beginCreating(cloudServiceName, resourceName, addOnName, parameters); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public AddOnOperationStatusResponse call() throws Exception + { + return beginCreating(cloudServiceName, resourceName, addOnName, parameters); + } }); } @@ -155,6 +161,18 @@ public AddOnOperationStatusResponse beginCreating(String cloudServiceName, Strin } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("cloudServiceName", cloudServiceName); + tracingParameters.put("resourceName", resourceName); + tracingParameters.put("addOnName", addOnName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginCreatingAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/CloudServices/" + cloudServiceName + "/resources/" + parameters.getType() + "/" + resourceName + "/" + addOnName; @@ -203,11 +221,23 @@ public AddOnOperationStatusResponse beginCreating(String cloudServiceName, Strin // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -220,6 +250,10 @@ public AddOnOperationStatusResponse beginCreating(String cloudServiceName, Strin result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -246,11 +280,12 @@ public AddOnOperationStatusResponse beginCreating(String cloudServiceName, Strin @Override public Future beginDeletingAsync(final String cloudServiceName, final String resourceProviderNamespace, final String resourceProviderType, final String resourceProviderName) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public AddOnOperationStatusResponse call() throws Exception - { - return beginDeleting(cloudServiceName, resourceProviderNamespace, resourceProviderType, resourceProviderName); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public AddOnOperationStatusResponse call() throws Exception + { + return beginDeleting(cloudServiceName, resourceProviderNamespace, resourceProviderType, resourceProviderName); + } }); } @@ -296,23 +331,47 @@ public AddOnOperationStatusResponse beginDeleting(String cloudServiceName, Strin } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("cloudServiceName", cloudServiceName); + tracingParameters.put("resourceProviderNamespace", resourceProviderNamespace); + tracingParameters.put("resourceProviderType", resourceProviderType); + tracingParameters.put("resourceProviderName", resourceProviderName); + CloudTracing.enter(invocationId, this, "beginDeletingAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/CloudServices/" + cloudServiceName + "/resources/" + resourceProviderNamespace + "/" + resourceProviderType + "/" + resourceProviderName; // Create HTTP transport objects - HttpDelete httpRequest = new HttpDelete(url); + CustomHttpDelete httpRequest = new CustomHttpDelete(url); // Set Headers httpRequest.setHeader("x-ms-version", "2013-06-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -325,6 +384,10 @@ public AddOnOperationStatusResponse beginDeleting(String cloudServiceName, Strin result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -351,11 +414,12 @@ public AddOnOperationStatusResponse beginDeleting(String cloudServiceName, Strin @Override public Future createAsync(final String cloudServiceName, final String resourceName, final String addOnName, final AddOnCreateParameters parameters) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public AddOnOperationStatusResponse call() throws Exception - { - return create(cloudServiceName, resourceName, addOnName, parameters); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public AddOnOperationStatusResponse call() throws Exception + { + return create(cloudServiceName, resourceName, addOnName, parameters); + } }); } @@ -380,29 +444,64 @@ public AddOnOperationStatusResponse call() throws Exception * failure. */ @Override - public AddOnOperationStatusResponse create(String cloudServiceName, String resourceName, String addOnName, AddOnCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public AddOnOperationStatusResponse create(String cloudServiceName, String resourceName, String addOnName, AddOnCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { StoreManagementClient client2 = this.getClient(); - - AddOnOperationStatusResponse response = client2.getAddOns().beginCreatingAsync(cloudServiceName, resourceName, addOnName, parameters).get(); - AddOnOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) - { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("cloudServiceName", cloudServiceName); + tracingParameters.put("resourceName", resourceName); + tracingParameters.put("addOnName", addOnName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); + } + try + { + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + AddOnOperationStatusResponse response = client2.getAddOnsOperations().beginCreatingAsync(cloudServiceName, resourceName, addOnName, parameters).get(); + AddOnOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - if (result.getStatus() != OperationStatus.Succeeded) - { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; - } - - return result; } /** @@ -428,11 +527,12 @@ public AddOnOperationStatusResponse create(String cloudServiceName, String resou @Override public Future deleteAsync(final String cloudServiceName, final String resourceProviderNamespace, final String resourceProviderType, final String resourceProviderName) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public AddOnOperationStatusResponse call() throws Exception - { - return delete(cloudServiceName, resourceProviderNamespace, resourceProviderType, resourceProviderName); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public AddOnOperationStatusResponse call() throws Exception + { + return delete(cloudServiceName, resourceProviderNamespace, resourceProviderType, resourceProviderName); + } }); } @@ -457,29 +557,64 @@ public AddOnOperationStatusResponse call() throws Exception * failure. */ @Override - public AddOnOperationStatusResponse delete(String cloudServiceName, String resourceProviderNamespace, String resourceProviderType, String resourceProviderName) throws InterruptedException, ExecutionException, ServiceException + public AddOnOperationStatusResponse delete(String cloudServiceName, String resourceProviderNamespace, String resourceProviderType, String resourceProviderName) throws InterruptedException, ExecutionException, ServiceException, IOException { StoreManagementClient client2 = this.getClient(); - - AddOnOperationStatusResponse response = client2.getAddOns().beginDeletingAsync(cloudServiceName, resourceProviderNamespace, resourceProviderType, resourceProviderName).get(); - AddOnOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) - { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; - } - - if (result.getStatus() != OperationStatus.Succeeded) - { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("cloudServiceName", cloudServiceName); + tracingParameters.put("resourceProviderNamespace", resourceProviderNamespace); + tracingParameters.put("resourceProviderType", resourceProviderType); + tracingParameters.put("resourceProviderName", resourceProviderName); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); + } + try + { + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + AddOnOperationStatusResponse response = client2.getAddOnsOperations().beginDeletingAsync(cloudServiceName, resourceProviderNamespace, resourceProviderType, resourceProviderName).get(); + AddOnOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -505,11 +640,12 @@ public AddOnOperationStatusResponse delete(String cloudServiceName, String resou @Override public Future updateAsync(final String cloudServiceName, final String resourceName, final String addOnName, final AddOnUpdateParameters parameters) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public AddOnOperationStatusResponse call() throws Exception - { - return update(cloudServiceName, resourceName, addOnName, parameters); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public AddOnOperationStatusResponse call() throws Exception + { + return update(cloudServiceName, resourceName, addOnName, parameters); + } }); } @@ -563,6 +699,18 @@ public AddOnOperationStatusResponse update(String cloudServiceName, String resou } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("cloudServiceName", cloudServiceName); + tracingParameters.put("resourceName", resourceName); + tracingParameters.put("addOnName", addOnName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/CloudServices/" + cloudServiceName + "/resources/" + parameters.getType() + "/" + resourceName + "/" + addOnName; @@ -612,11 +760,23 @@ public AddOnOperationStatusResponse update(String cloudServiceName, String resou // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -629,6 +789,10 @@ public AddOnOperationStatusResponse update(String cloudServiceName, String resou result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-store/src/main/java/com/microsoft/windowsazure/management/store/CloudServiceOperations.java b/management-store/src/main/java/com/microsoft/windowsazure/management/store/CloudServiceOperations.java index f21aad82b530c..9f2151dba8aed 100644 --- a/management-store/src/main/java/com/microsoft/windowsazure/management/store/CloudServiceOperations.java +++ b/management-store/src/main/java/com/microsoft/windowsazure/management/store/CloudServiceOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,10 +23,10 @@ package com.microsoft.windowsazure.management.store; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.store.models.AddOnOperationStatusResponse; import com.microsoft.windowsazure.management.store.models.CloudServiceCreateParameters; import com.microsoft.windowsazure.management.store.models.CloudServiceListResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.concurrent.ExecutionException; @@ -92,7 +94,7 @@ public interface CloudServiceOperations * the failed request, and also includes error information regarding the * failure. */ - AddOnOperationStatusResponse create(CloudServiceCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + AddOnOperationStatusResponse create(CloudServiceCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Create Cloud Service operation creates a Windows Azure cloud service @@ -116,7 +118,7 @@ public interface CloudServiceOperations * The List Cloud Services operation enumerates Windows Azure Store entries * that are provisioned for a subscription. * - * @return The response structure for the Cloud Service List operation + * @return The response structure for the Cloud Service List operation. */ CloudServiceListResponse list() throws IOException, ServiceException, ParserConfigurationException, SAXException; @@ -124,7 +126,7 @@ public interface CloudServiceOperations * The List Cloud Services operation enumerates Windows Azure Store entries * that are provisioned for a subscription. * - * @return The response structure for the Cloud Service List operation + * @return The response structure for the Cloud Service List operation. */ Future listAsync(); } diff --git a/management-store/src/main/java/com/microsoft/windowsazure/management/store/CloudServiceOperationsImpl.java b/management-store/src/main/java/com/microsoft/windowsazure/management/store/CloudServiceOperationsImpl.java index a9035c069b04a..e4594f29ae8fb 100644 --- a/management-store/src/main/java/com/microsoft/windowsazure/management/store/CloudServiceOperationsImpl.java +++ b/management-store/src/main/java/com/microsoft/windowsazure/management/store/CloudServiceOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,16 +23,19 @@ package com.microsoft.windowsazure.management.store; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.store.models.AddOnOperationStatusResponse; import com.microsoft.windowsazure.management.store.models.CloudServiceCreateParameters; import com.microsoft.windowsazure.management.store.models.CloudServiceListResponse; import com.microsoft.windowsazure.management.store.models.OperationStatus; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; +import com.microsoft.windowsazure.tracing.ClientRequestTrackingHandler; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; import java.io.UnsupportedEncodingException; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; @@ -96,11 +101,12 @@ public class CloudServiceOperationsImpl implements ServiceOperations beginCreatingAsync(final CloudServiceCreateParameters parameters) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public AddOnOperationStatusResponse call() throws Exception - { - return beginCreating(parameters); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public AddOnOperationStatusResponse call() throws Exception + { + return beginCreating(parameters); + } }); } @@ -146,6 +152,15 @@ public AddOnOperationStatusResponse beginCreating(CloudServiceCreateParameters p } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginCreatingAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/CloudServices/" + parameters.getName() + "/"; @@ -195,11 +210,23 @@ public AddOnOperationStatusResponse beginCreating(CloudServiceCreateParameters p // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -212,6 +239,10 @@ public AddOnOperationStatusResponse beginCreating(CloudServiceCreateParameters p result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -234,11 +265,12 @@ public AddOnOperationStatusResponse beginCreating(CloudServiceCreateParameters p @Override public Future createAsync(final CloudServiceCreateParameters parameters) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public AddOnOperationStatusResponse call() throws Exception - { - return create(parameters); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public AddOnOperationStatusResponse call() throws Exception + { + return create(parameters); + } }); } @@ -259,45 +291,78 @@ public AddOnOperationStatusResponse call() throws Exception * failure. */ @Override - public AddOnOperationStatusResponse create(CloudServiceCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public AddOnOperationStatusResponse create(CloudServiceCreateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { StoreManagementClient client2 = this.getClient(); - - AddOnOperationStatusResponse response = client2.getCloudServices().beginCreatingAsync(parameters).get(); - AddOnOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + AddOnOperationStatusResponse response = client2.getCloudServicesOperations().beginCreatingAsync(parameters).get(); + AddOnOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** * The List Cloud Services operation enumerates Windows Azure Store entries * that are provisioned for a subscription. * - * @return The response structure for the Cloud Service List operation + * @return The response structure for the Cloud Service List operation. */ @Override public Future listAsync() { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public CloudServiceListResponse call() throws Exception - { - return list(); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public CloudServiceListResponse call() throws Exception + { + return list(); + } }); } @@ -305,7 +370,7 @@ public CloudServiceListResponse call() throws Exception * The List Cloud Services operation enumerates Windows Azure Store entries * that are provisioned for a subscription. * - * @return The response structure for the Cloud Service List operation + * @return The response structure for the Cloud Service List operation. */ @Override public CloudServiceListResponse list() throws IOException, ServiceException, ParserConfigurationException, SAXException @@ -313,6 +378,14 @@ public CloudServiceListResponse list() throws IOException, ServiceException, Par // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/CloudServices/"; @@ -325,11 +398,23 @@ public CloudServiceListResponse list() throws IOException, ServiceException, Par // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -560,6 +645,10 @@ public CloudServiceListResponse list() throws IOException, ServiceException, Par result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-store/src/main/java/com/microsoft/windowsazure/management/store/Exports.java b/management-store/src/main/java/com/microsoft/windowsazure/management/store/Exports.java index 68564b89f7fd5..2f95db79624a4 100644 --- a/management-store/src/main/java/com/microsoft/windowsazure/management/store/Exports.java +++ b/management-store/src/main/java/com/microsoft/windowsazure/management/store/Exports.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.store; -import com.microsoft.windowsazure.services.core.Builder; +import com.microsoft.windowsazure.core.Builder; /** * The Class Exports. diff --git a/management-store/src/main/java/com/microsoft/windowsazure/management/store/StoreManagementClient.java b/management-store/src/main/java/com/microsoft/windowsazure/management/store/StoreManagementClient.java index 07ab3c6d11156..34d5afe876ded 100644 --- a/management-store/src/main/java/com/microsoft/windowsazure/management/store/StoreManagementClient.java +++ b/management-store/src/main/java/com/microsoft/windowsazure/management/store/StoreManagementClient.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,9 +23,10 @@ package com.microsoft.windowsazure.management.store; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.core.FilterableService; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.store.models.AddOnOperationStatusResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.net.URI; import java.util.concurrent.Future; @@ -34,7 +37,7 @@ * The Windows Azure Store API is a REST API for managing Windows Azure Store * add-ins. */ -public interface StoreManagementClient +public interface StoreManagementClient extends FilterableService { /** * The URI used as the base for all Store requests. @@ -55,13 +58,13 @@ public interface StoreManagementClient * Provides REST operations for working with Store add-ins from the Windows * Azure store service. */ - AddOnOperations getAddOns(); + AddOnOperations getAddOnsOperations(); /** * Provides REST operations for working with cloud services from the Windows * Azure store service. */ - CloudServiceOperations getCloudServices(); + CloudServiceOperations getCloudServicesOperations(); /** * The Get Operation Status operation returns the status of thespecified diff --git a/management-store/src/main/java/com/microsoft/windowsazure/management/store/StoreManagementClientImpl.java b/management-store/src/main/java/com/microsoft/windowsazure/management/store/StoreManagementClientImpl.java index ba7b7e91d7664..1c60f2ab01646 100644 --- a/management-store/src/main/java/com/microsoft/windowsazure/management/store/StoreManagementClientImpl.java +++ b/management-store/src/main/java/com/microsoft/windowsazure/management/store/StoreManagementClientImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,16 +23,19 @@ package com.microsoft.windowsazure.management.store; +import com.microsoft.windowsazure.core.ServiceClient; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.ManagementConfiguration; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; import com.microsoft.windowsazure.management.store.models.AddOnOperationStatusResponse; import com.microsoft.windowsazure.management.store.models.OperationStatus; -import com.microsoft.windowsazure.services.core.ServiceClient; -import com.microsoft.windowsazure.services.core.ServiceException; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.net.URI; +import java.util.HashMap; import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import javax.inject.Inject; import javax.inject.Named; @@ -39,6 +44,7 @@ import javax.xml.parsers.ParserConfigurationException; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.HttpClientBuilder; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -48,7 +54,7 @@ * The Windows Azure Store API is a REST API for managing Windows Azure Store * add-ins. */ -public class StoreManagementClientImpl extends ServiceClient implements StoreManagementClient +public class StoreManagementClientImpl extends ServiceClient implements StoreManagementClient { private URI baseUri; @@ -75,7 +81,7 @@ public class StoreManagementClientImpl extends ServiceClient getOperationStatusAsync(final String requestId) { - return this.getExecutorService().submit(new Callable() { @Override - public AddOnOperationStatusResponse call() throws Exception - { - return getOperationStatus(requestId); - } + return this.getExecutorService().submit(new Callable() { + @Override + public AddOnOperationStatusResponse call() throws Exception + { + return getOperationStatus(requestId); + } }); } @@ -211,6 +231,15 @@ public AddOnOperationStatusResponse getOperationStatus(String requestId) throws } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("requestId", requestId); + CloudTracing.enter(invocationId, this, "getOperationStatusAsync", tracingParameters); + } // Construct URL String url = this.getBaseUri() + "/" + this.getCredentials().getSubscriptionId() + "/operations/" + requestId; @@ -223,11 +252,23 @@ public AddOnOperationStatusResponse getOperationStatus(String requestId) throws // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -304,6 +345,10 @@ public AddOnOperationStatusResponse getOperationStatus(String requestId) throws result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-store/src/main/java/com/microsoft/windowsazure/management/store/StoreManagementService.java b/management-store/src/main/java/com/microsoft/windowsazure/management/store/StoreManagementService.java index 0aba8d6e97f56..f7855e2c9e12e 100644 --- a/management-store/src/main/java/com/microsoft/windowsazure/management/store/StoreManagementService.java +++ b/management-store/src/main/java/com/microsoft/windowsazure/management/store/StoreManagementService.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.store; -import com.microsoft.windowsazure.services.core.Configuration; +import com.microsoft.windowsazure.Configuration; /** * diff --git a/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/AddOnCreateParameters.java b/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/AddOnCreateParameters.java index 85a6e0a1704aa..c3a0278ff12ea 100644 --- a/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/AddOnCreateParameters.java +++ b/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/AddOnCreateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -22,7 +24,7 @@ package com.microsoft.windowsazure.management.store.models; /** -* Represents the data passed to the Create Store Resource API method +* Represents the data passed to the Create Store Resource API method. */ public class AddOnCreateParameters { diff --git a/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/AddOnOperationStatusResponse.java b/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/AddOnOperationStatusResponse.java index 5960785fb3658..f8dd27a0e9218 100644 --- a/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/AddOnOperationStatusResponse.java +++ b/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/AddOnOperationStatusResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.store.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The response body contains the status of the specified asynchronous diff --git a/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/AddOnUpdateParameters.java b/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/AddOnUpdateParameters.java index f55933c4459d9..afb1a9c81b876 100644 --- a/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/AddOnUpdateParameters.java +++ b/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/AddOnUpdateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -22,7 +24,7 @@ package com.microsoft.windowsazure.management.store.models; /** -* Represents the data passed to the Update Store Resource API method +* Represents the data passed to the Update Store Resource API method. */ public class AddOnUpdateParameters { diff --git a/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/CloudServiceCreateParameters.java b/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/CloudServiceCreateParameters.java index 8502e9626f208..38e66a3c88aa2 100644 --- a/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/CloudServiceCreateParameters.java +++ b/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/CloudServiceCreateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -22,7 +24,7 @@ package com.microsoft.windowsazure.management.store.models; /** -* Represents the data passed to the Create Cloud Service API method +* Represents the data passed to the Create Cloud Service API method. */ public class CloudServiceCreateParameters { diff --git a/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/CloudServiceListResponse.java b/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/CloudServiceListResponse.java index c190414bc3f3f..1de4e2a211932 100644 --- a/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/CloudServiceListResponse.java +++ b/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/CloudServiceListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,13 +23,13 @@ package com.microsoft.windowsazure.management.store.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; /** -* The response structure for the Cloud Service List operation +* The response structure for the Cloud Service List operation. */ public class CloudServiceListResponse extends OperationResponse implements Iterable { diff --git a/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/OperationStatus.java b/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/OperationStatus.java index d2e12dfd3484e..d1cb538a4158f 100644 --- a/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/OperationStatus.java +++ b/management-store/src/main/java/com/microsoft/windowsazure/management/store/models/OperationStatus.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/ClientRootCertificateOperations.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/ClientRootCertificateOperations.java index 7781fac0b468a..65d41cd3c8542 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/ClientRootCertificateOperations.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/ClientRootCertificateOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,11 +23,11 @@ package com.microsoft.windowsazure.management.virtualnetworks; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.virtualnetworks.models.ClientRootCertificateCreateParameters; import com.microsoft.windowsazure.management.virtualnetworks.models.ClientRootCertificateGetResponse; import com.microsoft.windowsazure.management.virtualnetworks.models.ClientRootCertificateListResponse; import com.microsoft.windowsazure.management.virtualnetworks.models.GatewayOperationResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.text.ParseException; @@ -42,7 +44,8 @@ public interface ClientRootCertificateOperations * http://msdn.microsoft.com/en-us/library/windowsazure/dn205129.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @param parameters Parameters supplied to the Upload client certificate * Virtual Network Gateway operation. * @return A standard storage response including an HTTP status code and @@ -56,7 +59,8 @@ public interface ClientRootCertificateOperations * http://msdn.microsoft.com/en-us/library/windowsazure/dn205129.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @param parameters Parameters supplied to the Upload client certificate * Virtual Network Gateway operation. * @return A standard storage response including an HTTP status code and @@ -70,8 +74,9 @@ public interface ClientRootCertificateOperations * http://msdn.microsoft.com/en-us/library/windowsazure/dn205128.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param certificateThumbprint The X509 certificate thumbprint + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param certificateThumbprint The X509 certificate thumbprint. * @return A standard storage response including an HTTP status code and * request ID. */ @@ -83,8 +88,9 @@ public interface ClientRootCertificateOperations * http://msdn.microsoft.com/en-us/library/windowsazure/dn205128.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param certificateThumbprint The X509 certificate thumbprint + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param certificateThumbprint The X509 certificate thumbprint. * @return A standard storage response including an HTTP status code and * request ID. */ @@ -97,8 +103,9 @@ public interface ClientRootCertificateOperations * http://msdn.microsoft.com/en-us/library/windowsazure/dn205127.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param certificateThumbprint The X509 certificate thumbprint + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param certificateThumbprint The X509 certificate thumbprint. * @return A standard storage response including an HTTP status code and * request ID. */ @@ -111,8 +118,9 @@ public interface ClientRootCertificateOperations * http://msdn.microsoft.com/en-us/library/windowsazure/dn205127.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param certificateThumbprint The X509 certificate thumbprint + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param certificateThumbprint The X509 certificate thumbprint. * @return A standard storage response including an HTTP status code and * request ID. */ @@ -125,8 +133,9 @@ public interface ClientRootCertificateOperations * http://msdn.microsoft.com/en-us/library/windowsazure/dn205130.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @return The response to the list client root certificates request + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @return The response to the list client root certificates request. */ ClientRootCertificateListResponse list(String virtualNetworkName) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException; @@ -137,8 +146,9 @@ public interface ClientRootCertificateOperations * http://msdn.microsoft.com/en-us/library/windowsazure/dn205130.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @return The response to the list client root certificates request + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @return The response to the list client root certificates request. */ Future listAsync(String virtualNetworkName); } diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/ClientRootCertificateOperationsImpl.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/ClientRootCertificateOperationsImpl.java index fc323f24cb1d3..cd0f0a67bb830 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/ClientRootCertificateOperationsImpl.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/ClientRootCertificateOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,20 +23,22 @@ package com.microsoft.windowsazure.management.virtualnetworks; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.core.utils.StreamUtils; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.virtualnetworks.models.ClientRootCertificateCreateParameters; import com.microsoft.windowsazure.management.virtualnetworks.models.ClientRootCertificateGetResponse; import com.microsoft.windowsazure.management.virtualnetworks.models.ClientRootCertificateListResponse; import com.microsoft.windowsazure.management.virtualnetworks.models.GatewayOperationResponse; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.utils.StreamUtils; -import com.microsoft.windowsazure.services.core.utils.pipeline.CustomHttpDelete; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; @@ -77,7 +81,8 @@ public class ClientRootCertificateOperationsImpl implements ServiceOperations tracingParameters = new HashMap(); + tracingParameters.put("virtualNetworkName", virtualNetworkName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/" + virtualNetworkName + "/gateway/clientrootcertificates"; @@ -134,7 +150,7 @@ public GatewayOperationResponse create(String virtualNetworkName, ClientRootCert // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -145,11 +161,23 @@ public GatewayOperationResponse create(String virtualNetworkName, ClientRootCert // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -182,6 +210,10 @@ public GatewayOperationResponse create(String virtualNetworkName, ClientRootCert result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -191,8 +223,9 @@ public GatewayOperationResponse create(String virtualNetworkName, ClientRootCert * http://msdn.microsoft.com/en-us/library/windowsazure/dn205128.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param certificateThumbprint The X509 certificate thumbprint + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param certificateThumbprint The X509 certificate thumbprint. * @return A standard storage response including an HTTP status code and * request ID. */ @@ -214,8 +247,9 @@ public GatewayOperationResponse call() throws Exception * http://msdn.microsoft.com/en-us/library/windowsazure/dn205128.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param certificateThumbprint The X509 certificate thumbprint + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param certificateThumbprint The X509 certificate thumbprint. * @return A standard storage response including an HTTP status code and * request ID. */ @@ -233,6 +267,16 @@ public GatewayOperationResponse delete(String virtualNetworkName, String certifi } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("virtualNetworkName", virtualNetworkName); + tracingParameters.put("certificateThumbprint", certificateThumbprint); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/" + virtualNetworkName + "/gateway/clientrootcertificates/" + certificateThumbprint; @@ -242,15 +286,27 @@ public GatewayOperationResponse delete(String virtualNetworkName, String certifi // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -283,6 +339,10 @@ public GatewayOperationResponse delete(String virtualNetworkName, String certifi result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -293,8 +353,9 @@ public GatewayOperationResponse delete(String virtualNetworkName, String certifi * http://msdn.microsoft.com/en-us/library/windowsazure/dn205127.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param certificateThumbprint The X509 certificate thumbprint + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param certificateThumbprint The X509 certificate thumbprint. * @return A standard storage response including an HTTP status code and * request ID. */ @@ -317,8 +378,9 @@ public ClientRootCertificateGetResponse call() throws Exception * http://msdn.microsoft.com/en-us/library/windowsazure/dn205127.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param certificateThumbprint The X509 certificate thumbprint + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param certificateThumbprint The X509 certificate thumbprint. * @return A standard storage response including an HTTP status code and * request ID. */ @@ -336,6 +398,16 @@ public ClientRootCertificateGetResponse get(String virtualNetworkName, String ce } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("virtualNetworkName", virtualNetworkName); + tracingParameters.put("certificateThumbprint", certificateThumbprint); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/" + virtualNetworkName + "/gateway/clientrootcertificates/" + certificateThumbprint; @@ -344,15 +416,27 @@ public ClientRootCertificateGetResponse get(String virtualNetworkName, String ce HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -369,6 +453,10 @@ public ClientRootCertificateGetResponse get(String virtualNetworkName, String ce result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -379,8 +467,9 @@ public ClientRootCertificateGetResponse get(String virtualNetworkName, String ce * http://msdn.microsoft.com/en-us/library/windowsazure/dn205130.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @return The response to the list client root certificates request + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @return The response to the list client root certificates request. */ @Override public Future listAsync(final String virtualNetworkName) @@ -401,8 +490,9 @@ public ClientRootCertificateListResponse call() throws Exception * http://msdn.microsoft.com/en-us/library/windowsazure/dn205130.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @return The response to the list client root certificates request + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @return The response to the list client root certificates request. */ @Override public ClientRootCertificateListResponse list(String virtualNetworkName) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException @@ -414,6 +504,15 @@ public ClientRootCertificateListResponse list(String virtualNetworkName) throws } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("virtualNetworkName", virtualNetworkName); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/" + virtualNetworkName + "/gateway/clientrootcertificates"; @@ -423,15 +522,27 @@ public ClientRootCertificateListResponse list(String virtualNetworkName) throws // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -492,6 +603,10 @@ public ClientRootCertificateListResponse list(String virtualNetworkName) throws result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/Exports.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/Exports.java index f65858e7917a3..0b36bf6c8062f 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/Exports.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/Exports.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.virtualnetworks; -import com.microsoft.windowsazure.services.core.Builder; +import com.microsoft.windowsazure.core.Builder; /** * The Class Exports. diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/GatewayOperations.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/GatewayOperations.java index 84f803f33f5e7..3814643889fef 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/GatewayOperations.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/GatewayOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,6 +23,7 @@ package com.microsoft.windowsazure.management.virtualnetworks; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.virtualnetworks.models.GatewayConnectDisconnectOrTestParameters; import com.microsoft.windowsazure.management.virtualnetworks.models.GatewayCreateParameters; import com.microsoft.windowsazure.management.virtualnetworks.models.GatewayGenerateVpnClientPackageParameters; @@ -33,7 +36,6 @@ import com.microsoft.windowsazure.management.virtualnetworks.models.GatewayListSupportedDevicesResponse; import com.microsoft.windowsazure.management.virtualnetworks.models.GatewayOperationResponse; import com.microsoft.windowsazure.management.virtualnetworks.models.GatewayResetSharedKeyParameters; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.text.ParseException; @@ -54,8 +56,9 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154107.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param localNetworkSiteName The name of the site to connect to + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param localNetworkSiteName The name of the site to connect to. * @param parameters Parameters supplied to the Create Virtual Network * Gateway operation. * @return A standard storage response including an HTTP status code and @@ -71,8 +74,9 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154107.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param localNetworkSiteName The name of the site to connect to + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param localNetworkSiteName The name of the site to connect to. * @param parameters Parameters supplied to the Create Virtual Network * Gateway operation. * @return A standard storage response including an HTTP status code and @@ -86,7 +90,8 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154119.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @param parameters Parameters supplied to the Create Virtual Network * Gateway operation. * @return A standard storage response including an HTTP status code and @@ -100,7 +105,8 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154119.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @param parameters Parameters supplied to the Create Virtual Network * Gateway operation. * @return A standard storage response including an HTTP status code and @@ -163,10 +169,11 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154114.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param localNetworkName The name of the local network + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param localNetworkName The name of the local network. * @param parameters The parameters to the Virtual Network Gateway Reset - * Shared Key request + * Shared Key request. * @return A standard storage response including an HTTP status code and * request ID. */ @@ -179,10 +186,11 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154114.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param localNetworkName The name of the local network + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param localNetworkName The name of the local network. * @param parameters The parameters to the Virtual Network Gateway Reset - * Shared Key request + * Shared Key request. * @return A standard storage response including an HTTP status code and * request ID. */ @@ -196,8 +204,9 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154107.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param localNetworkSiteName The name of the site to connect to + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param localNetworkSiteName The name of the site to connect to. * @param parameters Parameters supplied to the Create Virtual Network * Gateway operation. * @return The response body contains the status of the specified @@ -210,7 +219,7 @@ public interface GatewayOperations * the failed request, and also includes error information regarding the * failure. */ - GatewayGetOperationStatusResponse connectDisconnectOrTest(String virtualNetworkName, String localNetworkSiteName, GatewayConnectDisconnectOrTestParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + GatewayGetOperationStatusResponse connectDisconnectOrTest(String virtualNetworkName, String localNetworkSiteName, GatewayConnectDisconnectOrTestParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * To connect to, disconnect from, or test your connection to a local @@ -220,8 +229,9 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154107.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param localNetworkSiteName The name of the site to connect to + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param localNetworkSiteName The name of the site to connect to. * @param parameters Parameters supplied to the Create Virtual Network * Gateway operation. * @return The response body contains the status of the specified @@ -242,7 +252,8 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154119.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @param parameters Parameters supplied to the Create Virtual Network * Gateway operation. * @return The response body contains the status of the specified @@ -263,7 +274,8 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154119.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @param parameters Parameters supplied to the Create Virtual Network * Gateway operation. * @return The response body contains the status of the specified @@ -333,7 +345,7 @@ public interface GatewayOperations * the failed request, and also includes error information regarding the * failure. */ - GatewayGetOperationStatusResponse failover(String virtualNetworkName) throws InterruptedException, ExecutionException, ServiceException; + GatewayGetOperationStatusResponse failover(String virtualNetworkName) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Failover Virtual network Gateway operation causes a network gateway @@ -360,7 +372,8 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/dn205126.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @param parameters Parameters supplied to the Create Virtual Network * Gateway operation. * @return A standard storage response including an HTTP status code and @@ -374,7 +387,8 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/dn205126.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @param parameters Parameters supplied to the Create Virtual Network * Gateway operation. * @return A standard storage response including an HTTP status code and @@ -388,7 +402,8 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154109.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @return A standard storage response including an HTTP status code and * request ID. */ @@ -400,7 +415,8 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154109.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @return A standard storage response including an HTTP status code and * request ID. */ @@ -412,11 +428,12 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154115.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @param parameters The parameters for the GetDeviceConfigurationScript - * request + * request. * @return The configuration script returned from the get device - * configuration script request + * configuration script request. */ GatewayGetDeviceConfigurationScriptResponse getDeviceConfigurationScript(String virtualNetworkName, GatewayGetDeviceConfigurationScriptParameters parameters) throws IOException, ServiceException; @@ -426,11 +443,12 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154115.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @param parameters The parameters for the GetDeviceConfigurationScript - * request + * request. * @return The configuration script returned from the get device - * configuration script request + * configuration script request. */ Future getDeviceConfigurationScriptAsync(String virtualNetworkName, GatewayGetDeviceConfigurationScriptParameters parameters); @@ -440,7 +458,7 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154112.aspx for * more information) * - * @param operationId The id of the virtualnetwork operation + * @param operationId The id of the virtualnetwork operation. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -459,7 +477,7 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154112.aspx for * more information) * - * @param operationId The id of the virtualnetwork operation + * @param operationId The id of the virtualnetwork operation. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -479,9 +497,10 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154122.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param localNetworkName The name of the local network - * @return The response to the get shared key request + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param localNetworkName The name of the local network. + * @return The response to the get shared key request. */ GatewayGetSharedKeyResponse getSharedKey(String virtualNetworkName, String localNetworkName) throws IOException, ServiceException, ParserConfigurationException, SAXException; @@ -492,9 +511,10 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154122.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param localNetworkName The name of the local network - * @return The response to the get shared key request + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param localNetworkName The name of the local network. + * @return The response to the get shared key request. */ Future getSharedKeyAsync(String virtualNetworkName, String localNetworkName); @@ -504,9 +524,10 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154120.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @return The response to a ListConnections request to a Virtual Network - * Gateway + * Gateway. */ GatewayListConnectionsResponse listConnections(String virtualNetworkName) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException; @@ -516,9 +537,10 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154120.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @return The response to a ListConnections request to a Virtual Network - * Gateway + * Gateway. */ Future listConnectionsAsync(String virtualNetworkName); @@ -528,7 +550,7 @@ public interface GatewayOperations * (see http://msdn.microsoft.com/en-us/library/windowsazure/jj154102.aspx * for more information) * - * @return The respoonse to the get supported platform configuration request + * @return The respoonse to the get supported platform configuration request. */ GatewayListSupportedDevicesResponse listSupportedDevices() throws IOException, ServiceException, ParserConfigurationException, SAXException; @@ -538,7 +560,7 @@ public interface GatewayOperations * (see http://msdn.microsoft.com/en-us/library/windowsazure/jj154102.aspx * for more information) * - * @return The respoonse to the get supported platform configuration request + * @return The respoonse to the get supported platform configuration request. */ Future listSupportedDevicesAsync(); @@ -549,10 +571,11 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154114.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param localNetworkName The name of the local network + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param localNetworkName The name of the local network. * @param parameters The parameters to the Virtual Network Gateway Reset - * Shared Key request + * Shared Key request. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -563,7 +586,7 @@ public interface GatewayOperations * the failed request, and also includes error information regarding the * failure. */ - GatewayGetOperationStatusResponse resetSharedKey(String virtualNetworkName, String localNetworkName, GatewayResetSharedKeyParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + GatewayGetOperationStatusResponse resetSharedKey(String virtualNetworkName, String localNetworkName, GatewayResetSharedKeyParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Reset Virtual network Gateway shared key operation resets the shared @@ -572,10 +595,11 @@ public interface GatewayOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj154114.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param localNetworkName The name of the local network + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param localNetworkName The name of the local network. * @param parameters The parameters to the Virtual Network Gateway Reset - * Shared Key request + * Shared Key request. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/GatewayOperationsImpl.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/GatewayOperationsImpl.java index 3ac0f9246f641..300485d6d0524 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/GatewayOperationsImpl.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/GatewayOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,6 +23,10 @@ package com.microsoft.windowsazure.management.virtualnetworks; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.core.utils.StreamUtils; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.virtualnetworks.models.GatewayConnectDisconnectOrTestParameters; import com.microsoft.windowsazure.management.virtualnetworks.models.GatewayConnectivityState; import com.microsoft.windowsazure.management.virtualnetworks.models.GatewayCreateParameters; @@ -37,10 +43,8 @@ import com.microsoft.windowsazure.management.virtualnetworks.models.GatewayOperationStatus; import com.microsoft.windowsazure.management.virtualnetworks.models.GatewayResetSharedKeyParameters; import com.microsoft.windowsazure.management.virtualnetworks.models.GatewayType; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.utils.StreamUtils; -import com.microsoft.windowsazure.services.core.utils.pipeline.CustomHttpDelete; +import com.microsoft.windowsazure.tracing.ClientRequestTrackingHandler; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -49,6 +53,7 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; @@ -99,8 +104,9 @@ public class GatewayOperationsImpl implements ServiceOperations tracingParameters = new HashMap(); + tracingParameters.put("virtualNetworkName", virtualNetworkName); + tracingParameters.put("localNetworkSiteName", localNetworkSiteName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginConnectDisconnectOrTestingAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/" + virtualNetworkName + "/gateway/connection/" + localNetworkSiteName; @@ -160,7 +178,7 @@ public GatewayOperationResponse beginConnectDisconnectOrTesting(String virtualNe // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -195,11 +213,23 @@ public GatewayOperationResponse beginConnectDisconnectOrTesting(String virtualNe // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -232,6 +262,10 @@ public GatewayOperationResponse beginConnectDisconnectOrTesting(String virtualNe result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -241,7 +275,8 @@ public GatewayOperationResponse beginConnectDisconnectOrTesting(String virtualNe * http://msdn.microsoft.com/en-us/library/windowsazure/jj154119.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @param parameters Parameters supplied to the Create Virtual Network * Gateway operation. * @return A standard storage response including an HTTP status code and @@ -265,7 +300,8 @@ public GatewayOperationResponse call() throws Exception * http://msdn.microsoft.com/en-us/library/windowsazure/jj154119.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @param parameters Parameters supplied to the Create Virtual Network * Gateway operation. * @return A standard storage response including an HTTP status code and @@ -285,6 +321,16 @@ public GatewayOperationResponse beginCreating(String virtualNetworkName, Gateway } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("virtualNetworkName", virtualNetworkName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginCreatingAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/" + virtualNetworkName + "/gateway"; @@ -294,7 +340,7 @@ public GatewayOperationResponse beginCreating(String virtualNetworkName, Gateway // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -322,11 +368,23 @@ public GatewayOperationResponse beginCreating(String virtualNetworkName, Gateway // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 201) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -359,6 +417,10 @@ public GatewayOperationResponse beginCreating(String virtualNetworkName, Gateway result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -404,6 +466,15 @@ public GatewayOperationResponse beginDeleting(String virtualNetworkName) throws } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("virtualNetworkName", virtualNetworkName); + CloudTracing.enter(invocationId, this, "beginDeletingAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/" + virtualNetworkName + "/gateway"; @@ -413,15 +484,27 @@ public GatewayOperationResponse beginDeleting(String virtualNetworkName) throws // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -454,6 +537,10 @@ public GatewayOperationResponse beginDeleting(String virtualNetworkName) throws result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -499,6 +586,15 @@ public GatewayOperationResponse beginFailover(String virtualNetworkName) throws } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("virtualNetworkName", virtualNetworkName); + CloudTracing.enter(invocationId, this, "beginFailoverAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/" + virtualNetworkName + "/gateway"; @@ -508,7 +604,7 @@ public GatewayOperationResponse beginFailover(String virtualNetworkName) throws // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -519,11 +615,23 @@ public GatewayOperationResponse beginFailover(String virtualNetworkName) throws // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -556,6 +664,10 @@ public GatewayOperationResponse beginFailover(String virtualNetworkName) throws result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -566,10 +678,11 @@ public GatewayOperationResponse beginFailover(String virtualNetworkName) throws * http://msdn.microsoft.com/en-us/library/windowsazure/jj154114.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param localNetworkName The name of the local network + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param localNetworkName The name of the local network. * @param parameters The parameters to the Virtual Network Gateway Reset - * Shared Key request + * Shared Key request. * @return A standard storage response including an HTTP status code and * request ID. */ @@ -592,10 +705,11 @@ public GatewayOperationResponse call() throws Exception * http://msdn.microsoft.com/en-us/library/windowsazure/jj154114.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param localNetworkName The name of the local network + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param localNetworkName The name of the local network. * @param parameters The parameters to the Virtual Network Gateway Reset - * Shared Key request + * Shared Key request. * @return A standard storage response including an HTTP status code and * request ID. */ @@ -617,6 +731,17 @@ public GatewayOperationResponse beginResetSharedKey(String virtualNetworkName, S } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("virtualNetworkName", virtualNetworkName); + tracingParameters.put("localNetworkName", localNetworkName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginResetSharedKeyAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/" + virtualNetworkName + "/gateway/connection/" + localNetworkName + "/sharedkey"; @@ -626,7 +751,7 @@ public GatewayOperationResponse beginResetSharedKey(String virtualNetworkName, S // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -654,11 +779,23 @@ public GatewayOperationResponse beginResetSharedKey(String virtualNetworkName, S // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -691,6 +828,10 @@ public GatewayOperationResponse beginResetSharedKey(String virtualNetworkName, S result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -702,8 +843,9 @@ public GatewayOperationResponse beginResetSharedKey(String virtualNetworkName, S * http://msdn.microsoft.com/en-us/library/windowsazure/jj154107.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param localNetworkSiteName The name of the site to connect to + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param localNetworkSiteName The name of the site to connect to. * @param parameters Parameters supplied to the Create Virtual Network * Gateway operation. * @return The response body contains the status of the specified @@ -736,8 +878,9 @@ public GatewayGetOperationStatusResponse call() throws Exception * http://msdn.microsoft.com/en-us/library/windowsazure/jj154107.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param localNetworkSiteName The name of the site to connect to + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param localNetworkSiteName The name of the site to connect to. * @param parameters Parameters supplied to the Create Virtual Network * Gateway operation. * @return The response body contains the status of the specified @@ -751,29 +894,63 @@ public GatewayGetOperationStatusResponse call() throws Exception * failure. */ @Override - public GatewayGetOperationStatusResponse connectDisconnectOrTest(String virtualNetworkName, String localNetworkSiteName, GatewayConnectDisconnectOrTestParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public GatewayGetOperationStatusResponse connectDisconnectOrTest(String virtualNetworkName, String localNetworkSiteName, GatewayConnectDisconnectOrTestParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { VirtualNetworkManagementClient client2 = this.getClient(); - - GatewayOperationResponse response = client2.getGateways().beginConnectDisconnectOrTestingAsync(virtualNetworkName, localNetworkSiteName, parameters).get(); - GatewayGetOperationStatusResponse result = client2.getGateways().getOperationStatusAsync(response.getOperationId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != GatewayOperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getGateways().getOperationStatusAsync(response.getOperationId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("virtualNetworkName", virtualNetworkName); + tracingParameters.put("localNetworkSiteName", localNetworkSiteName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "connectDisconnectOrTestAsync", tracingParameters); } - - if (result.getStatus() != GatewayOperationStatus.Successful) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + GatewayOperationResponse response = client2.getGatewaysOperations().beginConnectDisconnectOrTestingAsync(virtualNetworkName, localNetworkSiteName, parameters).get(); + GatewayGetOperationStatusResponse result = client2.getGatewaysOperations().getOperationStatusAsync(response.getOperationId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != GatewayOperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getGatewaysOperations().getOperationStatusAsync(response.getOperationId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != GatewayOperationStatus.Successful) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -782,7 +959,8 @@ public GatewayGetOperationStatusResponse connectDisconnectOrTest(String virtualN * http://msdn.microsoft.com/en-us/library/windowsazure/jj154119.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @param parameters Parameters supplied to the Create Virtual Network * Gateway operation. * @return The response body contains the status of the specified @@ -813,7 +991,8 @@ public GatewayGetOperationStatusResponse call() throws Exception * http://msdn.microsoft.com/en-us/library/windowsazure/jj154119.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @param parameters Parameters supplied to the Create Virtual Network * Gateway operation. * @return The response body contains the status of the specified @@ -830,26 +1009,59 @@ public GatewayGetOperationStatusResponse call() throws Exception public GatewayGetOperationStatusResponse create(String virtualNetworkName, GatewayCreateParameters parameters) throws UnsupportedEncodingException, IOException, ServiceException, ParserConfigurationException, SAXException, InterruptedException, ExecutionException, ServiceException { VirtualNetworkManagementClient client2 = this.getClient(); - - GatewayOperationResponse response = client2.getGateways().beginCreatingAsync(virtualNetworkName, parameters).get(); - GatewayGetOperationStatusResponse result = client2.getGateways().getOperationStatusAsync(response.getOperationId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != GatewayOperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getGateways().getOperationStatusAsync(response.getOperationId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("virtualNetworkName", virtualNetworkName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); } - - if (result.getStatus() != GatewayOperationStatus.Successful) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + GatewayOperationResponse response = client2.getGatewaysOperations().beginCreatingAsync(virtualNetworkName, parameters).get(); + GatewayGetOperationStatusResponse result = client2.getGatewaysOperations().getOperationStatusAsync(response.getOperationId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != GatewayOperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getGatewaysOperations().getOperationStatusAsync(response.getOperationId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != GatewayOperationStatus.Successful) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -902,26 +1114,58 @@ public GatewayGetOperationStatusResponse call() throws Exception public GatewayGetOperationStatusResponse delete(String virtualNetworkName) throws IOException, ServiceException, ParserConfigurationException, SAXException, InterruptedException, ExecutionException, ServiceException { VirtualNetworkManagementClient client2 = this.getClient(); - - GatewayOperationResponse response = client2.getGateways().beginDeletingAsync(virtualNetworkName).get(); - GatewayGetOperationStatusResponse result = client2.getGateways().getOperationStatusAsync(response.getOperationId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != GatewayOperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getGateways().getOperationStatusAsync(response.getOperationId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("virtualNetworkName", virtualNetworkName); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); } - - if (result.getStatus() != GatewayOperationStatus.Successful) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + GatewayOperationResponse response = client2.getGatewaysOperations().beginDeletingAsync(virtualNetworkName).get(); + GatewayGetOperationStatusResponse result = client2.getGatewaysOperations().getOperationStatusAsync(response.getOperationId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != GatewayOperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getGatewaysOperations().getOperationStatusAsync(response.getOperationId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != GatewayOperationStatus.Successful) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -971,29 +1215,61 @@ public GatewayGetOperationStatusResponse call() throws Exception * failure. */ @Override - public GatewayGetOperationStatusResponse failover(String virtualNetworkName) throws InterruptedException, ExecutionException, ServiceException + public GatewayGetOperationStatusResponse failover(String virtualNetworkName) throws InterruptedException, ExecutionException, ServiceException, IOException { VirtualNetworkManagementClient client2 = this.getClient(); - - GatewayOperationResponse response = client2.getGateways().beginFailoverAsync(virtualNetworkName).get(); - GatewayGetOperationStatusResponse result = client2.getGateways().getOperationStatusAsync(response.getOperationId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != GatewayOperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getGateways().getOperationStatusAsync(response.getOperationId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("virtualNetworkName", virtualNetworkName); + CloudTracing.enter(invocationId, this, "failoverAsync", tracingParameters); } - - if (result.getStatus() != GatewayOperationStatus.Successful) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + GatewayOperationResponse response = client2.getGatewaysOperations().beginFailoverAsync(virtualNetworkName).get(); + GatewayGetOperationStatusResponse result = client2.getGatewaysOperations().getOperationStatusAsync(response.getOperationId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != GatewayOperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getGatewaysOperations().getOperationStatusAsync(response.getOperationId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != GatewayOperationStatus.Successful) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } /** @@ -1002,7 +1278,8 @@ public GatewayGetOperationStatusResponse failover(String virtualNetworkName) thr * http://msdn.microsoft.com/en-us/library/windowsazure/dn205126.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @param parameters Parameters supplied to the Create Virtual Network * Gateway operation. * @return A standard storage response including an HTTP status code and @@ -1026,7 +1303,8 @@ public GatewayOperationResponse call() throws Exception * http://msdn.microsoft.com/en-us/library/windowsazure/dn205126.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @param parameters Parameters supplied to the Create Virtual Network * Gateway operation. * @return A standard storage response including an HTTP status code and @@ -1046,6 +1324,16 @@ public GatewayOperationResponse generateVpnClientPackage(String virtualNetworkNa } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("virtualNetworkName", virtualNetworkName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "generateVpnClientPackageAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/" + virtualNetworkName + "/gateway/vpnclientpackage"; @@ -1055,7 +1343,7 @@ public GatewayOperationResponse generateVpnClientPackage(String virtualNetworkNa // Set Headers httpRequest.setHeader("Content-Type", "application/xml"); - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -1083,11 +1371,23 @@ public GatewayOperationResponse generateVpnClientPackage(String virtualNetworkNa // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 201) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1120,6 +1420,10 @@ public GatewayOperationResponse generateVpnClientPackage(String virtualNetworkNa result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1129,7 +1433,8 @@ public GatewayOperationResponse generateVpnClientPackage(String virtualNetworkNa * http://msdn.microsoft.com/en-us/library/windowsazure/jj154109.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @return A standard storage response including an HTTP status code and * request ID. */ @@ -1151,7 +1456,8 @@ public GatewayGetResponse call() throws Exception * http://msdn.microsoft.com/en-us/library/windowsazure/jj154109.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @return A standard storage response including an HTTP status code and * request ID. */ @@ -1165,6 +1471,15 @@ public GatewayGetResponse get(String virtualNetworkName) throws IOException, Ser } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("virtualNetworkName", virtualNetworkName); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/" + virtualNetworkName + "/gateway"; @@ -1173,15 +1488,27 @@ public GatewayGetResponse get(String virtualNetworkName) throws IOException, Ser HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1279,6 +1606,10 @@ public GatewayGetResponse get(String virtualNetworkName) throws IOException, Ser result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1288,11 +1619,12 @@ public GatewayGetResponse get(String virtualNetworkName) throws IOException, Ser * http://msdn.microsoft.com/en-us/library/windowsazure/jj154115.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @param parameters The parameters for the GetDeviceConfigurationScript - * request + * request. * @return The configuration script returned from the get device - * configuration script request + * configuration script request. */ @Override public Future getDeviceConfigurationScriptAsync(final String virtualNetworkName, final GatewayGetDeviceConfigurationScriptParameters parameters) @@ -1312,11 +1644,12 @@ public GatewayGetDeviceConfigurationScriptResponse call() throws Exception * http://msdn.microsoft.com/en-us/library/windowsazure/jj154115.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @param parameters The parameters for the GetDeviceConfigurationScript - * request + * request. * @return The configuration script returned from the get device - * configuration script request + * configuration script request. */ @Override public GatewayGetDeviceConfigurationScriptResponse getDeviceConfigurationScript(String virtualNetworkName, GatewayGetDeviceConfigurationScriptParameters parameters) throws IOException, ServiceException @@ -1332,6 +1665,16 @@ public GatewayGetDeviceConfigurationScriptResponse getDeviceConfigurationScript( } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("virtualNetworkName", virtualNetworkName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "getDeviceConfigurationScriptAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/" + virtualNetworkName + "/gateway/vpndeviceconfigurationscript?vendor=" + parameters.getVendor() + "&platform=" + parameters.getPlatform() + "&OSfamily=" + parameters.getOSFamily(); @@ -1340,15 +1683,27 @@ public GatewayGetDeviceConfigurationScriptResponse getDeviceConfigurationScript( HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1365,6 +1720,10 @@ public GatewayGetDeviceConfigurationScriptResponse getDeviceConfigurationScript( result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1374,7 +1733,7 @@ public GatewayGetDeviceConfigurationScriptResponse getDeviceConfigurationScript( * http://msdn.microsoft.com/en-us/library/windowsazure/jj154112.aspx for * more information) * - * @param operationId The id of the virtualnetwork operation + * @param operationId The id of the virtualnetwork operation. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -1403,7 +1762,7 @@ public GatewayGetOperationStatusResponse call() throws Exception * http://msdn.microsoft.com/en-us/library/windowsazure/jj154112.aspx for * more information) * - * @param operationId The id of the virtualnetwork operation + * @param operationId The id of the virtualnetwork operation. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -1424,6 +1783,15 @@ public GatewayGetOperationStatusResponse getOperationStatus(String operationId) } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("operationId", operationId); + CloudTracing.enter(invocationId, this, "getOperationStatusAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/operation/" + operationId; @@ -1432,15 +1800,27 @@ public GatewayGetOperationStatusResponse getOperationStatus(String operationId) HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1517,6 +1897,10 @@ public GatewayGetOperationStatusResponse getOperationStatus(String operationId) result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1527,9 +1911,10 @@ public GatewayGetOperationStatusResponse getOperationStatus(String operationId) * http://msdn.microsoft.com/en-us/library/windowsazure/jj154122.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param localNetworkName The name of the local network - * @return The response to the get shared key request + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param localNetworkName The name of the local network. + * @return The response to the get shared key request. */ @Override public Future getSharedKeyAsync(final String virtualNetworkName, final String localNetworkName) @@ -1550,9 +1935,10 @@ public GatewayGetSharedKeyResponse call() throws Exception * http://msdn.microsoft.com/en-us/library/windowsazure/jj154122.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param localNetworkName The name of the local network - * @return The response to the get shared key request + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param localNetworkName The name of the local network. + * @return The response to the get shared key request. */ @Override public GatewayGetSharedKeyResponse getSharedKey(String virtualNetworkName, String localNetworkName) throws IOException, ServiceException, ParserConfigurationException, SAXException @@ -1568,6 +1954,16 @@ public GatewayGetSharedKeyResponse getSharedKey(String virtualNetworkName, Strin } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("virtualNetworkName", virtualNetworkName); + tracingParameters.put("localNetworkName", localNetworkName); + CloudTracing.enter(invocationId, this, "getSharedKeyAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/" + virtualNetworkName + "/gateway/connection/" + localNetworkName + "/sharedkey"; @@ -1576,15 +1972,27 @@ public GatewayGetSharedKeyResponse getSharedKey(String virtualNetworkName, Strin HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1617,6 +2025,10 @@ public GatewayGetSharedKeyResponse getSharedKey(String virtualNetworkName, Strin result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1626,9 +2038,10 @@ public GatewayGetSharedKeyResponse getSharedKey(String virtualNetworkName, Strin * http://msdn.microsoft.com/en-us/library/windowsazure/jj154120.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @return The response to a ListConnections request to a Virtual Network - * Gateway + * Gateway. */ @Override public Future listConnectionsAsync(final String virtualNetworkName) @@ -1648,9 +2061,10 @@ public GatewayListConnectionsResponse call() throws Exception * http://msdn.microsoft.com/en-us/library/windowsazure/jj154120.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway + * @param virtualNetworkName The name of the virtual network for this + * gateway. * @return The response to a ListConnections request to a Virtual Network - * Gateway + * Gateway. */ @Override public GatewayListConnectionsResponse listConnections(String virtualNetworkName) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException @@ -1662,6 +2076,15 @@ public GatewayListConnectionsResponse listConnections(String virtualNetworkName) } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("virtualNetworkName", virtualNetworkName); + CloudTracing.enter(invocationId, this, "listConnectionsAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/" + virtualNetworkName + "/gateway/connections"; @@ -1670,15 +2093,27 @@ public GatewayListConnectionsResponse listConnections(String virtualNetworkName) HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1815,6 +2250,10 @@ public GatewayListConnectionsResponse listConnections(String virtualNetworkName) result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1824,7 +2263,7 @@ public GatewayListConnectionsResponse listConnections(String virtualNetworkName) * (see http://msdn.microsoft.com/en-us/library/windowsazure/jj154102.aspx * for more information) * - * @return The respoonse to the get supported platform configuration request + * @return The respoonse to the get supported platform configuration request. */ @Override public Future listSupportedDevicesAsync() @@ -1844,7 +2283,7 @@ public GatewayListSupportedDevicesResponse call() throws Exception * (see http://msdn.microsoft.com/en-us/library/windowsazure/jj154102.aspx * for more information) * - * @return The respoonse to the get supported platform configuration request + * @return The respoonse to the get supported platform configuration request. */ @Override public GatewayListSupportedDevicesResponse listSupportedDevices() throws IOException, ServiceException, ParserConfigurationException, SAXException @@ -1852,6 +2291,14 @@ public GatewayListSupportedDevicesResponse listSupportedDevices() throws IOExcep // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listSupportedDevicesAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/supporteddevices"; @@ -1860,15 +2307,27 @@ public GatewayListSupportedDevicesResponse listSupportedDevices() throws IOExcep HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1946,6 +2405,10 @@ public GatewayListSupportedDevicesResponse listSupportedDevices() throws IOExcep result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1956,10 +2419,11 @@ public GatewayListSupportedDevicesResponse listSupportedDevices() throws IOExcep * http://msdn.microsoft.com/en-us/library/windowsazure/jj154114.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param localNetworkName The name of the local network + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param localNetworkName The name of the local network. * @param parameters The parameters to the Virtual Network Gateway Reset - * Shared Key request + * Shared Key request. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -1989,10 +2453,11 @@ public GatewayGetOperationStatusResponse call() throws Exception * http://msdn.microsoft.com/en-us/library/windowsazure/jj154114.aspx for * more information) * - * @param virtualNetworkName The name of the virtual network for this gateway - * @param localNetworkName The name of the local network + * @param virtualNetworkName The name of the virtual network for this + * gateway. + * @param localNetworkName The name of the local network. * @param parameters The parameters to the Virtual Network Gateway Reset - * Shared Key request + * Shared Key request. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -2004,28 +2469,62 @@ public GatewayGetOperationStatusResponse call() throws Exception * failure. */ @Override - public GatewayGetOperationStatusResponse resetSharedKey(String virtualNetworkName, String localNetworkName, GatewayResetSharedKeyParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public GatewayGetOperationStatusResponse resetSharedKey(String virtualNetworkName, String localNetworkName, GatewayResetSharedKeyParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { VirtualNetworkManagementClient client2 = this.getClient(); - - GatewayOperationResponse response = client2.getGateways().beginResetSharedKeyAsync(virtualNetworkName, localNetworkName, parameters).get(); - GatewayGetOperationStatusResponse result = client2.getGateways().getOperationStatusAsync(response.getOperationId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != GatewayOperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getGateways().getOperationStatusAsync(response.getOperationId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("virtualNetworkName", virtualNetworkName); + tracingParameters.put("localNetworkName", localNetworkName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "resetSharedKeyAsync", tracingParameters); } - - if (result.getStatus() != GatewayOperationStatus.Successful) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + GatewayOperationResponse response = client2.getGatewaysOperations().beginResetSharedKeyAsync(virtualNetworkName, localNetworkName, parameters).get(); + GatewayGetOperationStatusResponse result = client2.getGatewaysOperations().getOperationStatusAsync(response.getOperationId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != GatewayOperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getGatewaysOperations().getOperationStatusAsync(response.getOperationId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != GatewayOperationStatus.Successful) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } } diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/NetworkOperations.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/NetworkOperations.java index 81f1aaea254ce..b2a315f64d281 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/NetworkOperations.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/NetworkOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,12 +23,12 @@ package com.microsoft.windowsazure.management.virtualnetworks; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.virtualnetworks.models.NetworkGetConfigurationResponse; import com.microsoft.windowsazure.management.virtualnetworks.models.NetworkListResponse; import com.microsoft.windowsazure.management.virtualnetworks.models.NetworkSetConfigurationParameters; import com.microsoft.windowsazure.management.virtualnetworks.models.VirtualNetworkOperationStatusResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.text.ParseException; @@ -43,7 +45,7 @@ public interface NetworkOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj157181.aspx for * more information) * - * @param parameters The updated network configuration + * @param parameters The updated network configuration. * @return A standard storage response including an HTTP status code and * request ID. */ @@ -55,7 +57,7 @@ public interface NetworkOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj157181.aspx for * more information) * - * @param parameters The updated network configuration + * @param parameters The updated network configuration. * @return A standard storage response including an HTTP status code and * request ID. */ @@ -87,7 +89,7 @@ public interface NetworkOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj157185.aspx for * more information) * - * @return The response structure for the Server List operation + * @return The response structure for the Server List operation. */ NetworkListResponse list() throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException; @@ -97,7 +99,7 @@ public interface NetworkOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj157185.aspx for * more information) * - * @return The response structure for the Server List operation + * @return The response structure for the Server List operation. */ Future listAsync(); @@ -107,7 +109,7 @@ public interface NetworkOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj157181.aspx for * more information) * - * @param parameters The updated network configuration + * @param parameters The updated network configuration. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -118,7 +120,7 @@ public interface NetworkOperations * the failed request, and also includes error information regarding the * failure. */ - VirtualNetworkOperationStatusResponse setConfiguration(NetworkSetConfigurationParameters parameters) throws InterruptedException, ExecutionException, ServiceException; + VirtualNetworkOperationStatusResponse setConfiguration(NetworkSetConfigurationParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException; /** * The Set Network Configuration operation asynchronously configures the @@ -126,7 +128,7 @@ public interface NetworkOperations * http://msdn.microsoft.com/en-us/library/windowsazure/jj157181.aspx for * more information) * - * @param parameters The updated network configuration + * @param parameters The updated network configuration. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/NetworkOperationsImpl.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/NetworkOperationsImpl.java index 5fe3fda42931a..ebd09343c155f 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/NetworkOperationsImpl.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/NetworkOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,10 @@ package com.microsoft.windowsazure.management.virtualnetworks; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.utils.StreamUtils; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.virtualnetworks.models.GatewayProfile; import com.microsoft.windowsazure.management.virtualnetworks.models.LocalNetworkConnectionType; import com.microsoft.windowsazure.management.virtualnetworks.models.NetworkGetConfigurationResponse; @@ -29,14 +34,14 @@ import com.microsoft.windowsazure.management.virtualnetworks.models.NetworkSetConfigurationParameters; import com.microsoft.windowsazure.management.virtualnetworks.models.OperationStatus; import com.microsoft.windowsazure.management.virtualnetworks.models.VirtualNetworkOperationStatusResponse; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.utils.StreamUtils; +import com.microsoft.windowsazure.tracing.ClientRequestTrackingHandler; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.net.InetAddress; import java.text.ParseException; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; @@ -78,7 +83,7 @@ public class NetworkOperationsImpl implements ServiceOperations tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginSettingConfigurationAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/media"; @@ -127,7 +141,7 @@ public OperationResponse beginSettingConfiguration(NetworkSetConfigurationParame // Set Headers httpRequest.setHeader("Content-Type", "application/octet-stream"); - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Serialize Request String requestContent = null; @@ -138,11 +152,23 @@ public OperationResponse beginSettingConfiguration(NetworkSetConfigurationParame // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -155,6 +181,10 @@ public OperationResponse beginSettingConfiguration(NetworkSetConfigurationParame result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -192,6 +222,14 @@ public NetworkGetConfigurationResponse getConfiguration() throws IOException, Se // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "getConfigurationAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/media"; @@ -200,15 +238,27 @@ public NetworkGetConfigurationResponse getConfiguration() throws IOException, Se HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -225,6 +275,10 @@ public NetworkGetConfigurationResponse getConfiguration() throws IOException, Se result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -234,7 +288,7 @@ public NetworkGetConfigurationResponse getConfiguration() throws IOException, Se * http://msdn.microsoft.com/en-us/library/windowsazure/jj157185.aspx for * more information) * - * @return The response structure for the Server List operation + * @return The response structure for the Server List operation. */ @Override public Future listAsync() @@ -254,7 +308,7 @@ public NetworkListResponse call() throws Exception * http://msdn.microsoft.com/en-us/library/windowsazure/jj157185.aspx for * more information) * - * @return The response structure for the Server List operation + * @return The response structure for the Server List operation. */ @Override public NetworkListResponse list() throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException @@ -262,6 +316,14 @@ public NetworkListResponse list() throws IOException, ServiceException, ParserCo // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/virtualnetwork"; @@ -270,15 +332,27 @@ public NetworkListResponse list() throws IOException, ServiceException, ParserCo HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -395,45 +469,50 @@ public NetworkListResponse list() throws IOException, ServiceException, ParserCo } } - NodeList elements12 = virtualNetworkSitesElement.getElementsByTagName("DnsServers"); - Element dnsServersSequenceElement = elements12.getLength() > 0 ? ((Element)elements12.item(0)) : null; - if (dnsServersSequenceElement != null) + NodeList elements12 = virtualNetworkSitesElement.getElementsByTagName("Dns"); + Element dnsElement = elements12.getLength() > 0 ? ((Element)elements12.item(0)) : null; + if (dnsElement != null) { - for (int i4 = 0; i4 < dnsServersSequenceElement.getElementsByTagName("DnsServer").getLength(); i4 = i4 + 1) + NodeList elements13 = dnsElement.getElementsByTagName("DnsServers"); + Element dnsServersSequenceElement = elements13.getLength() > 0 ? ((Element)elements13.item(0)) : null; + if (dnsServersSequenceElement != null) { - org.w3c.dom.Element dnsServersElement = ((org.w3c.dom.Element)dnsServersSequenceElement.getElementsByTagName("DnsServer").item(i4)); - NetworkListResponse.DnsServer dnsServerInstance = new NetworkListResponse.DnsServer(); - virtualNetworkSiteInstance.getDnsServers().add(dnsServerInstance); - - NodeList elements13 = dnsServersElement.getElementsByTagName("Name"); - Element nameElement3 = elements13.getLength() > 0 ? ((Element)elements13.item(0)) : null; - if (nameElement3 != null) - { - String nameInstance3; - nameInstance3 = nameElement3.getTextContent(); - dnsServerInstance.setName(nameInstance3); - } - - NodeList elements14 = dnsServersElement.getElementsByTagName("Address"); - Element addressElement = elements14.getLength() > 0 ? ((Element)elements14.item(0)) : null; - if (addressElement != null) + for (int i4 = 0; i4 < dnsServersSequenceElement.getElementsByTagName("DnsServer").getLength(); i4 = i4 + 1) { - InetAddress addressInstance; - addressInstance = InetAddress.getByName(addressElement.getTextContent()); - dnsServerInstance.setAddress(addressInstance); + org.w3c.dom.Element dnsServersElement = ((org.w3c.dom.Element)dnsServersSequenceElement.getElementsByTagName("DnsServer").item(i4)); + NetworkListResponse.DnsServer dnsServerInstance = new NetworkListResponse.DnsServer(); + virtualNetworkSiteInstance.getDnsServers().add(dnsServerInstance); + + NodeList elements14 = dnsServersElement.getElementsByTagName("Name"); + Element nameElement3 = elements14.getLength() > 0 ? ((Element)elements14.item(0)) : null; + if (nameElement3 != null) + { + String nameInstance3; + nameInstance3 = nameElement3.getTextContent(); + dnsServerInstance.setName(nameInstance3); + } + + NodeList elements15 = dnsServersElement.getElementsByTagName("Address"); + Element addressElement = elements15.getLength() > 0 ? ((Element)elements15.item(0)) : null; + if (addressElement != null) + { + InetAddress addressInstance; + addressInstance = InetAddress.getByName(addressElement.getTextContent()); + dnsServerInstance.setAddress(addressInstance); + } } } } - NodeList elements15 = virtualNetworkSitesElement.getElementsByTagName("Gateway"); - Element gatewayElement = elements15.getLength() > 0 ? ((Element)elements15.item(0)) : null; + NodeList elements16 = virtualNetworkSitesElement.getElementsByTagName("Gateway"); + Element gatewayElement = elements16.getLength() > 0 ? ((Element)elements16.item(0)) : null; if (gatewayElement != null) { NetworkListResponse.Gateway gatewayInstance = new NetworkListResponse.Gateway(); virtualNetworkSiteInstance.setGateway(gatewayInstance); - NodeList elements16 = gatewayElement.getElementsByTagName("Profile"); - Element profileElement = elements16.getLength() > 0 ? ((Element)elements16.item(0)) : null; + NodeList elements17 = gatewayElement.getElementsByTagName("Profile"); + Element profileElement = elements17.getLength() > 0 ? ((Element)elements17.item(0)) : null; if (profileElement != null) { GatewayProfile profileInstance; @@ -441,8 +520,8 @@ public NetworkListResponse list() throws IOException, ServiceException, ParserCo gatewayInstance.setProfile(profileInstance); } - NodeList elements17 = gatewayElement.getElementsByTagName("Sites"); - Element sitesSequenceElement = elements17.getLength() > 0 ? ((Element)elements17.item(0)) : null; + NodeList elements18 = gatewayElement.getElementsByTagName("Sites"); + Element sitesSequenceElement = elements18.getLength() > 0 ? ((Element)elements18.item(0)) : null; if (sitesSequenceElement != null) { for (int i5 = 0; i5 < sitesSequenceElement.getElementsByTagName("LocalNetworkSite").getLength(); i5 = i5 + 1) @@ -451,8 +530,8 @@ public NetworkListResponse list() throws IOException, ServiceException, ParserCo NetworkListResponse.LocalNetworkSite localNetworkSiteInstance = new NetworkListResponse.LocalNetworkSite(); gatewayInstance.getSites().add(localNetworkSiteInstance); - NodeList elements18 = sitesElement.getElementsByTagName("Name"); - Element nameElement4 = elements18.getLength() > 0 ? ((Element)elements18.item(0)) : null; + NodeList elements19 = sitesElement.getElementsByTagName("Name"); + Element nameElement4 = elements19.getLength() > 0 ? ((Element)elements19.item(0)) : null; if (nameElement4 != null) { String nameInstance4; @@ -460,8 +539,8 @@ public NetworkListResponse list() throws IOException, ServiceException, ParserCo localNetworkSiteInstance.setName(nameInstance4); } - NodeList elements19 = sitesElement.getElementsByTagName("VpnGatewayAddress"); - Element vpnGatewayAddressElement = elements19.getLength() > 0 ? ((Element)elements19.item(0)) : null; + NodeList elements20 = sitesElement.getElementsByTagName("VpnGatewayAddress"); + Element vpnGatewayAddressElement = elements20.getLength() > 0 ? ((Element)elements20.item(0)) : null; if (vpnGatewayAddressElement != null) { InetAddress vpnGatewayAddressInstance; @@ -469,15 +548,15 @@ public NetworkListResponse list() throws IOException, ServiceException, ParserCo localNetworkSiteInstance.setVpnGatewayAddress(vpnGatewayAddressInstance); } - NodeList elements20 = sitesElement.getElementsByTagName("AddressSpace"); - Element addressSpaceElement2 = elements20.getLength() > 0 ? ((Element)elements20.item(0)) : null; + NodeList elements21 = sitesElement.getElementsByTagName("AddressSpace"); + Element addressSpaceElement2 = elements21.getLength() > 0 ? ((Element)elements21.item(0)) : null; if (addressSpaceElement2 != null) { NetworkListResponse.AddressSpace addressSpaceInstance2 = new NetworkListResponse.AddressSpace(); localNetworkSiteInstance.setAddressSpace(addressSpaceInstance2); - NodeList elements21 = addressSpaceElement2.getElementsByTagName("AddressPrefixes"); - Element addressPrefixesSequenceElement2 = elements21.getLength() > 0 ? ((Element)elements21.item(0)) : null; + NodeList elements22 = addressSpaceElement2.getElementsByTagName("AddressPrefixes"); + Element addressPrefixesSequenceElement2 = elements22.getLength() > 0 ? ((Element)elements22.item(0)) : null; if (addressPrefixesSequenceElement2 != null) { for (int i6 = 0; i6 < addressPrefixesSequenceElement2.getElementsByTagName("AddressPrefix").getLength(); i6 = i6 + 1) @@ -488,8 +567,8 @@ public NetworkListResponse list() throws IOException, ServiceException, ParserCo } } - NodeList elements22 = sitesElement.getElementsByTagName("Connections"); - Element connectionsSequenceElement = elements22.getLength() > 0 ? ((Element)elements22.item(0)) : null; + NodeList elements23 = sitesElement.getElementsByTagName("Connections"); + Element connectionsSequenceElement = elements23.getLength() > 0 ? ((Element)elements23.item(0)) : null; if (connectionsSequenceElement != null) { for (int i7 = 0; i7 < connectionsSequenceElement.getElementsByTagName("Connection").getLength(); i7 = i7 + 1) @@ -498,8 +577,8 @@ public NetworkListResponse list() throws IOException, ServiceException, ParserCo NetworkListResponse.Connection connectionInstance = new NetworkListResponse.Connection(); localNetworkSiteInstance.getConnections().add(connectionInstance); - NodeList elements23 = connectionsElement.getElementsByTagName("Type"); - Element typeElement = elements23.getLength() > 0 ? ((Element)elements23.item(0)) : null; + NodeList elements24 = connectionsElement.getElementsByTagName("Type"); + Element typeElement = elements24.getLength() > 0 ? ((Element)elements24.item(0)) : null; if (typeElement != null) { LocalNetworkConnectionType typeInstance; @@ -511,15 +590,15 @@ public NetworkListResponse list() throws IOException, ServiceException, ParserCo } } - NodeList elements24 = gatewayElement.getElementsByTagName("VPNClientAddressPool"); - Element vPNClientAddressPoolElement = elements24.getLength() > 0 ? ((Element)elements24.item(0)) : null; + NodeList elements25 = gatewayElement.getElementsByTagName("VPNClientAddressPool"); + Element vPNClientAddressPoolElement = elements25.getLength() > 0 ? ((Element)elements25.item(0)) : null; if (vPNClientAddressPoolElement != null) { NetworkListResponse.VPNClientAddressPool vPNClientAddressPoolInstance = new NetworkListResponse.VPNClientAddressPool(); gatewayInstance.setVPNClientAddressPool(vPNClientAddressPoolInstance); - NodeList elements25 = vPNClientAddressPoolElement.getElementsByTagName("AddressPrefixes"); - Element addressPrefixesSequenceElement3 = elements25.getLength() > 0 ? ((Element)elements25.item(0)) : null; + NodeList elements26 = vPNClientAddressPoolElement.getElementsByTagName("AddressPrefixes"); + Element addressPrefixesSequenceElement3 = elements26.getLength() > 0 ? ((Element)elements26.item(0)) : null; if (addressPrefixesSequenceElement3 != null) { for (int i8 = 0; i8 < addressPrefixesSequenceElement3.getElementsByTagName("AddressPrefix").getLength(); i8 = i8 + 1) @@ -539,6 +618,10 @@ public NetworkListResponse list() throws IOException, ServiceException, ParserCo result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -548,7 +631,7 @@ public NetworkListResponse list() throws IOException, ServiceException, ParserCo * http://msdn.microsoft.com/en-us/library/windowsazure/jj157181.aspx for * more information) * - * @param parameters The updated network configuration + * @param parameters The updated network configuration. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -577,7 +660,7 @@ public VirtualNetworkOperationStatusResponse call() throws Exception * http://msdn.microsoft.com/en-us/library/windowsazure/jj157181.aspx for * more information) * - * @param parameters The updated network configuration + * @param parameters The updated network configuration. * @return The response body contains the status of the specified * asynchronous operation, indicating whether it has succeeded, is * inprogress, or has failed. Note that this status is distinct from the @@ -589,28 +672,60 @@ public VirtualNetworkOperationStatusResponse call() throws Exception * failure. */ @Override - public VirtualNetworkOperationStatusResponse setConfiguration(NetworkSetConfigurationParameters parameters) throws InterruptedException, ExecutionException, ServiceException + public VirtualNetworkOperationStatusResponse setConfiguration(NetworkSetConfigurationParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException { VirtualNetworkManagementClient client2 = this.getClient(); - - OperationResponse response = client2.getNetworks().beginSettingConfigurationAsync(parameters).get(); - VirtualNetworkOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); - int delayInSeconds = 30; - while ((result.getStatus() != OperationStatus.InProgress) == false) + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) { - Thread.sleep(delayInSeconds * 1000); - result = client2.getOperationStatusAsync(response.getRequestId()).get(); - delayInSeconds = 30; + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "setConfigurationAsync", tracingParameters); } - - if (result.getStatus() != OperationStatus.Succeeded) + try { - ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); - ex.setErrorCode(result.getError().getCode()); - ex.setErrorMessage(result.getError().getMessage()); - throw ex; + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getNetworksOperations().beginSettingConfigurationAsync(parameters).get(); + VirtualNetworkOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } } - - return result; } } diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/ReservedIPOperations.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/ReservedIPOperations.java new file mode 100644 index 0000000000000..bf38d96a67581 --- /dev/null +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/ReservedIPOperations.java @@ -0,0 +1,203 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.management.virtualnetworks; + +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; +import com.microsoft.windowsazure.management.virtualnetworks.models.NetworkReservedIPCreateParameters; +import com.microsoft.windowsazure.management.virtualnetworks.models.NetworkReservedIPGetResponse; +import com.microsoft.windowsazure.management.virtualnetworks.models.NetworkReservedIPListResponse; +import com.microsoft.windowsazure.management.virtualnetworks.models.VirtualNetworkOperationStatusResponse; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.text.ParseException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import org.xml.sax.SAXException; + +public interface ReservedIPOperations +{ + /** + * Preview Only. The Create Reserved IP operation creates a reserved IP from + * your the subscription. + * + * @param parameters Parameters supplied to the Create Virtual Machine Image + * operation. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. + */ + VirtualNetworkOperationStatusResponse beginCreating(NetworkReservedIPCreateParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException; + + /** + * Preview Only. The Create Reserved IP operation creates a reserved IP from + * your the subscription. + * + * @param parameters Parameters supplied to the Create Virtual Machine Image + * operation. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. + */ + Future beginCreatingAsync(NetworkReservedIPCreateParameters parameters); + + /** + * Preview Only. The Delete Reserved IP operation removes a reserved IP from + * your the subscription. + * + * @param ipName The name of the reserved IP. + * @return A standard storage response including an HTTP status code and + * request ID. + */ + OperationResponse beginDeleting(String ipName) throws IOException, ServiceException, ParserConfigurationException, SAXException; + + /** + * Preview Only. The Delete Reserved IP operation removes a reserved IP from + * your the subscription. + * + * @param ipName The name of the reserved IP. + * @return A standard storage response including an HTTP status code and + * request ID. + */ + Future beginDeletingAsync(String ipName); + + /** + * The Create Reserved IP operation creates a reserved IP from your the + * subscription. + * + * @param parameters Parameters supplied to the Create Virtual Machine Image + * operation. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. + */ + VirtualNetworkOperationStatusResponse create(NetworkReservedIPCreateParameters parameters) throws UnsupportedEncodingException, IOException, ServiceException, ParserConfigurationException, SAXException, InterruptedException, ExecutionException, ServiceException; + + /** + * The Create Reserved IP operation creates a reserved IP from your the + * subscription. + * + * @param parameters Parameters supplied to the Create Virtual Machine Image + * operation. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. + */ + Future createAsync(NetworkReservedIPCreateParameters parameters); + + /** + * The Delete Reserved IP operation removes a reserved IP from your the + * subscription. + * + * @param ipName The name of the reserved IP. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. + */ + VirtualNetworkOperationStatusResponse delete(String ipName) throws IOException, ServiceException, ParserConfigurationException, SAXException, InterruptedException, ExecutionException, ServiceException; + + /** + * The Delete Reserved IP operation removes a reserved IP from your the + * subscription. + * + * @param ipName The name of the reserved IP. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. + */ + Future deleteAsync(String ipName); + + /** + * Preview Only. The Get Reserved IP operation retrieves the details for + * virtual IP reserved for the subscription. + * + * @param ipName The name of the reserved IP to retrieve. + * @return Preview Only. A reserved IP associated with your subscription. + */ + NetworkReservedIPGetResponse get(String ipName) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException; + + /** + * Preview Only. The Get Reserved IP operation retrieves the details for + * virtual IP reserved for the subscription. + * + * @param ipName The name of the reserved IP to retrieve. + * @return Preview Only. A reserved IP associated with your subscription. + */ + Future getAsync(String ipName); + + /** + * Preview Only. The List Reserved IP operation retrieves the virtual IPs + * reserved for the subscription. + * + * @return Preview Only. The response structure for the Server List operation + */ + NetworkReservedIPListResponse list() throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException; + + /** + * Preview Only. The List Reserved IP operation retrieves the virtual IPs + * reserved for the subscription. + * + * @return Preview Only. The response structure for the Server List operation + */ + Future listAsync(); +} diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/ReservedIPOperationsImpl.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/ReservedIPOperationsImpl.java new file mode 100644 index 0000000000000..185df26a633ab --- /dev/null +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/ReservedIPOperationsImpl.java @@ -0,0 +1,919 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.management.virtualnetworks; + +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.exception.ServiceException; +import com.microsoft.windowsazure.management.virtualnetworks.models.NetworkReservedIPCreateParameters; +import com.microsoft.windowsazure.management.virtualnetworks.models.NetworkReservedIPGetResponse; +import com.microsoft.windowsazure.management.virtualnetworks.models.NetworkReservedIPListResponse; +import com.microsoft.windowsazure.management.virtualnetworks.models.OperationStatus; +import com.microsoft.windowsazure.management.virtualnetworks.models.VirtualNetworkOperationStatusResponse; +import com.microsoft.windowsazure.tracing.ClientRequestTrackingHandler; +import com.microsoft.windowsazure.tracing.CloudTracing; +import java.io.IOException; +import java.io.InputStream; +import java.io.StringWriter; +import java.io.UnsupportedEncodingException; +import java.net.InetAddress; +import java.text.ParseException; +import java.util.HashMap; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; +import org.apache.http.HttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.StringEntity; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NodeList; +import org.xml.sax.SAXException; + +public class ReservedIPOperationsImpl implements ServiceOperations, ReservedIPOperations +{ + /** + * Initializes a new instance of the ReservedIPOperationsImpl class. + * + * @param client Reference to the service client. + */ + ReservedIPOperationsImpl(VirtualNetworkManagementClientImpl client) + { + this.client = client; + } + + private VirtualNetworkManagementClientImpl client; + + /** + * Gets a reference to the + * microsoft.windowsazure.management.virtualnetworks.VirtualNetworkManagementClientImpl. + */ + public VirtualNetworkManagementClientImpl getClient() { return this.client; } + + /** + * Preview Only. The Create Reserved IP operation creates a reserved IP from + * your the subscription. + * + * @param parameters Parameters supplied to the Create Virtual Machine Image + * operation. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. + */ + @Override + public Future beginCreatingAsync(final NetworkReservedIPCreateParameters parameters) + { + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public VirtualNetworkOperationStatusResponse call() throws Exception + { + return beginCreating(parameters); + } + }); + } + + /** + * Preview Only. The Create Reserved IP operation creates a reserved IP from + * your the subscription. + * + * @param parameters Parameters supplied to the Create Virtual Machine Image + * operation. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. + */ + @Override + public VirtualNetworkOperationStatusResponse beginCreating(NetworkReservedIPCreateParameters parameters) throws ParserConfigurationException, SAXException, TransformerConfigurationException, TransformerException, UnsupportedEncodingException, IOException, ServiceException + { + // Validate + if (parameters == null) + { + throw new NullPointerException("parameters"); + } + + // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "beginCreatingAsync", tracingParameters); + } + + // Construct URL + String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/reservedips"; + + // Create HTTP transport objects + HttpPost httpRequest = new HttpPost(url); + + // Set Headers + httpRequest.setHeader("Content-Type", "application/xml"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); + + // Serialize Request + String requestContent = null; + DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); + Document requestDoc = documentBuilder.newDocument(); + + Element reservedIPElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "ReservedIP"); + requestDoc.appendChild(reservedIPElement); + + if (parameters.getName() != null) + { + Element nameElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "Name"); + nameElement.appendChild(requestDoc.createTextNode(parameters.getName())); + reservedIPElement.appendChild(nameElement); + } + + if (parameters.getLabel() != null) + { + Element labelElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "Label"); + labelElement.appendChild(requestDoc.createTextNode(parameters.getLabel())); + reservedIPElement.appendChild(labelElement); + } + + if (parameters.getAffinityGroup() != null) + { + Element affinityGroupElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "AffinityGroup"); + affinityGroupElement.appendChild(requestDoc.createTextNode(parameters.getAffinityGroup())); + reservedIPElement.appendChild(affinityGroupElement); + } + + if (parameters.getServiceName() != null) + { + Element serviceNameElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "ServiceName"); + serviceNameElement.appendChild(requestDoc.createTextNode(parameters.getServiceName())); + reservedIPElement.appendChild(serviceNameElement); + } + + if (parameters.getDeploymentName() != null) + { + Element deploymentNameElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "DeploymentName"); + deploymentNameElement.appendChild(requestDoc.createTextNode(parameters.getDeploymentName())); + reservedIPElement.appendChild(deploymentNameElement); + } + + DOMSource domSource = new DOMSource(requestDoc); + StringWriter stringWriter = new StringWriter(); + StreamResult streamResult = new StreamResult(stringWriter); + TransformerFactory transformerFactory = TransformerFactory.newInstance(); + Transformer transformer = transformerFactory.newTransformer(); + transformer.transform(domSource, streamResult); + requestContent = stringWriter.toString(); + StringEntity entity = new StringEntity(requestContent); + httpRequest.setEntity(entity); + httpRequest.setHeader("Content-Type", "application/xml"); + + // Send Request + HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } + httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } + int statusCode = httpResponse.getStatusLine().getStatusCode(); + if (statusCode != 202) + { + ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + // Create Result + VirtualNetworkOperationStatusResponse result = null; + result = new VirtualNetworkOperationStatusResponse(); + result.setStatusCode(statusCode); + if (httpResponse.getHeaders("x-ms-request-id").length > 0) + { + result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + return result; + } + + /** + * Preview Only. The Delete Reserved IP operation removes a reserved IP from + * your the subscription. + * + * @param ipName The name of the reserved IP. + * @return A standard storage response including an HTTP status code and + * request ID. + */ + @Override + public Future beginDeletingAsync(final String ipName) + { + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public OperationResponse call() throws Exception + { + return beginDeleting(ipName); + } + }); + } + + /** + * Preview Only. The Delete Reserved IP operation removes a reserved IP from + * your the subscription. + * + * @param ipName The name of the reserved IP. + * @return A standard storage response including an HTTP status code and + * request ID. + */ + @Override + public OperationResponse beginDeleting(String ipName) throws IOException, ServiceException, ParserConfigurationException, SAXException + { + // Validate + if (ipName == null) + { + throw new NullPointerException("ipName"); + } + + // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("ipName", ipName); + CloudTracing.enter(invocationId, this, "beginDeletingAsync", tracingParameters); + } + + // Construct URL + String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/reservedips/" + ipName; + + // Create HTTP transport objects + CustomHttpDelete httpRequest = new CustomHttpDelete(url); + + // Set Headers + httpRequest.setHeader("Content-Type", "application/xml"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); + + // Send Request + HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } + httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } + int statusCode = httpResponse.getStatusLine().getStatusCode(); + if (statusCode != 202) + { + ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + // Create Result + OperationResponse result = null; + result = new OperationResponse(); + result.setStatusCode(statusCode); + if (httpResponse.getHeaders("x-ms-request-id").length > 0) + { + result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + return result; + } + + /** + * The Create Reserved IP operation creates a reserved IP from your the + * subscription. + * + * @param parameters Parameters supplied to the Create Virtual Machine Image + * operation. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. + */ + @Override + public Future createAsync(final NetworkReservedIPCreateParameters parameters) + { + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public VirtualNetworkOperationStatusResponse call() throws Exception + { + return create(parameters); + } + }); + } + + /** + * The Create Reserved IP operation creates a reserved IP from your the + * subscription. + * + * @param parameters Parameters supplied to the Create Virtual Machine Image + * operation. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. + */ + @Override + public VirtualNetworkOperationStatusResponse create(NetworkReservedIPCreateParameters parameters) throws UnsupportedEncodingException, IOException, ServiceException, ParserConfigurationException, SAXException, InterruptedException, ExecutionException, ServiceException + { + VirtualNetworkManagementClient client2 = this.getClient(); + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); + } + try + { + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + VirtualNetworkOperationStatusResponse response = client2.getReservedIPsOperations().beginCreatingAsync(parameters).get(); + VirtualNetworkOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } + } + } + + /** + * The Delete Reserved IP operation removes a reserved IP from your the + * subscription. + * + * @param ipName The name of the reserved IP. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. + */ + @Override + public Future deleteAsync(final String ipName) + { + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public VirtualNetworkOperationStatusResponse call() throws Exception + { + return delete(ipName); + } + }); + } + + /** + * The Delete Reserved IP operation removes a reserved IP from your the + * subscription. + * + * @param ipName The name of the reserved IP. + * @return The response body contains the status of the specified + * asynchronous operation, indicating whether it has succeeded, is + * inprogress, or has failed. Note that this status is distinct from the + * HTTP status code returned for the Get Operation Status operation itself. + * If the asynchronous operation succeeded, the response body includes the + * HTTP status code for the successful request. If the asynchronous + * operation failed, the response body includes the HTTP status code for + * the failed request, and also includes error information regarding the + * failure. + */ + @Override + public VirtualNetworkOperationStatusResponse delete(String ipName) throws IOException, ServiceException, ParserConfigurationException, SAXException, InterruptedException, ExecutionException, ServiceException + { + VirtualNetworkManagementClient client2 = this.getClient(); + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("ipName", ipName); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); + } + try + { + if (shouldTrace) + { + client2 = this.getClient().withRequestFilterLast(new ClientRequestTrackingHandler(invocationId)).withResponseFilterLast(new ClientRequestTrackingHandler(invocationId)); + } + + OperationResponse response = client2.getReservedIPsOperations().beginDeletingAsync(ipName).get(); + VirtualNetworkOperationStatusResponse result = client2.getOperationStatusAsync(response.getRequestId()).get(); + int delayInSeconds = 30; + while ((result.getStatus() != OperationStatus.InProgress) == false) + { + Thread.sleep(delayInSeconds * 1000); + result = client2.getOperationStatusAsync(response.getRequestId()).get(); + delayInSeconds = 30; + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + + if (result.getStatus() != OperationStatus.Succeeded) + { + ServiceException ex = new ServiceException(result.getError().getCode() + " : " + result.getError().getMessage()); + ex.setErrorCode(result.getError().getCode()); + ex.setErrorMessage(result.getError().getMessage()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + return result; + } + finally + { + if (this.getClient() != null && shouldTrace) + { + this.getClient().close(); + } + } + } + + /** + * Preview Only. The Get Reserved IP operation retrieves the details for + * virtual IP reserved for the subscription. + * + * @param ipName The name of the reserved IP to retrieve. + * @return Preview Only. A reserved IP associated with your subscription. + */ + @Override + public Future getAsync(final String ipName) + { + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public NetworkReservedIPGetResponse call() throws Exception + { + return get(ipName); + } + }); + } + + /** + * Preview Only. The Get Reserved IP operation retrieves the details for + * virtual IP reserved for the subscription. + * + * @param ipName The name of the reserved IP to retrieve. + * @return Preview Only. A reserved IP associated with your subscription. + */ + @Override + public NetworkReservedIPGetResponse get(String ipName) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException + { + // Validate + if (ipName == null) + { + throw new NullPointerException("ipName"); + } + + // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("ipName", ipName); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } + + // Construct URL + String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/reservedips/" + ipName; + + // Create HTTP transport objects + HttpGet httpRequest = new HttpGet(url); + + // Set Headers + httpRequest.setHeader("x-ms-version", "2013-11-01"); + + // Send Request + HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } + httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } + int statusCode = httpResponse.getStatusLine().getStatusCode(); + if (statusCode != 200) + { + ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + // Create Result + NetworkReservedIPGetResponse result = null; + // Deserialize Response + InputStream responseContent = httpResponse.getEntity().getContent(); + result = new NetworkReservedIPGetResponse(); + DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); + Document responseDoc = documentBuilder.parse(responseContent); + + NodeList elements = responseDoc.getElementsByTagName("ReservedIP"); + Element reservedIPElement = elements.getLength() > 0 ? ((Element)elements.item(0)) : null; + if (reservedIPElement != null) + { + NodeList elements2 = reservedIPElement.getElementsByTagName("Name"); + Element nameElement = elements2.getLength() > 0 ? ((Element)elements2.item(0)) : null; + if (nameElement != null) + { + String nameInstance; + nameInstance = nameElement.getTextContent(); + result.setName(nameInstance); + } + + NodeList elements3 = reservedIPElement.getElementsByTagName("Address"); + Element addressElement = elements3.getLength() > 0 ? ((Element)elements3.item(0)) : null; + if (addressElement != null) + { + InetAddress addressInstance; + addressInstance = InetAddress.getByName(addressElement.getTextContent()); + result.setAddress(addressInstance); + } + + NodeList elements4 = reservedIPElement.getElementsByTagName("Id"); + Element idElement = elements4.getLength() > 0 ? ((Element)elements4.item(0)) : null; + if (idElement != null) + { + String idInstance; + idInstance = idElement.getTextContent(); + result.setId(idInstance); + } + + NodeList elements5 = reservedIPElement.getElementsByTagName("Label"); + Element labelElement = elements5.getLength() > 0 ? ((Element)elements5.item(0)) : null; + if (labelElement != null) + { + String labelInstance; + labelInstance = labelElement.getTextContent(); + result.setLabel(labelInstance); + } + + NodeList elements6 = reservedIPElement.getElementsByTagName("AffinityGroup"); + Element affinityGroupElement = elements6.getLength() > 0 ? ((Element)elements6.item(0)) : null; + if (affinityGroupElement != null) + { + String affinityGroupInstance; + affinityGroupInstance = affinityGroupElement.getTextContent(); + result.setAffinityGroup(affinityGroupInstance); + } + + NodeList elements7 = reservedIPElement.getElementsByTagName("State"); + Element stateElement = elements7.getLength() > 0 ? ((Element)elements7.item(0)) : null; + if (stateElement != null) + { + String stateInstance; + stateInstance = stateElement.getTextContent(); + result.setState(stateInstance); + } + + NodeList elements8 = reservedIPElement.getElementsByTagName("InUse"); + Element inUseElement = elements8.getLength() > 0 ? ((Element)elements8.item(0)) : null; + if (inUseElement != null) + { + boolean inUseInstance; + inUseInstance = Boolean.parseBoolean(inUseElement.getTextContent()); + result.setInUse(inUseInstance); + } + + NodeList elements9 = reservedIPElement.getElementsByTagName("ServiceName"); + Element serviceNameElement = elements9.getLength() > 0 ? ((Element)elements9.item(0)) : null; + if (serviceNameElement != null) + { + String serviceNameInstance; + serviceNameInstance = serviceNameElement.getTextContent(); + result.setServiceName(serviceNameInstance); + } + + NodeList elements10 = reservedIPElement.getElementsByTagName("DeploymentName"); + Element deploymentNameElement = elements10.getLength() > 0 ? ((Element)elements10.item(0)) : null; + if (deploymentNameElement != null) + { + String deploymentNameInstance; + deploymentNameInstance = deploymentNameElement.getTextContent(); + result.setDeploymentName(deploymentNameInstance); + } + } + + result.setStatusCode(statusCode); + if (httpResponse.getHeaders("x-ms-request-id").length > 0) + { + result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + return result; + } + + /** + * Preview Only. The List Reserved IP operation retrieves the virtual IPs + * reserved for the subscription. + * + * @return Preview Only. The response structure for the Server List operation + */ + @Override + public Future listAsync() + { + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public NetworkReservedIPListResponse call() throws Exception + { + return list(); + } + }); + } + + /** + * Preview Only. The List Reserved IP operation retrieves the virtual IPs + * reserved for the subscription. + * + * @return Preview Only. The response structure for the Server List operation + */ + @Override + public NetworkReservedIPListResponse list() throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException + { + // Validate + + // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } + + // Construct URL + String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/networking/reservedips"; + + // Create HTTP transport objects + HttpGet httpRequest = new HttpGet(url); + + // Set Headers + httpRequest.setHeader("x-ms-version", "2013-11-01"); + + // Send Request + HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } + httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } + int statusCode = httpResponse.getStatusLine().getStatusCode(); + if (statusCode != 200) + { + ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + // Create Result + NetworkReservedIPListResponse result = null; + // Deserialize Response + InputStream responseContent = httpResponse.getEntity().getContent(); + result = new NetworkReservedIPListResponse(); + DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); + Document responseDoc = documentBuilder.parse(responseContent); + + NodeList elements = responseDoc.getElementsByTagName("ReservedIPs"); + Element reservedIPsSequenceElement = elements.getLength() > 0 ? ((Element)elements.item(0)) : null; + if (reservedIPsSequenceElement != null) + { + for (int i1 = 0; i1 < reservedIPsSequenceElement.getElementsByTagName("ReservedIP").getLength(); i1 = i1 + 1) + { + org.w3c.dom.Element reservedIPsElement = ((org.w3c.dom.Element)reservedIPsSequenceElement.getElementsByTagName("ReservedIP").item(i1)); + NetworkReservedIPListResponse.ReservedIP reservedIPInstance = new NetworkReservedIPListResponse.ReservedIP(); + result.getReservedIPs().add(reservedIPInstance); + + NodeList elements2 = reservedIPsElement.getElementsByTagName("Name"); + Element nameElement = elements2.getLength() > 0 ? ((Element)elements2.item(0)) : null; + if (nameElement != null) + { + String nameInstance; + nameInstance = nameElement.getTextContent(); + reservedIPInstance.setName(nameInstance); + } + + NodeList elements3 = reservedIPsElement.getElementsByTagName("Address"); + Element addressElement = elements3.getLength() > 0 ? ((Element)elements3.item(0)) : null; + if (addressElement != null) + { + InetAddress addressInstance; + addressInstance = InetAddress.getByName(addressElement.getTextContent()); + reservedIPInstance.setAddress(addressInstance); + } + + NodeList elements4 = reservedIPsElement.getElementsByTagName("Id"); + Element idElement = elements4.getLength() > 0 ? ((Element)elements4.item(0)) : null; + if (idElement != null) + { + String idInstance; + idInstance = idElement.getTextContent(); + reservedIPInstance.setId(idInstance); + } + + NodeList elements5 = reservedIPsElement.getElementsByTagName("Label"); + Element labelElement = elements5.getLength() > 0 ? ((Element)elements5.item(0)) : null; + if (labelElement != null) + { + String labelInstance; + labelInstance = labelElement.getTextContent(); + reservedIPInstance.setLabel(labelInstance); + } + + NodeList elements6 = reservedIPsElement.getElementsByTagName("AffinityGroup"); + Element affinityGroupElement = elements6.getLength() > 0 ? ((Element)elements6.item(0)) : null; + if (affinityGroupElement != null) + { + String affinityGroupInstance; + affinityGroupInstance = affinityGroupElement.getTextContent(); + reservedIPInstance.setAffinityGroup(affinityGroupInstance); + } + + NodeList elements7 = reservedIPsElement.getElementsByTagName("State"); + Element stateElement = elements7.getLength() > 0 ? ((Element)elements7.item(0)) : null; + if (stateElement != null) + { + String stateInstance; + stateInstance = stateElement.getTextContent(); + reservedIPInstance.setState(stateInstance); + } + + NodeList elements8 = reservedIPsElement.getElementsByTagName("InUse"); + Element inUseElement = elements8.getLength() > 0 ? ((Element)elements8.item(0)) : null; + if (inUseElement != null) + { + boolean inUseInstance; + inUseInstance = Boolean.parseBoolean(inUseElement.getTextContent()); + reservedIPInstance.setInUse(inUseInstance); + } + + NodeList elements9 = reservedIPsElement.getElementsByTagName("ServiceName"); + Element serviceNameElement = elements9.getLength() > 0 ? ((Element)elements9.item(0)) : null; + if (serviceNameElement != null) + { + String serviceNameInstance; + serviceNameInstance = serviceNameElement.getTextContent(); + reservedIPInstance.setServiceName(serviceNameInstance); + } + + NodeList elements10 = reservedIPsElement.getElementsByTagName("DeploymentName"); + Element deploymentNameElement = elements10.getLength() > 0 ? ((Element)elements10.item(0)) : null; + if (deploymentNameElement != null) + { + String deploymentNameInstance; + deploymentNameInstance = deploymentNameElement.getTextContent(); + reservedIPInstance.setDeploymentName(deploymentNameInstance); + } + } + } + + result.setStatusCode(statusCode); + if (httpResponse.getHeaders("x-ms-request-id").length > 0) + { + result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + return result; + } +} diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/VirtualNetworkManagementClient.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/VirtualNetworkManagementClient.java index e5a58add9160a..d8496940a1ceb 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/VirtualNetworkManagementClient.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/VirtualNetworkManagementClient.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,9 +23,10 @@ package com.microsoft.windowsazure.management.virtualnetworks; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.core.FilterableService; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.virtualnetworks.models.VirtualNetworkOperationStatusResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.net.URI; import java.util.concurrent.Future; @@ -36,7 +39,7 @@ * http://msdn.microsoft.com/en-us/library/windowsazure/jj157182.aspx for more * information) */ -public interface VirtualNetworkManagementClient +public interface VirtualNetworkManagementClient extends FilterableService { /** * The URI used as the base for all SQL requests. @@ -53,11 +56,13 @@ public interface VirtualNetworkManagementClient */ SubscriptionCloudCredentials getCredentials(); - ClientRootCertificateOperations getClientRootCertificates(); + ClientRootCertificateOperations getClientRootCertificatesOperations(); + + GatewayOperations getGatewaysOperations(); - GatewayOperations getGateways(); + NetworkOperations getNetworksOperations(); - NetworkOperations getNetworks(); + ReservedIPOperations getReservedIPsOperations(); /** * The Get Operation Status operation returns the status of thespecified diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/VirtualNetworkManagementClientImpl.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/VirtualNetworkManagementClientImpl.java index aa4900ff8fc05..3980e5446c9d0 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/VirtualNetworkManagementClientImpl.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/VirtualNetworkManagementClientImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,17 +23,20 @@ package com.microsoft.windowsazure.management.virtualnetworks; +import com.microsoft.windowsazure.core.ServiceClient; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.ManagementConfiguration; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; import com.microsoft.windowsazure.management.virtualnetworks.models.LocalNetworkConnectionType; import com.microsoft.windowsazure.management.virtualnetworks.models.OperationStatus; import com.microsoft.windowsazure.management.virtualnetworks.models.VirtualNetworkOperationStatusResponse; -import com.microsoft.windowsazure.services.core.ServiceClient; -import com.microsoft.windowsazure.services.core.ServiceException; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.net.URI; +import java.util.HashMap; import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import javax.inject.Inject; import javax.inject.Named; @@ -40,6 +45,7 @@ import javax.xml.parsers.ParserConfigurationException; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.HttpClientBuilder; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -51,7 +57,7 @@ * http://msdn.microsoft.com/en-us/library/windowsazure/jj157182.aspx for more * information) */ -public class VirtualNetworkManagementClientImpl extends ServiceClient implements VirtualNetworkManagementClient +public class VirtualNetworkManagementClientImpl extends ServiceClient implements VirtualNetworkManagementClient { private URI baseUri; @@ -74,33 +80,42 @@ public class VirtualNetworkManagementClientImpl extends ServiceClient tracingParameters = new HashMap(); + tracingParameters.put("requestId", requestId); + CloudTracing.enter(invocationId, this, "getOperationStatusAsync", tracingParameters); + } // Construct URL String url = this.getBaseUri() + "/" + this.getCredentials().getSubscriptionId() + "/operations/" + requestId; @@ -223,15 +257,27 @@ public VirtualNetworkOperationStatusResponse getOperationStatus(String requestId HttpGet httpRequest = new HttpGet(url); // Set Headers - httpRequest.setHeader("x-ms-version", "2012-03-01"); + httpRequest.setHeader("x-ms-version", "2013-11-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -308,6 +354,10 @@ public VirtualNetworkOperationStatusResponse getOperationStatus(String requestId result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/VirtualNetworkManagementService.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/VirtualNetworkManagementService.java index e44852872c8ac..9cc018d82ac4f 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/VirtualNetworkManagementService.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/VirtualNetworkManagementService.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.virtualnetworks; -import com.microsoft.windowsazure.services.core.Configuration; +import com.microsoft.windowsazure.Configuration; /** * diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/ClientRootCertificateCreateParameters.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/ClientRootCertificateCreateParameters.java index 4594e4b5df099..9cce7c8e8c08d 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/ClientRootCertificateCreateParameters.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/ClientRootCertificateCreateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/ClientRootCertificateGetResponse.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/ClientRootCertificateGetResponse.java index 47a83b73f8be1..8e02383728b0c 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/ClientRootCertificateGetResponse.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/ClientRootCertificateGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.virtualnetworks.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * A standard storage response including an HTTP status code and request ID. @@ -31,12 +33,12 @@ public class ClientRootCertificateGetResponse extends OperationResponse private String certificate; /** - * The current client root certificate for the network gateway + * The current client root certificate for the network gateway. */ public String getCertificate() { return this.certificate; } /** - * The current client root certificate for the network gateway + * The current client root certificate for the network gateway. */ public void setCertificate(String certificate) { this.certificate = certificate; } diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/ClientRootCertificateListResponse.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/ClientRootCertificateListResponse.java index fab7349af1c61..933d2d5cbb2cf 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/ClientRootCertificateListResponse.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/ClientRootCertificateListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,25 +23,25 @@ package com.microsoft.windowsazure.management.virtualnetworks.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Calendar; import java.util.Iterator; /** -* The response to the list client root certificates request +* The response to the list client root certificates request. */ public class ClientRootCertificateListResponse extends OperationResponse implements Iterable { private ArrayList clientRootCertificates; /** - * The list of client root certificates + * The list of client root certificates. */ public ArrayList getClientRootCertificates() { return this.clientRootCertificates; } /** - * The list of client root certificates + * The list of client root certificates. */ public void setClientRootCertificates(ArrayList clientRootCertificates) { this.clientRootCertificates = clientRootCertificates; } diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayConnectDisconnectOrTestParameters.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayConnectDisconnectOrTestParameters.java index 439c94b62a213..a6b5535a93edb 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayConnectDisconnectOrTestParameters.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayConnectDisconnectOrTestParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayConnectionUpdateOperation.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayConnectionUpdateOperation.java index 1e6d2ab1d87c1..1283e80c00928 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayConnectionUpdateOperation.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayConnectionUpdateOperation.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayConnectivityState.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayConnectivityState.java index 9d30d55b7120f..7a2af02e038cc 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayConnectivityState.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayConnectivityState.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayCreateParameters.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayCreateParameters.java index dba424934dba7..4143af0558d25 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayCreateParameters.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayCreateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,9 +23,8 @@ package com.microsoft.windowsazure.management.virtualnetworks.models; - /** -* The parameters to the Gateway Create request +* The parameters to the Gateway Create request. */ public class GatewayCreateParameters { diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayEvent.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayEvent.java index 9132f3368565e..5b892990724a8 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayEvent.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayEvent.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -24,55 +26,55 @@ import java.util.Calendar; /** -* A management event for the virtual network gateway +* A management event for the virtual network gateway. */ public class GatewayEvent { private String data; /** - * Additional data associated with this event + * Additional data associated with this event. */ public String getData() { return this.data; } /** - * Additional data associated with this event + * Additional data associated with this event. */ public void setData(String data) { this.data = data; } private String id; /** - * The event ID + * The event ID. */ public String getId() { return this.id; } /** - * The event ID + * The event ID. */ public void setId(String id) { this.id = id; } private String message; /** - * The event message + * The event message. */ public String getMessage() { return this.message; } /** - * The event message + * The event message. */ public void setMessage(String message) { this.message = message; } private Calendar timestamp; /** - * The date and time when the event occurred + * The date and time when the event occurred. */ public Calendar getTimestamp() { return this.timestamp; } /** - * The date and time when the event occurred + * The date and time when the event occurred. */ public void setTimestamp(Calendar timestamp) { this.timestamp = timestamp; } diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGenerateVpnClientPackageParameters.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGenerateVpnClientPackageParameters.java index 60a2d658b12e5..5671cd8e6306d 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGenerateVpnClientPackageParameters.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGenerateVpnClientPackageParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,6 @@ package com.microsoft.windowsazure.management.virtualnetworks.models; - /** * The parameters to the Generate VPN Client Package request. */ diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetDeviceConfigurationScriptParameters.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetDeviceConfigurationScriptParameters.java index c7c7cb22d6247..5b3bde31c6c0a 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetDeviceConfigurationScriptParameters.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetDeviceConfigurationScriptParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -30,36 +32,36 @@ public class GatewayGetDeviceConfigurationScriptParameters private String oSFamily; /** - * The device OS Family + * The device OS Family. */ public String getOSFamily() { return this.oSFamily; } /** - * The device OS Family + * The device OS Family. */ public void setOSFamily(String oSFamily) { this.oSFamily = oSFamily; } private String platform; /** - * The device platform + * The device platform. */ public String getPlatform() { return this.platform; } /** - * The device platform + * The device platform. */ public void setPlatform(String platform) { this.platform = platform; } private String vendor; /** - * The name of the device vendor + * The name of the device vendor. */ public String getVendor() { return this.vendor; } /** - * The name of the device vendor + * The name of the device vendor. */ public void setVendor(String vendor) { this.vendor = vendor; } diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetDeviceConfigurationScriptResponse.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetDeviceConfigurationScriptResponse.java index 0ebe9c50b5ce6..adfb08b60c2d2 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetDeviceConfigurationScriptResponse.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetDeviceConfigurationScriptResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,23 +23,23 @@ package com.microsoft.windowsazure.management.virtualnetworks.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The configuration script returned from the get device configuration script -* request +* request. */ public class GatewayGetDeviceConfigurationScriptResponse extends OperationResponse { private String configurationScript; /** - * The requested configuration script for the local network device + * The requested configuration script for the local network device. */ public String getConfigurationScript() { return this.configurationScript; } /** - * The requested configuration script for the local network device + * The requested configuration script for the local network device. */ public void setConfigurationScript(String configurationScript) { this.configurationScript = configurationScript; } diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetOperationStatusResponse.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetOperationStatusResponse.java index b38920efadd87..d59806a4adfc2 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetOperationStatusResponse.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetOperationStatusResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.virtualnetworks.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The response body contains the status of the specified asynchronous diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetResponse.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetResponse.java index 650c82f0a455e..72d6f888dab87 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetResponse.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.virtualnetworks.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.InetAddress; /** @@ -32,48 +34,48 @@ public class GatewayGetResponse extends OperationResponse private GatewayType gatewayType; /** - * The type of gateway routing used for this virtual network + * The type of gateway routing used for this virtual network. */ public GatewayType getGatewayType() { return this.gatewayType; } /** - * The type of gateway routing used for this virtual network + * The type of gateway routing used for this virtual network. */ public void setGatewayType(GatewayType gatewayType) { this.gatewayType = gatewayType; } private GatewayEvent lastEvent; /** - * The last recorded event for this virtual network gateway + * The last recorded event for this virtual network gateway. */ public GatewayEvent getLastEvent() { return this.lastEvent; } /** - * The last recorded event for this virtual network gateway + * The last recorded event for this virtual network gateway. */ public void setLastEvent(GatewayEvent lastEvent) { this.lastEvent = lastEvent; } private String state; /** - * The provisioning state of the virtual network gateway + * The provisioning state of the virtual network gateway. */ public String getState() { return this.state; } /** - * The provisioning state of the virtual network gateway + * The provisioning state of the virtual network gateway. */ public void setState(String state) { this.state = state; } private InetAddress vipAddress; /** - * The virtual IP address for this virtual network gateway + * The virtual IP address for this virtual network gateway. */ public InetAddress getVipAddress() { return this.vipAddress; } /** - * The virtual IP address for this virtual network gateway + * The virtual IP address for this virtual network gateway. */ public void setVipAddress(InetAddress vipAddress) { this.vipAddress = vipAddress; } diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetSharedKeyResponse.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetSharedKeyResponse.java index 7a282b546f201..ef2b805c75980 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetSharedKeyResponse.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayGetSharedKeyResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,10 +23,10 @@ package com.microsoft.windowsazure.management.virtualnetworks.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** -* The response to the get shared key request +* The response to the get shared key request. */ public class GatewayGetSharedKeyResponse extends OperationResponse { @@ -32,13 +34,13 @@ public class GatewayGetSharedKeyResponse extends OperationResponse /** * Contains the shared key used by the gateway to authenticate connections - * to sites on a virtual network + * to sites on a virtual network. */ public String getSharedKey() { return this.sharedKey; } /** * Contains the shared key used by the gateway to authenticate connections - * to sites on a virtual network + * to sites on a virtual network. */ public void setSharedKey(String sharedKey) { this.sharedKey = sharedKey; } diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayListConnectionsResponse.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayListConnectionsResponse.java index c3b3241efbc45..54a97a579f0d6 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayListConnectionsResponse.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayListConnectionsResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,25 +23,25 @@ package com.microsoft.windowsazure.management.virtualnetworks.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Calendar; import java.util.Iterator; /** -* The response to a ListConnections request to a Virtual Network Gateway +* The response to a ListConnections request to a Virtual Network Gateway. */ public class GatewayListConnectionsResponse extends OperationResponse implements Iterable { private ArrayList connections; /** - * The list of connections + * The list of connections. */ public ArrayList getConnections() { return this.connections; } /** - * The list of connections + * The list of connections. */ public void setConnections(ArrayList connections) { this.connections = connections; } @@ -97,13 +99,13 @@ public static class GatewayConnection /** * The number of bytes of data transferred out through this connection - * since it was started + * since it was started. */ public long getEgressBytesTransferred() { return this.egressBytesTransferred; } /** * The number of bytes of data transferred out through this connection - * since it was started + * since it was started. */ public void setEgressBytesTransferred(long egressBytesTransferred) { this.egressBytesTransferred = egressBytesTransferred; } @@ -111,13 +113,13 @@ public static class GatewayConnection /** * The number of bytes of data transferred in through this connection - * since it was started + * since it was started. */ public long getIngressBytesTransferred() { return this.ingressBytesTransferred; } /** * The number of bytes of data transferred in through this connection - * since it was started + * since it was started. */ public void setIngressBytesTransferred(long ingressBytesTransferred) { this.ingressBytesTransferred = ingressBytesTransferred; } @@ -142,12 +144,12 @@ public static class GatewayConnection private String localNetworkSiteName; /** - * The name of the local network site represented by the connection + * The name of the local network site represented by the connection. */ public String getLocalNetworkSiteName() { return this.localNetworkSiteName; } /** - * The name of the local network site represented by the connection + * The name of the local network site represented by the connection. */ public void setLocalNetworkSiteName(String localNetworkSiteName) { this.localNetworkSiteName = localNetworkSiteName; } diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayListSupportedDevicesResponse.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayListSupportedDevicesResponse.java index 0f5bab6679096..7322e0b4687f5 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayListSupportedDevicesResponse.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayListSupportedDevicesResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,23 +23,23 @@ package com.microsoft.windowsazure.management.virtualnetworks.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; /** -* The respoonse to the get supported platform configuration request +* The respoonse to the get supported platform configuration request. */ public class GatewayListSupportedDevicesResponse extends OperationResponse { private ArrayList vendors; /** - * The set of supported vendors + * The set of supported vendors. */ public ArrayList getVendors() { return this.vendors; } /** - * The set of supported vendors + * The set of supported vendors. */ public void setVendors(ArrayList vendors) { this.vendors = vendors; } @@ -68,12 +70,12 @@ public static class OSFamily private String name; /** - * The name of the os family + * The name of the os family. */ public String getName() { return this.name; } /** - * The name of the os family + * The name of the os family. */ public void setName(String name) { this.name = name; } @@ -87,7 +89,7 @@ public OSFamily() } /** - * The name and supported OS Families for this vendor on the platform + * The name and supported OS Families for this vendor on the platform. */ public static class Platform { @@ -106,12 +108,12 @@ public static class Platform private ArrayList oSFamilies; /** - * The supported OS Families for this platform + * The supported OS Families for this platform. */ public ArrayList getOSFamilies() { return this.oSFamilies; } /** - * The supported OS Families for this platform + * The supported OS Families for this platform. */ public void setOSFamilies(ArrayList oSFamilies) { this.oSFamilies = oSFamilies; } @@ -133,12 +135,12 @@ public static class Vendor private String name; /** - * The vendor name + * The vendor name. */ public String getName() { return this.name; } /** - * The vendor name + * The vendor name. */ public void setName(String name) { this.name = name; } diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayOperationResponse.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayOperationResponse.java index b6aa8e747cd37..b94883f1b446f 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayOperationResponse.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayOperationResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.virtualnetworks.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * A standard storage response including an HTTP status code and request ID. diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayOperationStatus.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayOperationStatus.java index 733a73796d30a..1177edaaecf89 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayOperationStatus.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayOperationStatus.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayProcessorArchitecture.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayProcessorArchitecture.java index 7c721244480f1..f7c421357a10f 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayProcessorArchitecture.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayProcessorArchitecture.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -22,7 +24,7 @@ package com.microsoft.windowsazure.management.virtualnetworks.models; /** -* The processor architecture for the generated vpn client package +* The processor architecture for the generated vpn client package. */ public enum GatewayProcessorArchitecture { diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayProfile.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayProfile.java index ecd62529e0306..b8416c20669d4 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayProfile.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayProfile.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -22,7 +24,7 @@ package com.microsoft.windowsazure.management.virtualnetworks.models; /** -* Possible values for Gateway Profile +* Possible values for Gateway Profile. */ public enum GatewayProfile { diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayProvisioningEventStates.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayProvisioningEventStates.java index a6552e8e768a6..add8271f0501f 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayProvisioningEventStates.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayProvisioningEventStates.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -22,7 +24,7 @@ package com.microsoft.windowsazure.management.virtualnetworks.models; /** -* Standard states for Virtual Network Gateway Provisioning Events +* Standard states for Virtual Network Gateway Provisioning Events. */ public class GatewayProvisioningEventStates { diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayResetSharedKeyParameters.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayResetSharedKeyParameters.java index f3c348e6eeda5..2fd6f3dd5b039 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayResetSharedKeyParameters.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayResetSharedKeyParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -22,7 +24,7 @@ package com.microsoft.windowsazure.management.virtualnetworks.models; /** -* The length of shared key to generate +* The length of shared key to generate. */ public class GatewayResetSharedKeyParameters { diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayType.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayType.java index 539997b26bba9..d4f8dc0f8bee1 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayType.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/GatewayType.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/LocalNetworkConnectionType.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/LocalNetworkConnectionType.java index f86b398053324..d4b8a875a5aea 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/LocalNetworkConnectionType.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/LocalNetworkConnectionType.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkGetConfigurationResponse.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkGetConfigurationResponse.java index d3aafe8373bf2..f78e87d85ace1 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkGetConfigurationResponse.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkGetConfigurationResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.virtualnetworks.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Get Network Configuration operation response. diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkListResponse.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkListResponse.java index bfafa41bac52d..f1ba4fe4a128a 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkListResponse.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,13 +23,13 @@ package com.microsoft.windowsazure.management.virtualnetworks.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.InetAddress; import java.util.ArrayList; import java.util.Iterator; /** -* The response structure for the Server List operation +* The response structure for the Server List operation. */ public class NetworkListResponse extends OperationResponse implements Iterable { @@ -106,24 +108,24 @@ public static class DnsServer private InetAddress address; /** - * The IPv4 address of the DNS server + * The IPv4 address of the DNS server. */ public InetAddress getAddress() { return this.address; } /** - * The IPv4 address of the DNS server + * The IPv4 address of the DNS server. */ public void setAddress(InetAddress address) { this.address = address; } private String name; /** - * The name of the DNS server + * The name of the DNS server. */ public String getName() { return this.name; } /** - * The name of the DNS server + * The name of the DNS server. */ public void setName(String name) { this.name = name; } @@ -145,12 +147,12 @@ public static class Gateway private GatewayProfile profile; /** - * The gateway connection size + * The gateway connection size. */ public GatewayProfile getProfile() { return this.profile; } /** - * The gateway connection size + * The gateway connection size. */ public void setProfile(GatewayProfile profile) { this.profile = profile; } @@ -200,48 +202,48 @@ public static class LocalNetworkSite private NetworkListResponse.AddressSpace addressSpace; /** - * The address space of the local network site + * The address space of the local network site. */ public NetworkListResponse.AddressSpace getAddressSpace() { return this.addressSpace; } /** - * The address space of the local network site + * The address space of the local network site. */ public void setAddressSpace(NetworkListResponse.AddressSpace addressSpace) { this.addressSpace = addressSpace; } private ArrayList connections; /** - * Specifies the types of connections to the local network site + * Specifies the types of connections to the local network site. */ public ArrayList getConnections() { return this.connections; } /** - * Specifies the types of connections to the local network site + * Specifies the types of connections to the local network site. */ public void setConnections(ArrayList connections) { this.connections = connections; } private String name; /** - * The name of the local network site + * The name of the local network site. */ public String getName() { return this.name; } /** - * The name of the local network site + * The name of the local network site. */ public void setName(String name) { this.name = name; } private InetAddress vpnGatewayAddress; /** - * The IPv4 address of the local network site + * The IPv4 address of the local network site. */ public InetAddress getVpnGatewayAddress() { return this.vpnGatewayAddress; } /** - * The IPv4 address of the local network site + * The IPv4 address of the local network site. */ public void setVpnGatewayAddress(InetAddress vpnGatewayAddress) { this.vpnGatewayAddress = vpnGatewayAddress; } @@ -272,12 +274,12 @@ public static class Subnet private String name; /** - * Name for the subnet + * Name for the subnet. */ public String getName() { return this.name; } /** - * Name for the subnet + * Name for the subnet. */ public void setName(String name) { this.name = name; } diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkReservedIPCreateParameters.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkReservedIPCreateParameters.java new file mode 100644 index 0000000000000..5c4719386c448 --- /dev/null +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkReservedIPCreateParameters.java @@ -0,0 +1,100 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.management.virtualnetworks.models; + +/** +* Preview Only. Parameters supplied to the Create Reserved IP operation. +*/ +public class NetworkReservedIPCreateParameters +{ + private String affinityGroup; + + /** + * An affinity group, which indirectly refers to the location where the + * virtual network exists. + */ + public String getAffinityGroup() { return this.affinityGroup; } + + /** + * An affinity group, which indirectly refers to the location where the + * virtual network exists. + */ + public void setAffinityGroup(String affinityGroup) { this.affinityGroup = affinityGroup; } + + private String deploymentName; + + /** + * The name of the deployment the IP belongs to, if being used. + */ + public String getDeploymentName() { return this.deploymentName; } + + /** + * The name of the deployment the IP belongs to, if being used. + */ + public void setDeploymentName(String deploymentName) { this.deploymentName = deploymentName; } + + private String label; + + /** + * The friendly identifier of the site. + */ + public String getLabel() { return this.label; } + + /** + * The friendly identifier of the site. + */ + public void setLabel(String label) { this.label = label; } + + private String name; + + /** + * Name of the reserved IP. + */ + public String getName() { return this.name; } + + /** + * Name of the reserved IP. + */ + public void setName(String name) { this.name = name; } + + private String serviceName; + + /** + * The name of the service the IP belongs to, if being used. + */ + public String getServiceName() { return this.serviceName; } + + /** + * The name of the service the IP belongs to, if being used. + */ + public void setServiceName(String serviceName) { this.serviceName = serviceName; } + + /** + * Initializes a new instance of the NetworkReservedIPCreateParameters class. + * + */ + public NetworkReservedIPCreateParameters() + { + } +} diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkReservedIPGetResponse.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkReservedIPGetResponse.java new file mode 100644 index 0000000000000..82723c16fc642 --- /dev/null +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkReservedIPGetResponse.java @@ -0,0 +1,153 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.management.virtualnetworks.models; + +import com.microsoft.windowsazure.core.OperationResponse; +import java.net.InetAddress; + +/** +* Preview Only. A reserved IP associated with your subscription. +*/ +public class NetworkReservedIPGetResponse extends OperationResponse +{ + private InetAddress address; + + /** + * The IP address of the reserved IP. + */ + public InetAddress getAddress() { return this.address; } + + /** + * The IP address of the reserved IP. + */ + public void setAddress(InetAddress address) { this.address = address; } + + private String affinityGroup; + + /** + * An affinity group, which indirectly refers to the location where the + * virtual network exists. + */ + public String getAffinityGroup() { return this.affinityGroup; } + + /** + * An affinity group, which indirectly refers to the location where the + * virtual network exists. + */ + public void setAffinityGroup(String affinityGroup) { this.affinityGroup = affinityGroup; } + + private String deploymentName; + + /** + * The name of the deployment the IP belongs to, if being used. + */ + public String getDeploymentName() { return this.deploymentName; } + + /** + * The name of the deployment the IP belongs to, if being used. + */ + public void setDeploymentName(String deploymentName) { this.deploymentName = deploymentName; } + + private String id; + + /** + * A unique string identifier that represents the reserved IP. + */ + public String getId() { return this.id; } + + /** + * A unique string identifier that represents the reserved IP. + */ + public void setId(String id) { this.id = id; } + + private boolean inUse; + + /** + * The indicator of whether the reserved IP is being used. + */ + public boolean getInUse() { return this.inUse; } + + /** + * The indicator of whether the reserved IP is being used. + */ + public void setInUse(boolean inUse) { this.inUse = inUse; } + + private String label; + + /** + * The friendly identifier of the site. + */ + public String getLabel() { return this.label; } + + /** + * The friendly identifier of the site. + */ + public void setLabel(String label) { this.label = label; } + + private String name; + + /** + * Name of the reserved IP. + */ + public String getName() { return this.name; } + + /** + * Name of the reserved IP. + */ + public void setName(String name) { this.name = name; } + + private String serviceName; + + /** + * The name of the service the IP belongs to, if being used. + */ + public String getServiceName() { return this.serviceName; } + + /** + * The name of the service the IP belongs to, if being used. + */ + public void setServiceName(String serviceName) { this.serviceName = serviceName; } + + private String state; + + /** + * Current status of the reserved IP. (Created, Creating, Updating, + * Deleting, Unavailable) + */ + public String getState() { return this.state; } + + /** + * Current status of the reserved IP. (Created, Creating, Updating, + * Deleting, Unavailable) + */ + public void setState(String state) { this.state = state; } + + /** + * Initializes a new instance of the NetworkReservedIPGetResponse class. + * + */ + public NetworkReservedIPGetResponse() + { + } +} diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkReservedIPListResponse.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkReservedIPListResponse.java new file mode 100644 index 0000000000000..308c0151602f3 --- /dev/null +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkReservedIPListResponse.java @@ -0,0 +1,185 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.management.virtualnetworks.models; + +import com.microsoft.windowsazure.core.OperationResponse; +import java.net.InetAddress; +import java.util.ArrayList; +import java.util.Iterator; + +/** +* Preview Only. The response structure for the Server List operation +*/ +public class NetworkReservedIPListResponse extends OperationResponse implements Iterable +{ + private ArrayList reservedIPs; + + public ArrayList getReservedIPs() { return this.reservedIPs; } + + public void setReservedIPs(ArrayList reservedIPs) { this.reservedIPs = reservedIPs; } + + /** + * Initializes a new instance of the NetworkReservedIPListResponse class. + * + */ + public NetworkReservedIPListResponse() + { + this.reservedIPs = new ArrayList(); + } + + /** + * Gets the sequence of ReservedIPs. + * + */ + public Iterator iterator() + { + return this.getReservedIPs().iterator(); + } + + /** + * A reserved IP associated with your subscription. + */ + public static class ReservedIP + { + private InetAddress address; + + /** + * The IP address of the reserved IP. + */ + public InetAddress getAddress() { return this.address; } + + /** + * The IP address of the reserved IP. + */ + public void setAddress(InetAddress address) { this.address = address; } + + private String affinityGroup; + + /** + * An affinity group, which indirectly refers to the location where the + * virtual network exists. + */ + public String getAffinityGroup() { return this.affinityGroup; } + + /** + * An affinity group, which indirectly refers to the location where the + * virtual network exists. + */ + public void setAffinityGroup(String affinityGroup) { this.affinityGroup = affinityGroup; } + + private String deploymentName; + + /** + * The name of the deployment the IP belongs to, if being used. + */ + public String getDeploymentName() { return this.deploymentName; } + + /** + * The name of the deployment the IP belongs to, if being used. + */ + public void setDeploymentName(String deploymentName) { this.deploymentName = deploymentName; } + + private String id; + + /** + * A unique string identifier that represents the reserved IP. + */ + public String getId() { return this.id; } + + /** + * A unique string identifier that represents the reserved IP. + */ + public void setId(String id) { this.id = id; } + + private boolean inUse; + + /** + * The indicator of whether the reserved IP is being used. + */ + public boolean getInUse() { return this.inUse; } + + /** + * The indicator of whether the reserved IP is being used. + */ + public void setInUse(boolean inUse) { this.inUse = inUse; } + + private String label; + + /** + * The friendly identifier of the site. + */ + public String getLabel() { return this.label; } + + /** + * The friendly identifier of the site. + */ + public void setLabel(String label) { this.label = label; } + + private String name; + + /** + * Name of the reserved IP. + */ + public String getName() { return this.name; } + + /** + * Name of the reserved IP. + */ + public void setName(String name) { this.name = name; } + + private String serviceName; + + /** + * The name of the service the IP belongs to, if being used. + */ + public String getServiceName() { return this.serviceName; } + + /** + * The name of the service the IP belongs to, if being used. + */ + public void setServiceName(String serviceName) { this.serviceName = serviceName; } + + private String state; + + /** + * Current status of the reserved IP. (Created, Creating, Updating, + * Deleting, Unavailable) + */ + public String getState() { return this.state; } + + /** + * Current status of the reserved IP. (Created, Creating, Updating, + * Deleting, Unavailable) + */ + public void setState(String state) { this.state = state; } + + /** + * Initializes a new instance of the ReservedIP class. + * + */ + public ReservedIP() + { + } + } +} diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkSetConfigurationParameters.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkSetConfigurationParameters.java index 2485e83b3e230..83fb94528448f 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkSetConfigurationParameters.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/NetworkSetConfigurationParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/OperationStatus.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/OperationStatus.java index a296857952c87..71e71e6da6dec 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/OperationStatus.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/OperationStatus.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/ReservedIPState.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/ReservedIPState.java new file mode 100644 index 0000000000000..e9c0d70e234b1 --- /dev/null +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/ReservedIPState.java @@ -0,0 +1,37 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.management.virtualnetworks.models; + +public class ReservedIPState +{ + public static final String Created = "Created"; + + public static final String Creating = "Creating"; + + public static final String Updating = "Updating"; + + public static final String Deleting = "Deleting"; + + public static final String Unavailable = "Unavailable"; +} diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/VirtualNetworkOperationStatusResponse.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/VirtualNetworkOperationStatusResponse.java index 111f26cacfd30..b370b88ca6e3c 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/VirtualNetworkOperationStatusResponse.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/VirtualNetworkOperationStatusResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.virtualnetworks.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The response body contains the status of the specified asynchronous diff --git a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/VirtualNetworkState.java b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/VirtualNetworkState.java index ef3235686791e..b723e8467e75d 100644 --- a/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/VirtualNetworkState.java +++ b/management-virtualnetwork/src/main/java/com/microsoft/windowsazure/management/virtualnetworks/models/VirtualNetworkState.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/Exports.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/Exports.java index e32f98a97eac9..e8eff2c9d9ffc 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/Exports.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/Exports.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.websites; -import com.microsoft.windowsazure.services.core.Builder; +import com.microsoft.windowsazure.core.Builder; /** * The Class Exports. diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/ServerFarmOperations.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/ServerFarmOperations.java index caa9bc4a1beeb..83ae85497ba61 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/ServerFarmOperations.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/ServerFarmOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,14 +23,14 @@ package com.microsoft.windowsazure.management.websites; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.websites.models.ServerFarmCreateParameters; import com.microsoft.windowsazure.management.websites.models.ServerFarmCreateResponse; import com.microsoft.windowsazure.management.websites.models.ServerFarmGetResponse; import com.microsoft.windowsazure.management.websites.models.ServerFarmListResponse; import com.microsoft.windowsazure.management.websites.models.ServerFarmUpdateParameters; import com.microsoft.windowsazure.management.websites.models.ServerFarmUpdateResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/ServerFarmOperationsImpl.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/ServerFarmOperationsImpl.java index fc77d8f944397..02f789fdb7d58 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/ServerFarmOperationsImpl.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/ServerFarmOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,10 @@ package com.microsoft.windowsazure.management.websites; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.websites.models.ServerFarmCreateParameters; import com.microsoft.windowsazure.management.websites.models.ServerFarmCreateResponse; import com.microsoft.windowsazure.management.websites.models.ServerFarmGetResponse; @@ -30,14 +35,14 @@ import com.microsoft.windowsazure.management.websites.models.ServerFarmUpdateParameters; import com.microsoft.windowsazure.management.websites.models.ServerFarmUpdateResponse; import com.microsoft.windowsazure.management.websites.models.ServerFarmWorkerSize; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; import java.text.ParseException; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.Future; import javax.xml.parsers.DocumentBuilder; @@ -50,7 +55,6 @@ import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.apache.http.HttpResponse; -import org.apache.http.client.methods.HttpDelete; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPut; @@ -105,11 +109,12 @@ public class ServerFarmOperationsImpl implements ServiceOperations createAsync(final String webSpaceName, final ServerFarmCreateParameters parameters) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public ServerFarmCreateResponse call() throws Exception - { - return create(webSpaceName, parameters); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public ServerFarmCreateResponse call() throws Exception + { + return create(webSpaceName, parameters); + } }); } @@ -144,6 +149,16 @@ public ServerFarmCreateResponse create(String webSpaceName, ServerFarmCreatePara } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/ServerFarms"; @@ -210,11 +225,23 @@ public ServerFarmCreateResponse create(String webSpaceName, ServerFarmCreatePara // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -292,6 +319,10 @@ public ServerFarmCreateResponse create(String webSpaceName, ServerFarmCreatePara result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -315,11 +346,12 @@ public ServerFarmCreateResponse create(String webSpaceName, ServerFarmCreatePara @Override public Future deleteAsync(final String webSpaceName) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public OperationResponse call() throws Exception - { - return delete(webSpaceName); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public OperationResponse call() throws Exception + { + return delete(webSpaceName); + } }); } @@ -350,23 +382,44 @@ public OperationResponse delete(String webSpaceName) throws IOException, Service } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/ServerFarms/DefaultServerFarm"; // Create HTTP transport objects - HttpDelete httpRequest = new HttpDelete(url); + CustomHttpDelete httpRequest = new CustomHttpDelete(url); // Set Headers httpRequest.setHeader("x-ms-version", "2013-08-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -379,6 +432,10 @@ public OperationResponse delete(String webSpaceName) throws IOException, Service result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -402,11 +459,12 @@ public OperationResponse delete(String webSpaceName) throws IOException, Service @Override public Future getAsync(final String webSpaceName, final String serverFarmName) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public ServerFarmGetResponse call() throws Exception - { - return get(webSpaceName, serverFarmName); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public ServerFarmGetResponse call() throws Exception + { + return get(webSpaceName, serverFarmName); + } }); } @@ -441,6 +499,16 @@ public ServerFarmGetResponse get(String webSpaceName, String serverFarmName) thr } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + tracingParameters.put("serverFarmName", serverFarmName); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/ServerFarms/" + serverFarmName; @@ -453,11 +521,23 @@ public ServerFarmGetResponse get(String webSpaceName, String serverFarmName) thr // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -535,6 +615,10 @@ public ServerFarmGetResponse get(String webSpaceName, String serverFarmName) thr result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -557,11 +641,12 @@ public ServerFarmGetResponse get(String webSpaceName, String serverFarmName) thr @Override public Future listAsync(final String webSpaceName) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public ServerFarmListResponse call() throws Exception - { - return list(webSpaceName); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public ServerFarmListResponse call() throws Exception + { + return list(webSpaceName); + } }); } @@ -591,6 +676,15 @@ public ServerFarmListResponse list(String webSpaceName) throws IOException, Serv } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/ServerFarms"; @@ -603,11 +697,23 @@ public ServerFarmListResponse list(String webSpaceName) throws IOException, Serv // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -692,6 +798,10 @@ public ServerFarmListResponse list(String webSpaceName) throws IOException, Serv result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -715,11 +825,12 @@ public ServerFarmListResponse list(String webSpaceName) throws IOException, Serv @Override public Future updateAsync(final String webSpaceName, final ServerFarmUpdateParameters parameters) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public ServerFarmUpdateResponse call() throws Exception - { - return update(webSpaceName, parameters); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public ServerFarmUpdateResponse call() throws Exception + { + return update(webSpaceName, parameters); + } }); } @@ -754,6 +865,16 @@ public ServerFarmUpdateResponse update(String webSpaceName, ServerFarmUpdatePara } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/ServerFarms/DefaultServerFarm"; @@ -820,11 +941,23 @@ public ServerFarmUpdateResponse update(String webSpaceName, ServerFarmUpdatePara // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -902,6 +1035,10 @@ public ServerFarmUpdateResponse update(String webSpaceName, ServerFarmUpdatePara result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteExtendedErrorCodes.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteExtendedErrorCodes.java index bd632b331fb2b..b74cbe0940320 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteExtendedErrorCodes.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteExtendedErrorCodes.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -108,12 +110,12 @@ public class WebSiteExtendedErrorCodes public static final String ParameterNameIsEmpty = "01014"; /** - * Not ready + * Not ready. */ public static final String NotReady = "01015"; /** - * Ready + * Ready. */ public static final String Ready = "01016"; diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteManagementClient.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteManagementClient.java index 69d7009fdcb24..4e354193ac232 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteManagementClient.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteManagementClient.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,9 +23,10 @@ package com.microsoft.windowsazure.management.websites; -import com.microsoft.windowsazure.management.OperationResponse; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; -import com.microsoft.windowsazure.services.core.ServiceException; +import com.microsoft.windowsazure.core.FilterableService; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.exception.ServiceException; import java.io.IOException; import java.net.URI; import java.util.concurrent.Future; @@ -36,7 +39,7 @@ * http://msdn.microsoft.com/en-us/library/windowsazure/dn166981.aspx for more * information) */ -public interface WebSiteManagementClient +public interface WebSiteManagementClient extends FilterableService { /** * The URI used as the base for all Service Management requests. @@ -58,17 +61,17 @@ public interface WebSiteManagementClient * http://msdn.microsoft.com/en-us/library/windowsazure/dn194277.aspx for * more information) */ - ServerFarmOperations getServerFarms(); + ServerFarmOperations getServerFarmsOperations(); /** * Operations for managing the web sites in a web space. */ - WebSiteOperations getWebSites(); + WebSiteOperations getWebSitesOperations(); /** * Operations for managing web spaces beneath your subscription. */ - WebSpaceOperations getWebSpaces(); + WebSpaceOperations getWebSpacesOperations(); /** * Register your subscription to use Windows Azure Web Sites. diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteManagementClientImpl.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteManagementClientImpl.java index 4dca75e55b95d..9e97692badd04 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteManagementClientImpl.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteManagementClientImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,19 +23,23 @@ package com.microsoft.windowsazure.management.websites; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceClient; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.ManagementConfiguration; -import com.microsoft.windowsazure.management.OperationResponse; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; -import com.microsoft.windowsazure.services.core.ServiceClient; -import com.microsoft.windowsazure.services.core.ServiceException; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.net.URI; +import java.util.HashMap; import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import javax.inject.Inject; import javax.inject.Named; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpPut; +import org.apache.http.impl.client.HttpClientBuilder; /** * The Windows Azure Web Sites management API provides a RESTful set of web @@ -43,7 +49,7 @@ * http://msdn.microsoft.com/en-us/library/windowsazure/dn166981.aspx for more * information) */ -public class WebSiteManagementClientImpl extends ServiceClient implements WebSiteManagementClient +public class WebSiteManagementClientImpl extends ServiceClient implements WebSiteManagementClient { private URI baseUri; @@ -71,29 +77,31 @@ public class WebSiteManagementClientImpl extends ServiceClient registerSubscriptionAsync() { - return this.getExecutorService().submit(new Callable() { @Override - public OperationResponse call() throws Exception - { - return registerSubscription(); - } + return this.getExecutorService().submit(new Callable() { + @Override + public OperationResponse call() throws Exception + { + return registerSubscription(); + } }); } @@ -181,6 +201,14 @@ public OperationResponse registerSubscription() throws IOException, ServiceExcep // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "registerSubscriptionAsync", tracingParameters); + } // Construct URL String url = this.getBaseUri() + "/" + this.getCredentials().getSubscriptionId() + "/services?service=website&action=register"; @@ -194,11 +222,23 @@ public OperationResponse registerSubscription() throws IOException, ServiceExcep // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -211,6 +251,10 @@ public OperationResponse registerSubscription() throws IOException, ServiceExcep result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -223,11 +267,12 @@ public OperationResponse registerSubscription() throws IOException, ServiceExcep @Override public Future unregisterSubscriptionAsync() { - return this.getExecutorService().submit(new Callable() { @Override - public OperationResponse call() throws Exception - { - return unregisterSubscription(); - } + return this.getExecutorService().submit(new Callable() { + @Override + public OperationResponse call() throws Exception + { + return unregisterSubscription(); + } }); } @@ -243,6 +288,14 @@ public OperationResponse unregisterSubscription() throws IOException, ServiceExc // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "unregisterSubscriptionAsync", tracingParameters); + } // Construct URL String url = this.getBaseUri() + "/" + this.getCredentials().getSubscriptionId() + "/services?service=website&action=unregister"; @@ -256,11 +309,23 @@ public OperationResponse unregisterSubscription() throws IOException, ServiceExc // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -273,6 +338,10 @@ public OperationResponse unregisterSubscription() throws IOException, ServiceExc result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteManagementService.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteManagementService.java index eb6dc991e3c27..99334935423f4 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteManagementService.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteManagementService.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.management.websites; -import com.microsoft.windowsazure.services.core.Configuration; +import com.microsoft.windowsazure.Configuration; /** * diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteOperations.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteOperations.java index b92ae80dceb17..5d20fa6b03308 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteOperations.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,8 @@ package com.microsoft.windowsazure.management.websites; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.websites.models.WebSiteCreateParameters; import com.microsoft.windowsazure.management.websites.models.WebSiteCreateResponse; import com.microsoft.windowsazure.management.websites.models.WebSiteDeleteRepositoryResponse; @@ -36,7 +39,6 @@ import com.microsoft.windowsazure.management.websites.models.WebSiteUpdateConfigurationParameters; import com.microsoft.windowsazure.management.websites.models.WebSiteUpdateParameters; import com.microsoft.windowsazure.management.websites.models.WebSiteUpdateResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; @@ -217,7 +219,7 @@ public interface WebSiteOperations * * @param webSpaceName The name of the web space. * @param webSiteName The name of the web site. - * @param parameters Additional parameters + * @param parameters Additional parameters. * @return The Get Web Site Details operation response. */ WebSiteGetResponse get(String webSpaceName, String webSiteName, WebSiteGetParameters parameters) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException, URISyntaxException; @@ -229,7 +231,7 @@ public interface WebSiteOperations * * @param webSpaceName The name of the web space. * @param webSiteName The name of the web site. - * @param parameters Additional parameters + * @param parameters Additional parameters. * @return The Get Web Site Details operation response. */ Future getAsync(String webSpaceName, String webSiteName, WebSiteGetParameters parameters); diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteOperationsImpl.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteOperationsImpl.java index 03e7f648e6896..ab464e6b30d4c 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteOperationsImpl.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,8 +23,13 @@ package com.microsoft.windowsazure.management.websites; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.core.utils.CommaStringBuilder; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.websites.models.ManagedPipelineMode; +import com.microsoft.windowsazure.management.websites.models.RemoteDebuggingVersion; import com.microsoft.windowsazure.management.websites.models.WebSite; import com.microsoft.windowsazure.management.websites.models.WebSiteComputeMode; import com.microsoft.windowsazure.management.websites.models.WebSiteCreateParameters; @@ -45,9 +52,7 @@ import com.microsoft.windowsazure.management.websites.models.WebSiteUpdateResponse; import com.microsoft.windowsazure.management.websites.models.WebSiteUsageState; import com.microsoft.windowsazure.management.websites.models.WebSpaceAvailabilityState; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.utils.CommaStringBuilder; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -59,7 +64,9 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; -import java.util.Map.Entry; +import java.util.HashMap; +import java.util.Map; +import java.util.TimeZone; import java.util.concurrent.Callable; import java.util.concurrent.Future; import javax.xml.parsers.DocumentBuilder; @@ -73,7 +80,6 @@ import javax.xml.transform.stream.StreamResult; import org.apache.commons.codec.binary.Base64; import org.apache.http.HttpResponse; -import org.apache.http.client.methods.HttpDelete; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPut; @@ -119,11 +125,12 @@ public class WebSiteOperationsImpl implements ServiceOperations createAsync(final String webSpaceName, final WebSiteCreateParameters parameters) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public WebSiteCreateResponse call() throws Exception - { - return create(webSpaceName, parameters); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public WebSiteCreateResponse call() throws Exception + { + return create(webSpaceName, parameters); + } }); } @@ -178,6 +185,16 @@ public WebSiteCreateResponse create(String webSpaceName, WebSiteCreateParameters } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/sites"; @@ -267,11 +284,23 @@ public WebSiteCreateResponse create(String webSpaceName, WebSiteCreateParameters // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200 && statusCode != 201) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -723,6 +752,10 @@ public WebSiteCreateResponse create(String webSpaceName, WebSiteCreateParameters result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -743,11 +776,12 @@ public WebSiteCreateResponse create(String webSpaceName, WebSiteCreateParameters @Override public Future createRepositoryAsync(final String webSpaceName, final String webSiteName) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public OperationResponse call() throws Exception - { - return createRepository(webSpaceName, webSiteName); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public OperationResponse call() throws Exception + { + return createRepository(webSpaceName, webSiteName); + } }); } @@ -779,6 +813,16 @@ public OperationResponse createRepository(String webSpaceName, String webSiteNam } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + tracingParameters.put("webSiteName", webSiteName); + CloudTracing.enter(invocationId, this, "createRepositoryAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/sites/" + webSiteName + "/repository"; @@ -792,11 +836,23 @@ public OperationResponse createRepository(String webSpaceName, String webSiteNam // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -809,6 +865,10 @@ public OperationResponse createRepository(String webSpaceName, String webSiteNam result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -831,11 +891,12 @@ public OperationResponse createRepository(String webSpaceName, String webSiteNam @Override public Future deleteAsync(final String webSpaceName, final String webSiteName, final boolean deleteEmptyServerFarm, final boolean deleteMetrics) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public OperationResponse call() throws Exception - { - return delete(webSpaceName, webSiteName, deleteEmptyServerFarm, deleteMetrics); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public OperationResponse call() throws Exception + { + return delete(webSpaceName, webSiteName, deleteEmptyServerFarm, deleteMetrics); + } }); } @@ -869,6 +930,18 @@ public OperationResponse delete(String webSpaceName, String webSiteName, boolean } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + tracingParameters.put("webSiteName", webSiteName); + tracingParameters.put("deleteEmptyServerFarm", deleteEmptyServerFarm); + tracingParameters.put("deleteMetrics", deleteMetrics); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/sites/" + webSiteName + "?"; @@ -876,18 +949,30 @@ public OperationResponse delete(String webSpaceName, String webSiteName, boolean url = url + "&deleteMetrics=" + URLEncoder.encode(Boolean.toString(deleteMetrics).toLowerCase()); // Create HTTP transport objects - HttpDelete httpRequest = new HttpDelete(url); + CustomHttpDelete httpRequest = new CustomHttpDelete(url); // Set Headers httpRequest.setHeader("x-ms-version", "2013-08-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -900,6 +985,10 @@ public OperationResponse delete(String webSpaceName, String webSiteName, boolean result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -919,11 +1008,12 @@ public OperationResponse delete(String webSpaceName, String webSiteName, boolean @Override public Future deleteRepositoryAsync(final String webSpaceName, final String webSiteName) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public WebSiteDeleteRepositoryResponse call() throws Exception - { - return deleteRepository(webSpaceName, webSiteName); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public WebSiteDeleteRepositoryResponse call() throws Exception + { + return deleteRepository(webSpaceName, webSiteName); + } }); } @@ -954,23 +1044,45 @@ public WebSiteDeleteRepositoryResponse deleteRepository(String webSpaceName, Str } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + tracingParameters.put("webSiteName", webSiteName); + CloudTracing.enter(invocationId, this, "deleteRepositoryAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/sites/" + webSiteName + "/repository"; // Create HTTP transport objects - HttpDelete httpRequest = new HttpDelete(url); + CustomHttpDelete httpRequest = new CustomHttpDelete(url); // Set Headers httpRequest.setHeader("x-ms-version", "2013-08-01"); // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -996,6 +1108,10 @@ public WebSiteDeleteRepositoryResponse deleteRepository(String webSpaceName, Str result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1018,11 +1134,12 @@ public WebSiteDeleteRepositoryResponse deleteRepository(String webSpaceName, Str @Override public Future generatePasswordAsync(final String webSpaceName, final String webSiteName) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public OperationResponse call() throws Exception - { - return generatePassword(webSpaceName, webSiteName); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public OperationResponse call() throws Exception + { + return generatePassword(webSpaceName, webSiteName); + } }); } @@ -1056,6 +1173,16 @@ public OperationResponse generatePassword(String webSpaceName, String webSiteNam } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + tracingParameters.put("webSiteName", webSiteName); + CloudTracing.enter(invocationId, this, "generatePasswordAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/sites/" + webSiteName + "/newpassword"; @@ -1069,11 +1196,23 @@ public OperationResponse generatePassword(String webSpaceName, String webSiteNam // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1086,6 +1225,10 @@ public OperationResponse generatePassword(String webSpaceName, String webSiteNam result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1096,17 +1239,18 @@ public OperationResponse generatePassword(String webSpaceName, String webSiteNam * * @param webSpaceName The name of the web space. * @param webSiteName The name of the web site. - * @param parameters Additional parameters + * @param parameters Additional parameters. * @return The Get Web Site Details operation response. */ @Override public Future getAsync(final String webSpaceName, final String webSiteName, final WebSiteGetParameters parameters) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public WebSiteGetResponse call() throws Exception - { - return get(webSpaceName, webSiteName, parameters); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public WebSiteGetResponse call() throws Exception + { + return get(webSpaceName, webSiteName, parameters); + } }); } @@ -1117,7 +1261,7 @@ public WebSiteGetResponse call() throws Exception * * @param webSpaceName The name of the web space. * @param webSiteName The name of the web site. - * @param parameters Additional parameters + * @param parameters Additional parameters. * @return The Get Web Site Details operation response. */ @Override @@ -1134,6 +1278,17 @@ public WebSiteGetResponse get(String webSpaceName, String webSiteName, WebSiteGe } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + tracingParameters.put("webSiteName", webSiteName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/sites/" + webSiteName + "?"; @@ -1150,11 +1305,23 @@ public WebSiteGetResponse get(String webSpaceName, String webSiteName, WebSiteGe // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1606,6 +1773,10 @@ public WebSiteGetResponse get(String webSpaceName, String webSiteName, WebSiteGe result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1623,11 +1794,12 @@ public WebSiteGetResponse get(String webSpaceName, String webSiteName, WebSiteGe @Override public Future getConfigurationAsync(final String webSpaceName, final String webSiteName) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public WebSiteGetConfigurationResponse call() throws Exception - { - return getConfiguration(webSpaceName, webSiteName); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public WebSiteGetConfigurationResponse call() throws Exception + { + return getConfiguration(webSpaceName, webSiteName); + } }); } @@ -1656,6 +1828,16 @@ public WebSiteGetConfigurationResponse getConfiguration(String webSpaceName, Str } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + tracingParameters.put("webSiteName", webSiteName); + CloudTracing.enter(invocationId, this, "getConfigurationAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/sites/" + webSiteName + "/config"; @@ -1668,11 +1850,23 @@ public WebSiteGetConfigurationResponse getConfiguration(String webSpaceName, Str // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1756,15 +1950,24 @@ public WebSiteGetConfigurationResponse getConfiguration(String webSpaceName, Str NodeList elements10 = siteConfigElement.getElementsByTagName("DetailedErrorLoggingEnabled"); Element detailedErrorLoggingEnabledElement = elements10.getLength() > 0 ? ((Element)elements10.item(0)) : null; - if (detailedErrorLoggingEnabledElement != null) + if (detailedErrorLoggingEnabledElement != null && (detailedErrorLoggingEnabledElement.getTextContent() != null && detailedErrorLoggingEnabledElement.getTextContent().isEmpty() != true) == false) { boolean detailedErrorLoggingEnabledInstance; detailedErrorLoggingEnabledInstance = Boolean.parseBoolean(detailedErrorLoggingEnabledElement.getTextContent()); result.setDetailedErrorLoggingEnabled(detailedErrorLoggingEnabledInstance); } - NodeList elements11 = siteConfigElement.getElementsByTagName("HandlerMappings"); - Element handlerMappingsSequenceElement = elements11.getLength() > 0 ? ((Element)elements11.item(0)) : null; + NodeList elements11 = siteConfigElement.getElementsByTagName("DocumentRoot"); + Element documentRootElement = elements11.getLength() > 0 ? ((Element)elements11.item(0)) : null; + if (documentRootElement != null) + { + String documentRootInstance; + documentRootInstance = documentRootElement.getTextContent(); + result.setDocumentRoot(documentRootInstance); + } + + NodeList elements12 = siteConfigElement.getElementsByTagName("HandlerMappings"); + Element handlerMappingsSequenceElement = elements12.getLength() > 0 ? ((Element)elements12.item(0)) : null; if (handlerMappingsSequenceElement != null) { for (int i4 = 0; i4 < handlerMappingsSequenceElement.getElementsByTagName("HandlerMapping").getLength(); i4 = i4 + 1) @@ -1773,8 +1976,8 @@ public WebSiteGetConfigurationResponse getConfiguration(String webSpaceName, Str WebSiteGetConfigurationResponse.HandlerMapping handlerMappingInstance = new WebSiteGetConfigurationResponse.HandlerMapping(); result.getHandlerMappings().add(handlerMappingInstance); - NodeList elements12 = handlerMappingsElement.getElementsByTagName("Arguments"); - Element argumentsElement = elements12.getLength() > 0 ? ((Element)elements12.item(0)) : null; + NodeList elements13 = handlerMappingsElement.getElementsByTagName("Arguments"); + Element argumentsElement = elements13.getLength() > 0 ? ((Element)elements13.item(0)) : null; if (argumentsElement != null) { String argumentsInstance; @@ -1782,8 +1985,8 @@ public WebSiteGetConfigurationResponse getConfiguration(String webSpaceName, Str handlerMappingInstance.setArguments(argumentsInstance); } - NodeList elements13 = handlerMappingsElement.getElementsByTagName("Extension"); - Element extensionElement = elements13.getLength() > 0 ? ((Element)elements13.item(0)) : null; + NodeList elements14 = handlerMappingsElement.getElementsByTagName("Extension"); + Element extensionElement = elements14.getLength() > 0 ? ((Element)elements14.item(0)) : null; if (extensionElement != null) { String extensionInstance; @@ -1791,8 +1994,8 @@ public WebSiteGetConfigurationResponse getConfiguration(String webSpaceName, Str handlerMappingInstance.setExtension(extensionInstance); } - NodeList elements14 = handlerMappingsElement.getElementsByTagName("ScriptProcessor"); - Element scriptProcessorElement = elements14.getLength() > 0 ? ((Element)elements14.item(0)) : null; + NodeList elements15 = handlerMappingsElement.getElementsByTagName("ScriptProcessor"); + Element scriptProcessorElement = elements15.getLength() > 0 ? ((Element)elements15.item(0)) : null; if (scriptProcessorElement != null) { String scriptProcessorInstance; @@ -1802,32 +2005,50 @@ public WebSiteGetConfigurationResponse getConfiguration(String webSpaceName, Str } } - NodeList elements15 = siteConfigElement.getElementsByTagName("HttpLoggingEnabled"); - Element httpLoggingEnabledElement = elements15.getLength() > 0 ? ((Element)elements15.item(0)) : null; - if (httpLoggingEnabledElement != null) + NodeList elements16 = siteConfigElement.getElementsByTagName("HttpLoggingEnabled"); + Element httpLoggingEnabledElement = elements16.getLength() > 0 ? ((Element)elements16.item(0)) : null; + if (httpLoggingEnabledElement != null && (httpLoggingEnabledElement.getTextContent() != null && httpLoggingEnabledElement.getTextContent().isEmpty() != true) == false) { boolean httpLoggingEnabledInstance; httpLoggingEnabledInstance = Boolean.parseBoolean(httpLoggingEnabledElement.getTextContent()); result.setHttpLoggingEnabled(httpLoggingEnabledInstance); } - NodeList elements16 = siteConfigElement.getElementsByTagName("Metadata"); - Element metadataSequenceElement = elements16.getLength() > 0 ? ((Element)elements16.item(0)) : null; + NodeList elements17 = siteConfigElement.getElementsByTagName("LogsDirectorySizeLimit"); + Element logsDirectorySizeLimitElement = elements17.getLength() > 0 ? ((Element)elements17.item(0)) : null; + if (logsDirectorySizeLimitElement != null && (logsDirectorySizeLimitElement.getTextContent() != null && logsDirectorySizeLimitElement.getTextContent().isEmpty() != true) == false) + { + int logsDirectorySizeLimitInstance; + logsDirectorySizeLimitInstance = Integer.parseInt(logsDirectorySizeLimitElement.getTextContent()); + result.setLogsDirectorySizeLimit(logsDirectorySizeLimitInstance); + } + + NodeList elements18 = siteConfigElement.getElementsByTagName("ManagedPipelineMode"); + Element managedPipelineModeElement = elements18.getLength() > 0 ? ((Element)elements18.item(0)) : null; + if (managedPipelineModeElement != null && (managedPipelineModeElement.getTextContent() != null && managedPipelineModeElement.getTextContent().isEmpty() != true) == false) + { + ManagedPipelineMode managedPipelineModeInstance; + managedPipelineModeInstance = ManagedPipelineMode.valueOf(managedPipelineModeElement.getTextContent()); + result.setManagedPipelineMode(managedPipelineModeInstance); + } + + NodeList elements19 = siteConfigElement.getElementsByTagName("Metadata"); + Element metadataSequenceElement = elements19.getLength() > 0 ? ((Element)elements19.item(0)) : null; if (metadataSequenceElement != null) { for (int i5 = 0; i5 < metadataSequenceElement.getElementsByTagName("NameValuePair").getLength(); i5 = i5 + 1) { org.w3c.dom.Element metadataElement = ((org.w3c.dom.Element)metadataSequenceElement.getElementsByTagName("NameValuePair").item(i5)); - NodeList elements17 = metadataElement.getElementsByTagName("Name"); - String metadataKey = elements17.getLength() > 0 ? ((org.w3c.dom.Element)elements17.item(0)).getTextContent() : null; - NodeList elements18 = metadataElement.getElementsByTagName("Value"); - String metadataValue = elements18.getLength() > 0 ? ((org.w3c.dom.Element)elements18.item(0)).getTextContent() : null; + NodeList elements20 = metadataElement.getElementsByTagName("Name"); + String metadataKey = elements20.getLength() > 0 ? ((org.w3c.dom.Element)elements20.item(0)).getTextContent() : null; + NodeList elements21 = metadataElement.getElementsByTagName("Value"); + String metadataValue = elements21.getLength() > 0 ? ((org.w3c.dom.Element)elements21.item(0)).getTextContent() : null; result.getMetadata().put(metadataKey, metadataValue); } } - NodeList elements19 = siteConfigElement.getElementsByTagName("NetFrameworkVersion"); - Element netFrameworkVersionElement = elements19.getLength() > 0 ? ((Element)elements19.item(0)) : null; + NodeList elements22 = siteConfigElement.getElementsByTagName("NetFrameworkVersion"); + Element netFrameworkVersionElement = elements22.getLength() > 0 ? ((Element)elements22.item(0)) : null; if (netFrameworkVersionElement != null) { String netFrameworkVersionInstance; @@ -1835,17 +2056,17 @@ public WebSiteGetConfigurationResponse getConfiguration(String webSpaceName, Str result.setNetFrameworkVersion(netFrameworkVersionInstance); } - NodeList elements20 = siteConfigElement.getElementsByTagName("NumberOfWorkers"); - Element numberOfWorkersElement = elements20.getLength() > 0 ? ((Element)elements20.item(0)) : null; - if (numberOfWorkersElement != null) + NodeList elements23 = siteConfigElement.getElementsByTagName("NumberOfWorkers"); + Element numberOfWorkersElement = elements23.getLength() > 0 ? ((Element)elements23.item(0)) : null; + if (numberOfWorkersElement != null && (numberOfWorkersElement.getTextContent() != null && numberOfWorkersElement.getTextContent().isEmpty() != true) == false) { int numberOfWorkersInstance; numberOfWorkersInstance = Integer.parseInt(numberOfWorkersElement.getTextContent()); result.setNumberOfWorkers(numberOfWorkersInstance); } - NodeList elements21 = siteConfigElement.getElementsByTagName("PhpVersion"); - Element phpVersionElement = elements21.getLength() > 0 ? ((Element)elements21.item(0)) : null; + NodeList elements24 = siteConfigElement.getElementsByTagName("PhpVersion"); + Element phpVersionElement = elements24.getLength() > 0 ? ((Element)elements24.item(0)) : null; if (phpVersionElement != null) { String phpVersionInstance; @@ -1853,8 +2074,8 @@ public WebSiteGetConfigurationResponse getConfiguration(String webSpaceName, Str result.setPhpVersion(phpVersionInstance); } - NodeList elements22 = siteConfigElement.getElementsByTagName("PublishingPassword"); - Element publishingPasswordElement = elements22.getLength() > 0 ? ((Element)elements22.item(0)) : null; + NodeList elements25 = siteConfigElement.getElementsByTagName("PublishingPassword"); + Element publishingPasswordElement = elements25.getLength() > 0 ? ((Element)elements25.item(0)) : null; if (publishingPasswordElement != null) { String publishingPasswordInstance; @@ -1862,38 +2083,74 @@ public WebSiteGetConfigurationResponse getConfiguration(String webSpaceName, Str result.setPublishingPassword(publishingPasswordInstance); } - NodeList elements23 = siteConfigElement.getElementsByTagName("PublishingUserName"); - Element publishingUserNameElement = elements23.getLength() > 0 ? ((Element)elements23.item(0)) : null; - if (publishingUserNameElement != null) + NodeList elements26 = siteConfigElement.getElementsByTagName("PublishingUsername"); + Element publishingUsernameElement = elements26.getLength() > 0 ? ((Element)elements26.item(0)) : null; + if (publishingUsernameElement != null) + { + String publishingUsernameInstance; + publishingUsernameInstance = publishingUsernameElement.getTextContent(); + result.setPublishingUserName(publishingUsernameInstance); + } + + NodeList elements27 = siteConfigElement.getElementsByTagName("RemoteDebuggingEnabled"); + Element remoteDebuggingEnabledElement = elements27.getLength() > 0 ? ((Element)elements27.item(0)) : null; + if (remoteDebuggingEnabledElement != null && (remoteDebuggingEnabledElement.getTextContent() != null && remoteDebuggingEnabledElement.getTextContent().isEmpty() != true) == false) { - String publishingUserNameInstance; - publishingUserNameInstance = publishingUserNameElement.getTextContent(); - result.setPublishingUserName(publishingUserNameInstance); + boolean remoteDebuggingEnabledInstance; + remoteDebuggingEnabledInstance = Boolean.parseBoolean(remoteDebuggingEnabledElement.getTextContent()); + result.setRemoteDebuggingEnabled(remoteDebuggingEnabledInstance); + } + + NodeList elements28 = siteConfigElement.getElementsByTagName("RemoteDebuggingVersion"); + Element remoteDebuggingVersionElement = elements28.getLength() > 0 ? ((Element)elements28.item(0)) : null; + if (remoteDebuggingVersionElement != null) + { + boolean isNil = false; + String nilAttribute = remoteDebuggingVersionElement.getAttributeNS("http://www.w3.org/2001/XMLSchema-instance", "nil"); + if (nilAttribute != null) + { + isNil = nilAttribute == "true"; + } + if (isNil == false) + { + RemoteDebuggingVersion remoteDebuggingVersionInstance; + remoteDebuggingVersionInstance = RemoteDebuggingVersion.valueOf(remoteDebuggingVersionElement.getTextContent()); + result.setRemoteDebuggingVersion(remoteDebuggingVersionInstance); + } } - NodeList elements24 = siteConfigElement.getElementsByTagName("RequestTracingEnabled"); - Element requestTracingEnabledElement = elements24.getLength() > 0 ? ((Element)elements24.item(0)) : null; - if (requestTracingEnabledElement != null) + NodeList elements29 = siteConfigElement.getElementsByTagName("RequestTracingEnabled"); + Element requestTracingEnabledElement = elements29.getLength() > 0 ? ((Element)elements29.item(0)) : null; + if (requestTracingEnabledElement != null && (requestTracingEnabledElement.getTextContent() != null && requestTracingEnabledElement.getTextContent().isEmpty() != true) == false) { boolean requestTracingEnabledInstance; requestTracingEnabledInstance = Boolean.parseBoolean(requestTracingEnabledElement.getTextContent()); result.setRequestTracingEnabled(requestTracingEnabledInstance); } - NodeList elements25 = siteConfigElement.getElementsByTagName("RequestTracingExpirationTime"); - Element requestTracingExpirationTimeElement = elements25.getLength() > 0 ? ((Element)elements25.item(0)) : null; + NodeList elements30 = siteConfigElement.getElementsByTagName("RequestTracingExpirationTime"); + Element requestTracingExpirationTimeElement = elements30.getLength() > 0 ? ((Element)elements30.item(0)) : null; if (requestTracingExpirationTimeElement != null && (requestTracingExpirationTimeElement.getTextContent() != null && requestTracingExpirationTimeElement.getTextContent().isEmpty() != true) == false) { - Calendar requestTracingExpirationTimeInstance; - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy"); - Calendar calendar = Calendar.getInstance(); - calendar.setTime(simpleDateFormat.parse(requestTracingExpirationTimeElement.getTextContent())); - requestTracingExpirationTimeInstance = calendar; - result.setRequestTracingExpirationTime(requestTracingExpirationTimeInstance); + boolean isNil2 = false; + String nilAttribute2 = requestTracingExpirationTimeElement.getAttributeNS("http://www.w3.org/2001/XMLSchema-instance", "nil"); + if (nilAttribute2 != null) + { + isNil2 = nilAttribute2 == "true"; + } + if (isNil2 == false) + { + Calendar requestTracingExpirationTimeInstance; + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy"); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(simpleDateFormat.parse(requestTracingExpirationTimeElement.getTextContent())); + requestTracingExpirationTimeInstance = calendar; + result.setRequestTracingExpirationTime(requestTracingExpirationTimeInstance); + } } - NodeList elements26 = siteConfigElement.getElementsByTagName("ScmType"); - Element scmTypeElement = elements26.getLength() > 0 ? ((Element)elements26.item(0)) : null; + NodeList elements31 = siteConfigElement.getElementsByTagName("ScmType"); + Element scmTypeElement = elements31.getLength() > 0 ? ((Element)elements31.item(0)) : null; if (scmTypeElement != null) { String scmTypeInstance; @@ -1901,50 +2158,23 @@ public WebSiteGetConfigurationResponse getConfiguration(String webSpaceName, Str result.setScmType(scmTypeInstance); } - NodeList elements27 = siteConfigElement.getElementsByTagName("Use32BitWorkerProcess"); - Element use32BitWorkerProcessElement = elements27.getLength() > 0 ? ((Element)elements27.item(0)) : null; - if (use32BitWorkerProcessElement != null) + NodeList elements32 = siteConfigElement.getElementsByTagName("Use32BitWorkerProcess"); + Element use32BitWorkerProcessElement = elements32.getLength() > 0 ? ((Element)elements32.item(0)) : null; + if (use32BitWorkerProcessElement != null && (use32BitWorkerProcessElement.getTextContent() != null && use32BitWorkerProcessElement.getTextContent().isEmpty() != true) == false) { boolean use32BitWorkerProcessInstance; use32BitWorkerProcessInstance = Boolean.parseBoolean(use32BitWorkerProcessElement.getTextContent()); result.setUse32BitWorkerProcess(use32BitWorkerProcessInstance); } - NodeList elements28 = siteConfigElement.getElementsByTagName("WebSocketsEnabled"); - Element webSocketsEnabledElement = elements28.getLength() > 0 ? ((Element)elements28.item(0)) : null; - if (webSocketsEnabledElement != null) + NodeList elements33 = siteConfigElement.getElementsByTagName("WebSocketsEnabled"); + Element webSocketsEnabledElement = elements33.getLength() > 0 ? ((Element)elements33.item(0)) : null; + if (webSocketsEnabledElement != null && (webSocketsEnabledElement.getTextContent() != null && webSocketsEnabledElement.getTextContent().isEmpty() != true) == false) { boolean webSocketsEnabledInstance; webSocketsEnabledInstance = Boolean.parseBoolean(webSocketsEnabledElement.getTextContent()); result.setWebSocketsEnabled(webSocketsEnabledInstance); } - - NodeList elements29 = siteConfigElement.getElementsByTagName("RemoteDebuggingEnabled"); - Element remoteDebuggingEnabledElement = elements29.getLength() > 0 ? ((Element)elements29.item(0)) : null; - if (remoteDebuggingEnabledElement != null) - { - boolean remoteDebuggingEnabledInstance; - remoteDebuggingEnabledInstance = Boolean.parseBoolean(remoteDebuggingEnabledElement.getTextContent()); - result.setRemoteDebuggingEnabled(remoteDebuggingEnabledInstance); - } - - NodeList elements30 = siteConfigElement.getElementsByTagName("RemoteDebuggingVersion"); - Element remoteDebuggingVersionElement = elements30.getLength() > 0 ? ((Element)elements30.item(0)) : null; - if (remoteDebuggingVersionElement != null) - { - String remoteDebuggingVersionInstance; - remoteDebuggingVersionInstance = remoteDebuggingVersionElement.getTextContent(); - result.setRemoteDebuggingVersion(remoteDebuggingVersionInstance); - } - - NodeList elements31 = siteConfigElement.getElementsByTagName("ManagedPipelineMode"); - Element managedPipelineModeElement = elements31.getLength() > 0 ? ((Element)elements31.item(0)) : null; - if (managedPipelineModeElement != null) - { - ManagedPipelineMode managedPipelineModeInstance; - managedPipelineModeInstance = ManagedPipelineMode.valueOf(managedPipelineModeElement.getTextContent()); - result.setManagedPipelineMode(managedPipelineModeInstance); - } } result.setStatusCode(statusCode); @@ -1953,6 +2183,10 @@ public WebSiteGetConfigurationResponse getConfiguration(String webSpaceName, Str result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1970,11 +2204,12 @@ public WebSiteGetConfigurationResponse getConfiguration(String webSpaceName, Str @Override public Future getHistoricalUsageMetricsAsync(final String webSpaceName, final String webSiteName, final WebSiteGetHistoricalUsageMetricsParameters parameters) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public WebSiteGetHistoricalUsageMetricsResponse call() throws Exception - { - return getHistoricalUsageMetrics(webSpaceName, webSiteName, parameters); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public WebSiteGetHistoricalUsageMetricsResponse call() throws Exception + { + return getHistoricalUsageMetrics(webSpaceName, webSiteName, parameters); + } }); } @@ -2007,8 +2242,23 @@ public WebSiteGetHistoricalUsageMetricsResponse getHistoricalUsageMetrics(String } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + tracingParameters.put("webSiteName", webSiteName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "getHistoricalUsageMetricsAsync", tracingParameters); + } // Construct URL + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mmZ"); + simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); + SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mmZ"); + simpleDateFormat2.setTimeZone(TimeZone.getTimeZone("UTC")); String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/sites/" + webSiteName + "/metrics?"; if (parameters.getMetricNames() != null && parameters.getMetricNames().size() > 0) { @@ -2016,11 +2266,11 @@ public WebSiteGetHistoricalUsageMetricsResponse getHistoricalUsageMetrics(String } if (parameters.getStartTime() != null) { - url = url + "&StartTime=" + URLEncoder.encode(parameters.getStartTime().toString()); + url = url + "&StartTime=" + URLEncoder.encode(simpleDateFormat.format(parameters.getStartTime().getTime())); } if (parameters.getEndTime() != null) { - url = url + "&EndTime=" + URLEncoder.encode(parameters.getEndTime().toString()); + url = url + "&EndTime=" + URLEncoder.encode(simpleDateFormat2.format(parameters.getEndTime().getTime())); } // Create HTTP transport objects @@ -2031,11 +2281,23 @@ public WebSiteGetHistoricalUsageMetricsResponse getHistoricalUsageMetrics(String // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2090,9 +2352,9 @@ public WebSiteGetHistoricalUsageMetricsResponse getHistoricalUsageMetrics(String if (endTimeElement != null) { Calendar endTimeInstance; - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy"); + SimpleDateFormat simpleDateFormat3 = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy"); Calendar calendar = Calendar.getInstance(); - calendar.setTime(simpleDateFormat.parse(endTimeElement.getTextContent())); + calendar.setTime(simpleDateFormat3.parse(endTimeElement.getTextContent())); endTimeInstance = calendar; dataInstance.setEndTime(endTimeInstance); } @@ -2120,9 +2382,9 @@ public WebSiteGetHistoricalUsageMetricsResponse getHistoricalUsageMetrics(String if (startTimeElement != null) { Calendar startTimeInstance; - SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy"); + SimpleDateFormat simpleDateFormat4 = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy"); Calendar calendar2 = Calendar.getInstance(); - calendar2.setTime(simpleDateFormat2.parse(startTimeElement.getTextContent())); + calendar2.setTime(simpleDateFormat4.parse(startTimeElement.getTextContent())); startTimeInstance = calendar2; dataInstance.setStartTime(startTimeInstance); } @@ -2205,9 +2467,9 @@ public WebSiteGetHistoricalUsageMetricsResponse getHistoricalUsageMetrics(String if (timeCreatedElement != null) { Calendar timeCreatedInstance; - SimpleDateFormat simpleDateFormat3 = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy"); + SimpleDateFormat simpleDateFormat5 = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy"); Calendar calendar3 = Calendar.getInstance(); - calendar3.setTime(simpleDateFormat3.parse(timeCreatedElement.getTextContent())); + calendar3.setTime(simpleDateFormat5.parse(timeCreatedElement.getTextContent())); timeCreatedInstance = calendar3; metricSampleInstance.setTimeCreated(timeCreatedInstance); } @@ -2242,6 +2504,10 @@ public WebSiteGetHistoricalUsageMetricsResponse getHistoricalUsageMetrics(String result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -2258,11 +2524,12 @@ public WebSiteGetHistoricalUsageMetricsResponse getHistoricalUsageMetrics(String @Override public Future getPublishProfileAsync(final String webSpaceName, final String webSiteName) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public WebSiteGetPublishProfileResponse call() throws Exception - { - return getPublishProfile(webSpaceName, webSiteName); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public WebSiteGetPublishProfileResponse call() throws Exception + { + return getPublishProfile(webSpaceName, webSiteName); + } }); } @@ -2290,6 +2557,16 @@ public WebSiteGetPublishProfileResponse getPublishProfile(String webSpaceName, S } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + tracingParameters.put("webSiteName", webSiteName); + CloudTracing.enter(invocationId, this, "getPublishProfileAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/sites/" + webSiteName + "/publishxml"; @@ -2302,11 +2579,23 @@ public WebSiteGetPublishProfileResponse getPublishProfile(String webSpaceName, S // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2448,6 +2737,10 @@ public WebSiteGetPublishProfileResponse getPublishProfile(String webSpaceName, S result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -2467,11 +2760,12 @@ public WebSiteGetPublishProfileResponse getPublishProfile(String webSpaceName, S @Override public Future getRepositoryAsync(final String webSpaceName, final String webSiteName) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public WebSiteGetRepositoryResponse call() throws Exception - { - return getRepository(webSpaceName, webSiteName); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public WebSiteGetRepositoryResponse call() throws Exception + { + return getRepository(webSpaceName, webSiteName); + } }); } @@ -2502,6 +2796,16 @@ public WebSiteGetRepositoryResponse getRepository(String webSpaceName, String we } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + tracingParameters.put("webSiteName", webSiteName); + CloudTracing.enter(invocationId, this, "getRepositoryAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/sites/" + webSiteName + "/repository"; @@ -2514,11 +2818,23 @@ public WebSiteGetRepositoryResponse getRepository(String webSpaceName, String we // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2544,6 +2860,10 @@ public WebSiteGetRepositoryResponse getRepository(String webSpaceName, String we result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -2563,11 +2883,12 @@ public WebSiteGetRepositoryResponse getRepository(String webSpaceName, String we @Override public Future getUsageMetricsAsync(final String webSpaceName, final String webSiteName) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public WebSiteGetUsageMetricsResponse call() throws Exception - { - return getUsageMetrics(webSpaceName, webSiteName); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public WebSiteGetUsageMetricsResponse call() throws Exception + { + return getUsageMetrics(webSpaceName, webSiteName); + } }); } @@ -2598,6 +2919,16 @@ public WebSiteGetUsageMetricsResponse getUsageMetrics(String webSpaceName, Strin } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + tracingParameters.put("webSiteName", webSiteName); + CloudTracing.enter(invocationId, this, "getUsageMetricsAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/sites/" + webSiteName + "/usages"; @@ -2610,11 +2941,23 @@ public WebSiteGetUsageMetricsResponse getUsageMetrics(String webSpaceName, Strin // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2732,6 +3075,10 @@ public WebSiteGetUsageMetricsResponse getUsageMetrics(String webSpaceName, Strin result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -2748,11 +3095,12 @@ public WebSiteGetUsageMetricsResponse getUsageMetrics(String webSpaceName, Strin @Override public Future restartAsync(final String webSpaceName, final String webSiteName) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public OperationResponse call() throws Exception - { - return restart(webSpaceName, webSiteName); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public OperationResponse call() throws Exception + { + return restart(webSpaceName, webSiteName); + } }); } @@ -2780,6 +3128,16 @@ public OperationResponse restart(String webSpaceName, String webSiteName) throws } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + tracingParameters.put("webSiteName", webSiteName); + CloudTracing.enter(invocationId, this, "restartAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/sites/" + webSiteName + "/restart"; @@ -2793,11 +3151,23 @@ public OperationResponse restart(String webSpaceName, String webSiteName) throws // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2810,6 +3180,10 @@ public OperationResponse restart(String webSpaceName, String webSiteName) throws result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -2827,11 +3201,12 @@ public OperationResponse restart(String webSpaceName, String webSiteName) throws @Override public Future updateAsync(final String webSpaceName, final String webSiteName, final WebSiteUpdateParameters parameters) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public WebSiteUpdateResponse call() throws Exception - { - return update(webSpaceName, webSiteName, parameters); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public WebSiteUpdateResponse call() throws Exception + { + return update(webSpaceName, webSiteName, parameters); + } }); } @@ -2864,6 +3239,17 @@ public WebSiteUpdateResponse update(String webSpaceName, String webSiteName, Web } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + tracingParameters.put("webSiteName", webSiteName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/sites/" + webSiteName; @@ -3035,11 +3421,23 @@ public WebSiteUpdateResponse update(String webSpaceName, String webSiteName, Web // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -3491,6 +3889,10 @@ public WebSiteUpdateResponse update(String webSpaceName, String webSiteName, Web result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -3510,11 +3912,12 @@ public WebSiteUpdateResponse update(String webSpaceName, String webSiteName, Web @Override public Future updateConfigurationAsync(final String webSpaceName, final String webSiteName, final WebSiteUpdateConfigurationParameters parameters) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public OperationResponse call() throws Exception - { - return updateConfiguration(webSpaceName, webSiteName, parameters); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public OperationResponse call() throws Exception + { + return updateConfiguration(webSpaceName, webSiteName, parameters); + } }); } @@ -3549,6 +3952,17 @@ public OperationResponse updateConfiguration(String webSpaceName, String webSite } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + tracingParameters.put("webSiteName", webSiteName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateConfigurationAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/sites/" + webSiteName + "/config"; @@ -3572,7 +3986,7 @@ public OperationResponse updateConfiguration(String webSpaceName, String webSite if (parameters.getAppSettings() != null) { Element appSettingsDictionaryElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "AppSettings"); - for (Entry entry : parameters.getAppSettings().entrySet()) + for (Map.Entry entry : parameters.getAppSettings().entrySet()) { String appSettingsKey = entry.getKey(); String appSettingsValue = entry.getValue(); @@ -3641,6 +4055,13 @@ public OperationResponse updateConfiguration(String webSpaceName, String webSite siteConfigElement.appendChild(detailedErrorLoggingEnabledElement); } + if (parameters.getDocumentRoot() != null) + { + Element documentRootElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "DocumentRoot"); + documentRootElement.appendChild(requestDoc.createTextNode(parameters.getDocumentRoot())); + siteConfigElement.appendChild(documentRootElement); + } + if (parameters.getHandlerMappings() != null) { Element handlerMappingsSequenceElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "HandlerMappings"); @@ -3680,10 +4101,24 @@ public OperationResponse updateConfiguration(String webSpaceName, String webSite siteConfigElement.appendChild(httpLoggingEnabledElement); } + if (parameters.getLogsDirectorySizeLimit() != null) + { + Element logsDirectorySizeLimitElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "LogsDirectorySizeLimit"); + logsDirectorySizeLimitElement.appendChild(requestDoc.createTextNode(Integer.toString(parameters.getLogsDirectorySizeLimit()))); + siteConfigElement.appendChild(logsDirectorySizeLimitElement); + } + + if (parameters.getManagedPipelineMode() != null) + { + Element managedPipelineModeElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "ManagedPipelineMode"); + managedPipelineModeElement.appendChild(requestDoc.createTextNode(parameters.getManagedPipelineMode().toString())); + siteConfigElement.appendChild(managedPipelineModeElement); + } + if (parameters.getMetadata() != null) { Element metadataDictionaryElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "Metadata"); - for (Entry entry2 : parameters.getMetadata().entrySet()) + for (Map.Entry entry2 : parameters.getMetadata().entrySet()) { String metadataKey = entry2.getKey(); String metadataValue = entry2.getValue(); @@ -3736,6 +4171,17 @@ public OperationResponse updateConfiguration(String webSpaceName, String webSite siteConfigElement.appendChild(publishingUsernameElement); } + if (parameters.getRemoteDebuggingEnabled() != null) + { + Element remoteDebuggingEnabledElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "RemoteDebuggingEnabled"); + remoteDebuggingEnabledElement.appendChild(requestDoc.createTextNode(Boolean.toString(parameters.getRemoteDebuggingEnabled()).toLowerCase())); + siteConfigElement.appendChild(remoteDebuggingEnabledElement); + } + + Element remoteDebuggingVersionElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "RemoteDebuggingVersion"); + remoteDebuggingVersionElement.appendChild(requestDoc.createTextNode(parameters.getRemoteDebuggingVersion().toString())); + siteConfigElement.appendChild(remoteDebuggingVersionElement); + if (parameters.getRequestTracingEnabled() != null) { Element requestTracingEnabledElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "RequestTracingEnabled"); @@ -3746,7 +4192,9 @@ public OperationResponse updateConfiguration(String webSpaceName, String webSite if (parameters.getRequestTracingExpirationTime() != null) { Element requestTracingExpirationTimeElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "RequestTracingExpirationTime"); - requestTracingExpirationTimeElement.appendChild(requestDoc.createTextNode(parameters.getRequestTracingExpirationTime().toString())); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mmZ"); + simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); + requestTracingExpirationTimeElement.appendChild(requestDoc.createTextNode(simpleDateFormat.format(parameters.getRequestTracingExpirationTime().getTime()))); siteConfigElement.appendChild(requestTracingExpirationTimeElement); } @@ -3771,27 +4219,6 @@ public OperationResponse updateConfiguration(String webSpaceName, String webSite siteConfigElement.appendChild(webSocketsEnabledElement); } - if (parameters.getRemoteDebuggingEnabled() != null) - { - Element remoteDebuggingEnabledElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "RemoteDebuggingEnabled"); - remoteDebuggingEnabledElement.appendChild(requestDoc.createTextNode(Boolean.toString(parameters.getRemoteDebuggingEnabled()).toLowerCase())); - siteConfigElement.appendChild(remoteDebuggingEnabledElement); - } - - if (parameters.getRemoteDebuggingVersion() != null) - { - Element remoteDebuggingVersionElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "RemoteDebuggingVersion"); - remoteDebuggingVersionElement.appendChild(requestDoc.createTextNode(parameters.getRemoteDebuggingVersion())); - siteConfigElement.appendChild(remoteDebuggingVersionElement); - } - - if (parameters.getManagedPipelineMode() != null) - { - Element managedPipelineModeElement = requestDoc.createElementNS("http://schemas.microsoft.com/windowsazure", "ManagedPipelineMode"); - managedPipelineModeElement.appendChild(requestDoc.createTextNode(parameters.getManagedPipelineMode().toString())); - siteConfigElement.appendChild(managedPipelineModeElement); - } - DOMSource domSource = new DOMSource(requestDoc); StringWriter stringWriter = new StringWriter(); StreamResult streamResult = new StreamResult(stringWriter); @@ -3805,11 +4232,23 @@ public OperationResponse updateConfiguration(String webSpaceName, String webSite // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -3822,6 +4261,10 @@ public OperationResponse updateConfiguration(String webSpaceName, String webSite result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSpaceOperations.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSpaceOperations.java index a6cef547ebc69..f43367905edf4 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSpaceOperations.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSpaceOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,6 +23,7 @@ package com.microsoft.windowsazure.management.websites; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.websites.models.WebSiteListParameters; import com.microsoft.windowsazure.management.websites.models.WebSpacesCreatePublishingUserParameters; import com.microsoft.windowsazure.management.websites.models.WebSpacesCreatePublishingUserResponse; @@ -30,7 +33,6 @@ import com.microsoft.windowsazure.management.websites.models.WebSpacesListPublishingUsersResponse; import com.microsoft.windowsazure.management.websites.models.WebSpacesListResponse; import com.microsoft.windowsazure.management.websites.models.WebSpacesListWebSitesResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; @@ -159,7 +161,7 @@ public interface WebSpaceOperations * more information) * * @param webSpaceName The name of the web space. - * @param parameters Additional parameters + * @param parameters Additional parameters. * @return The List Web Sites operation response. */ WebSpacesListWebSitesResponse listWebSites(String webSpaceName, WebSiteListParameters parameters) throws IOException, ServiceException, ParserConfigurationException, SAXException, ParseException, URISyntaxException; @@ -171,7 +173,7 @@ public interface WebSpaceOperations * more information) * * @param webSpaceName The name of the web space. - * @param parameters Additional parameters + * @param parameters Additional parameters. * @return The List Web Sites operation response. */ Future listWebSitesAsync(String webSpaceName, WebSiteListParameters parameters); diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSpaceOperationsImpl.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSpaceOperationsImpl.java index af12fcf0286d6..b3e406853e77d 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSpaceOperationsImpl.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/WebSpaceOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,6 +23,9 @@ package com.microsoft.windowsazure.management.websites; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.utils.CommaStringBuilder; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.websites.models.WebSite; import com.microsoft.windowsazure.management.websites.models.WebSiteComputeMode; import com.microsoft.windowsazure.management.websites.models.WebSiteListParameters; @@ -40,9 +45,7 @@ import com.microsoft.windowsazure.management.websites.models.WebSpacesListPublishingUsersResponse; import com.microsoft.windowsazure.management.websites.models.WebSpacesListResponse; import com.microsoft.windowsazure.management.websites.models.WebSpacesListWebSitesResponse; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.utils.CommaStringBuilder; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -54,6 +57,7 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.Future; import javax.xml.parsers.DocumentBuilder; @@ -110,11 +114,12 @@ public class WebSpaceOperationsImpl implements ServiceOperations createPublishingUserAsync(final String username, final String password, final WebSpacesCreatePublishingUserParameters parameters) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public WebSpacesCreatePublishingUserResponse call() throws Exception - { - return createPublishingUser(username, password, parameters); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public WebSpacesCreatePublishingUserResponse call() throws Exception + { + return createPublishingUser(username, password, parameters); + } }); } @@ -152,6 +157,17 @@ public WebSpacesCreatePublishingUserResponse createPublishingUser(String usernam } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("username", username); + tracingParameters.put("password", password); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createPublishingUserAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces?properties=publishingCredentials"; @@ -203,11 +219,23 @@ public WebSpacesCreatePublishingUserResponse createPublishingUser(String usernam // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 201) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -258,6 +286,10 @@ public WebSpacesCreatePublishingUserResponse createPublishingUser(String usernam result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -273,11 +305,12 @@ public WebSpacesCreatePublishingUserResponse createPublishingUser(String usernam @Override public Future getAsync(final String webSpaceName) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public WebSpacesGetResponse call() throws Exception - { - return get(webSpaceName); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public WebSpacesGetResponse call() throws Exception + { + return get(webSpaceName); + } }); } @@ -300,6 +333,15 @@ public WebSpacesGetResponse get(String webSpaceName) throws IOException, Service } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName; @@ -312,11 +354,23 @@ public WebSpacesGetResponse get(String webSpaceName) throws IOException, Service // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -448,6 +502,10 @@ public WebSpacesGetResponse get(String webSpaceName) throws IOException, Service result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -459,11 +517,12 @@ public WebSpacesGetResponse get(String webSpaceName) throws IOException, Service @Override public Future getDnsSuffixAsync() { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public WebSpacesGetDnsSuffixResponse call() throws Exception - { - return getDnsSuffix(); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public WebSpacesGetDnsSuffixResponse call() throws Exception + { + return getDnsSuffix(); + } }); } @@ -478,6 +537,14 @@ public WebSpacesGetDnsSuffixResponse getDnsSuffix() throws IOException, ServiceE // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "getDnsSuffixAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces?properties=dnssuffix"; @@ -490,11 +557,23 @@ public WebSpacesGetDnsSuffixResponse getDnsSuffix() throws IOException, ServiceE // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -520,6 +599,10 @@ public WebSpacesGetDnsSuffixResponse getDnsSuffix() throws IOException, ServiceE result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -534,11 +617,12 @@ public WebSpacesGetDnsSuffixResponse getDnsSuffix() throws IOException, ServiceE @Override public Future listAsync() { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public WebSpacesListResponse call() throws Exception - { - return list(); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public WebSpacesListResponse call() throws Exception + { + return list(); + } }); } @@ -556,6 +640,14 @@ public WebSpacesListResponse list() throws IOException, ServiceException, Parser // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces"; @@ -568,11 +660,23 @@ public WebSpacesListResponse list() throws IOException, ServiceException, Parser // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -711,6 +815,10 @@ public WebSpacesListResponse list() throws IOException, ServiceException, Parser result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -722,11 +830,12 @@ public WebSpacesListResponse list() throws IOException, ServiceException, Parser @Override public Future listGeoRegionsAsync() { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public WebSpacesListGeoRegionsResponse call() throws Exception - { - return listGeoRegions(); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public WebSpacesListGeoRegionsResponse call() throws Exception + { + return listGeoRegions(); + } }); } @@ -741,6 +850,14 @@ public WebSpacesListGeoRegionsResponse listGeoRegions() throws IOException, Serv // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listGeoRegionsAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces?properties=georegions"; @@ -753,11 +870,23 @@ public WebSpacesListGeoRegionsResponse listGeoRegions() throws IOException, Serv // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -824,6 +953,10 @@ public WebSpacesListGeoRegionsResponse listGeoRegions() throws IOException, Serv result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -835,11 +968,12 @@ public WebSpacesListGeoRegionsResponse listGeoRegions() throws IOException, Serv @Override public Future listPublishingUsersAsync() { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public WebSpacesListPublishingUsersResponse call() throws Exception - { - return listPublishingUsers(); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public WebSpacesListPublishingUsersResponse call() throws Exception + { + return listPublishingUsers(); + } }); } @@ -854,6 +988,14 @@ public WebSpacesListPublishingUsersResponse listPublishingUsers() throws IOExcep // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listPublishingUsersAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces?properties=publishingUsers"; @@ -866,11 +1008,23 @@ public WebSpacesListPublishingUsersResponse listPublishingUsers() throws IOExcep // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -905,6 +1059,10 @@ public WebSpacesListPublishingUsersResponse listPublishingUsers() throws IOExcep result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -915,17 +1073,18 @@ public WebSpacesListPublishingUsersResponse listPublishingUsers() throws IOExcep * more information) * * @param webSpaceName The name of the web space. - * @param parameters Additional parameters + * @param parameters Additional parameters. * @return The List Web Sites operation response. */ @Override public Future listWebSitesAsync(final String webSpaceName, final WebSiteListParameters parameters) { - return this.getClient().getExecutorService().submit(new Callable() { @Override - public WebSpacesListWebSitesResponse call() throws Exception - { - return listWebSites(webSpaceName, parameters); - } + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public WebSpacesListWebSitesResponse call() throws Exception + { + return listWebSites(webSpaceName, parameters); + } }); } @@ -936,7 +1095,7 @@ public WebSpacesListWebSitesResponse call() throws Exception * more information) * * @param webSpaceName The name of the web space. - * @param parameters Additional parameters + * @param parameters Additional parameters. * @return The List Web Sites operation response. */ @Override @@ -949,6 +1108,16 @@ public WebSpacesListWebSitesResponse listWebSites(String webSpaceName, WebSiteLi } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("webSpaceName", webSpaceName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "listWebSitesAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services/WebSpaces/" + webSpaceName + "/sites?"; @@ -965,11 +1134,23 @@ public WebSpacesListWebSitesResponse listWebSites(String webSpaceName, WebSiteLi // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1425,6 +1606,10 @@ public WebSpacesListWebSitesResponse listWebSites(String webSpaceName, WebSiteLi result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/GeoRegionNames.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/GeoRegionNames.java index 48f9a8dcb82b1..e29408a461113 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/GeoRegionNames.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/GeoRegionNames.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/HistoricalUsageMetricNames.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/HistoricalUsageMetricNames.java index 9899f19ff971b..5064b6e5609b4 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/HistoricalUsageMetricNames.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/HistoricalUsageMetricNames.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ManagedPipelineMode.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ManagedPipelineMode.java index fe3f9d0651d36..a275b515f0ce7 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ManagedPipelineMode.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ManagedPipelineMode.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/RemoteDebuggingVersion.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/RemoteDebuggingVersion.java new file mode 100644 index 0000000000000..d0fbcc7f754ab --- /dev/null +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/RemoteDebuggingVersion.java @@ -0,0 +1,40 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.management.websites.models; + +/** +* The remote debugging version. +*/ +public enum RemoteDebuggingVersion +{ + /** + * Visual Studio 2012. + */ + VS2012, + + /** + * Visual Studio 2013. + */ + VS2013, +} diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmCreateParameters.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmCreateParameters.java index 022d49f7b7f2e..28649164868d6 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmCreateParameters.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmCreateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,6 @@ package com.microsoft.windowsazure.management.websites.models; - /** * Parameters supplied to the Create Server Farm operation. */ diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmCreateResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmCreateResponse.java index c987f189ff8cb..4078528aab746 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmCreateResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmCreateResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Create Server Farm operation response. diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmGetResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmGetResponse.java index ec3e7d2a27b4c..af906fef7366e 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmGetResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Get Server Farm operation response. diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmListResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmListResponse.java index c82aa56d21a0a..7fd5eb41e12c1 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmListResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmStatus.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmStatus.java index 4630c95beb587..2883d6a4bd2a5 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmStatus.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmStatus.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmUpdateParameters.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmUpdateParameters.java index 84bd2e0b0ca55..a4ce485bb73b9 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmUpdateParameters.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmUpdateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,6 @@ package com.microsoft.windowsazure.management.websites.models; - /** * Parameters supplied to the Update Server Farm operation. */ diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmUpdateResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmUpdateResponse.java index 75023bef13cc7..19d38f02224e5 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmUpdateResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmUpdateResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Update Server Farm operation response. diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmWorkerSize.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmWorkerSize.java index 61824ed99e70d..282b8904d9124 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmWorkerSize.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/ServerFarmWorkerSize.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSite.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSite.java index 34a6f6f7b2a61..506c948a55f3d 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSite.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSite.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteComputeMode.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteComputeMode.java index 4c0e4cd3a4396..8fb43c57b13ff 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteComputeMode.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteComputeMode.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteCreateParameters.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteCreateParameters.java index e93c0d7c15bb8..ec08a613df33b 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteCreateParameters.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteCreateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -125,12 +127,12 @@ public class WebSiteCreateParameters private String webSpaceName; /** - * The name of the webspace + * The name of the webspace. */ public String getWebSpaceName() { return this.webSpaceName; } /** - * The name of the webspace + * The name of the webspace. */ public void setWebSpaceName(String webSpaceName) { this.webSpaceName = webSpaceName; } diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteCreateResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteCreateResponse.java index a2cba7c56470b..010925eb4080b 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteCreateResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteCreateResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Create Web Space operation response. diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteDeleteRepositoryResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteDeleteRepositoryResponse.java index f94d04421441a..cd129fe92d1be 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteDeleteRepositoryResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteDeleteRepositoryResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; /** diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetConfigurationResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetConfigurationResponse.java index 41a234ffc012e..c33f55e9c73dc 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetConfigurationResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetConfigurationResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Calendar; import java.util.HashMap; @@ -77,17 +79,29 @@ public class WebSiteGetConfigurationResponse extends OperationResponse */ public void setDefaultDocuments(ArrayList defaultDocuments) { this.defaultDocuments = defaultDocuments; } - private boolean detailedErrorLoggingEnabled; + private Boolean detailedErrorLoggingEnabled; /** * True if detailed error logging is enabled; otherwise, false. */ - public boolean getDetailedErrorLoggingEnabled() { return this.detailedErrorLoggingEnabled; } + public Boolean getDetailedErrorLoggingEnabled() { return this.detailedErrorLoggingEnabled; } /** * True if detailed error logging is enabled; otherwise, false. */ - public void setDetailedErrorLoggingEnabled(boolean detailedErrorLoggingEnabled) { this.detailedErrorLoggingEnabled = detailedErrorLoggingEnabled; } + public void setDetailedErrorLoggingEnabled(Boolean detailedErrorLoggingEnabled) { this.detailedErrorLoggingEnabled = detailedErrorLoggingEnabled; } + + private String documentRoot; + + /** + * The document root. + */ + public String getDocumentRoot() { return this.documentRoot; } + + /** + * The document root. + */ + public void setDocumentRoot(String documentRoot) { this.documentRoot = documentRoot; } private ArrayList handlerMappings; @@ -103,17 +117,29 @@ public class WebSiteGetConfigurationResponse extends OperationResponse */ public void setHandlerMappings(ArrayList handlerMappings) { this.handlerMappings = handlerMappings; } - private boolean httpLoggingEnabled; + private Boolean httpLoggingEnabled; /** * True if HTTP error logging is enabled; otherwise, false. */ - public boolean getHttpLoggingEnabled() { return this.httpLoggingEnabled; } + public Boolean getHttpLoggingEnabled() { return this.httpLoggingEnabled; } /** * True if HTTP error logging is enabled; otherwise, false. */ - public void setHttpLoggingEnabled(boolean httpLoggingEnabled) { this.httpLoggingEnabled = httpLoggingEnabled; } + public void setHttpLoggingEnabled(Boolean httpLoggingEnabled) { this.httpLoggingEnabled = httpLoggingEnabled; } + + private Integer logsDirectorySizeLimit; + + /** + * The limit of the logs directory. + */ + public Integer getLogsDirectorySizeLimit() { return this.logsDirectorySizeLimit; } + + /** + * The limit of the logs directory. + */ + public void setLogsDirectorySizeLimit(Integer logsDirectorySizeLimit) { this.logsDirectorySizeLimit = logsDirectorySizeLimit; } private ManagedPipelineMode managedPipelineMode; @@ -151,7 +177,7 @@ public class WebSiteGetConfigurationResponse extends OperationResponse */ public void setNetFrameworkVersion(String netFrameworkVersion) { this.netFrameworkVersion = netFrameworkVersion; } - private int numberOfWorkers; + private Integer numberOfWorkers; /** * The number of web workers allotted to the web site. If the site mode is @@ -159,7 +185,7 @@ public class WebSiteGetConfigurationResponse extends OperationResponse * from 1 through 6. If the site mode is Standard, this value can range * from 1 through 10. */ - public int getNumberOfWorkers() { return this.numberOfWorkers; } + public Integer getNumberOfWorkers() { return this.numberOfWorkers; } /** * The number of web workers allotted to the web site. If the site mode is @@ -167,7 +193,7 @@ public class WebSiteGetConfigurationResponse extends OperationResponse * from 1 through 6. If the site mode is Standard, this value can range * from 1 through 10. */ - public void setNumberOfWorkers(int numberOfWorkers) { this.numberOfWorkers = numberOfWorkers; } + public void setNumberOfWorkers(Integer numberOfWorkers) { this.numberOfWorkers = numberOfWorkers; } private String phpVersion; @@ -209,41 +235,41 @@ public class WebSiteGetConfigurationResponse extends OperationResponse */ public void setPublishingUserName(String publishingUserName) { this.publishingUserName = publishingUserName; } - private boolean remoteDebuggingEnabled; + private Boolean remoteDebuggingEnabled; /** * True remote debugging is enabled; otherwise, false. */ - public boolean getRemoteDebuggingEnabled() { return this.remoteDebuggingEnabled; } + public Boolean getRemoteDebuggingEnabled() { return this.remoteDebuggingEnabled; } /** * True remote debugging is enabled; otherwise, false. */ - public void setRemoteDebuggingEnabled(boolean remoteDebuggingEnabled) { this.remoteDebuggingEnabled = remoteDebuggingEnabled; } + public void setRemoteDebuggingEnabled(Boolean remoteDebuggingEnabled) { this.remoteDebuggingEnabled = remoteDebuggingEnabled; } - private String remoteDebuggingVersion; + private RemoteDebuggingVersion remoteDebuggingVersion; /** * True remote debugging version. */ - public String getRemoteDebuggingVersion() { return this.remoteDebuggingVersion; } + public RemoteDebuggingVersion getRemoteDebuggingVersion() { return this.remoteDebuggingVersion; } /** * True remote debugging version. */ - public void setRemoteDebuggingVersion(String remoteDebuggingVersion) { this.remoteDebuggingVersion = remoteDebuggingVersion; } + public void setRemoteDebuggingVersion(RemoteDebuggingVersion remoteDebuggingVersion) { this.remoteDebuggingVersion = remoteDebuggingVersion; } - private boolean requestTracingEnabled; + private Boolean requestTracingEnabled; /** * True if request tracing is enabled; otherwise, false. */ - public boolean getRequestTracingEnabled() { return this.requestTracingEnabled; } + public Boolean getRequestTracingEnabled() { return this.requestTracingEnabled; } /** * True if request tracing is enabled; otherwise, false. */ - public void setRequestTracingEnabled(boolean requestTracingEnabled) { this.requestTracingEnabled = requestTracingEnabled; } + public void setRequestTracingEnabled(Boolean requestTracingEnabled) { this.requestTracingEnabled = requestTracingEnabled; } private Calendar requestTracingExpirationTime; @@ -273,29 +299,29 @@ public class WebSiteGetConfigurationResponse extends OperationResponse */ public void setScmType(String scmType) { this.scmType = scmType; } - private boolean use32BitWorkerProcess; + private Boolean use32BitWorkerProcess; /** * True if 32-bit mode is enabled; otherwise, false. */ - public boolean getUse32BitWorkerProcess() { return this.use32BitWorkerProcess; } + public Boolean getUse32BitWorkerProcess() { return this.use32BitWorkerProcess; } /** * True if 32-bit mode is enabled; otherwise, false. */ - public void setUse32BitWorkerProcess(boolean use32BitWorkerProcess) { this.use32BitWorkerProcess = use32BitWorkerProcess; } + public void setUse32BitWorkerProcess(Boolean use32BitWorkerProcess) { this.use32BitWorkerProcess = use32BitWorkerProcess; } - private boolean webSocketsEnabled; + private Boolean webSocketsEnabled; /** * True if Web Sockets are enabled; otherwise, false. */ - public boolean getWebSocketsEnabled() { return this.webSocketsEnabled; } + public Boolean getWebSocketsEnabled() { return this.webSocketsEnabled; } /** * True if Web Sockets are enabled; otherwise, false. */ - public void setWebSocketsEnabled(boolean webSocketsEnabled) { this.webSocketsEnabled = webSocketsEnabled; } + public void setWebSocketsEnabled(Boolean webSocketsEnabled) { this.webSocketsEnabled = webSocketsEnabled; } /** * Initializes a new instance of the WebSiteGetConfigurationResponse class. diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetHistoricalUsageMetricsParameters.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetHistoricalUsageMetricsParameters.java index 1362b697f6268..d287c7b8752d9 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetHistoricalUsageMetricsParameters.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetHistoricalUsageMetricsParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetHistoricalUsageMetricsResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetHistoricalUsageMetricsResponse.java index 020e50e1cbd1d..5280d5e5267ba 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetHistoricalUsageMetricsResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetHistoricalUsageMetricsResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Calendar; import java.util.Iterator; diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetParameters.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetParameters.java index 9e37a1cb1e46f..0b8ad8cc64988 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetParameters.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -31,12 +33,12 @@ public class WebSiteGetParameters private ArrayList propertiesToInclude; /** - * Specifies a list of the names of any addtional parameters to return + * Specifies a list of the names of any addtional parameters to return. */ public ArrayList getPropertiesToInclude() { return this.propertiesToInclude; } /** - * Specifies a list of the names of any addtional parameters to return + * Specifies a list of the names of any addtional parameters to return. */ public void setPropertiesToInclude(ArrayList propertiesToInclude) { this.propertiesToInclude = propertiesToInclude; } diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetPublishProfileResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetPublishProfileResponse.java index a4a060225ee88..02d40d75f3aaf 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetPublishProfileResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetPublishProfileResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; import java.util.ArrayList; import java.util.Iterator; diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetRepositoryResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetRepositoryResponse.java index e29c5932416f8..915ef4320c75a 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetRepositoryResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetRepositoryResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.net.URI; /** diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetResponse.java index 05590c260b348..def285b44232e 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Get Web Site Details operation response. diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetUsageMetricsResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetUsageMetricsResponse.java index 55f692706eb7d..9d80151147088 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetUsageMetricsResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteGetUsageMetricsResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Calendar; import java.util.Iterator; diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteListParameters.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteListParameters.java index dbcbdc2cb256a..142db314d895c 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteListParameters.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteListParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -31,12 +33,12 @@ public class WebSiteListParameters private ArrayList propertiesToInclude; /** - * Specifies a list of the names of any addtional parameters to return + * Specifies a list of the names of any addtional parameters to return. */ public ArrayList getPropertiesToInclude() { return this.propertiesToInclude; } /** - * Specifies a list of the names of any addtional parameters to return + * Specifies a list of the names of any addtional parameters to return. */ public void setPropertiesToInclude(ArrayList propertiesToInclude) { this.propertiesToInclude = propertiesToInclude; } diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteMode.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteMode.java index 0577378aa48ae..844ca57d88265 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteMode.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteMode.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteRuntimeAvailabilityState.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteRuntimeAvailabilityState.java index e22f2b1453cb3..3417b821a9d50 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteRuntimeAvailabilityState.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteRuntimeAvailabilityState.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteSslState.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteSslState.java index 84544b3b2f281..ef3eeb62e72a8 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteSslState.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteSslState.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteState.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteState.java index 318c39ee9f362..ae2032ab6adf3 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteState.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteState.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteUpdateConfigurationParameters.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteUpdateConfigurationParameters.java index 7d60984a05524..02c37b409ef2b 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteUpdateConfigurationParameters.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteUpdateConfigurationParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -88,6 +90,18 @@ public class WebSiteUpdateConfigurationParameters */ public void setDetailedErrorLoggingEnabled(Boolean detailedErrorLoggingEnabled) { this.detailedErrorLoggingEnabled = detailedErrorLoggingEnabled; } + private String documentRoot; + + /** + * The document root. + */ + public String getDocumentRoot() { return this.documentRoot; } + + /** + * The document root. + */ + public void setDocumentRoot(String documentRoot) { this.documentRoot = documentRoot; } + private ArrayList handlerMappings; /** @@ -114,6 +128,18 @@ public class WebSiteUpdateConfigurationParameters */ public void setHttpLoggingEnabled(Boolean httpLoggingEnabled) { this.httpLoggingEnabled = httpLoggingEnabled; } + private Integer logsDirectorySizeLimit; + + /** + * The limit of the logs directory. + */ + public Integer getLogsDirectorySizeLimit() { return this.logsDirectorySizeLimit; } + + /** + * The limit of the logs directory. + */ + public void setLogsDirectorySizeLimit(Integer logsDirectorySizeLimit) { this.logsDirectorySizeLimit = logsDirectorySizeLimit; } + private ManagedPipelineMode managedPipelineMode; /** @@ -220,17 +246,17 @@ public class WebSiteUpdateConfigurationParameters */ public void setRemoteDebuggingEnabled(Boolean remoteDebuggingEnabled) { this.remoteDebuggingEnabled = remoteDebuggingEnabled; } - private String remoteDebuggingVersion; + private RemoteDebuggingVersion remoteDebuggingVersion; /** * True remote debugging version. */ - public String getRemoteDebuggingVersion() { return this.remoteDebuggingVersion; } + public RemoteDebuggingVersion getRemoteDebuggingVersion() { return this.remoteDebuggingVersion; } /** * True remote debugging version. */ - public void setRemoteDebuggingVersion(String remoteDebuggingVersion) { this.remoteDebuggingVersion = remoteDebuggingVersion; } + public void setRemoteDebuggingVersion(RemoteDebuggingVersion remoteDebuggingVersion) { this.remoteDebuggingVersion = remoteDebuggingVersion; } private Boolean requestTracingEnabled; diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteUpdateParameters.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteUpdateParameters.java index e43455c5b781e..0d0fbab03a3be 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteUpdateParameters.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteUpdateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteUpdateResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteUpdateResponse.java index 603c6d7db698d..51fae5faa4891 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteUpdateResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteUpdateResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Update Web Site operation response. diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteUsageState.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteUsageState.java index 0730505ffed75..c2ceef6b6b3c3 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteUsageState.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSiteUsageState.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpaceAvailabilityState.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpaceAvailabilityState.java index 78f4cbcd88124..21bcb6ff2e13c 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpaceAvailabilityState.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpaceAvailabilityState.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpaceNames.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpaceNames.java index 3a904dea3f85c..bf03ac91d7973 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpaceNames.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpaceNames.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacePlanNames.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacePlanNames.java index 374387bb8616b..b703099a0f2de 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacePlanNames.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacePlanNames.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpaceStatus.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpaceStatus.java index 3b79c2dbd8795..b9d8b00eb95eb 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpaceStatus.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpaceStatus.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpaceWorkerSize.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpaceWorkerSize.java index a42c871b8b55f..df6e031c2986e 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpaceWorkerSize.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpaceWorkerSize.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesCreatePublishingUserParameters.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesCreatePublishingUserParameters.java index 24947d4d613d5..29791295e8292 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesCreatePublishingUserParameters.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesCreatePublishingUserParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesCreatePublishingUserResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesCreatePublishingUserResponse.java index fb9c45d80b09e..16657e8f8de33 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesCreatePublishingUserResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesCreatePublishingUserResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Create Publishing User operation response. @@ -31,36 +33,36 @@ public class WebSpacesCreatePublishingUserResponse extends OperationResponse private String name; /** - * The publishing user name + * The publishing user name. */ public String getName() { return this.name; } /** - * The publishing user name + * The publishing user name. */ public void setName(String name) { this.name = name; } private String publishingPassword; /** - * The publishing user password + * The publishing user password. */ public String getPublishingPassword() { return this.publishingPassword; } /** - * The publishing user password + * The publishing user password. */ public void setPublishingPassword(String publishingPassword) { this.publishingPassword = publishingPassword; } private String publishingUserName; /** - * The publishing user username + * The publishing user username. */ public String getPublishingUserName() { return this.publishingUserName; } /** - * The publishing user username + * The publishing user username. */ public void setPublishingUserName(String publishingUserName) { this.publishingUserName = publishingUserName; } diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesGetDnsSuffixResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesGetDnsSuffixResponse.java index 1d3af5ceca028..7672a873dca7b 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesGetDnsSuffixResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesGetDnsSuffixResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Get DNS Suffix operation response. @@ -31,12 +33,12 @@ public class WebSpacesGetDnsSuffixResponse extends OperationResponse private String dnsSuffix; /** - * The DNS Suffix used for the web space + * The DNS Suffix used for the web space. */ public String getDnsSuffix() { return this.dnsSuffix; } /** - * The DNS Suffix used for the web space + * The DNS Suffix used for the web space. */ public void setDnsSuffix(String dnsSuffix) { this.dnsSuffix = dnsSuffix; } diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesGetResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesGetResponse.java index 0c5dde2898d5b..c9edacd0e9b00 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesGetResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Get Web Space Details operation response. diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesListGeoRegionsResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesListGeoRegionsResponse.java index ccb3befe72265..098101094a51d 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesListGeoRegionsResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesListGeoRegionsResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; @@ -33,12 +35,12 @@ public class WebSpacesListGeoRegionsResponse extends OperationResponse implement private ArrayList geoRegions; /** - * The available geo regions + * The available geo regions. */ public ArrayList getGeoRegions() { return this.geoRegions; } /** - * The available geo regions + * The available geo regions. */ public void setGeoRegions(ArrayList geoRegions) { this.geoRegions = geoRegions; } @@ -61,43 +63,43 @@ public Iterator iterator() } /** - * An available geo region for a web space + * An available geo region for a web space. */ public static class GeoRegion { private String description; /** - * Geo Region description + * Geo Region description. */ public String getDescription() { return this.description; } /** - * Geo Region description + * Geo Region description. */ public void setDescription(String description) { this.description = description; } private String name; /** - * Name of the region + * Name of the region. */ public String getName() { return this.name; } /** - * Name of the region + * Name of the region. */ public void setName(String name) { this.name = name; } private int sortOrder; /** - * Sort order + * Sort order. */ public int getSortOrder() { return this.sortOrder; } /** - * Sort order + * Sort order. */ public void setSortOrder(int sortOrder) { this.sortOrder = sortOrder; } diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesListPublishingUsersResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesListPublishingUsersResponse.java index 342c3a1b77000..c830531609084 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesListPublishingUsersResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesListPublishingUsersResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; @@ -33,12 +35,12 @@ public class WebSpacesListPublishingUsersResponse extends OperationResponse impl private ArrayList users; /** - * The publishing users + * The publishing users. */ public ArrayList getUsers() { return this.users; } /** - * The publishing users + * The publishing users. */ public void setUsers(ArrayList users) { this.users = users; } @@ -62,19 +64,19 @@ public Iterator iterator() } /** - * Information about a single publishing user + * Information about a single publishing user. */ public static class User { private String name; /** - * The publishing user name + * The publishing user name. */ public String getName() { return this.name; } /** - * The publishing user name + * The publishing user name. */ public void setName(String name) { this.name = name; } diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesListResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesListResponse.java index 3b2ed277422b2..644165523cb1e 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesListResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; diff --git a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesListWebSitesResponse.java b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesListWebSitesResponse.java index b4a5e81431ccb..644e7c95c6adf 100644 --- a/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesListWebSitesResponse.java +++ b/management-website/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesListWebSitesResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.management.websites.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; diff --git a/management/src/main/java/com/microsoft/windowsazure/management/AffinityGroupOperations.java b/management/src/main/java/com/microsoft/windowsazure/management/AffinityGroupOperations.java index f688e6577945a..83596c43f805e 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/AffinityGroupOperations.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/AffinityGroupOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/AffinityGroupOperationsImpl.java b/management/src/main/java/com/microsoft/windowsazure/management/AffinityGroupOperationsImpl.java index 6269a922e768d..03673e23915a8 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/AffinityGroupOperationsImpl.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/AffinityGroupOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -29,6 +31,7 @@ import com.microsoft.windowsazure.management.models.AffinityGroupGetResponse; import com.microsoft.windowsazure.management.models.AffinityGroupListResponse; import com.microsoft.windowsazure.management.models.AffinityGroupUpdateParameters; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -36,6 +39,7 @@ import java.net.URI; import java.net.URISyntaxException; import java.text.ParseException; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.Future; import javax.xml.parsers.DocumentBuilder; @@ -147,6 +151,15 @@ public OperationResponse create(AffinityGroupCreateParameters parameters) throws } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/affinitygroups"; @@ -199,11 +212,23 @@ public OperationResponse create(AffinityGroupCreateParameters parameters) throws // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 201) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -216,6 +241,10 @@ public OperationResponse create(AffinityGroupCreateParameters parameters) throws result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -261,6 +290,15 @@ public OperationResponse delete(String affinityGroupName) throws IOException, Se } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("affinityGroupName", affinityGroupName); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/affinitygroups/" + affinityGroupName; @@ -273,11 +311,23 @@ public OperationResponse delete(String affinityGroupName) throws IOException, Se // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -290,6 +340,10 @@ public OperationResponse delete(String affinityGroupName) throws IOException, Se result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -335,6 +389,15 @@ public AffinityGroupGetResponse get(String affinityGroupName) throws IOException } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("affinityGroupName", affinityGroupName); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/affinitygroups/" + affinityGroupName; @@ -347,11 +410,23 @@ public AffinityGroupGetResponse get(String affinityGroupName) throws IOException // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -482,6 +557,10 @@ public AffinityGroupGetResponse get(String affinityGroupName) throws IOException result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -519,6 +598,14 @@ public AffinityGroupListResponse list() throws IOException, ServiceException, Pa // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/affinitygroups"; @@ -531,11 +618,23 @@ public AffinityGroupListResponse list() throws IOException, ServiceException, Pa // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -613,6 +712,10 @@ public AffinityGroupListResponse list() throws IOException, ServiceException, Pa result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -678,6 +781,16 @@ public OperationResponse update(String affinityGroupName, AffinityGroupUpdatePar } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("affinityGroupName", affinityGroupName); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/affinitygroups/" + affinityGroupName; @@ -722,11 +835,23 @@ public OperationResponse update(String affinityGroupName, AffinityGroupUpdatePar // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -739,6 +864,10 @@ public OperationResponse update(String affinityGroupName, AffinityGroupUpdatePar result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management/src/main/java/com/microsoft/windowsazure/management/LocationOperations.java b/management/src/main/java/com/microsoft/windowsazure/management/LocationOperations.java index d46141adc8cc7..a5e1b3fd20691 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/LocationOperations.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/LocationOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/LocationOperationsImpl.java b/management/src/main/java/com/microsoft/windowsazure/management/LocationOperationsImpl.java index 0480e2cda0ce5..7ea6648754352 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/LocationOperationsImpl.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/LocationOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -24,9 +26,11 @@ import com.microsoft.windowsazure.core.ServiceOperations; import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.models.LocationsListResponse; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.text.ParseException; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.Future; import javax.xml.parsers.DocumentBuilder; @@ -99,6 +103,14 @@ public LocationsListResponse list() throws IOException, ServiceException, Parser // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/locations"; @@ -111,11 +123,23 @@ public LocationsListResponse list() throws IOException, ServiceException, Parser // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -175,6 +199,10 @@ public LocationsListResponse list() throws IOException, ServiceException, Parser result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management/src/main/java/com/microsoft/windowsazure/management/ManagementCertificateOperations.java b/management/src/main/java/com/microsoft/windowsazure/management/ManagementCertificateOperations.java index e7f7e4f00add2..71b8aafd39991 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/ManagementCertificateOperations.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/ManagementCertificateOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/ManagementCertificateOperationsImpl.java b/management/src/main/java/com/microsoft/windowsazure/management/ManagementCertificateOperationsImpl.java index 47360aac7d2dd..429ae674fab16 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/ManagementCertificateOperationsImpl.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/ManagementCertificateOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -28,6 +30,7 @@ import com.microsoft.windowsazure.management.models.ManagementCertificateCreateParameters; import com.microsoft.windowsazure.management.models.ManagementCertificateGetResponse; import com.microsoft.windowsazure.management.models.ManagementCertificateListResponse; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -36,6 +39,7 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.Future; import javax.xml.parsers.DocumentBuilder; @@ -133,6 +137,15 @@ public OperationResponse create(ManagementCertificateCreateParameters parameters } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/certificates"; @@ -187,11 +200,23 @@ public OperationResponse create(ManagementCertificateCreateParameters parameters // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -204,6 +229,10 @@ public OperationResponse create(ManagementCertificateCreateParameters parameters result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -253,6 +282,15 @@ public OperationResponse delete(String thumbprint) throws IOException, ServiceEx } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("thumbprint", thumbprint); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/certificates/" + thumbprint; @@ -265,11 +303,23 @@ public OperationResponse delete(String thumbprint) throws IOException, ServiceEx // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200 && statusCode != 404) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -282,6 +332,10 @@ public OperationResponse delete(String thumbprint) throws IOException, ServiceEx result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -333,6 +387,15 @@ public ManagementCertificateGetResponse get(String thumbprint) throws IOExceptio } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("thumbprint", thumbprint); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/certificates/" + thumbprint; @@ -345,11 +408,23 @@ public ManagementCertificateGetResponse get(String thumbprint) throws IOExceptio // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -412,6 +487,10 @@ public ManagementCertificateGetResponse get(String thumbprint) throws IOExceptio result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -455,6 +534,14 @@ public ManagementCertificateListResponse list() throws IOException, ServiceExcep // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/certificates"; @@ -467,11 +554,23 @@ public ManagementCertificateListResponse list() throws IOException, ServiceExcep // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -541,6 +640,10 @@ public ManagementCertificateListResponse list() throws IOException, ServiceExcep result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management/src/main/java/com/microsoft/windowsazure/management/ManagementClient.java b/management/src/main/java/com/microsoft/windowsazure/management/ManagementClient.java index 9859842201968..b2fa0a7c687a9 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/ManagementClient.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/ManagementClient.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/ManagementClientImpl.java b/management/src/main/java/com/microsoft/windowsazure/management/ManagementClientImpl.java index 0969c0e8955cf..212cda02fda24 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/ManagementClientImpl.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/ManagementClientImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -26,9 +28,11 @@ import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.models.OperationStatus; import com.microsoft.windowsazure.management.models.OperationStatusResponse; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.net.URI; +import java.util.HashMap; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; @@ -256,6 +260,15 @@ public OperationStatusResponse getOperationStatus(String requestId) throws IOExc } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("requestId", requestId); + CloudTracing.enter(invocationId, this, "getOperationStatusAsync", tracingParameters); + } // Construct URL String url = this.getBaseUri() + "/" + this.getCredentials().getSubscriptionId() + "/operations/" + requestId; @@ -268,11 +281,23 @@ public OperationStatusResponse getOperationStatus(String requestId) throws IOExc // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -349,6 +374,10 @@ public OperationStatusResponse getOperationStatus(String requestId) throws IOExc result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management/src/main/java/com/microsoft/windowsazure/management/SubscriptionOperations.java b/management/src/main/java/com/microsoft/windowsazure/management/SubscriptionOperations.java index 772d50e2cbf8d..cca2c43088493 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/SubscriptionOperations.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/SubscriptionOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/SubscriptionOperationsImpl.java b/management/src/main/java/com/microsoft/windowsazure/management/SubscriptionOperationsImpl.java index f449a551a47b8..96cbfad0a0ab5 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/SubscriptionOperationsImpl.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/SubscriptionOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -28,6 +30,7 @@ import com.microsoft.windowsazure.management.models.SubscriptionListOperationsParameters; import com.microsoft.windowsazure.management.models.SubscriptionListOperationsResponse; import com.microsoft.windowsazure.management.models.SubscriptionStatus; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.net.InetAddress; @@ -36,6 +39,7 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.HashMap; import java.util.TimeZone; import java.util.concurrent.Callable; import java.util.concurrent.Future; @@ -109,6 +113,14 @@ public SubscriptionGetResponse get() throws IOException, ServiceException, Parse // Validate // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId(); @@ -121,11 +133,23 @@ public SubscriptionGetResponse get() throws IOException, ServiceException, Parse // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -302,6 +326,10 @@ public SubscriptionGetResponse get() throws IOException, ServiceException, Parse result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -349,6 +377,15 @@ public SubscriptionListOperationsResponse listOperations(SubscriptionListOperati } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "listOperationsAsync", tracingParameters); + } // Construct URL SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mmZ"); @@ -379,11 +416,23 @@ public SubscriptionListOperationsResponse listOperations(SubscriptionListOperati // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -547,6 +596,10 @@ public SubscriptionListOperationsResponse listOperations(SubscriptionListOperati result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -586,6 +639,15 @@ public OperationResponse registerResource(String resourceName) throws IOExceptio } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("resourceName", resourceName); + CloudTracing.enter(invocationId, this, "registerResourceAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services?service=" + resourceName + "&action=register"; @@ -599,11 +661,23 @@ public OperationResponse registerResource(String resourceName) throws IOExceptio // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200 && statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -616,6 +690,10 @@ public OperationResponse registerResource(String resourceName) throws IOExceptio result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -655,6 +733,15 @@ public OperationResponse unregisterResource(String resourceName) throws IOExcept } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("resourceName", resourceName); + CloudTracing.enter(invocationId, this, "unregisterResourceAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + "/" + this.getClient().getCredentials().getSubscriptionId() + "/services?service=" + resourceName + "&action=unregister"; @@ -668,11 +755,23 @@ public OperationResponse unregisterResource(String resourceName) throws IOExcept // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200 && statusCode != 202) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -685,6 +784,10 @@ public OperationResponse unregisterResource(String resourceName) throws IOExcept result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupCapabilities.java b/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupCapabilities.java index 50869fca87197..4adad12a16b0d 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupCapabilities.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupCapabilities.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupCreateParameters.java b/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupCreateParameters.java index 73774e972d7f1..5073b279276ad 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupCreateParameters.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupCreateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupGetResponse.java b/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupGetResponse.java index 18e57eff27a3e..78c130934bdcb 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupGetResponse.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupListResponse.java b/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupListResponse.java index 38ec7e5fce51b..bcce33c5c799d 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupListResponse.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupUpdateParameters.java b/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupUpdateParameters.java index cf48d4f6fddac..4a9edc71efb96 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupUpdateParameters.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/models/AffinityGroupUpdateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/models/LocationAvailableServiceNames.java b/management/src/main/java/com/microsoft/windowsazure/management/models/LocationAvailableServiceNames.java index 348a3ed0d06e9..a17f4b466ad18 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/models/LocationAvailableServiceNames.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/models/LocationAvailableServiceNames.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/models/LocationNames.java b/management/src/main/java/com/microsoft/windowsazure/management/models/LocationNames.java index 16b2aabe634bf..19e3cf10c3072 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/models/LocationNames.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/models/LocationNames.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/models/LocationsListResponse.java b/management/src/main/java/com/microsoft/windowsazure/management/models/LocationsListResponse.java index 59e2e1c5db96f..e54916f04d0d0 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/models/LocationsListResponse.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/models/LocationsListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/models/ManagementCertificateCreateParameters.java b/management/src/main/java/com/microsoft/windowsazure/management/models/ManagementCertificateCreateParameters.java index b1bbab1f029b0..d2c0fda078879 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/models/ManagementCertificateCreateParameters.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/models/ManagementCertificateCreateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/models/ManagementCertificateGetResponse.java b/management/src/main/java/com/microsoft/windowsazure/management/models/ManagementCertificateGetResponse.java index 67a8d33605f46..91fb3fd78f991 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/models/ManagementCertificateGetResponse.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/models/ManagementCertificateGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/models/ManagementCertificateListResponse.java b/management/src/main/java/com/microsoft/windowsazure/management/models/ManagementCertificateListResponse.java index ba320b43be68d..5d89c8f9e194f 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/models/ManagementCertificateListResponse.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/models/ManagementCertificateListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/models/OperationStatus.java b/management/src/main/java/com/microsoft/windowsazure/management/models/OperationStatus.java index 3a3b17285abb7..95845e0d8cf7a 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/models/OperationStatus.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/models/OperationStatus.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/models/OperationStatusResponse.java b/management/src/main/java/com/microsoft/windowsazure/management/models/OperationStatusResponse.java index 9da070247ee2e..bfafa1e6852c3 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/models/OperationStatusResponse.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/models/OperationStatusResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionGetResponse.java b/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionGetResponse.java index 8cd5386e60166..dfd8a2a73a2dc 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionGetResponse.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionListOperationsParameters.java b/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionListOperationsParameters.java index 08fd809c70008..ac9b3722ccd60 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionListOperationsParameters.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionListOperationsParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionListOperationsResponse.java b/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionListOperationsResponse.java index acbbce5887787..72a99955e5a53 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionListOperationsResponse.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionListOperationsResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionOperationNames.java b/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionOperationNames.java index d5b16a6745111..27bc626e66e6f 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionOperationNames.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionOperationNames.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionStatus.java b/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionStatus.java index e56d1ce84407d..66354ac0453fc 100644 --- a/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionStatus.java +++ b/management/src/main/java/com/microsoft/windowsazure/management/models/SubscriptionStatus.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/Exports.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/Exports.java index 27be9dc1d216e..61a11407b4d1b 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/Exports.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/Exports.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.scheduler; -import com.microsoft.windowsazure.services.core.Builder; +import com.microsoft.windowsazure.core.Builder; /** * The Class Exports. diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/JobOperations.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/JobOperations.java index 92b0041fc5785..9632e9391b18e 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/JobOperations.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/JobOperations.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,8 @@ package com.microsoft.windowsazure.scheduler; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.scheduler.models.JobCollectionJobsUpdateStateParameters; import com.microsoft.windowsazure.scheduler.models.JobCollectionJobsUpdateStateResponse; import com.microsoft.windowsazure.scheduler.models.JobCreateOrUpdateParameters; @@ -30,12 +33,13 @@ import com.microsoft.windowsazure.scheduler.models.JobCreateResponse; import com.microsoft.windowsazure.scheduler.models.JobGetHistoryParameters; import com.microsoft.windowsazure.scheduler.models.JobGetHistoryResponse; +import com.microsoft.windowsazure.scheduler.models.JobGetHistoryWithFilterParameters; import com.microsoft.windowsazure.scheduler.models.JobGetResponse; import com.microsoft.windowsazure.scheduler.models.JobListParameters; import com.microsoft.windowsazure.scheduler.models.JobListResponse; +import com.microsoft.windowsazure.scheduler.models.JobListWithFilterParameters; import com.microsoft.windowsazure.scheduler.models.JobUpdateStateParameters; import com.microsoft.windowsazure.scheduler.models.JobUpdateStateResponse; -import com.microsoft.windowsazure.services.core.ServiceException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; @@ -140,6 +144,26 @@ public interface JobOperations */ Future getHistoryAsync(String jobId, JobGetHistoryParameters parameters); + /** + * Job history tracks the updates and executions of a job. + * + * @param jobId Id of the job to get the history of. + * @param parameters Parameters supplied to the Get Job History With Filter + * operation. + * @return The Get Job History operation response. + */ + JobGetHistoryResponse getHistoryWithFilter(String jobId, JobGetHistoryWithFilterParameters parameters) throws IOException, ServiceException, ParseException; + + /** + * Job history tracks the updates and executions of a job. + * + * @param jobId Id of the job to get the history of. + * @param parameters Parameters supplied to the Get Job History With Filter + * operation. + * @return The Get Job History operation response. + */ + Future getHistoryWithFilterAsync(String jobId, JobGetHistoryWithFilterParameters parameters); + /** * Fetch all jobs in a job collection. * @@ -156,6 +180,24 @@ public interface JobOperations */ Future listAsync(JobListParameters parameters); + /** + * Fetch jobs in a job collection via a filter. + * + * @param parameters Parameters supplied to the List Jobs with filter + * operation. + * @return The List Jobs operation response. + */ + JobListResponse listWithFilter(JobListWithFilterParameters parameters) throws IOException, ServiceException, ParseException, URISyntaxException; + + /** + * Fetch jobs in a job collection via a filter. + * + * @param parameters Parameters supplied to the List Jobs with filter + * operation. + * @return The List Jobs operation response. + */ + Future listWithFilterAsync(JobListWithFilterParameters parameters); + /** * Job collections can be updated through a simple PATCH operation. The * format of the request is the same as that for creating a job, though if diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/JobOperationsImpl.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/JobOperationsImpl.java index 936a27a4db4e3..212b1fedd5ce4 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/JobOperationsImpl.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/JobOperationsImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,11 @@ package com.microsoft.windowsazure.scheduler; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; +import com.microsoft.windowsazure.core.ServiceOperations; +import com.microsoft.windowsazure.core.TimeSpan8601Converter; +import com.microsoft.windowsazure.core.pipeline.apache.CustomHttpDelete; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.scheduler.models.Job; import com.microsoft.windowsazure.scheduler.models.JobAction; import com.microsoft.windowsazure.scheduler.models.JobActionType; @@ -34,10 +40,14 @@ import com.microsoft.windowsazure.scheduler.models.JobErrorAction; import com.microsoft.windowsazure.scheduler.models.JobGetHistoryParameters; import com.microsoft.windowsazure.scheduler.models.JobGetHistoryResponse; +import com.microsoft.windowsazure.scheduler.models.JobGetHistoryWithFilterParameters; import com.microsoft.windowsazure.scheduler.models.JobGetResponse; +import com.microsoft.windowsazure.scheduler.models.JobHistoryActionName; +import com.microsoft.windowsazure.scheduler.models.JobHistoryStatus; import com.microsoft.windowsazure.scheduler.models.JobHttpRequest; import com.microsoft.windowsazure.scheduler.models.JobListParameters; import com.microsoft.windowsazure.scheduler.models.JobListResponse; +import com.microsoft.windowsazure.scheduler.models.JobListWithFilterParameters; import com.microsoft.windowsazure.scheduler.models.JobQueueMessage; import com.microsoft.windowsazure.scheduler.models.JobRecurrence; import com.microsoft.windowsazure.scheduler.models.JobRecurrenceFrequency; @@ -50,10 +60,7 @@ import com.microsoft.windowsazure.scheduler.models.JobUpdateStateResponse; import com.microsoft.windowsazure.scheduler.models.RetryPolicy; import com.microsoft.windowsazure.scheduler.models.RetryType; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.ServiceOperations; -import com.microsoft.windowsazure.services.core.TimeSpan8601Converter; -import com.microsoft.windowsazure.services.core.utils.pipeline.CustomHttpDelete; +import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -64,6 +71,7 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.TimeZone; @@ -204,6 +212,15 @@ public JobCreateResponse create(JobCreateParameters parameters) throws Unsupport } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/cloudservices/" + this.getClient().getCloudServiceName() + "/resources/" + "scheduler" + "/~/" + "JobCollections" + "/" + this.getClient().getJobCollectionName() + "/jobs?api-version=" + "2013-10-31_Preview"; @@ -394,12 +411,12 @@ public JobCreateResponse create(JobCreateParameters parameters) throws Unsupport if (parameters.getRecurrence().getSchedule().getDays() != null) { - ArrayNode daysArray = objectMapper.createArrayNode(); - for (JobScheduleDay daysItem : parameters.getRecurrence().getSchedule().getDays()) + ArrayNode weekDaysArray = objectMapper.createArrayNode(); + for (JobScheduleDay weekDaysItem : parameters.getRecurrence().getSchedule().getDays()) { - daysArray.add(SchedulerClientImpl.jobScheduleDayToString(daysItem)); + weekDaysArray.add(SchedulerClientImpl.jobScheduleDayToString(weekDaysItem)); } - scheduleValue.put("days", daysArray); + scheduleValue.put("weekDays", weekDaysArray); } if (parameters.getRecurrence().getSchedule().getMonths() != null) @@ -451,11 +468,23 @@ public JobCreateResponse create(JobCreateParameters parameters) throws Unsupport // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 201) { ServiceException ex = ServiceException.createFromJson(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -782,12 +811,12 @@ public JobCreateResponse create(JobCreateParameters parameters) throws Unsupport } } - ArrayNode daysArray2 = ((ArrayNode)scheduleValue2.get("days")); - if (daysArray2 != null) + ArrayNode weekDaysArray2 = ((ArrayNode)scheduleValue2.get("weekDays")); + if (weekDaysArray2 != null) { - for (JsonNode daysValue : daysArray2) + for (JsonNode weekDaysValue : weekDaysArray2) { - scheduleInstance.getDays().add(SchedulerClientImpl.parseJobScheduleDay(daysValue.getTextValue())); + scheduleInstance.getDays().add(SchedulerClientImpl.parseJobScheduleDay(weekDaysValue.getTextValue())); } } @@ -905,6 +934,10 @@ public JobCreateResponse create(JobCreateParameters parameters) throws Unsupport result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1021,6 +1054,16 @@ public JobCreateOrUpdateResponse createOrUpdate(String jobId, JobCreateOrUpdateP } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("jobId", jobId); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "createOrUpdateAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/cloudservices/" + this.getClient().getCloudServiceName() + "/resources/" + "scheduler" + "/~/" + "JobCollections" + "/" + this.getClient().getJobCollectionName() + "/jobs/" + jobId + "?api-version=" + "2013-10-31_Preview"; @@ -1211,12 +1254,12 @@ public JobCreateOrUpdateResponse createOrUpdate(String jobId, JobCreateOrUpdateP if (parameters.getRecurrence().getSchedule().getDays() != null) { - ArrayNode daysArray = objectMapper.createArrayNode(); - for (JobScheduleDay daysItem : parameters.getRecurrence().getSchedule().getDays()) + ArrayNode weekDaysArray = objectMapper.createArrayNode(); + for (JobScheduleDay weekDaysItem : parameters.getRecurrence().getSchedule().getDays()) { - daysArray.add(SchedulerClientImpl.jobScheduleDayToString(daysItem)); + weekDaysArray.add(SchedulerClientImpl.jobScheduleDayToString(weekDaysItem)); } - scheduleValue.put("days", daysArray); + scheduleValue.put("weekDays", weekDaysArray); } if (parameters.getRecurrence().getSchedule().getMonths() != null) @@ -1268,11 +1311,23 @@ public JobCreateOrUpdateResponse createOrUpdate(String jobId, JobCreateOrUpdateP // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200 && statusCode != 201) { ServiceException ex = ServiceException.createFromJson(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1599,12 +1654,12 @@ public JobCreateOrUpdateResponse createOrUpdate(String jobId, JobCreateOrUpdateP } } - ArrayNode daysArray2 = ((ArrayNode)scheduleValue2.get("days")); - if (daysArray2 != null) + ArrayNode weekDaysArray2 = ((ArrayNode)scheduleValue2.get("weekDays")); + if (weekDaysArray2 != null) { - for (JsonNode daysValue : daysArray2) + for (JsonNode weekDaysValue : weekDaysArray2) { - scheduleInstance.getDays().add(SchedulerClientImpl.parseJobScheduleDay(daysValue.getTextValue())); + scheduleInstance.getDays().add(SchedulerClientImpl.parseJobScheduleDay(weekDaysValue.getTextValue())); } } @@ -1722,6 +1777,10 @@ public JobCreateOrUpdateResponse createOrUpdate(String jobId, JobCreateOrUpdateP result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1761,6 +1820,15 @@ public OperationResponse delete(String jobId) throws IOException, ServiceExcepti } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("jobId", jobId); + CloudTracing.enter(invocationId, this, "deleteAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/cloudservices/" + this.getClient().getCloudServiceName() + "/resources/" + "scheduler" + "/~/" + "JobCollections" + "/" + this.getClient().getJobCollectionName() + "/jobs/" + jobId + "?api-version=" + "2013-10-31_Preview"; @@ -1773,11 +1841,23 @@ public OperationResponse delete(String jobId) throws IOException, ServiceExcepti // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromXml(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -1790,6 +1870,10 @@ public OperationResponse delete(String jobId) throws IOException, ServiceExcepti result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -1829,6 +1913,15 @@ public JobGetResponse get(String jobId) throws IOException, ServiceException, Pa } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("jobId", jobId); + CloudTracing.enter(invocationId, this, "getAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/cloudservices/" + this.getClient().getCloudServiceName() + "/resources/" + "scheduler" + "/~/" + "JobCollections" + "/" + this.getClient().getJobCollectionName() + "/jobs/" + jobId + "?api-version=" + "2013-10-31_Preview"; @@ -1841,11 +1934,23 @@ public JobGetResponse get(String jobId) throws IOException, ServiceException, Pa // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromJson(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2173,12 +2278,12 @@ public JobGetResponse get(String jobId) throws IOException, ServiceException, Pa } } - ArrayNode daysArray = ((ArrayNode)scheduleValue.get("days")); - if (daysArray != null) + ArrayNode weekDaysArray = ((ArrayNode)scheduleValue.get("weekDays")); + if (weekDaysArray != null) { - for (JsonNode daysValue : daysArray) + for (JsonNode weekDaysValue : weekDaysArray) { - scheduleInstance.getDays().add(SchedulerClientImpl.parseJobScheduleDay(daysValue.getTextValue())); + scheduleInstance.getDays().add(SchedulerClientImpl.parseJobScheduleDay(weekDaysValue.getTextValue())); } } @@ -2296,6 +2401,10 @@ public JobGetResponse get(String jobId) throws IOException, ServiceException, Pa result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -2339,22 +2448,232 @@ public JobGetHistoryResponse getHistory(String jobId, JobGetHistoryParameters pa } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("jobId", jobId); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "getHistoryAsync", tracingParameters); + } // Construct URL - String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/cloudservices/" + this.getClient().getCloudServiceName() + "/resources/" + "scheduler" + "/~/" + "JobCollections" + "/" + this.getClient().getJobCollectionName() + "/jobs/" + jobId + "/history?api-version=" + "2013-10-31_Preview"; - if (parameters.getState() != null) + String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/cloudservices/" + this.getClient().getCloudServiceName() + "/resources/" + "scheduler" + "/~/" + "JobCollections" + "/" + this.getClient().getJobCollectionName() + "/jobs/" + jobId + "/history?api-version=" + "2013-10-31_Preview" + "&$skip=" + parameters.getSkip() + "&$top=" + parameters.getTop(); + + // Create HTTP transport objects + HttpGet httpRequest = new HttpGet(url); + + // Set Headers + httpRequest.setHeader("x-ms-version", "2013-03-01"); + + // Send Request + HttpResponse httpResponse = null; + if (shouldTrace) { - url = url + "&state=" + URLEncoder.encode(SchedulerClientImpl.jobStateToString(parameters.getState())); + CloudTracing.sendRequest(invocationId, httpRequest); } - if (parameters.getSkip() != null) + httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) { - url = url + "&$skip=" + URLEncoder.encode(Integer.toString(parameters.getSkip())); + CloudTracing.receiveResponse(invocationId, httpResponse); } - if (parameters.getTop() != null) + int statusCode = httpResponse.getStatusLine().getStatusCode(); + if (statusCode != 200) { - url = url + "&$top=" + URLEncoder.encode(Integer.toString(parameters.getTop())); + ServiceException ex = ServiceException.createFromJson(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + // Create Result + JobGetHistoryResponse result = null; + // Deserialize Response + InputStream responseContent = httpResponse.getEntity().getContent(); + result = new JobGetHistoryResponse(); + ObjectMapper objectMapper = new ObjectMapper(); + JsonNode responseDoc = objectMapper.readTree(responseContent); + + ArrayNode jobHistoryArray = ((ArrayNode)responseDoc); + if (jobHistoryArray != null) + { + for (JsonNode jobHistoryValue : jobHistoryArray) + { + JobGetHistoryResponse.JobHistoryEntry jobHistoryEntryInstance = new JobGetHistoryResponse.JobHistoryEntry(); + result.getJobHistory().add(jobHistoryEntryInstance); + + JsonNode jobIdValue = jobHistoryValue.get("jobId"); + if (jobIdValue != null) + { + String jobIdInstance; + jobIdInstance = jobIdValue.getTextValue(); + jobHistoryEntryInstance.setId(jobIdInstance); + } + + JsonNode recordNumberValue = jobHistoryValue.get("recordNumber"); + if (recordNumberValue != null) + { + int recordNumberInstance; + recordNumberInstance = recordNumberValue.getIntValue(); + jobHistoryEntryInstance.setRecordNumber(recordNumberInstance); + } + + JsonNode timestampValue = jobHistoryValue.get("timestamp"); + if (timestampValue != null) + { + Calendar timestampInstance; + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy"); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(simpleDateFormat.parse(timestampValue.getTextValue())); + timestampInstance = calendar; + jobHistoryEntryInstance.setTimestamp(timestampInstance); + } + + JsonNode startTimeValue = jobHistoryValue.get("startTime"); + if (startTimeValue != null) + { + Calendar startTimeInstance; + SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy"); + Calendar calendar2 = Calendar.getInstance(); + calendar2.setTime(simpleDateFormat2.parse(startTimeValue.getTextValue())); + startTimeInstance = calendar2; + jobHistoryEntryInstance.setStartTime(startTimeInstance); + } + + JsonNode endTimeValue = jobHistoryValue.get("endTime"); + if (endTimeValue != null) + { + Calendar endTimeInstance; + SimpleDateFormat simpleDateFormat3 = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy"); + Calendar calendar3 = Calendar.getInstance(); + calendar3.setTime(simpleDateFormat3.parse(endTimeValue.getTextValue())); + endTimeInstance = calendar3; + jobHistoryEntryInstance.setEndTime(endTimeInstance); + } + + JsonNode stateValue = jobHistoryValue.get("state"); + if (stateValue != null) + { + JobState stateInstance; + stateInstance = SchedulerClientImpl.parseJobState(stateValue.getTextValue()); + jobHistoryEntryInstance.setState(stateInstance); + } + + JsonNode messageValue = jobHistoryValue.get("message"); + if (messageValue != null) + { + String messageInstance; + messageInstance = messageValue.getTextValue(); + jobHistoryEntryInstance.setMessage(messageInstance); + } + + JsonNode statusValue = jobHistoryValue.get("status"); + if (statusValue != null) + { + JobHistoryStatus statusInstance; + statusInstance = SchedulerClientImpl.parseJobHistoryStatus(statusValue.getTextValue()); + jobHistoryEntryInstance.setStatus(statusInstance); + } + + JsonNode actionNameValue = jobHistoryValue.get("actionName"); + if (actionNameValue != null) + { + JobHistoryActionName actionNameInstance; + actionNameInstance = SchedulerClientImpl.parseJobHistoryActionName(actionNameValue.getTextValue()); + jobHistoryEntryInstance.setActionName(actionNameInstance); + } + + JsonNode repeatCountValue = jobHistoryValue.get("repeatCount"); + if (repeatCountValue != null) + { + int repeatCountInstance; + repeatCountInstance = repeatCountValue.getIntValue(); + jobHistoryEntryInstance.setRepeatCount(repeatCountInstance); + } + + JsonNode retryCountValue = jobHistoryValue.get("retryCount"); + if (retryCountValue != null) + { + int retryCountInstance; + retryCountInstance = retryCountValue.getIntValue(); + jobHistoryEntryInstance.setRetryCount(retryCountInstance); + } + } + } + + result.setStatusCode(statusCode); + if (httpResponse.getHeaders("x-ms-request-id").length > 0) + { + result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + return result; + } + + /** + * Job history tracks the updates and executions of a job. + * + * @param jobId Id of the job to get the history of. + * @param parameters Parameters supplied to the Get Job History With Filter + * operation. + * @return The Get Job History operation response. + */ + @Override + public Future getHistoryWithFilterAsync(final String jobId, final JobGetHistoryWithFilterParameters parameters) + { + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public JobGetHistoryResponse call() throws Exception + { + return getHistoryWithFilter(jobId, parameters); + } + }); + } + + /** + * Job history tracks the updates and executions of a job. + * + * @param jobId Id of the job to get the history of. + * @param parameters Parameters supplied to the Get Job History With Filter + * operation. + * @return The Get Job History operation response. + */ + @Override + public JobGetHistoryResponse getHistoryWithFilter(String jobId, JobGetHistoryWithFilterParameters parameters) throws IOException, ServiceException, ParseException + { + // Validate + if (jobId == null) + { + throw new NullPointerException("jobId"); + } + if (parameters == null) + { + throw new NullPointerException("parameters"); } + // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("jobId", jobId); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "getHistoryWithFilterAsync", tracingParameters); + } + + // Construct URL + String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/cloudservices/" + this.getClient().getCloudServiceName() + "/resources/" + "scheduler" + "/~/" + "JobCollections" + "/" + this.getClient().getJobCollectionName() + "/jobs/" + jobId + "/history?api-version=" + "2013-10-31_Preview" + "&$filter=status eq " + parameters.getStatus() + "&$skip=" + parameters.getSkip() + "&$top=" + parameters.getTop(); + // Create HTTP transport objects HttpGet httpRequest = new HttpGet(url); @@ -2363,11 +2682,23 @@ public JobGetHistoryResponse getHistory(String jobId, JobGetHistoryParameters pa // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromJson(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2451,6 +2782,38 @@ public JobGetHistoryResponse getHistory(String jobId, JobGetHistoryParameters pa messageInstance = messageValue.getTextValue(); jobHistoryEntryInstance.setMessage(messageInstance); } + + JsonNode statusValue = jobHistoryValue.get("status"); + if (statusValue != null) + { + JobHistoryStatus statusInstance; + statusInstance = SchedulerClientImpl.parseJobHistoryStatus(statusValue.getTextValue()); + jobHistoryEntryInstance.setStatus(statusInstance); + } + + JsonNode actionNameValue = jobHistoryValue.get("actionName"); + if (actionNameValue != null) + { + JobHistoryActionName actionNameInstance; + actionNameInstance = SchedulerClientImpl.parseJobHistoryActionName(actionNameValue.getTextValue()); + jobHistoryEntryInstance.setActionName(actionNameInstance); + } + + JsonNode repeatCountValue = jobHistoryValue.get("repeatCount"); + if (repeatCountValue != null) + { + int repeatCountInstance; + repeatCountInstance = repeatCountValue.getIntValue(); + jobHistoryEntryInstance.setRepeatCount(repeatCountInstance); + } + + JsonNode retryCountValue = jobHistoryValue.get("retryCount"); + if (retryCountValue != null) + { + int retryCountInstance; + retryCountInstance = retryCountValue.getIntValue(); + jobHistoryEntryInstance.setRetryCount(retryCountInstance); + } } } @@ -2460,6 +2823,10 @@ public JobGetHistoryResponse getHistory(String jobId, JobGetHistoryParameters pa result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -2497,13 +2864,18 @@ public JobListResponse list(JobListParameters parameters) throws IOException, Se } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "listAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/cloudservices/" + this.getClient().getCloudServiceName() + "/resources/" + "scheduler" + "/~/" + "JobCollections" + "/" + this.getClient().getJobCollectionName() + "/jobs?api-version=" + "2013-10-31_Preview"; - if (parameters.getState() != null) - { - url = url + "&state=" + URLEncoder.encode(SchedulerClientImpl.jobStateToString(parameters.getState())); - } if (parameters.getSkip() != null) { url = url + "&$skip=" + URLEncoder.encode(Integer.toString(parameters.getSkip())); @@ -2521,11 +2893,23 @@ public JobListResponse list(JobListParameters parameters) throws IOException, Se // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromJson(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -2856,12 +3240,12 @@ public JobListResponse list(JobListParameters parameters) throws IOException, Se } } - ArrayNode daysArray = ((ArrayNode)scheduleValue.get("days")); - if (daysArray != null) + ArrayNode weekDaysArray = ((ArrayNode)scheduleValue.get("weekDays")); + if (weekDaysArray != null) { - for (JsonNode daysValue : daysArray) + for (JsonNode weekDaysValue : weekDaysArray) { - scheduleInstance.getDays().add(SchedulerClientImpl.parseJobScheduleDay(daysValue.getTextValue())); + scheduleInstance.getDays().add(SchedulerClientImpl.parseJobScheduleDay(weekDaysValue.getTextValue())); } } @@ -2980,21 +3364,568 @@ public JobListResponse list(JobListParameters parameters) throws IOException, Se result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } /** - * Job collections can be updated through a simple PATCH operation. The - * format of the request is the same as that for creating a job, though if - * a field is unspecified we will carry forward the current value. + * Fetch jobs in a job collection via a filter. * - * @param parameters Parameters supplied to the Update Jobs State operation. - * @return The Update Jobs State operation response. + * @param parameters Parameters supplied to the List Jobs with filter + * operation. + * @return The List Jobs operation response. */ @Override - public Future updateJobCollectionStateAsync(final JobCollectionJobsUpdateStateParameters parameters) + public Future listWithFilterAsync(final JobListWithFilterParameters parameters) { - return this.getClient().getExecutorService().submit(new Callable() { + return this.getClient().getExecutorService().submit(new Callable() { + @Override + public JobListResponse call() throws Exception + { + return listWithFilter(parameters); + } + }); + } + + /** + * Fetch jobs in a job collection via a filter. + * + * @param parameters Parameters supplied to the List Jobs with filter + * operation. + * @return The List Jobs operation response. + */ + @Override + public JobListResponse listWithFilter(JobListWithFilterParameters parameters) throws IOException, ServiceException, ParseException, URISyntaxException + { + // Validate + if (parameters == null) + { + throw new NullPointerException("parameters"); + } + + // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "listWithFilterAsync", tracingParameters); + } + + // Construct URL + String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/cloudservices/" + this.getClient().getCloudServiceName() + "/resources/" + "scheduler" + "/~/" + "JobCollections" + "/" + this.getClient().getJobCollectionName() + "/jobs?api-version=" + "2013-10-31_Preview" + "&$filter=state eq " + parameters.getState(); + if (parameters.getSkip() != null) + { + url = url + "&$skip=" + URLEncoder.encode(Integer.toString(parameters.getSkip())); + } + if (parameters.getTop() != null) + { + url = url + "&$top=" + URLEncoder.encode(Integer.toString(parameters.getTop())); + } + + // Create HTTP transport objects + HttpGet httpRequest = new HttpGet(url); + + // Set Headers + httpRequest.setHeader("x-ms-version", "2013-03-01"); + + // Send Request + HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } + httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } + int statusCode = httpResponse.getStatusLine().getStatusCode(); + if (statusCode != 200) + { + ServiceException ex = ServiceException.createFromJson(httpRequest, null, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } + throw ex; + } + + // Create Result + JobListResponse result = null; + // Deserialize Response + InputStream responseContent = httpResponse.getEntity().getContent(); + result = new JobListResponse(); + ObjectMapper objectMapper = new ObjectMapper(); + JsonNode responseDoc = objectMapper.readTree(responseContent); + + ArrayNode jobsArray = ((ArrayNode)responseDoc); + if (jobsArray != null) + { + for (JsonNode jobsValue : jobsArray) + { + Job jobInstance = new Job(); + result.getJobs().add(jobInstance); + + JsonNode idValue = jobsValue.get("id"); + if (idValue != null) + { + String idInstance; + idInstance = idValue.getTextValue(); + jobInstance.setId(idInstance); + } + + JsonNode startTimeValue = jobsValue.get("startTime"); + if (startTimeValue != null) + { + Calendar startTimeInstance; + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy"); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(simpleDateFormat.parse(startTimeValue.getTextValue())); + startTimeInstance = calendar; + jobInstance.setStartTime(startTimeInstance); + } + + JsonNode actionValue = jobsValue.get("action"); + if (actionValue != null) + { + JobAction actionInstance = new JobAction(); + jobInstance.setAction(actionInstance); + + JsonNode typeValue = actionValue.get("type"); + if (typeValue != null) + { + JobActionType typeInstance; + typeInstance = SchedulerClientImpl.parseJobActionType(typeValue.getTextValue()); + actionInstance.setType(typeInstance); + } + + JsonNode retryPolicyValue = actionValue.get("retryPolicy"); + if (retryPolicyValue != null) + { + RetryPolicy retryPolicyInstance = new RetryPolicy(); + actionInstance.setRetryPolicy(retryPolicyInstance); + + JsonNode retryTypeValue = retryPolicyValue.get("retryType"); + if (retryTypeValue != null) + { + RetryType retryTypeInstance; + retryTypeInstance = SchedulerClientImpl.parseRetryType(retryTypeValue.getTextValue()); + retryPolicyInstance.setRetryType(retryTypeInstance); + } + + JsonNode retryIntervalValue = retryPolicyValue.get("retryInterval"); + if (retryIntervalValue != null) + { + Duration retryIntervalInstance; + retryIntervalInstance = TimeSpan8601Converter.parse(retryIntervalValue.getTextValue()); + retryPolicyInstance.setRetryInterval(retryIntervalInstance); + } + + JsonNode retryCountValue = retryPolicyValue.get("retryCount"); + if (retryCountValue != null) + { + int retryCountInstance; + retryCountInstance = retryCountValue.getIntValue(); + retryPolicyInstance.setRetryCount(retryCountInstance); + } + } + + JsonNode errorActionValue = actionValue.get("errorAction"); + if (errorActionValue != null) + { + JobErrorAction errorActionInstance = new JobErrorAction(); + actionInstance.setErrorAction(errorActionInstance); + + JsonNode typeValue2 = errorActionValue.get("type"); + if (typeValue2 != null) + { + JobActionType typeInstance2; + typeInstance2 = SchedulerClientImpl.parseJobActionType(typeValue2.getTextValue()); + errorActionInstance.setType(typeInstance2); + } + + JsonNode requestValue = errorActionValue.get("request"); + if (requestValue != null) + { + JobHttpRequest requestInstance = new JobHttpRequest(); + errorActionInstance.setRequest(requestInstance); + + JsonNode uriValue = requestValue.get("uri"); + if (uriValue != null) + { + URI uriInstance; + uriInstance = new URI(uriValue.getTextValue()); + requestInstance.setUri(uriInstance); + } + + JsonNode methodValue = requestValue.get("method"); + if (methodValue != null) + { + String methodInstance; + methodInstance = methodValue.getTextValue(); + requestInstance.setMethod(methodInstance); + } + + JsonNode headersSequenceElement = requestValue.get("headers"); + if (headersSequenceElement != null) + { + Iterator> itr = headersSequenceElement.getFields(); + while (itr.hasNext()) + { + Map.Entry property = itr.next(); + String headersKey = property.getKey(); + String headersValue = property.getValue().getTextValue(); + requestInstance.getHeaders().put(headersKey, headersValue); + } + } + + JsonNode bodyValue = requestValue.get("body"); + if (bodyValue != null) + { + String bodyInstance; + bodyInstance = bodyValue.getTextValue(); + requestInstance.setBody(bodyInstance); + } + } + + JsonNode queueMessageValue = errorActionValue.get("queueMessage"); + if (queueMessageValue != null) + { + JobQueueMessage queueMessageInstance = new JobQueueMessage(); + errorActionInstance.setQueueMessage(queueMessageInstance); + + JsonNode storageAccountValue = queueMessageValue.get("storageAccount"); + if (storageAccountValue != null) + { + String storageAccountInstance; + storageAccountInstance = storageAccountValue.getTextValue(); + queueMessageInstance.setStorageAccountName(storageAccountInstance); + } + + JsonNode queueNameValue = queueMessageValue.get("queueName"); + if (queueNameValue != null) + { + String queueNameInstance; + queueNameInstance = queueNameValue.getTextValue(); + queueMessageInstance.setQueueName(queueNameInstance); + } + + JsonNode sasTokenValue = queueMessageValue.get("sasToken"); + if (sasTokenValue != null) + { + String sasTokenInstance; + sasTokenInstance = sasTokenValue.getTextValue(); + queueMessageInstance.setSasToken(sasTokenInstance); + } + + JsonNode messageValue = queueMessageValue.get("message"); + if (messageValue != null) + { + String messageInstance; + messageInstance = messageValue.getTextValue(); + queueMessageInstance.setMessage(messageInstance); + } + } + } + + JsonNode requestValue2 = actionValue.get("request"); + if (requestValue2 != null) + { + JobHttpRequest requestInstance2 = new JobHttpRequest(); + actionInstance.setRequest(requestInstance2); + + JsonNode uriValue2 = requestValue2.get("uri"); + if (uriValue2 != null) + { + URI uriInstance2; + uriInstance2 = new URI(uriValue2.getTextValue()); + requestInstance2.setUri(uriInstance2); + } + + JsonNode methodValue2 = requestValue2.get("method"); + if (methodValue2 != null) + { + String methodInstance2; + methodInstance2 = methodValue2.getTextValue(); + requestInstance2.setMethod(methodInstance2); + } + + JsonNode headersSequenceElement2 = requestValue2.get("headers"); + if (headersSequenceElement2 != null) + { + Iterator> itr2 = headersSequenceElement2.getFields(); + while (itr2.hasNext()) + { + Map.Entry property2 = itr2.next(); + String headersKey2 = property2.getKey(); + String headersValue2 = property2.getValue().getTextValue(); + requestInstance2.getHeaders().put(headersKey2, headersValue2); + } + } + + JsonNode bodyValue2 = requestValue2.get("body"); + if (bodyValue2 != null) + { + String bodyInstance2; + bodyInstance2 = bodyValue2.getTextValue(); + requestInstance2.setBody(bodyInstance2); + } + } + + JsonNode queueMessageValue2 = actionValue.get("queueMessage"); + if (queueMessageValue2 != null) + { + JobQueueMessage queueMessageInstance2 = new JobQueueMessage(); + actionInstance.setQueueMessage(queueMessageInstance2); + + JsonNode storageAccountValue2 = queueMessageValue2.get("storageAccount"); + if (storageAccountValue2 != null) + { + String storageAccountInstance2; + storageAccountInstance2 = storageAccountValue2.getTextValue(); + queueMessageInstance2.setStorageAccountName(storageAccountInstance2); + } + + JsonNode queueNameValue2 = queueMessageValue2.get("queueName"); + if (queueNameValue2 != null) + { + String queueNameInstance2; + queueNameInstance2 = queueNameValue2.getTextValue(); + queueMessageInstance2.setQueueName(queueNameInstance2); + } + + JsonNode sasTokenValue2 = queueMessageValue2.get("sasToken"); + if (sasTokenValue2 != null) + { + String sasTokenInstance2; + sasTokenInstance2 = sasTokenValue2.getTextValue(); + queueMessageInstance2.setSasToken(sasTokenInstance2); + } + + JsonNode messageValue2 = queueMessageValue2.get("message"); + if (messageValue2 != null) + { + String messageInstance2; + messageInstance2 = messageValue2.getTextValue(); + queueMessageInstance2.setMessage(messageInstance2); + } + } + } + + JsonNode recurrenceValue = jobsValue.get("recurrence"); + if (recurrenceValue != null) + { + JobRecurrence recurrenceInstance = new JobRecurrence(); + jobInstance.setRecurrence(recurrenceInstance); + + JsonNode frequencyValue = recurrenceValue.get("frequency"); + if (frequencyValue != null) + { + JobRecurrenceFrequency frequencyInstance; + frequencyInstance = SchedulerClientImpl.parseJobRecurrenceFrequency(frequencyValue.getTextValue()); + recurrenceInstance.setFrequency(frequencyInstance); + } + + JsonNode intervalValue = recurrenceValue.get("interval"); + if (intervalValue != null) + { + int intervalInstance; + intervalInstance = intervalValue.getIntValue(); + recurrenceInstance.setInterval(intervalInstance); + } + + JsonNode countValue = recurrenceValue.get("count"); + if (countValue != null) + { + int countInstance; + countInstance = countValue.getIntValue(); + recurrenceInstance.setCount(countInstance); + } + + JsonNode endTimeValue = recurrenceValue.get("endTime"); + if (endTimeValue != null) + { + Calendar endTimeInstance; + SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy"); + Calendar calendar2 = Calendar.getInstance(); + calendar2.setTime(simpleDateFormat2.parse(endTimeValue.getTextValue())); + endTimeInstance = calendar2; + recurrenceInstance.setEndTime(endTimeInstance); + } + + JsonNode scheduleValue = recurrenceValue.get("schedule"); + if (scheduleValue != null) + { + JobRecurrenceSchedule scheduleInstance = new JobRecurrenceSchedule(); + recurrenceInstance.setSchedule(scheduleInstance); + + ArrayNode minutesArray = ((ArrayNode)scheduleValue.get("minutes")); + if (minutesArray != null) + { + for (JsonNode minutesValue : minutesArray) + { + scheduleInstance.getMinutes().add(minutesValue.getIntValue()); + } + } + + ArrayNode hoursArray = ((ArrayNode)scheduleValue.get("hours")); + if (hoursArray != null) + { + for (JsonNode hoursValue : hoursArray) + { + scheduleInstance.getHours().add(hoursValue.getIntValue()); + } + } + + ArrayNode weekDaysArray = ((ArrayNode)scheduleValue.get("weekDays")); + if (weekDaysArray != null) + { + for (JsonNode weekDaysValue : weekDaysArray) + { + scheduleInstance.getDays().add(SchedulerClientImpl.parseJobScheduleDay(weekDaysValue.getTextValue())); + } + } + + ArrayNode monthsArray = ((ArrayNode)scheduleValue.get("months")); + if (monthsArray != null) + { + for (JsonNode monthsValue : monthsArray) + { + scheduleInstance.getMonths().add(monthsValue.getIntValue()); + } + } + + ArrayNode monthDaysArray = ((ArrayNode)scheduleValue.get("monthDays")); + if (monthDaysArray != null) + { + for (JsonNode monthDaysValue : monthDaysArray) + { + scheduleInstance.getMonthDays().add(monthDaysValue.getIntValue()); + } + } + + ArrayNode monthlyOccurrencesArray = ((ArrayNode)scheduleValue.get("monthlyOccurrences")); + if (monthlyOccurrencesArray != null) + { + for (JsonNode monthlyOccurrencesValue : monthlyOccurrencesArray) + { + JobScheduleMonthlyOccurrence jobScheduleMonthlyOccurrenceInstance = new JobScheduleMonthlyOccurrence(); + scheduleInstance.getMonthlyOccurrences().add(jobScheduleMonthlyOccurrenceInstance); + + JsonNode dayValue = monthlyOccurrencesValue.get("day"); + if (dayValue != null) + { + JobScheduleDay dayInstance; + dayInstance = SchedulerClientImpl.parseJobScheduleDay(dayValue.getTextValue()); + jobScheduleMonthlyOccurrenceInstance.setDay(dayInstance); + } + + JsonNode occurrenceValue = monthlyOccurrencesValue.get("occurrence"); + if (occurrenceValue != null) + { + int occurrenceInstance; + occurrenceInstance = occurrenceValue.getIntValue(); + jobScheduleMonthlyOccurrenceInstance.setOccurrence(occurrenceInstance); + } + } + } + } + } + + JsonNode statusValue = jobsValue.get("status"); + if (statusValue != null) + { + JobStatus statusInstance = new JobStatus(); + jobInstance.setStatus(statusInstance); + + JsonNode lastExecutionTimeValue = statusValue.get("lastExecutionTime"); + if (lastExecutionTimeValue != null) + { + Calendar lastExecutionTimeInstance; + SimpleDateFormat simpleDateFormat3 = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy"); + Calendar calendar3 = Calendar.getInstance(); + calendar3.setTime(simpleDateFormat3.parse(lastExecutionTimeValue.getTextValue())); + lastExecutionTimeInstance = calendar3; + statusInstance.setLastExecutionTime(lastExecutionTimeInstance); + } + + JsonNode nextExecutionTimeValue = statusValue.get("nextExecutionTime"); + if (nextExecutionTimeValue != null) + { + Calendar nextExecutionTimeInstance; + SimpleDateFormat simpleDateFormat4 = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy"); + Calendar calendar4 = Calendar.getInstance(); + calendar4.setTime(simpleDateFormat4.parse(nextExecutionTimeValue.getTextValue())); + nextExecutionTimeInstance = calendar4; + statusInstance.setNextExecutionTime(nextExecutionTimeInstance); + } + + JsonNode executionCountValue = statusValue.get("executionCount"); + if (executionCountValue != null) + { + int executionCountInstance; + executionCountInstance = executionCountValue.getIntValue(); + statusInstance.setExecutionCount(executionCountInstance); + } + + JsonNode failureCountValue = statusValue.get("failureCount"); + if (failureCountValue != null) + { + int failureCountInstance; + failureCountInstance = failureCountValue.getIntValue(); + statusInstance.setFailureCount(failureCountInstance); + } + + JsonNode faultedCountValue = statusValue.get("faultedCount"); + if (faultedCountValue != null) + { + int faultedCountInstance; + faultedCountInstance = faultedCountValue.getIntValue(); + statusInstance.setFaultedCount(faultedCountInstance); + } + } + + JsonNode stateValue = jobsValue.get("state"); + if (stateValue != null) + { + JobState stateInstance; + stateInstance = SchedulerClientImpl.parseJobState(stateValue.getTextValue()); + jobInstance.setState(stateInstance); + } + } + } + + result.setStatusCode(statusCode); + if (httpResponse.getHeaders("x-ms-request-id").length > 0) + { + result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); + } + + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } + return result; + } + + /** + * Job collections can be updated through a simple PATCH operation. The + * format of the request is the same as that for creating a job, though if + * a field is unspecified we will carry forward the current value. + * + * @param parameters Parameters supplied to the Update Jobs State operation. + * @return The Update Jobs State operation response. + */ + @Override + public Future updateJobCollectionStateAsync(final JobCollectionJobsUpdateStateParameters parameters) + { + return this.getClient().getExecutorService().submit(new Callable() { @Override public JobCollectionJobsUpdateStateResponse call() throws Exception { @@ -3021,6 +3952,15 @@ public JobCollectionJobsUpdateStateResponse updateJobCollectionState(JobCollecti } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateJobCollectionStateAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/cloudservices/" + this.getClient().getCloudServiceName() + "/resources/" + "scheduler" + "/~/" + "JobCollections" + "/" + this.getClient().getJobCollectionName() + "/jobs"; @@ -3040,7 +3980,10 @@ public JobCollectionJobsUpdateStateResponse updateJobCollectionState(JobCollecti ObjectNode jobCollectionJobsUpdateStateParametersValue = objectMapper.createObjectNode(); requestDoc = jobCollectionJobsUpdateStateParametersValue; - jobCollectionJobsUpdateStateParametersValue.put("state", SchedulerClientImpl.jobStateToString(parameters.getState())); + if (parameters.getStateIsIncluded()) + { + jobCollectionJobsUpdateStateParametersValue.put("state", SchedulerClientImpl.jobStateToString(parameters.getState())); + } StringWriter stringWriter = new StringWriter(); objectMapper.writeValue(stringWriter, requestDoc); @@ -3051,11 +3994,23 @@ public JobCollectionJobsUpdateStateResponse updateJobCollectionState(JobCollecti // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromJson(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -3385,12 +4340,12 @@ public JobCollectionJobsUpdateStateResponse updateJobCollectionState(JobCollecti } } - ArrayNode daysArray = ((ArrayNode)scheduleValue.get("days")); - if (daysArray != null) + ArrayNode weekDaysArray = ((ArrayNode)scheduleValue.get("weekDays")); + if (weekDaysArray != null) { - for (JsonNode daysValue : daysArray) + for (JsonNode weekDaysValue : weekDaysArray) { - scheduleInstance.getDays().add(SchedulerClientImpl.parseJobScheduleDay(daysValue.getTextValue())); + scheduleInstance.getDays().add(SchedulerClientImpl.parseJobScheduleDay(weekDaysValue.getTextValue())); } } @@ -3509,6 +4464,10 @@ public JobCollectionJobsUpdateStateResponse updateJobCollectionState(JobCollecti result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } @@ -3556,6 +4515,16 @@ public JobUpdateStateResponse updateState(String jobId, JobUpdateStateParameters } // Tracing + boolean shouldTrace = CloudTracing.getIsEnabled(); + String invocationId = null; + if (shouldTrace) + { + invocationId = Long.toString(CloudTracing.getNextInvocationId()); + HashMap tracingParameters = new HashMap(); + tracingParameters.put("jobId", jobId); + tracingParameters.put("parameters", parameters); + CloudTracing.enter(invocationId, this, "updateStateAsync", tracingParameters); + } // Construct URL String url = this.getClient().getBaseUri() + this.getClient().getCredentials().getSubscriptionId() + "/cloudservices/" + this.getClient().getCloudServiceName() + "/resources/" + "scheduler" + "/~/" + "JobCollections" + "/" + this.getClient().getJobCollectionName() + "/jobs/" + jobId + "?api-version=" + "2013-10-31_Preview"; @@ -3591,11 +4560,23 @@ public JobUpdateStateResponse updateState(String jobId, JobUpdateStateParameters // Send Request HttpResponse httpResponse = null; + if (shouldTrace) + { + CloudTracing.sendRequest(invocationId, httpRequest); + } httpResponse = this.getClient().getHttpClient().execute(httpRequest); + if (shouldTrace) + { + CloudTracing.receiveResponse(invocationId, httpResponse); + } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (statusCode != 200) { ServiceException ex = ServiceException.createFromJson(httpRequest, requestContent, httpResponse, httpResponse.getEntity()); + if (shouldTrace) + { + CloudTracing.error(invocationId, ex); + } throw ex; } @@ -3922,12 +4903,12 @@ public JobUpdateStateResponse updateState(String jobId, JobUpdateStateParameters } } - ArrayNode daysArray = ((ArrayNode)scheduleValue.get("days")); - if (daysArray != null) + ArrayNode weekDaysArray = ((ArrayNode)scheduleValue.get("weekDays")); + if (weekDaysArray != null) { - for (JsonNode daysValue : daysArray) + for (JsonNode weekDaysValue : weekDaysArray) { - scheduleInstance.getDays().add(SchedulerClientImpl.parseJobScheduleDay(daysValue.getTextValue())); + scheduleInstance.getDays().add(SchedulerClientImpl.parseJobScheduleDay(weekDaysValue.getTextValue())); } } @@ -4045,6 +5026,10 @@ public JobUpdateStateResponse updateState(String jobId, JobUpdateStateParameters result.setRequestId(httpResponse.getFirstHeader("x-ms-request-id").getValue()); } + if (shouldTrace) + { + CloudTracing.exit(invocationId, result); + } return result; } } diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/SchedulerClient.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/SchedulerClient.java index aac2e4b2f1dd5..a881011cc582f 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/SchedulerClient.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/SchedulerClient.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,10 +23,11 @@ package com.microsoft.windowsazure.scheduler; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; +import com.microsoft.windowsazure.core.FilterableService; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; import java.net.URI; -public interface SchedulerClient +public interface SchedulerClient extends FilterableService { URI getBaseUri(); @@ -34,5 +37,5 @@ public interface SchedulerClient String getJobCollectionName(); - JobOperations getJobs(); + JobOperations getJobsOperations(); } diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/SchedulerClientImpl.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/SchedulerClientImpl.java index 3f0d8e43bbdd2..359dcec916108 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/SchedulerClientImpl.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/SchedulerClientImpl.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,19 +23,23 @@ package com.microsoft.windowsazure.scheduler; +import com.microsoft.windowsazure.core.ServiceClient; +import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; import com.microsoft.windowsazure.management.ManagementConfiguration; -import com.microsoft.windowsazure.management.SubscriptionCloudCredentials; import com.microsoft.windowsazure.scheduler.models.JobActionType; +import com.microsoft.windowsazure.scheduler.models.JobHistoryActionName; +import com.microsoft.windowsazure.scheduler.models.JobHistoryStatus; import com.microsoft.windowsazure.scheduler.models.JobRecurrenceFrequency; import com.microsoft.windowsazure.scheduler.models.JobScheduleDay; import com.microsoft.windowsazure.scheduler.models.JobState; import com.microsoft.windowsazure.scheduler.models.RetryType; -import com.microsoft.windowsazure.services.core.ServiceClient; import java.net.URI; +import java.util.concurrent.ExecutorService; import javax.inject.Inject; import javax.inject.Named; +import org.apache.http.impl.client.HttpClientBuilder; -public class SchedulerClientImpl extends ServiceClient implements SchedulerClient +public class SchedulerClientImpl extends ServiceClient implements SchedulerClient { private URI baseUri; @@ -53,25 +59,29 @@ public class SchedulerClientImpl extends ServiceClient impl private JobOperations jobs; - public JobOperations getJobs() { return this.jobs; } + public JobOperations getJobsOperations() { return this.jobs; } /** * Initializes a new instance of the SchedulerClientImpl class. * + * @param httpBuilder The HTTP client builder. + * @param executorService The executor service. */ - private SchedulerClientImpl() + private SchedulerClientImpl(HttpClientBuilder httpBuilder, ExecutorService executorService) { - super(); + super(httpBuilder, executorService); this.jobs = new JobOperationsImpl(this); } /** * Initializes a new instance of the SchedulerClientImpl class. * + * @param httpBuilder The HTTP client builder. + * @param executorService The executor service. */ - public SchedulerClientImpl(SubscriptionCloudCredentials credentials, String cloudServiceName, String jobCollectionName, URI baseUri) + public SchedulerClientImpl(HttpClientBuilder httpBuilder, ExecutorService executorService, SubscriptionCloudCredentials credentials, String cloudServiceName, String jobCollectionName, URI baseUri) { - this(); + this(httpBuilder, executorService); if (credentials == null) { throw new NullPointerException("credentials"); @@ -92,18 +102,19 @@ public SchedulerClientImpl(SubscriptionCloudCredentials credentials, String clou this.cloudServiceName = cloudServiceName; this.jobCollectionName = jobCollectionName; this.baseUri = baseUri; - - httpClient = credentials.initializeClient(); } /** * Initializes a new instance of the SchedulerClientImpl class. + * Initializes a new instance of the SchedulerClientImpl class. * + * @param httpBuilder The HTTP client builder. + * @param executorService The executor service. */ @Inject - public SchedulerClientImpl(@Named(ManagementConfiguration.SUBSCRIPTION_CLOUD_CREDENTIALS) SubscriptionCloudCredentials credentials, String cloudServiceName, String jobCollectionName) throws java.net.URISyntaxException + public SchedulerClientImpl(HttpClientBuilder httpBuilder, ExecutorService executorService, @Named(ManagementConfiguration.SUBSCRIPTION_CLOUD_CREDENTIALS) SubscriptionCloudCredentials credentials, String cloudServiceName, String jobCollectionName) throws java.net.URISyntaxException { - this(); + this(httpBuilder, executorService); if (credentials == null) { throw new NullPointerException("credentials"); @@ -120,8 +131,16 @@ public SchedulerClientImpl(@Named(ManagementConfiguration.SUBSCRIPTION_CLOUD_CRE this.cloudServiceName = cloudServiceName; this.jobCollectionName = jobCollectionName; this.baseUri = new URI("https://management.core.windows.net/"); - - httpClient = credentials.initializeClient(); + } + + /** + * + * @param httpBuilder The HTTP client builder. + * @param executorService The executor service. + */ + protected SchedulerClientImpl newInstance(HttpClientBuilder httpBuilder, ExecutorService executorService) + { + return new SchedulerClientImpl(httpBuilder, executorService, this.getCredentials(), this.getCloudServiceName(), this.getJobCollectionName(), this.getBaseUri()); } /** @@ -170,6 +189,82 @@ static String jobActionTypeToString(JobActionType value) throw new IllegalArgumentException("value"); } + /** + * Parse enum values for type JobHistoryActionName. + * + * @param value The value to parse. + * @return The enum value. + */ + static JobHistoryActionName parseJobHistoryActionName(String value) + { + if (value == "MainAction") + { + return JobHistoryActionName.MainAction; + } + if (value == "ErrorAction") + { + return JobHistoryActionName.ErrorAction; + } + throw new IllegalArgumentException("value"); + } + + /** + * Convert an enum of type JobHistoryActionName to a string. + * + * @param value The value to convert to a string. + * @return The enum value as a string. + */ + static String jobHistoryActionNameToString(JobHistoryActionName value) + { + if (value == JobHistoryActionName.MainAction) + { + return "MainAction"; + } + if (value == JobHistoryActionName.ErrorAction) + { + return "ErrorAction"; + } + throw new IllegalArgumentException("value"); + } + + /** + * Parse enum values for type JobHistoryStatus. + * + * @param value The value to parse. + * @return The enum value. + */ + static JobHistoryStatus parseJobHistoryStatus(String value) + { + if (value == "completed") + { + return JobHistoryStatus.Completed; + } + if (value == "failed") + { + return JobHistoryStatus.Failed; + } + throw new IllegalArgumentException("value"); + } + + /** + * Convert an enum of type JobHistoryStatus to a string. + * + * @param value The value to convert to a string. + * @return The enum value as a string. + */ + static String jobHistoryStatusToString(JobHistoryStatus value) + { + if (value == JobHistoryStatus.Completed) + { + return "completed"; + } + if (value == JobHistoryStatus.Failed) + { + return "failed"; + } + throw new IllegalArgumentException("value"); + } + /** * Parse enum values for type JobRecurrenceFrequency. * diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/SchedulerService.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/SchedulerService.java index 063de4d00443f..a0908a548fdf7 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/SchedulerService.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/SchedulerService.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.scheduler; -import com.microsoft.windowsazure.services.core.Configuration; +import com.microsoft.windowsazure.Configuration; /** * diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/Job.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/Job.java index fc7de3b71420c..2ef346abac1ee 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/Job.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/Job.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobAction.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobAction.java index 24799351d7c25..5af26fe8c90fd 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobAction.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobAction.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobActionType.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobActionType.java index 4cf1b9f6cd583..414ca520fbe61 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobActionType.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobActionType.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCollectionJobsUpdateStateParameters.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCollectionJobsUpdateStateParameters.java index 1de58b47661d1..eeb087c93e195 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCollectionJobsUpdateStateParameters.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCollectionJobsUpdateStateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -30,7 +32,15 @@ public class JobCollectionJobsUpdateStateParameters public JobState getState() { return this.state; } - public void setState(JobState state) { this.state = state; } + public void setState(JobState state) + { + this.stateIsIncluded = true; + this.state = state; + } + + private boolean stateIsIncluded; + + public boolean getStateIsIncluded() { return this.stateIsIncluded; } /** * Initializes a new instance of the JobCollectionJobsUpdateStateParameters diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCollectionJobsUpdateStateResponse.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCollectionJobsUpdateStateResponse.java index d7aac2c8b6c9f..9b3f3891b1489 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCollectionJobsUpdateStateResponse.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCollectionJobsUpdateStateResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.scheduler.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCreateOrUpdateParameters.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCreateOrUpdateParameters.java index ead5dc73f03ca..9348d81f4664f 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCreateOrUpdateParameters.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCreateOrUpdateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCreateOrUpdateResponse.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCreateOrUpdateResponse.java index 12a828ff54254..fc11edf51e7f3 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCreateOrUpdateResponse.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCreateOrUpdateResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.scheduler.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Update Job operation response. diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCreateParameters.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCreateParameters.java index a7c16e5bb27cf..44603d268e7b9 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCreateParameters.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCreateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCreateResponse.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCreateResponse.java index 2d0be66298309..96ba01f2bd890 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCreateResponse.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobCreateResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.scheduler.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Create Job operation response. diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobErrorAction.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobErrorAction.java index 62bbb47de5e58..e41477159f925 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobErrorAction.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobErrorAction.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobGetHistoryParameters.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobGetHistoryParameters.java index 19441efb96c7a..07980014357a0 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobGetHistoryParameters.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobGetHistoryParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -26,49 +28,33 @@ */ public class JobGetHistoryParameters { - private Integer skip; - - /** - * By default the top 100 history entries will be returned in a call to GET - * job history. A maximum of 1000 history entries can be returned in any - * call. To get history entries beyond 1000 entries use $skip. - */ - public Integer getSkip() { return this.skip; } - - /** - * By default the top 100 history entries will be returned in a call to GET - * job history. A maximum of 1000 history entries can be returned in any - * call. To get history entries beyond 1000 entries use $skip. - */ - public void setSkip(Integer skip) { this.skip = skip; } - - private JobState state; + private int skip; /** - * Filter the job history to have it only return job histories of a - * particular state. + * Specify the (0-based) index of the history list from which to begin + * requesting entries. */ - public JobState getState() { return this.state; } + public int getSkip() { return this.skip; } /** - * Filter the job history to have it only return job histories of a - * particular state. + * Specify the (0-based) index of the history list from which to begin + * requesting entries. */ - public void setState(JobState state) { this.state = state; } + public void setSkip(int skip) { this.skip = skip; } - private Integer top; + private int top; /** - * To receive more or less than the default number of entries in a call then - * use the $top OData operation. + * Specify the number of history entries to request, in the of range + * [1..100]. */ - public Integer getTop() { return this.top; } + public int getTop() { return this.top; } /** - * To receive more or less than the default number of entries in a call then - * use the $top OData operation. + * Specify the number of history entries to request, in the of range + * [1..100]. */ - public void setTop(Integer top) { this.top = top; } + public void setTop(int top) { this.top = top; } /** * Initializes a new instance of the JobGetHistoryParameters class. diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobGetHistoryResponse.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobGetHistoryResponse.java index eeea0cfeb8fb5..57b5d0c5d5f87 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobGetHistoryResponse.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobGetHistoryResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.scheduler.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Calendar; import java.util.Iterator; @@ -61,48 +63,141 @@ public Iterator iterator() return this.getJobHistory().iterator(); } + /** + * A job history entry. + */ public static class JobHistoryEntry { + private JobHistoryActionName actionName; + + /** + * The action of this execution, MainAction or ErrorAction. + */ + public JobHistoryActionName getActionName() { return this.actionName; } + + /** + * The action of this execution, MainAction or ErrorAction. + */ + public void setActionName(JobHistoryActionName actionName) { this.actionName = actionName; } + private Calendar endTime; + /** + * The time the execution attempt concluded. + */ public Calendar getEndTime() { return this.endTime; } + /** + * The time the execution attempt concluded. + */ public void setEndTime(Calendar endTime) { this.endTime = endTime; } private String id; + /** + * The job id that this history entry is for. + */ public String getId() { return this.id; } + /** + * The job id that this history entry is for. + */ public void setId(String id) { this.id = id; } private String message; + /** + * A description of the result of the execution attempt. + */ public String getMessage() { return this.message; } + /** + * A description of the result of the execution attempt. + */ public void setMessage(String message) { this.message = message; } private int recordNumber; + /** + * The zero-based index of the history entry. + */ public int getRecordNumber() { return this.recordNumber; } + /** + * The zero-based index of the history entry. + */ public void setRecordNumber(int recordNumber) { this.recordNumber = recordNumber; } + private int repeatCount; + + /** + * The occurrence count of this execution. + */ + public int getRepeatCount() { return this.repeatCount; } + + /** + * The occurrence count of this execution. + */ + public void setRepeatCount(int repeatCount) { this.repeatCount = repeatCount; } + + private int retryCount; + + /** + * The retry count of this occurrence. + */ + public int getRetryCount() { return this.retryCount; } + + /** + * The retry count of this occurrence. + */ + public void setRetryCount(int retryCount) { this.retryCount = retryCount; } + private Calendar startTime; + /** + * The time the execution attempt began. + */ public Calendar getStartTime() { return this.startTime; } + /** + * The time the execution attempt began. + */ public void setStartTime(Calendar startTime) { this.startTime = startTime; } private JobState state; + /** + * The state of the job: enabled, disabled, faulted, or completed. + */ public JobState getState() { return this.state; } + /** + * The state of the job: enabled, disabled, faulted, or completed. + */ public void setState(JobState state) { this.state = state; } + private JobHistoryStatus status; + + /** + * The status of this execution attempt, completed or failed. + */ + public JobHistoryStatus getStatus() { return this.status; } + + /** + * The status of this execution attempt, completed or failed. + */ + public void setStatus(JobHistoryStatus status) { this.status = status; } + private Calendar timestamp; + /** + * The time the execution attempt began. + */ public Calendar getTimestamp() { return this.timestamp; } + /** + * The time the execution attempt began. + */ public void setTimestamp(Calendar timestamp) { this.timestamp = timestamp; } /** diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobGetHistoryWithFilterParameters.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobGetHistoryWithFilterParameters.java new file mode 100644 index 0000000000000..3c3b874284174 --- /dev/null +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobGetHistoryWithFilterParameters.java @@ -0,0 +1,52 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.scheduler.models; + +/** +* Parameters supplied to the Get Job History With Filter operation. +*/ +public class JobGetHistoryWithFilterParameters extends JobGetHistoryParameters +{ + private JobHistoryStatus status; + + /** + * Filter the job history to have it only return job execution attempts + * having a particular Status, 'completed' or 'failed'. + */ + public JobHistoryStatus getStatus() { return this.status; } + + /** + * Filter the job history to have it only return job execution attempts + * having a particular Status, 'completed' or 'failed'. + */ + public void setStatus(JobHistoryStatus status) { this.status = status; } + + /** + * Initializes a new instance of the JobGetHistoryWithFilterParameters class. + * + */ + public JobGetHistoryWithFilterParameters() + { + } +} diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobGetResponse.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobGetResponse.java index 11e0cd49dbd96..e850511c253bf 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobGetResponse.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobGetResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.scheduler.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Get Job operation response. diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobHistoryActionName.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobHistoryActionName.java new file mode 100644 index 0000000000000..2f972d4898cd1 --- /dev/null +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobHistoryActionName.java @@ -0,0 +1,40 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.scheduler.models; + +/** +* The action of this execution, MainAction or ErrorAction. +*/ +public enum JobHistoryActionName +{ + /** + * An execution attempt of the primary action. + */ + MainAction, + + /** + * An execution attempt of the error action. + */ + ErrorAction, +} diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobHistoryStatus.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobHistoryStatus.java new file mode 100644 index 0000000000000..4b02ada888b8d --- /dev/null +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobHistoryStatus.java @@ -0,0 +1,40 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.scheduler.models; + +/** +* The status of this execution attempt, completed or failed. +*/ +public enum JobHistoryStatus +{ + /** + * A completed execution attempt. + */ + Completed, + + /** + * A failed execution attempt. + */ + Failed, +} diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobHttpRequest.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobHttpRequest.java index fda7e0c466f59..ddb839d14d7ac 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobHttpRequest.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobHttpRequest.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobListParameters.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobListParameters.java index 706dbcd242976..89b2f8ca5db6b 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobListParameters.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobListParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -29,44 +31,26 @@ public class JobListParameters private Integer skip; /** - * By default the top 1000 jobs will be returned in a call to GET jobs. A - * maximum of 1000 jobs can be returned in any call. To get jobs beyond - * 1000 entries use $skip. + * Specify the (0-based) index of the job list from which to begin + * requesting entries. */ public Integer getSkip() { return this.skip; } /** - * By default the top 1000 jobs will be returned in a call to GET jobs. A - * maximum of 1000 jobs can be returned in any call. To get jobs beyond - * 1000 entries use $skip. + * Specify the (0-based) index of the job list from which to begin + * requesting entries. */ public void setSkip(Integer skip) { this.skip = skip; } - private JobState state; - - /** - * To filter the jobs to have it only return jobs of a particular state use - * the $filter OData operation with the ‘state’ keyword. - */ - public JobState getState() { return this.state; } - - /** - * To filter the jobs to have it only return jobs of a particular state use - * the $filter OData operation with the ‘state’ keyword. - */ - public void setState(JobState state) { this.state = state; } - private Integer top; /** - * To receive more or less than the default number of jobs in a call then - * use the $top OData operation. + * Specify the number of jobs to request, in the of range [1..100]. */ public Integer getTop() { return this.top; } /** - * To receive more or less than the default number of jobs in a call then - * use the $top OData operation. + * Specify the number of jobs to request, in the of range [1..100]. */ public void setTop(Integer top) { this.top = top; } diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobListResponse.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobListResponse.java index 4f2178febe004..b297a5c19cb60 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobListResponse.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobListResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.scheduler.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; import java.util.ArrayList; import java.util.Iterator; diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobListWithFilterParameters.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobListWithFilterParameters.java new file mode 100644 index 0000000000000..b687b5903a36a --- /dev/null +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobListWithFilterParameters.java @@ -0,0 +1,52 @@ +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +package com.microsoft.windowsazure.scheduler.models; + +/** +* Parameters supplied to the List Jobs with filter operation. +*/ +public class JobListWithFilterParameters extends JobListParameters +{ + private JobState state; + + /** + * Filter the job history to have it only return job execution attempts + * having a particular State, enabled, disabled, faulted, or completed. + */ + public JobState getState() { return this.state; } + + /** + * Filter the job history to have it only return job execution attempts + * having a particular State, enabled, disabled, faulted, or completed. + */ + public void setState(JobState state) { this.state = state; } + + /** + * Initializes a new instance of the JobListWithFilterParameters class. + * + */ + public JobListWithFilterParameters() + { + } +} diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobQueueMessage.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobQueueMessage.java index 0b778b4d0f455..a22aa35816ebc 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobQueueMessage.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobQueueMessage.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobRecurrence.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobRecurrence.java index bd7293ca7ad4d..e970da879f907 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobRecurrence.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobRecurrence.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobRecurrenceFrequency.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobRecurrenceFrequency.java index 3ca0bbf8767de..04998efbed5f4 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobRecurrenceFrequency.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobRecurrenceFrequency.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobRecurrenceSchedule.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobRecurrenceSchedule.java index e61a48350ba95..41f25510dc6e7 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobRecurrenceSchedule.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobRecurrenceSchedule.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobScheduleDay.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobScheduleDay.java index 02175288fca21..2a6ff4fba06a2 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobScheduleDay.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobScheduleDay.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobScheduleMonthlyOccurrence.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobScheduleMonthlyOccurrence.java index 4c3b066f67a8f..d1c95de994658 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobScheduleMonthlyOccurrence.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobScheduleMonthlyOccurrence.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobState.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobState.java index 946229c0de08c..feaccf4bfd68b 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobState.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobState.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobStatus.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobStatus.java index a7a5320a0c39e..650df52408799 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobStatus.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobStatus.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobUpdateStateParameters.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobUpdateStateParameters.java index 991c878bfdfba..e731c727164d6 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobUpdateStateParameters.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobUpdateStateParameters.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobUpdateStateResponse.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobUpdateStateResponse.java index 8a8f41e918ecf..ee706beadd28d 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobUpdateStateResponse.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/JobUpdateStateResponse.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.scheduler.models; -import com.microsoft.windowsazure.management.OperationResponse; +import com.microsoft.windowsazure.core.OperationResponse; /** * The Update Job State operation response. diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/RetryPolicy.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/RetryPolicy.java index dbaa4b152d05b..eef6f0163c870 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/RetryPolicy.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/RetryPolicy.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // @@ -21,7 +23,7 @@ package com.microsoft.windowsazure.scheduler.models; -import java.util.Calendar; +import javax.xml.datatype.Duration; /** * Retry Policy for the job action. @@ -40,17 +42,17 @@ public class RetryPolicy */ public void setRetryCount(Integer retryCount) { this.retryCount = retryCount; } - private Calendar retryInterval; + private Duration retryInterval; /** * The interval between retries. */ - public Calendar getRetryInterval() { return this.retryInterval; } + public Duration getRetryInterval() { return this.retryInterval; } /** * The interval between retries. */ - public void setRetryInterval(Calendar retryInterval) { this.retryInterval = retryInterval; } + public void setRetryInterval(Duration retryInterval) { this.retryInterval = retryInterval; } private RetryType retryType; diff --git a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/RetryType.java b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/RetryType.java index cca93221eecfd..9f45f39b66692 100644 --- a/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/RetryType.java +++ b/scheduler/src/main/java/com/microsoft/windowsazure/scheduler/models/RetryType.java @@ -1,18 +1,20 @@ -// -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// +/** + * + * Copyright (c) Microsoft and contributors. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // Warning: This code was generated by a tool. // diff --git a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/Exports.java b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/Exports.java index 44c683ad083fb..62074981f0e16 100644 --- a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/Exports.java +++ b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/Exports.java @@ -14,10 +14,10 @@ */ package com.microsoft.windowsazure.services.serviceBus; +import com.microsoft.windowsazure.core.Builder; import com.microsoft.windowsazure.core.UserAgentFilter; import java.util.Map; -import com.microsoft.windowsazure.services.core.Builder; import com.microsoft.windowsazure.services.serviceBus.implementation.BrokerPropertiesMapper; import com.microsoft.windowsazure.services.serviceBus.implementation.EntryModelProvider; import com.microsoft.windowsazure.services.serviceBus.implementation.MarshallerProvider; diff --git a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/ServiceBusContract.java b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/ServiceBusContract.java index e19e8b3c33a5d..ca514897d7a16 100644 --- a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/ServiceBusContract.java +++ b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/ServiceBusContract.java @@ -15,7 +15,7 @@ package com.microsoft.windowsazure.services.serviceBus; import com.microsoft.windowsazure.core.pipeline.jersey.JerseyFilterableService; -import com.microsoft.windowsazure.services.core.ServiceException; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.services.serviceBus.models.BrokeredMessage; import com.microsoft.windowsazure.services.serviceBus.models.CreateQueueResult; import com.microsoft.windowsazure.services.serviceBus.models.CreateRuleResult; diff --git a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/Util.java b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/Util.java index 128e23fe2f506..5a9b40558cab3 100644 --- a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/Util.java +++ b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/Util.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.services.serviceBus; -import com.microsoft.windowsazure.services.core.ServiceException; +import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.services.serviceBus.models.QueueInfo; import com.microsoft.windowsazure.services.serviceBus.models.TopicInfo; diff --git a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/Exports.java b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/Exports.java index e5a2629fa9c7c..5fa039978999f 100644 --- a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/Exports.java +++ b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/Exports.java @@ -14,15 +14,13 @@ */ package com.microsoft.windowsazure.services.serviceBus.implementation; -import static com.microsoft.windowsazure.services.core.utils.ExportUtils.*; - +import com.microsoft.windowsazure.core.Builder; +import com.microsoft.windowsazure.core.utils.ConnectionStringSyntaxException; +import static com.microsoft.windowsazure.core.utils.ExportUtils.getPropertyIfExists; +import com.microsoft.windowsazure.services.serviceBus.ServiceBusConfiguration; import java.net.URISyntaxException; import java.util.Map; -import com.microsoft.windowsazure.services.core.Builder; -import com.microsoft.windowsazure.services.core.utils.ConnectionStringSyntaxException; -import com.microsoft.windowsazure.services.serviceBus.ServiceBusConfiguration; - public class Exports implements Builder.Exports { @Override diff --git a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/ServiceBusConnectionSettings.java b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/ServiceBusConnectionSettings.java index 20bd238789b9e..cb21a0e9a28a6 100644 --- a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/ServiceBusConnectionSettings.java +++ b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/ServiceBusConnectionSettings.java @@ -15,11 +15,10 @@ package com.microsoft.windowsazure.services.serviceBus.implementation; +import com.microsoft.windowsazure.core.utils.ConnectionStringSyntaxException; import java.net.URI; import java.net.URISyntaxException; -import com.microsoft.windowsazure.services.core.utils.ConnectionStringSyntaxException; - /** * Class that encapsulates all the various settings needed * to connect to Service Bus, provided via either a diff --git a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/ServiceBusConnectionString.java b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/ServiceBusConnectionString.java index ee63db4ccaf8a..b6b212352510d 100644 --- a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/ServiceBusConnectionString.java +++ b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/ServiceBusConnectionString.java @@ -15,8 +15,8 @@ package com.microsoft.windowsazure.services.serviceBus.implementation; -import com.microsoft.windowsazure.services.core.utils.ConnectionStringSyntaxException; -import com.microsoft.windowsazure.services.core.utils.ParsedConnectionString; +import com.microsoft.windowsazure.core.utils.ConnectionStringSyntaxException; +import com.microsoft.windowsazure.core.utils.ParsedConnectionString; /** * Class that parses the fields present in a service bus connection string. diff --git a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/ServiceBusExceptionProcessor.java b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/ServiceBusExceptionProcessor.java index 060edabaa3f06..d0a97b570205c 100644 --- a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/ServiceBusExceptionProcessor.java +++ b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/ServiceBusExceptionProcessor.java @@ -14,17 +14,17 @@ */ package com.microsoft.windowsazure.services.serviceBus.implementation; -import com.microsoft.windowsazure.core.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.filter.ServiceResponseFilter; +import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; +import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; +import com.microsoft.windowsazure.exception.ServiceException; +import com.microsoft.windowsazure.exception.ServiceExceptionFactory; import javax.inject.Inject; import javax.ws.rs.WebApplicationException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.utils.ServiceExceptionFactory; import com.microsoft.windowsazure.services.serviceBus.ServiceBusContract; import com.microsoft.windowsazure.services.serviceBus.models.BrokeredMessage; import com.microsoft.windowsazure.services.serviceBus.models.CreateQueueResult; diff --git a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/ServiceBusRestProxy.java b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/ServiceBusRestProxy.java index 865ec0dba568d..1d611557c5456 100644 --- a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/ServiceBusRestProxy.java +++ b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/ServiceBusRestProxy.java @@ -15,13 +15,14 @@ package com.microsoft.windowsazure.services.serviceBus.implementation; import com.microsoft.windowsazure.core.UserAgentFilter; -import com.microsoft.windowsazure.core.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.filter.ServiceResponseFilter; import com.microsoft.windowsazure.core.pipeline.PipelineHelpers; +import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; +import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterAdapter; import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterRequestAdapter; import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterResponseAdapter; import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; +import com.microsoft.windowsazure.exception.ServiceException; import java.io.InputStream; import java.text.ParseException; import java.util.ArrayList; @@ -34,7 +35,6 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import com.microsoft.windowsazure.services.core.ServiceException; import com.microsoft.windowsazure.services.serviceBus.ServiceBusContract; import com.microsoft.windowsazure.services.serviceBus.models.AbstractListOptions; import com.microsoft.windowsazure.services.serviceBus.models.BrokeredMessage; diff --git a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapContract.java b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapContract.java index 2e8389774679d..dc0d26e3a5879 100644 --- a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapContract.java +++ b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapContract.java @@ -14,7 +14,7 @@ */ package com.microsoft.windowsazure.services.serviceBus.implementation; -import com.microsoft.windowsazure.services.core.ServiceException; +import com.microsoft.windowsazure.exception.ServiceException; public interface WrapContract { WrapAccessTokenResult wrapAccessToken(String uri, String name, String password, String scope) diff --git a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapFilter.java b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapFilter.java index f1d0187a6b21c..f76be97e3dc6c 100644 --- a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapFilter.java +++ b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapFilter.java @@ -14,10 +14,10 @@ */ package com.microsoft.windowsazure.services.serviceBus.implementation; +import com.microsoft.windowsazure.exception.ServiceException; import java.net.URI; import java.net.URISyntaxException; -import com.microsoft.windowsazure.services.core.ServiceException; import com.sun.jersey.api.client.ClientHandlerException; import com.sun.jersey.api.client.ClientRequest; import com.sun.jersey.api.client.ClientResponse; diff --git a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapRestProxy.java b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapRestProxy.java index 577a909b28525..da35c60dedaae 100644 --- a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapRestProxy.java +++ b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapRestProxy.java @@ -16,14 +16,14 @@ import com.microsoft.windowsazure.core.UserAgentFilter; import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterRequestAdapter; +import com.microsoft.windowsazure.exception.ServiceException; +import com.microsoft.windowsazure.exception.ServiceExceptionFactory; import javax.inject.Inject; import javax.ws.rs.core.MediaType; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.utils.ServiceExceptionFactory; import com.sun.jersey.api.client.Client; import com.sun.jersey.api.client.UniformInterfaceException; import com.sun.jersey.api.representation.Form; diff --git a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapTokenManager.java b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapTokenManager.java index 5255b4ec25cd8..0071c03c819e2 100644 --- a/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapTokenManager.java +++ b/serviceBus/src/main/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapTokenManager.java @@ -14,6 +14,8 @@ */ package com.microsoft.windowsazure.services.serviceBus.implementation; +import com.microsoft.windowsazure.core.utils.DateFactory; +import com.microsoft.windowsazure.exception.ServiceException; import java.net.URI; import java.net.URISyntaxException; import java.util.Date; @@ -25,9 +27,6 @@ import javax.inject.Inject; import javax.management.timer.Timer; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.utils.DateFactory; - public class WrapTokenManager { WrapContract contract; diff --git a/serviceBus/src/test/java/com/microsoft/windowsazure/services/serviceBus/IntegrationTestBase.java b/serviceBus/src/test/java/com/microsoft/windowsazure/services/serviceBus/IntegrationTestBase.java index 0e19df51ee321..c108db75ada1a 100644 --- a/serviceBus/src/test/java/com/microsoft/windowsazure/services/serviceBus/IntegrationTestBase.java +++ b/serviceBus/src/test/java/com/microsoft/windowsazure/services/serviceBus/IntegrationTestBase.java @@ -15,13 +15,13 @@ package com.microsoft.windowsazure.services.serviceBus; import com.microsoft.windowsazure.Configuration; +import com.microsoft.windowsazure.exception.ServiceException; import static com.microsoft.windowsazure.services.serviceBus.Util.*; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; -import com.microsoft.windowsazure.services.core.ServiceException; import com.microsoft.windowsazure.services.serviceBus.models.QueueInfo; import com.microsoft.windowsazure.services.serviceBus.models.ReceiveMessageOptions; import com.microsoft.windowsazure.services.serviceBus.models.TopicInfo; diff --git a/serviceBus/src/test/java/com/microsoft/windowsazure/services/serviceBus/ServiceBusIntegrationTest.java b/serviceBus/src/test/java/com/microsoft/windowsazure/services/serviceBus/ServiceBusIntegrationTest.java index 6fbbf2d854e43..7a804dc5db7d9 100644 --- a/serviceBus/src/test/java/com/microsoft/windowsazure/services/serviceBus/ServiceBusIntegrationTest.java +++ b/serviceBus/src/test/java/com/microsoft/windowsazure/services/serviceBus/ServiceBusIntegrationTest.java @@ -15,10 +15,14 @@ package com.microsoft.windowsazure.services.serviceBus; import com.microsoft.windowsazure.Configuration; -import com.microsoft.windowsazure.core.filter.ServiceRequestContext; -import com.microsoft.windowsazure.core.filter.ServiceResponseContext; +import com.microsoft.windowsazure.core.Builder; +import com.microsoft.windowsazure.core.Builder.Alteration; +import com.microsoft.windowsazure.core.Builder.Registry; +import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestContext; +import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseContext; import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter.Next; +import com.microsoft.windowsazure.exception.ServiceException; import static org.junit.Assert.*; import java.util.ArrayList; @@ -30,10 +34,6 @@ import org.junit.Before; import org.junit.Test; -import com.microsoft.windowsazure.services.core.Builder; -import com.microsoft.windowsazure.services.core.Builder.Alteration; -import com.microsoft.windowsazure.services.core.Builder.Registry; -import com.microsoft.windowsazure.services.core.ServiceException; import com.microsoft.windowsazure.services.serviceBus.implementation.CorrelationFilter; import com.microsoft.windowsazure.services.serviceBus.implementation.EmptyRuleAction; import com.microsoft.windowsazure.services.serviceBus.implementation.EntityStatus; diff --git a/serviceBus/src/test/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapTokenManagerTest.java b/serviceBus/src/test/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapTokenManagerTest.java index 5fb85b33358ed..1ca39f978c14f 100644 --- a/serviceBus/src/test/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapTokenManagerTest.java +++ b/serviceBus/src/test/java/com/microsoft/windowsazure/services/serviceBus/implementation/WrapTokenManagerTest.java @@ -14,6 +14,8 @@ */ package com.microsoft.windowsazure.services.serviceBus.implementation; +import com.microsoft.windowsazure.core.utils.DateFactory; +import com.microsoft.windowsazure.exception.ServiceException; import static org.junit.Assert.*; import static org.mockito.Mockito.*; @@ -28,9 +30,6 @@ import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -import com.microsoft.windowsazure.services.core.ServiceException; -import com.microsoft.windowsazure.services.core.utils.DateFactory; - public class WrapTokenManagerTest { private WrapContract contract; private WrapTokenManager client;